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

Provides a simple interface to PorousFlow material properties. More...

#include <PorousFlowPropertyAux.h>

Inheritance diagram for PorousFlowPropertyAux:
[legend]

Public Member Functions

 PorousFlowPropertyAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue ()
 

Private Types

enum  PropertyEnum {
  PropertyEnum::PRESSURE, PropertyEnum::SATURATION, PropertyEnum::TEMPERATURE, PropertyEnum::DENSITY,
  PropertyEnum::VISCOSITY, PropertyEnum::MASS_FRACTION, PropertyEnum::RELPERM, PropertyEnum::ENTHALPY,
  PropertyEnum::INTERNAL_ENERGY
}
 enum of properties More...
 

Private Attributes

const MaterialProperty< std::vector< Real > > * _pressure
 Pressure of each phase (at the qps) More...
 
const MaterialProperty< std::vector< Real > > * _saturation
 Saturation of each phase (at the qps) More...
 
const MaterialProperty< Real > * _temperature
 Temperature of the fluid (at the qps) More...
 
const MaterialProperty< std::vector< Real > > * _fluid_density
 Fluid density of each phase (at the qps) More...
 
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
 Viscosity of each phase. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
 Mass fraction of each component in each phase. More...
 
const MaterialProperty< std::vector< Real > > * _relative_permeability
 Relative permeability of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _enthalpy
 Enthalpy of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _internal_energy
 Internal energy of each phase. More...
 
const PorousFlowDictator_dictator
 PorousFlow Dictator UserObject. More...
 
enum PorousFlowPropertyAux::PropertyEnum _property_enum
 
unsigned int _phase
 Phase index. More...
 
unsigned int _fluid_component
 Fluid omponent index. More...
 

Detailed Description

Provides a simple interface to PorousFlow material properties.

Note that as all properties are in materials, only elemental AuxVariables can be used

Definition at line 24 of file PorousFlowPropertyAux.h.

Member Enumeration Documentation

enum of properties

Enumerator
PRESSURE 
SATURATION 
TEMPERATURE 
DENSITY 
VISCOSITY 
MASS_FRACTION 
RELPERM 
ENTHALPY 
INTERNAL_ENERGY 

Definition at line 64 of file PorousFlowPropertyAux.h.

64  {
65  PRESSURE,
66  SATURATION,
67  TEMPERATURE,
68  DENSITY,
69  VISCOSITY,
70  MASS_FRACTION,
71  RELPERM,
72  ENTHALPY,
73  INTERNAL_ENERGY
enum PorousFlowPropertyAux::PropertyEnum _property_enum

Constructor & Destructor Documentation

PorousFlowPropertyAux::PorousFlowPropertyAux ( const InputParameters &  parameters)

Definition at line 30 of file PorousFlowPropertyAux.C.

31  : AuxKernel(parameters),
32  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
33  _property_enum(getParam<MooseEnum>("property").getEnum<PropertyEnum>()),
34  _phase(getParam<unsigned int>("phase")),
35  _fluid_component(getParam<unsigned int>("fluid_component"))
36 {
37  // Check that the phase and fluid_component are valid
38  if (_phase >= _dictator.numPhases())
39  mooseError("Phase number in the AuxKernel ",
40  _name,
41  " is greater than the number of phases in the problem");
42 
44  mooseError("Fluid component number in the AuxKernel ",
45  _name,
46  " is greater than the number of phases in the problem");
47 
48  // Only get material properties required by this instance of the AuxKernel
49  switch (_property_enum)
50  {
52  _pressure = &getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_qp");
53  break;
54 
56  _saturation = &getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_qp");
57  break;
58 
60  _temperature = &getMaterialProperty<Real>("PorousFlow_temperature_qp");
61  break;
62 
64  _fluid_density = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_density_qp");
65  break;
66 
68  _fluid_viscosity = &getMaterialProperty<std::vector<Real>>("PorousFlow_viscosity_qp");
69  break;
70 
73  &getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp");
74  break;
75 
78  &getMaterialProperty<std::vector<Real>>("PorousFlow_relative_permeability_qp");
79  break;
80 
82  _enthalpy = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_qp");
83 
86  &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_internal_energy_qp");
87  }
88 }
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
Viscosity of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
Mass fraction of each component in each phase.
unsigned int _fluid_component
Fluid omponent index.
const PorousFlowDictator & _dictator
PorousFlow Dictator UserObject.
unsigned int numComponents() const
the number of fluid components
const MaterialProperty< std::vector< Real > > * _internal_energy
Internal energy of each phase.
const MaterialProperty< std::vector< Real > > * _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< Real > > * _saturation
Saturation of each phase (at the qps)
const MaterialProperty< Real > * _temperature
Temperature of the fluid (at the qps)
const MaterialProperty< std::vector< Real > > * _fluid_density
Fluid density of each phase (at the qps)
unsigned int _phase
Phase index.
unsigned int numPhases() const
the number of fluid phases
enum PorousFlowPropertyAux::PropertyEnum _property_enum
const MaterialProperty< std::vector< Real > > * _relative_permeability
Relative permeability of each phase.
const MaterialProperty< std::vector< Real > > * _pressure
Pressure of each phase (at the qps)

Member Function Documentation

Real PorousFlowPropertyAux::computeValue ( )
protectedvirtual

Definition at line 91 of file PorousFlowPropertyAux.C.

92 {
93  Real property = 0.0;
94 
95  switch (_property_enum)
96  {
98  property = (*_pressure)[_qp][_phase];
99  break;
100 
102  property = (*_saturation)[_qp][_phase];
103  break;
104 
106  property = (*_temperature)[_qp];
107  break;
108 
110  property = (*_fluid_density)[_qp][_phase];
111  break;
112 
114  property = (*_fluid_viscosity)[_qp][_phase];
115  break;
116 
118  property = (*_mass_fractions)[_qp][_phase][_fluid_component];
119  break;
120 
122  property = (*_relative_permeability)[_qp][_phase];
123  break;
124 
126  property = (*_enthalpy)[_qp][_phase];
127  break;
128 
130  property = (*_internal_energy)[_qp][_phase];
131  break;
132  }
133 
134  return property;
135 }
unsigned int _fluid_component
Fluid omponent index.
unsigned int _phase
Phase index.
enum PorousFlowPropertyAux::PropertyEnum _property_enum

Member Data Documentation

const PorousFlowDictator& PorousFlowPropertyAux::_dictator
private

PorousFlow Dictator UserObject.

Definition at line 61 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_enthalpy
private

Enthalpy of each phase.

Definition at line 55 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

unsigned int PorousFlowPropertyAux::_fluid_component
private

Fluid omponent index.

Definition at line 80 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_fluid_density
private

Fluid density of each phase (at the qps)

Definition at line 43 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_fluid_viscosity
private

Viscosity of each phase.

Definition at line 46 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_internal_energy
private

Internal energy of each phase.

Definition at line 58 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<std::vector<std::vector<Real> > >* PorousFlowPropertyAux::_mass_fractions
private

Mass fraction of each component in each phase.

Definition at line 49 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

unsigned int PorousFlowPropertyAux::_phase
private

Phase index.

Definition at line 77 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_pressure
private

Pressure of each phase (at the qps)

Definition at line 34 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

enum PorousFlowPropertyAux::PropertyEnum PorousFlowPropertyAux::_property_enum
private
const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_relative_permeability
private

Relative permeability of each phase.

Definition at line 52 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_saturation
private

Saturation of each phase (at the qps)

Definition at line 37 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

const MaterialProperty<Real>* PorousFlowPropertyAux::_temperature
private

Temperature of the fluid (at the qps)

Definition at line 40 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().


The documentation for this class was generated from the following files: