cparedis/OpenHydraulics — pull request #10 by harmanpa (2013-03-08 12:23:31+00:00)
Title: Bugs in GenericOil, use of Streams.print() vs assert(), real-equality-with-0

GenericOil references a type, Density, and a variable, T, neither of which is defined. Density is presumably SI.Density, T should be Toperating as this is done in dynamicViscosity()? (Though I'm not sure if a function should access a parameter in the enclosing scope).

ConstVolumeSource contains an if-equation that compares a Real parameter q with 0, however since the right-hand-side of the resulting equation is multiplied by q the same effect can be achieved by forcing q to be evaluated.

assert(...,...,AssertionLevel.warning) can now be used in place of issuing warnings via Streams.print() giving tool-dependent handling of warnings, this is used in FluidPower2MechTrans and DoubleActingCylinder.