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:

x=Ty=Pρ=ρu(t=0,(x=T,y=P,z=0))μ=μu(t=0,(x=T,y=P,z=0))k=ku(t=0,(x=T,y=P,z=0))\begin{aligned} x = T \\ y = P \\ \rho = \rho^{u}(t=0, (x=T, y=P, z=0)) \\ \mu = \mu^{u}(t=0, (x=T, y=P, z=0)) \\ k = k^{u}(t=0, (x=T, y=P, z=0)) \\ \end{aligned}

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

cv=cvue=eref+cv(TTref)\begin{aligned} c_v = c_v^{u} \\ e = e_{ref} + c_v * (T - T_{ref}) \end{aligned}

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

x=Ty=Pcp=cpu(t=0,(x=T,y=P,z=0))cv=cpα2TρβT\begin{aligned} x = T \\ y = P \\ cp = cp^{u}(t=0, (x=T, y=P, z=0)) cv = cp - \dfrac{\alpha^2 T}{\rho \beta_T} \end{aligned}

with TT the temperature, PP the pressure, ρ\rho the density, μ\mu the dynamic viscosity, kk the thermal conductivity, cvc_v the specific isochoric heat capacity, ee the specific internal energy, TrefT_{ref} a reference temperature at which the specific internal energy is equal to a reference energy erefe_{ref}, α\alpha the coefficient of thermal expansion, βT\beta_T the isothermal compressibility, and the u^u 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 e(p,T)e(p,T) as eref+TrefTcv(p,T)dTe_{ref} + \int_{T_{ref}}^T c_v(p,T) dT. Note that this neglects the dVdV 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]
  # 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
    expression = '14 + 1e-2 * x + 1e-5 * y'
  []
  [rho]
    type = ParsedFunction
    expression = '1.5e3 + 0.13 * x - 1.5e-4 * y'
  []
  [mu]
    type = ParsedFunction
    expression = '1e-3 + 2e-6 * x - 3e-9 * y'
  []
[]

[FluidProperties]
  [fp]
    type = TemperaturePressureFunctionFluidProperties
    cv = ${cv}
    k = k
    rho = rho
    mu = mu
  []
[]
(contrib/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

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • max_newton_its100Maximum number of Newton iterations for variable set conversions

    Default:100

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Maximum number of Newton iterations for variable set conversions

  • 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

    Unit:(no unit assumed)

    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.

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

  • 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_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

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

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    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>

    Unit:(no unit assumed)

    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

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • fp_typesingle-phase-fpType of the fluid property object

    Default:single-phase-fp

    C++ Type:FPType

    Unit:(no unit assumed)

    Controllable:No

    Description:Type of the fluid property object

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters