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

Material designed to provide the density of the porous medium for the fully-saturated case. More...

#include <PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.h>

Inheritance diagram for PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity:
[legend]

Public Member Functions

 PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity (const InputParameters &parameters)
 

Protected Member Functions

void initQpStatefulProperties () override
 
void computeQpProperties () override
 

Protected Attributes

const Real _rho_s
 Solid density. More...
 
const MaterialProperty< std::vector< Real > > & _rho_f_qp
 fluid density at qps More...
 
const MaterialProperty< Real > & _porosity_qp
 porosity at qps More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _drho_f_qp_dvar
 d(rho_f)/d(PorousFlow variable) More...
 
const MaterialProperty< std::vector< Real > > & _dporosity_qp_dvar
 d(porosity)/d(PorousFlow variable) More...
 
MaterialProperty< Real > & _gravdensity
 computed density at quadpoints More...
 
MaterialProperty< std::vector< Real > > & _dgravdensity_dvar
 d(density)/d(PorousFlow variable) More...
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of fluid components. More...
 
const unsigned int _num_var
 Number of PorousFlow variables. More...
 

Detailed Description

Material designed to provide the density of the porous medium for the fully-saturated case.

Density is calculated as a weighted average of the fluid and solid densities: density = phi * rho_f + (1 - phi) * rho_s where phi is porosity, rho_f is fluid density and rho_s is solid density (assumed constant).

Definition at line 27 of file PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.h.

Constructor & Destructor Documentation

PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity ( const InputParameters &  parameters)

Definition at line 27 of file PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.C.

Referenced by validParams< PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity >().

30  _rho_s(getParam<Real>("rho_s")),
31  _rho_f_qp(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_density_qp")),
32  _porosity_qp(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
33  _drho_f_qp_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
34  "dPorousFlow_fluid_phase_density_qp_dvar")),
35  _dporosity_qp_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar"))
36 {
37  if (_num_phases != 1)
38  mooseError("The Dictator proclaims that the number of phases is ",
39  _dictator.numPhases(),
40  " whereas PorousFlowThermalConductivityFromPorosity can only be used for 1-phase "
41  "simulations. Be aware that the Dictator has noted your mistake.");
42  if (_nodal_material == true)
43  mooseError("PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity is only defined for "
44  "at_nodes = false");
45 }
const unsigned int _num_phases
Number of phases.
const MaterialProperty< std::vector< std::vector< Real > > > & _drho_f_qp_dvar
d(rho_f)/d(PorousFlow variable)
const MaterialProperty< std::vector< Real > > & _dporosity_qp_dvar
d(porosity)/d(PorousFlow variable)
PorousFlowTotalGravitationalDensityBase(const InputParameters &parameters)

Member Function Documentation

void PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::computeQpProperties ( )
overrideprotected

Definition at line 55 of file PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.C.

56 {
57  const unsigned ph = 0;
58  _gravdensity[_qp] = _rho_s * (1.0 - _porosity_qp[_qp]) + _rho_f_qp[_qp][ph] * _porosity_qp[_qp];
59 
60  _dgravdensity_dvar[_qp].resize(_num_var);
61  for (unsigned int v = 0; v < _num_var; ++v)
62  {
63  _dgravdensity_dvar[_qp][v] = _dporosity_qp_dvar[_qp][v] * (_rho_f_qp[_qp][ph] - _rho_s) +
64  _drho_f_qp_dvar[_qp][ph][v] * _porosity_qp[_qp];
65  }
66 }
const MaterialProperty< std::vector< std::vector< Real > > > & _drho_f_qp_dvar
d(rho_f)/d(PorousFlow variable)
const unsigned int _num_var
Number of PorousFlow variables.
const MaterialProperty< std::vector< Real > > & _dporosity_qp_dvar
d(porosity)/d(PorousFlow variable)
MaterialProperty< std::vector< Real > > & _dgravdensity_dvar
d(density)/d(PorousFlow variable)
MaterialProperty< Real > & _gravdensity
computed density at quadpoints
void PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::initQpStatefulProperties ( )
overrideprotected

Member Data Documentation

MaterialProperty<std::vector<Real> >& PorousFlowTotalGravitationalDensityBase::_dgravdensity_dvar
protectedinherited

d(density)/d(PorousFlow variable)

Definition at line 32 of file PorousFlowTotalGravitationalDensityBase.h.

Referenced by computeQpProperties().

const MaterialProperty<std::vector<Real> >& PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::_dporosity_qp_dvar
protected

d(porosity)/d(PorousFlow variable)

Definition at line 50 of file PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.h.

Referenced by computeQpProperties().

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::_drho_f_qp_dvar
protected

d(rho_f)/d(PorousFlow variable)

Definition at line 47 of file PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PorousFlowTotalGravitationalDensityBase::_gravdensity
protectedinherited

computed density at quadpoints

Definition at line 29 of file PorousFlowTotalGravitationalDensityBase.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited
const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited
const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited
const MaterialProperty<Real>& PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::_porosity_qp
protected
const MaterialProperty<std::vector<Real> >& PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::_rho_f_qp
protected
const Real PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity::_rho_s
protected

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