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:

with the temperature, the pressure, the density, the dynamic viscosity, the thermal conductivity, the specific isochoric heat capacity, the specific energy 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.

warningwarning

Due to the approximations made when computing the isobaric heat capacity from the constant isochoric heat capacity, this material should only be used for nearly-incompressible fluids.

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
  []
[]
(moose/modules/fluid_properties/test/tests/temperature_pressure_function/example.i)

Input Parameters

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

    C++ Type:double

    Controllable:No

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

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

    C++ Type:FunctionName

    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

    Controllable:No

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

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

    C++ Type:FunctionName

    Controllable:No

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

Required Parameters

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, 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, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.

  • 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

    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.

Optional Parameters

  • T_initial_guess400Temperature initial guess for Newton Method variable set conversion

    Default:400

    C++ Type:double

    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

    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

    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

    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

    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.

  • 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

    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

    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

    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

    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

    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

    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