www.mooseframework.org
Public Member Functions | Protected Types | Protected Attributes | List of all members
PorousFlowFluidPropertyIC Class Reference

PorousFlowFluidPropertyIC calculates an initial value for a fluid property (such as enthalpy) using pressure and temperature in the single phase regions. More...

#include <PorousFlowFluidPropertyIC.h>

Inheritance diagram for PorousFlowFluidPropertyIC:
[legend]

Public Member Functions

 PorousFlowFluidPropertyIC (const InputParameters &parameters)
 
virtual Real value (const Point &p) override
 

Protected Types

enum  PropertyEnum { PropertyEnum::ENTHALPY, PropertyEnum::INTERNAL_ENERGY, PropertyEnum::DENSITY }
 Enum of fluid properties that can be set using this IC. More...
 

Protected Attributes

const VariableValue & _porepressure
 Porepressure (Pa) More...
 
const VariableValue & _temperature
 Fluid temperature (C or K) More...
 
enum PorousFlowFluidPropertyIC::PropertyEnum _property_enum
 
const SinglePhaseFluidProperties_fp
 FluidProperties user object. More...
 
const Real _T_c2k
 Conversion from degrees Celsius to degrees Kelvin. More...
 

Detailed Description

PorousFlowFluidPropertyIC calculates an initial value for a fluid property (such as enthalpy) using pressure and temperature in the single phase regions.

Definition at line 24 of file PorousFlowFluidPropertyIC.h.

Member Enumeration Documentation

◆ PropertyEnum

Enum of fluid properties that can be set using this IC.

Enumerator
ENTHALPY 
INTERNAL_ENERGY 
DENSITY 

Definition at line 37 of file PorousFlowFluidPropertyIC.h.

37 { ENTHALPY, INTERNAL_ENERGY, DENSITY } _property_enum;

Constructor & Destructor Documentation

◆ PorousFlowFluidPropertyIC()

PorousFlowFluidPropertyIC::PorousFlowFluidPropertyIC ( const InputParameters &  parameters)

Definition at line 34 of file PorousFlowFluidPropertyIC.C.

35  : InitialCondition(parameters),
36  _porepressure(coupledValue("porepressure")),
37  _temperature(coupledValue("temperature")),
38  _property_enum(getParam<MooseEnum>("property").getEnum<PropertyEnum>()),
39  _fp(getUserObject<SinglePhaseFluidProperties>("fp")),
40  _T_c2k(getParam<MooseEnum>("temperature_unit") == 0 ? 0.0 : 273.15)
41 {
42 }

Member Function Documentation

◆ value()

Real PorousFlowFluidPropertyIC::value ( const Point &  p)
overridevirtual

Definition at line 45 of file PorousFlowFluidPropertyIC.C.

46 {
47  // The FluidProperties userobject uses temperature in K
48  const Real Tk = _temperature[_qp] + _T_c2k;
49 
50  // The fluid property
51  Real property = 0.0;
52 
53  switch (_property_enum)
54  {
56  property = _fp.h_from_p_T(_porepressure[_qp], Tk);
57  break;
58 
60  property = _fp.e_from_p_T(_porepressure[_qp], Tk);
61  break;
62 
64  property = _fp.rho_from_p_T(_porepressure[_qp], Tk);
65  break;
66  }
67 
68  return property;
69 }

Member Data Documentation

◆ _fp

const SinglePhaseFluidProperties& PorousFlowFluidPropertyIC::_fp
protected

FluidProperties user object.

Definition at line 39 of file PorousFlowFluidPropertyIC.h.

Referenced by value().

◆ _porepressure

const VariableValue& PorousFlowFluidPropertyIC::_porepressure
protected

Porepressure (Pa)

Definition at line 33 of file PorousFlowFluidPropertyIC.h.

Referenced by value().

◆ _property_enum

enum PorousFlowFluidPropertyIC::PropertyEnum PorousFlowFluidPropertyIC::_property_enum
protected

Referenced by value().

◆ _T_c2k

const Real PorousFlowFluidPropertyIC::_T_c2k
protected

Conversion from degrees Celsius to degrees Kelvin.

Definition at line 41 of file PorousFlowFluidPropertyIC.h.

Referenced by value().

◆ _temperature

const VariableValue& PorousFlowFluidPropertyIC::_temperature
protected

Fluid temperature (C or K)

Definition at line 35 of file PorousFlowFluidPropertyIC.h.

Referenced by value().


The documentation for this class was generated from the following files:
PorousFlowFluidPropertyIC::_T_c2k
const Real _T_c2k
Conversion from degrees Celsius to degrees Kelvin.
Definition: PorousFlowFluidPropertyIC.h:41
PorousFlowFluidPropertyIC::PropertyEnum::DENSITY
PorousFlowFluidPropertyIC::_porepressure
const VariableValue & _porepressure
Porepressure (Pa)
Definition: PorousFlowFluidPropertyIC.h:33
PorousFlowFluidPropertyIC::PropertyEnum::ENTHALPY
PorousFlowFluidPropertyIC::_property_enum
enum PorousFlowFluidPropertyIC::PropertyEnum _property_enum
PorousFlowFluidPropertyIC::PropertyEnum::INTERNAL_ENERGY
PorousFlowFluidPropertyIC::_fp
const SinglePhaseFluidProperties & _fp
FluidProperties user object.
Definition: PorousFlowFluidPropertyIC.h:39
PorousFlowFluidPropertyIC::_temperature
const VariableValue & _temperature
Fluid temperature (C or K)
Definition: PorousFlowFluidPropertyIC.h:35