Open GoogleCodeExporter opened 9 years ago
I don't think that integration of a units package into cantera is necessary, as
units are as far as I am aware consistent within cantera, and documentation of
units (at least of r2710) is available through python's help function
(generated from the original .pyx files in
<cantera-src>/interfaces/cython/cantera).
Original comment by ischo...@gmail.com
on 30 Jan 2014 at 4:03
You're right, it is pretty nice that cantera is unit-consistent (and SI). The
documentation of the units is also pretty good, although a little cumbersome
(like gas.viscosity? does not give you any useful help, but you have to find
your way to cantera.transport.viscosity? - or am I doing something cumbersome
myself here?)
The advantage of using a units-package would be that the user is forced to
enter the right units, and can easily convert it to other units.
This is surely not an essential feature and also possibly annoying for some
people. It's just an idea.
Original comment by thetruet...@googlemail.com
on 30 Jan 2014 at 5:27
I wouldn't be opposed to providing a set of wrapped classes that worked with
dimensioned values, but I think the main Cantera classes should remain as is.
It would probably even be possible to generate the classes somewhat
programatically.
As far accessing the documentation in IPython goes, this is unfortately what
always happens when using properties. That is, you get the docstring for
whatever "gas.viscosity" returns, in this case a float, rather than the
docstring for the property. The other option besides using
"Solution.viscosity?" is to do "gas.__class__.viscosity?" which is also
somewhat cumbersome, but doesn't require you to know the type of the underlying
object.
Original comment by yarmond
on 31 Jan 2014 at 3:59
Original issue reported on code.google.com by
thetruet...@googlemail.com
on 29 Jan 2014 at 9:58