Solve

It calculates the root of F(Tmd1,Tmd2) - FF = 0 where Tmd's are available thermodynamic properties, F is any of the available methods for thermodynamic property calculations (see Table of available Thermodynamic and Transport Properties) and FF is a desired value for the property F.

 

The general syntax for programs like Excel and programming languages like Fortran is:

Root = Solve( FluidObj, FuncSpec, FuncVal, InputSpec, Target, FixedVal, MinVal, MaxVal, ErrorMsg)

The syntax for object oriented programming languages like VB, C++ and Matlab is:

Root = FluidObj.Solve( FuncSpec, FuncVal, InputSpec, Target, FixedVal, MinVal, MaxVal, ErrorMsg)

 

Arguments:

FluidObj:

In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable created at runtime.

FuncSpec:

 String, function specification ("Pressure", "Temperature",...), i.e. F in F(Tmd1,Tmd2) - FF = 0

FuncVal:

Double, desired value of the function F, i.e. FF in F(Tmd1,Tmd2) - FF = 0

InputSpec:

String

Target:

Integer, indicates which is the running variable, i.e. Target = 1 for Tmd1 or Target = 2 for Tmd2

FixedVal:

Double, fixed Value, i.e. Tmd1 (Target = 2) or Tmd2 (Target = 1)

MinVal:

Lower boundary for the running variable

MaxVal:

Upper boundary for the running variable

ErrorMsg:

String

 

Excel Example to find T for which Gamma(T,v) - G = 0 at fixed v:

 

T = Solve( A1,"Gamma",1.008,"Tv",1,0.3723,0,200)

 

Notes: A1 is a cell containing the value returned by SetFluid.

The error message is not in the arguments list; in case an error occurs during the calculation, the value returned by the function is a string containing the error description.

The possible input specifications are listed in the table of available Thermodynamic State definitions.