#include <solver2.h>
Inheritance diagram for Solver2< FirstProp, SecondProp, FirstPropAlt, SecondPropAlt >:

Public Member Functions | |
| Solver2 (const bool debug=false) | |
| int | whichRegion (const FirstProp &fp, const SecondProp &sp) |
| Calculator the IAPWS-IF97 region number given (any combination of) property values. | |
| SteamCalculator | solve (const FirstProp &fp, const SecondProp &sp) |
| Solve with no first guess provided. | |
| SteamCalculator | solve (const FirstProp &fp, const SecondProp &sp, const SteamCalculator &firstguess) |
| Solve with a first guess provided. | |
This is intended to be a general purpose way of defining steam state in terms of any combination of properties, eg to find the pressure at which rho = 1.1 kg/m3 and u = 2500 kJ/kg, use:
Solver2<Density,SpecificEnergy> SS; SteamCalculator S = SS.solve(1.1 * kg_m3, 2500.0 * kJ_kg); cerr << S->pres() << endl;
Likewise, even with one of the properties being a correlation property, just use
Solver2<Temperature,SpecificEnergy> SS; SteamCalculator S = SS.solve(450.0 * Kelvin, 2500.0 * kJ_kg); cerr << S->pres() << endl;
Or even,
Solver2<Temperature,Pressure> SS; SteamCalculator S = SS.solve(450.0 * Kelvin, 10.0 * bar); cerr << S->dens() << endl;
|
||||||||||||||||||||
|
Solve with a first guess provided. If you already have steam properties very close to your expected point, you can use this method. Note that it will not use the 'make guess' (eg Solver2::makeRegion1Guess etc) methods, so if you have faster methods like that, it may be better not to provide a first guess for Solver2 iterations.
|
|
||||||||||||||||
|
Solve with no first guess provided. This will called the appropriate 'make guess' method, based on the results of the whichRegion call, and then perform iteration in that region (using the appropriate 'solve region x' method) to home in on the solution using a two-way solver method.
Implements Solver2Base< FirstProp, SecondProp, FirstPropAlt, SecondPropAlt >.
|
|
||||||||||||||||
|
Calculator the IAPWS-IF97 region number given (any combination of) property values. Used in the same way as Solver2::solve but the solution is not done, only the region is found.
Solver2<SpecificEnergy,SpecificVolume> SS; cerr << SS.whichRegion(1500. * kJ_kg, 0.02 * m3_kg); Implements Solver2Base< FirstProp, SecondProp, FirstPropAlt, SecondPropAlt >.
|
1.3.8