EBSILON®Professional Online Documentation
EbsScript / EbsScript Interface Units / InterfaceUnit-Fluid
In This Topic
    InterfaceUnit-Fluid
    In This Topic

    InterfaceUnit-Fluid


    These functions are used to edit the material composition of fluids. To use these functions, the unit "Fluid" has to be included. In this unit, there are the definitions of the data types that are used in these functions.

    uses @Fluid;

    The definitions are displayed via the menu command "EbsScript" -> "Open Interface Unit" -> "Fluid". There is no implementation of these functions is in this unit, because they are implemented internally within EBSILON®Professional..

     

    Note: PHASE (P,H) : Determination of phase from pressure and enthalpy:  0: no phase calculated
                                                                                                                              1: for liquid phase (in the one-phase region
                                                                                                                              2: for gaseous phase (in the one-phase region)
                                                                                                                              3: in the two-phase region liquid/gaseous
                                                                                                                              4: for solid phase
                                                                                                                              5: in the two-phase region solid/liquid 
                                                                                                                              6: in the two-phase region solid/gaseous

    Name

    Purpose

    Arguments

    Return value

    Example

    fluidGetAnalysis

    retrieves the material composition of an Ebsilon object (either a pipe or component 1 or 33)

    1: ebsData: Ebsilon object to be considered

    2: FluidData: the requested material composition

    3: CompositionDefined ByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: error

    fluidGetAnalysis (BoundaryValue, fluidData, CompositionDefinedByVolume);
    rO2:=fluidData.fluidAnalysis[SubstanceO2];
    rCO2:=fluidData.fluidAnalysis[SubstanceCO2];

    fluidGetUniversalFluid

    retrieves the data for the data structure of an universal fluid from an Ebsilon object (a pipe or a component 1 or 33) with the fluid type "universal fluid"

    1: ebsData: Ebsilon object to be considered

    2: UniversalFluidType: data structure for retrieval of the universal fluid data

    3: UniversalCompositionDefinedByEnum: requested kind of specification (mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: error

    if (fluidGetUniversalFluid (obj, universalData,
       UniversalCompositionDefinedByMass)) then
    begin
       nLibs:=length(universalData.libraries);
       for iLib:=1 to nLibs do

        begin

            lib:=universalData.libraries[iLib-1];

            println("Library ",lib.library,": ",lib.fraction,"\n");

            if (lib.fraction > 1.0e-7) then

            begin

                nParts:=length(lib.substanceParts);

                for iPart:=1 to nParts do    

                begin

                    part:=lib.substanceParts[iPart-1];

                    if (part.fraction > 1.0e-7) then

                    begin

                        println ("Substance ",part.substance,
                       ": ",part.fraction);

                    end;

                end;

            end;

        end;

    end;

    fluidNormalize

    normalizes a material composition. In the NormalizeControl structure, you can define which parts of the composition shall fixed and which shall modified for the normalization.

    Note that this function modifies the FluidData structure only, not the Ebsilon object in the model.

    1: FluidData: the material composition under consideration

    2: CompositionDefined ByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

    3:NormalizeControl: structure to specify the way of normalization

    BOOLEAN:
    true: o.k.
    false: error

    fluidGetAnalysis (BoundaryValue, fluidData, CompositionDefinedByVolume);

    fluidData.fluidAnalysis[SubstanceO2]:=0.04;

    control.action:=NormalizeFillUpSelected; control.selection[SubstanceCO2]:=true;

     fluidNormalize (fluidData, CompositionDefinedByVolume, control);

    fluidSetAnalyis (BoundaryValue, fluidData, CompositionDefinedByVolume);

    fluidSetAnalysis

    modifies the material composition for an Ebsilon object (component 1 or 33)

     

     

    1: ebsData: Ebsilon object to be modified

    2: FluidData: the specified material composition

    3: CompositionDefined ByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: Error

    fluidSetAnalysis (BoundaryValue, fluidData, CompositionDefinedByVolume);

    fluidSetUniversalFluid

    inserts the data of a universal fluid data structure to an Ebsilon object (a pipe or a component 1 or 33)

    1: ebsData: Ebsilon object to be modified

    2: UniversalFluidType: data structure with data for the universal fluid

    3: UniversalCompositionDefinedByEnum: requested kind of specification (mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: Error

    uses @fluid;

    var

        universalData:UniversalFluidType;

    begin

        setLength(universalData.libraries, 2);

        universalData.libraries[0].library:=UniversalLibraryLIBIF97;

        universalData.libraries[1].library:=UniversalLibraryFDBR;

        universalData.libraries[0].fraction:=0.1;  

        universalData.libraries[1].fraction:=0.9;

        setLength(universalData.libraries[1].substanceParts, 2);
       universalData.libraries[1].substanceParts[0].
                   substance:=UniversalSubstanceN2;

        universalData.libraries[1].substanceParts[0].
                   fraction:= 0.7;               

        universalData.libraries[1].substanceParts[1].
                   substance:=UniversalSubstanceO2;
       universalData.libraries[1].substanceParts[1].
                   fraction:=0.3;  

        if (fluidSetUniversalFluid (Start Value, universalData,

                UniversalCompositionDefinedByMass)) then

        begin

            println ("ok");

        end;

    end.

    fluidTable

    calls the property table functions for a specified fluid

     

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6:FluidData: the considered material composition

    7: CompositionDefined ByEnum:  the requested way of specification of the composition (e.g. mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: error

    r1:=1.013;
    r2:=20.0;
    fluidTable( rResult, iPhase, r1, r2, FuncH_OF_PT, fluidData, CompositionDefinedByVolume);

    fluidTableBinaryMixture

    calls the property table functions for a fluid of type binary mixture

     

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6: INTEGER: type of the binary mixture:
       1=ammonia/water
       2=water/lithium bromide

    7: REAL: mass fraction of the cooling medium

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

    begin

        r1:=1.013;

        r2:=-30.0;

        fluidTableBinaryMixture( rResult, iPhase, r1, r2,
                    FuncH_OF_PT, 1, 0.8);

        println (rResult);

    end.

    fluidTableHumidAir

    calls the property table functions for humid air

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6: REAL: mass fraction of water as a fraction of total mass

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

    begin

        r1:=1.013;

        r2:=20.0;

        fluidTableHumidAir( rResult, iPhase, r1, r2,
                    FuncH_OF_PT, 0.01);

        println (rResult);

    end.

    fluidTableSalt

    calls the property table functions for a fluid of type saltwater

     

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6: REAL: salt fraction (mass fraction of salt from total mass)

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

    begin

        r1:=1.013;

        r2:=20.0;

        fluidTableSalt( rResult, iPhase, r1, r2,
                    FuncH_OF_PT, 0.05);

        println (rResult);

    end.

    fluidTableUniversalFluid

    calls the property table functions for a fluid of type universal fluid

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6:UniversalFluidType: data structure with data for the universal fluid

    7:UniversalCompositionDefinedByEnum: requested kind of specification (mass or volume fractions)

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

        universalData:UniversalFluidType;

    begin

        setLength(universalData.libraries, 2);

        universalData.libraries[0].library:=UniversalLibraryLIBIF97;

        universalData.libraries[1].library:=UniversalLibraryFDBR;

        universalData.libraries[0].fraction:=0.1;  

        universalData.libraries[1].fraction:=0.9;

        setLength(universalData.libraries[1].substanceParts, 2);
       universalData.libraries[1].substanceParts[0].
                   substance:=UniversalSubstanceN2;

        universalData.libraries[1].substanceParts[0].
                   fraction:= 0.7;               

        universalData.libraries[1].substanceParts[1].
                   substance:=UniversalSubstanceO2;
       universalData.libraries[1].substanceParts[1].
                   fraction:=0.3;  

        r1:=1.013;

        r2:=20.0;

        fluidTableUniversalFluid( rResult, iPhase, r1, r2,

                     FuncH_OF_PT, universalData,
                    UniversalCompositionDefinedByMass );   

        println (rResult);

    end.

    fluidTableUser2Phase

    calls the property table functions for a fluid of type user2phase

     

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6: INTEGER: medium type

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

    begin

        r1:=1.013;

        r2:=20.0;

        fluidTableUser2Phase( rResult, iPhase, r1, r2,

                     FuncH_OF_PT, -1022);    // ethanol

        println (rResult);

    end.

    fluidTableWST

    calls the property table functions for a fluid of type water/steam

     

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

        iphase:PhaseEnum;

    begin

        r1:=1.013;

        r2:=20.0;

        fluidTableWST( rResult, iPhase, r1, r2,

                     FuncH_OF_PT);   

        println (rResult);

    end.

    fluidTranslate Analysis

    transfer a material composition from one type of presentation to another

     

    1:FluidData:  the material composition under consideration

    2: CompositionDefined ByEnum:present type of specification

    3: CompositionDefined ByEnum: desired type of specification

    BOOLEAN:
    true: o.k.
    false: error

    fluidTranslateAnalysis (fluidData, CompositionDefinedByVolume, CompositionDefinedByMass );

    fluidTableObject

    You can directly activate the physical properties for an object with this function. The function automatically recognizes which type of fluid it is and then activates the appropriate function. If a composition or further parameters are needed, these are adopted from the specified object.

    1:REAL: calculated result

    2:PhaseEnum: Phase is not calculated (value 0)
    Note: phase can only with explicit
    Call (PHASE (P, H)) can be calculated.

    3:REAL: 1st argument for the material table function

    4:REAL: 2nd argument for the material table function

    5:FuncEnum: type of the function to be called

    6:ebsData: Object


     

    BOOLEAN:
    true: o.k.
    false: error

    uses @Fluid;

    var

    r:real;

    phase:PhaseEnum;

    begin

    fluidTableObject( r, phase, 1, 500, FuncH_OF_PT, Fluegas_1 );

    println (r);

    end.

    fluidTableThermoLiquid

    You can activate the library for thermoliquids for a predefined fluid (thermal oil, molten salt) with this function.

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5: ThermoLiquidTypeEnum: Thermoliquid-Type

    BOOLEAN:
    true: o.k.
    false: error

    uses @Fluid;

    var

    r:real;

    begin

    fluidTableThermoLiquid( r, 20, 380, FuncH_OF_PT,

                                                      ThermoLiquidTypeDowtherm_A );

    println (r);

    end.

    fluidTableThermoLiquidUser

    With this function, you can activate the library for thermoliquids for a fluid defined on your own. The required material parameters have to be set in EbsScript before:

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: Function to call

    5:FluidExtensionThermoliquid: const fluidExtensionThermoLiquid

    BOOLEAN:
    true: o.k.
    false: error

    uses @Fluid;

    var

    r:real;

    flAttr:FluidExtensionThermoLiquid;

    begin

    flAttr.thermoLiquidType:=ThermoLiquidTypeUserDefined;

    flAttr.mol_weight:=100;

    flAttr.t_min:=200;

    flAttr.t_max:=400;

    flAttr.viscosity:=ThermoLiquidUserDefinedViscosityUseEta;

    flAttr.cp[0]:=1.5;

    flAttr.cp[0]:=0.005;

    fluidTableThermoLiquidUser( r, 20, 380, FuncH_OF_PT, flAttr );

    println (r);

    end. 

     

    Other Thermal Properties Functions

    Two new sets of functions have been implemented for calculating physical properties. For these, the (obsolete) parameter “Phase” is no longer required.

    In the first set, the calculated result is returned as a parameter, while the return code contains the information whether the calculation has been successful (true) or not (false).

    This set consists of the following functions:

     

    fluidPropertyCall

    fluidPropertyCallAnalysis

    fluidProperty3CallAnalysis

    fluidPropertyCallWST

    fluidPropertyCallSalt

    fluidPropertyCallBinaryMixture

    fluidPropertyCallUser2Phase
    fluidProperty3CallUser2Phase

    fluidPropertyCallThermoLiquid

    fluidPropertyCallThermoLiquidUser

    fluidPropertyCallHumidAir

    fluidProperty3Call (with three arguments)

    The second set is to be used functionally, i.e. the calculated result is returned as return value. In an optional argument it is possible to specify which value is to be returned in the event of an error. The default error value is -999. This set consists of the following functions:

     

    fluidProperty

    fluidPropertyAnalysis

    fluidProperty3Analysis

    fluidPropertyWST

    fluidPropertySalt

    fluidPropertyBinaryMixture

    fluidPropertyUser2Phase

    fluidProperty3User2Phase

    fluidPropertyThermoLiquid

    fluidPropertyThermoLiquidUser

    fluidPropertyHumidAir

    fluidProperty3 (with three arguments)

     

     

    Name

    Purpose

    Arguments

    Value returned

    Example

    fluidPropertyCall

    calls the property table functions for a specified fluid

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5:EBSDATA: object

     

    BOOLEAN:
    true: o.k.
    false: error

    r1:=1.013;
    r2:=20.0;
    fluidPropertyCall( rResult, r1, r2, FuncH_OF_PT, ebsData);

    fluidPropertyCallAnalysis

    calls the property table functions for a specified fluid

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5:FluidData: the specified material composition

    6:CompositionDefinedByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

     

    BOOLEAN:
    true: o.k.
    false: error

    r1:=1.013;
    r2:=20.0;
    fluidPropertyCallAnalysis( rResult, r1, r2, FuncH_OF_PT, fluidData, CompositionDefinedByMass);

    fluidProperty3CallAnalysis

    calls the property table functions for a specified fluid

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:REAL: 3rd argument for the material table function (e.g phi for FuncXIW OF PTPhi; Tf for FuncXIW OF  PTTf)
     

    5:FuncEnum: type of the function to be called

    6:FluidData: the specified material composition

    7:CompositionDefinedByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

     

    BOOLEAN:
    true: o.k.
    false: error

    r1:=1.013;
    r2:=20.0;
    r3:=0,8
      fluidProperty3CallAnalysis( rResult, r1, r2, r3,FuncXIW_OF_PTPhi, fluidData, CompositionDefinedByMass);

    fluidPropertyCallWST

    calls the property table functions for a fluid of type "water/steam"

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;    

    begin

        r1:=1.013;

        r2:=20.0;

        fluidPropertyCallWST 
       ( rResult,  r1,
        r2, FuncH_OF_PT);   

        println (rResult);

    end.

    fluidPropertyCallSALT

    calls the property table functions for a fluid of type "salt water"

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5:REAL: salt (Content of the salt in the total mass)

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var   

        r1,r2,rResult:real;

        begin

        r1:=1.013;

        r2:=20.0;

        fluidPropertyCallSalt ( rResult, r1, r2,
                     FuncH_OF_PT, 0.035);

        println (rResult);

    end.

    fluidPropertyCallBinaryMixture

    calls the property table functions for a fluid of type "binary mixture"

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5: INTEGER: Type of binary mixture:
       1=Ammonia/Water
       2=Water/Lithiumbromid

    6: REAL: XI (Mass fraction of refrigerant of total mass)

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var    

        r1,r2,rResult:real;

    begin

        r1:=1.013;

        r2:=30.0;

        fluidPropertyCallBinaryMixture( rResult, r1, r2, FuncH_OF_PT, 1, 0.8);

        println (rResult);

    end.

    fluidPropertyCallUser2Phase

    calls the property table functions for a fluid of type "User2Phase"

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5: INTEGER: medium type

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var   

        r1,r2,rResult:real;

    begin

        r1:=1.013;

        r2:=20.0;

        fluidPropertyCallUser2Phase(rResult,r1,r2,FuncH_OF_PT,-1022);   
        // ethanol

        println (rResult);

    end.

    fluidProperty3CallUser2Phase

    calls the property table functions for a fluid of type "User2Phase"
    with three arguments

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:REAL: 3rd argument for the material table function

    5:FuncEnum: type of the function to be called

    6: INTEGER: medium type

    BOOLEAN:
    true: o.k.
    false: error

                   

     

    fluidPropertyCallThermoLiquid

    You can activate the library for thermoliquids for a predefined fluid (thermal oil, molten salt) with this function.

    :REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5: ThermoLiquidTypeEnum: Thermoliquid type

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var   

        r1,r2,rResult:real;

    begin

        r1:=20;

        r2:=380.0;

        fluidPropertyCallThermoLiquid(rResult,r1,r2,FuncH_OF_PT,ThermoLiquidTypeDowtherm_A);   
        
    println (rResult);

    end.

    fluidPropertyCallThermoLiquidUser

    With this function, you can activate the library for thermoliquids for a fluid defined on your own. The required material parameters have to be set in EbsScript before .

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    4:const fluidExtensionThermo
       liquid: FluidExtensionThermo
       liquid

    BOOLEAN:
    true: o.k.
    false: error

    uses @Fluid;

    var

    r:real;

    flAttr:FluidExtensionThermoLiquid;

    begin

    flAttr.thermoLiquidType:=ThermoLiquidTypeUserDefined;

    flAttr.mol_weight:=100;

    flAttr.t_min:=200;

    flAttr.t_max:=400;

    flAttr.viscosity:=ThermoLiquidUserDefinedViscosityUseEta;

    flAttr.cp[0]:=1.5;

    flAttr.cp[0]:=0.005;

    fluidTableThermoLiquidUser( r, 20, 380, FuncH_OF_PT, flAttr );

    println (r);

    end. 

     

    fluidPropertyCallHumidAir

    calls the property table functions for a fluid of type "humid air"

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:FuncEnum: type of the function to be called

    5:REAL: XI (Specified water content)

    BOOLEAN:
    true: o.k.
    false: error

    uses @fluid;

    var   

        r1,r2,rResult:real;    

    begin

        r1:=2;

        r2:=25;

        fluidPropertyCallHumidAir(rResult,r1,r2,FuncH_OF_PT, 0.005);  

        println (rResult);

    end.

    fluidProperty3Call

    (with 3 arguments)

    calls a property table functions for a fluid of type with 3 arguments

    1:REAL: calculated result

    2:REAL: 1st argument for the material table function

    3:REAL: 2nd argument for the material table function

    4:REAL: 3rd argument for the material table function

    5:FuncEnum: type of the function to be called

    4:EBSDATA: object

    BOOLEAN:
    true: o.k.
    false: error

                   

     

     

     

    Name

    Purpose

    Arguments

    Value returned

    Example

    fluidProperty

    calls the property table functions for a specified fluid

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:EBSDATA: object

    5:REAL: return on error value (default is -999)

     

    REAL: calculated result

    uses @Fluid;

    var

    r, rError:real;

    begin

    r:=fluidProperty(1.0135199, 370, FuncH_OF_PT, Fluegas_1);

    println (r)
    end.

    fluidPropertyAnalysis

    calls the property table functions for a specified fluid

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:FluidData: the specified material composition

    5:CompositionDefinedByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

    6:REAL: return on error value (default is -999)

     

     

    REAL: calculated result

    r1:=1.013;
    r2:=20.0;
    rResult:=fluidPropertyAnalysis( rResult, r1, r2, FuncH_OF_PT, fluidData,CompositionDefinedByMass);

    fluidProperty3Analysis

    calls the property table functions for a specified fluid with 3 arguments

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:REAL: 3rd argument for the material table function

    4:FuncEnum: type of the function to be called

    5:FluidData: the specified material composition

    6:CompositionDefinedByEnum: the requested way of specification of the composition (e.g. mass or volume fractions)

    7:REAL: return on error value (default is -999)

     

    REAL: calculated result

     

    fluidPropertyWST

    calls the property table functions for a fluid of type "water/steam"

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var   

        r1,r2,rResult:real;   

    begin

        r1:=1.013;

        r2:=20.0;

        rResult:=fluidPropertyWST( r1, r2, FuncH_OF_PT);  

        println (rResult);

    end.

    fluidPropertySalt

    calls the property table functions for a fluid of type "salt water"

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:REAL: salt (Proportion of salt in the total mass)

    5:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var  

        r1,r2,rResult:real;

        begin

        r1:=1.013;

        r2:=20.0;

        rResult:=fluidPropertySalt (r1,r2,FuncH_OF_PT,0.035);

        println (rResult);

    end.

    fluidPropertyBinaryMixture

    calls the property table functions for a fluid of type "binary mixture"

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4: INTEGER: type of binary mixture:
       1=Ammonia/Water
       2=Water/Lithiumbromid

    5: REAL: XI (Mass fraction of refrigerant v. total mass)

    6:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var   

        r1,r2,rResult:real;

    begin

        r1:=1.013;

        r2:=30.0;

        rResult:=fluidPropertyBinaryMixture( r1, r2, FuncH_OF_PT, 1, 0.8);

        println (rResult);

    end.

    fluidPropertyUser2Phase

    calls the property table functions for a fluid of type "User2phase"

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4: INTEGER: type of medium

    5:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var   

        r1,r2,rResult:real;

    begin

        r1:=1.013;

        r2:=20.0;

        rResult:=fluidPropertyUser2Phaser1,r2,FuncH_OF_PT,-1022);   
        // ethanol

        println (rResult);

    end.

    fluidProperty3User2Phase

    calls the property table functions for a fluid of type "User2Phase"
    with three arguments

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:REAL: 3rd argument for the material table function

    4:FuncEnum: type of the function to be called

    5: INTEGER: type of medium

    6:REAL: return on error value (default is -999)

    REAL: calculated result

                   

     

    fluidPropertyThermoLiquid

    You can activate the library for thermoliquids for a predefined fluid (thermal oil, molten salt) with this function.

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4: ThermoLiquidTypeEnum: Thermoliquid-Type

    5:REAL: return on error value (default is -999)

    6:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var  

        r1,r2,rResult:real;

    begin

        r1:=20;

        r2:=380.0;

        rResult:=fluidPropertyThermoLiquid(r1,r2,FuncH_OF_PT,ThermoLiquidTypeDowtherm_A);  
        
        println (rResult);

    end.

    fluidPropertyThermoLiquidUser

    With this function, you can activate the library for thermoliquids for a fluid defined on your own. The required material parameters have to be set in EbsScript before .

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:CONST: fluidExtensionThermo
       liquid: FluidExtensionThermo
       liquid

    5:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @Fluid;

    var

    r:real;

    flAttr:FluidExtensionThermoLiquid;

    begin

    flAttr.thermoLiquidType:=ThermoLiquidTypeUserDefined;

    flAttr.mol_weight:=100;

    flAttr.t_min:=200;

    flAttr.t_max:=400;

    flAttr.viscosity:=ThermoLiquidUserDefinedViscosityUseEta;

    flAttr.cp[0]:=1.5;

    flAttr.cp[0]:=0.005;

    r:=fluidPropertyThermoLiquidUser( 20, 380, FuncH_OF_PT, flAttr );

    println (r);

    end.

    fluidPropertyHumidAir

    calls the property table functions for a fluid of type "Humid air"

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:FuncEnum: type of the function to be called

    4:REAL: XI (Specific water content)

    5:REAL: return on error value (default is -999)

    REAL: calculated result

    uses @fluid;

    var   

        r1,r2,rResult:real;   

    begin

        r1:=2;

        r2:=25;

        rResult:=fluidPropertyHumidAir(r1,r2,FuncH_OF_PT, 0.005);  

        println (rResult);

    end.

    fluidProperty3

    (with 3 arguments)

    calls a property table functions for a fluid of type with three  arguments

    1:REAL: 1st argument for the material table function

    2:REAL: 2nd argument for the material table function

    3:REAL: 3rd argument for the material table function

    4FuncEnum: type of the function to be called

    5:EBSDATA: object

    6:REAL: return on error value (default is -999)

    REAL: calculated result