Hi,

I apologize if I am asking too many somewhat basic questions, as I would
still consider myself new to using mathematical software to this degree.

I wish to use units in my nonlinear coupled system. So far, I have gotten
the units to work in all my algebraic calculations; however, when I try
solving, FiPy claims it cannot sweep with units, because it can't convert
to "floats." The exact error is the following:

TypeError, Not possible to convert a PhysicalField with dimension to float



One of the equations in the system is as such, with density and diffusivity
having units of m^-3 and m^2/s, respectively.

density.equation = TransientTerm(coeff=1.0, var=density)\
> == DiffusionTerm(coeff=Diffusivity, var=density)


If I tack on ".numericValue" on to the end of the coefficient terms, a
different error is raised. It is also important to note that my system is 1
dimensional and without any use of tensors.

IndexError: diffusion coefficient tensor is not an appropriate shape for
> this mesh


Do I need to fully-remove any form of units in both the coefficient and/or
the var of the Transient/Diffusion terms before sweeping?


Thanks,
Kevin
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to