TemperaturePressureFunctionFluidProperties

Single-phase fluid properties that allows to provide thermal conductivity, density, and viscosity as functions of temperature and pressure.

The temperature and pressure will be passed as respectively the x and y spatial arguments of the functions. The following relations hold true:

Both the time (t) and Z-axis dimension are not used here. A fluid property made to depend on time will not be properly updated by this FluidProperties object. There are two options for specific heat. Either the user sets a constant specific isochoric heat capacity

Or, the user uses a function of temperature and pressure (same arguments as for density)

with the temperature, the pressure, the density, the dynamic viscosity, the thermal conductivity, the specific isochoric heat capacity, the specific internal energy, a reference temperature at which the specific internal energy is equal to a reference energy , the coefficient of thermal expansion, the isothermal compressibility, and the exponent indicating a user-passed parameter.

The derivatives of the fluid properties are obtained using the Function(s) gradient components and the appropriate derivative chaining for derived properties.

warningwarning

The range of validity of the property is based off of the validity of the functions that are input, and is not checked by this FluidProperties object.

commentnote

Support for the conservative (specific volume, internal energy) variable set is only partial. Notable missing implementations are routines for entropy, the speed of sound, and some conversions between specific enthalpy and specific energy.

commentnote

When using a function for the isobaric specific heat capacity, a numerical integration is performed to compute as . Note that this neglects the term. This is exact for incompressible fluids and ideal gases.

Example Input File Syntax

In this example, temperature and pressure dependent density, dynamic viscosity and thermal conductivity of a fluid are being set using three ParsedFunctions. The functions are specified with the x and y coordinates, and are evaluated with respectively the temperature and pressure variables.

[Functions<<<{"href": "../../syntax/Functions/index.html"}>>>]
  # This demonstrates how to define fluid properties that are functions
  # of the LOCAL value of the (p,T) variables
  # x for temperature
  # y for pressure
  [k]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = '14 + 1e-2 * x + 1e-5 * y'
  []
  [rho]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = '1.5e3 + 0.13 * x - 1.5e-4 * y'
  []
  [mu]
    type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../functions/MooseParsedFunction.html"}>>>
    expression<<<{"description": "The user defined function."}>>> = '1e-3 + 2e-6 * x - 3e-9 * y'
  []
[]

[FluidProperties<<<{"href": "../../syntax/FluidProperties/index.html"}>>>]
  [fp]
    type = TemperaturePressureFunctionFluidProperties<<<{"description": "Single-phase fluid properties that allows to provide thermal conductivity, density, and viscosity as functions of temperature and pressure.", "href": "TemperaturePressureFunctionFluidProperties.html"}>>>
    cv<<<{"description": "Constant isochoric specific heat [J/(kg-K)]"}>>> = ${cv}
    k<<<{"description": "Thermal conductivity function of temperature and pressure [W/(m-K)]"}>>> = k
    rho<<<{"description": "Density function of temperature and pressure [kg/m^3]"}>>> = rho
    mu<<<{"description": "Dynamic viscosity function of temperature and pressure [Pa-s]"}>>> = mu
  []
[]
(moose/modules/fluid_properties/test/tests/temperature_pressure_function/example.i)

Input Parameters

  • kThermal conductivity function of temperature and pressure [W/(m-K)]

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:Thermal conductivity function of temperature and pressure [W/(m-K)]

  • muDynamic viscosity function of temperature and pressure [Pa-s]

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:Dynamic viscosity function of temperature and pressure [Pa-s]

  • rhoDensity function of temperature and pressure [kg/m^3]

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:Density function of temperature and pressure [kg/m^3]

Required Parameters

  • T_ref0Reference temperature for the specific internal energy

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Reference temperature for the specific internal energy

  • cpIsobaric specific heat function of temperature and pressure [J/(kg-K)]

    C++ Type:FunctionName

    Unit:(no unit assumed)

    Controllable:No

    Description:Isobaric specific heat function of temperature and pressure [J/(kg-K)]

  • cv0Constant isochoric specific heat [J/(kg-K)]

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Constant isochoric specific heat [J/(kg-K)]

  • dT_integration_intervals10Size of intervals for integrating cv(T) to compute e(T) from e(T_ref)

    Default:10

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Size of intervals for integrating cv(T) to compute e(T) from e(T_ref)

  • e_ref0Specific internal energy at the reference temperature

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Specific internal energy at the reference temperature

Optional Parameters

  • T_initial_guess400Temperature initial guess for Newton Method variable set conversion

    Default:400

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Temperature initial guess for Newton Method variable set conversion

  • max_newton_its100Maximum number of Newton iterations for variable set conversions

    Default:100

    C++ Type:unsigned int

    Controllable:No

    Description:Maximum number of Newton iterations for variable set conversions

  • p_initial_guess200000Pressure initial guess for Newton Method variable set conversion

    Default:200000

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Pressure initial guess for Newton Method variable set conversion

  • tolerance1e-08Tolerance for 2D Newton variable set conversion

    Default:1e-08

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Tolerance for 2D Newton variable set conversion

Variable Set Conversions Newton Solve Parameters

  • allow_imperfect_jacobiansFalsetrue to allow unimplemented property derivative terms to be set to zero for the AD API

    Default:False

    C++ Type:bool

    Controllable:No

    Description:true to allow unimplemented property derivative terms to be set to zero for the AD API

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • fp_typesingle-phase-fpType of the fluid property object

    Default:single-phase-fp

    C++ Type:FPType

    Controllable:No

    Description:Type of the fluid property object

Advanced Parameters

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Material Property Retrieval Parameters