/home/john/freesteam/solver.h

Single-property steam solver This class will solve for (temperature or pressure) plus another steam property, by varying (pressure or temperature) until the desired value of the other steam property is found.

To find p such that (T=600K, u=1500 kJ/kg):

        Solver<Temperature,SpecificEnergy,Pressure,0,SOLVE_ENERGY> PS1(600 * Kelvin,1500 * kJ_kg);
        SteamCalculator S = PS1.solve(0.00001 * kJ_kg, 0.1 * Pascal);
        cout << S.pres() << end;

Note that dimensionally some properties are equivalent, for example specific internal energy and specific enthalpy. In these cases you need to use the OtherPropAlt template parameter to specify which one you want. Values of this parameter are defined in common.h, such as SOLVE_ENTHALPY and SOLVE_IENERGY, etc.

Parameters:
MainProp is the one of the correlation properties. In other words it can be fed directly into the known correlation equations.
OtherProp is the quantity to be solved for. In other words it is not correlated for and must be solved for by varying VaryProp.
VaryProp is the quantity which will be varied to in order to home in on the desired value of OtherProp.
OtherPropAlt is the 'alt code' for the other (target) property. You will need to set it to SOLVE_ENTHALPY, SOLVE_ENTROPY, etc, becuase dimensional equivalence means that this C++ template can't distinguish between SpecificEnergy and SpecificEnthalpy (as far as the Units<...> class goes, these are the same thing).

Generated on Tue Feb 10 18:37:36 2009 for freesteam by  doxygen 1.5.6