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

Darcy advective flux for a fully-saturated, single-phase, multi-component fluid. More...

#include <PorousFlowFullySaturatedDarcyFlow.h>

Inheritance diagram for PorousFlowFullySaturatedDarcyFlow:
[legend]

Public Member Functions

 PorousFlowFullySaturatedDarcyFlow (const InputParameters &parameters)
 

Protected Member Functions

virtual Real mobility () const override
 The mobility of the fluid = mass_fraction * density / viscosity. More...
 
virtual Real dmobility (unsigned pvar) const override
 The derivative of the mobility with respect to the PorousFlow variable pvar. More...
 
virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
 mass fraction of the components in the phase More...
 
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmfrac_dvar
 Derivative of mass fraction wrt wrt PorousFlow variables. More...
 
const unsigned int _fluid_component
 The fluid component for this Kernel. More...
 
const bool _multiply_by_density
 If true then the mobility contains the fluid density, otherwise it doesn't. More...
 
const MaterialProperty< RealTensorValue > & _permeability
 Permeability of porous material. More...
 
const MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_dvar
 d(permeabiity)/d(PorousFlow variable) More...
 
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
 d(permeabiity)/d(grad(PorousFlow variable)) More...
 
const MaterialProperty< std::vector< Real > > & _density
 Fluid density for each phase (at the qp) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dvar
 Derivative of the fluid density for each phase wrt PorousFlow variables (at the qp) More...
 
const MaterialProperty< std::vector< Real > > & _viscosity
 Viscosity of the fluid at the qp. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dviscosity_dvar
 Derivative of the fluid viscosity wrt PorousFlow variables. More...
 
const MaterialProperty< std::vector< Real > > & _pp
 Quadpoint pore pressure in each phase. More...
 
const MaterialProperty< std::vector< RealGradient > > & _grad_p
 Gradient of the pore pressure in each phase. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dgrad_p_dgrad_var
 Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables) More...
 
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _dgrad_p_dvar
 Derivative of Grad porepressure in each phase wrt PorousFlow variables. More...
 
const PorousFlowDictator_dictator
 PorousFlowDictator UserObject. More...
 
const RealVectorValue _gravity
 Gravity pointing downwards. More...
 

Detailed Description

Darcy advective flux for a fully-saturated, single-phase, multi-component fluid.

No upwinding or relative-permeability is used.

Definition at line 25 of file PorousFlowFullySaturatedDarcyFlow.h.

Constructor & Destructor Documentation

◆ PorousFlowFullySaturatedDarcyFlow()

PorousFlowFullySaturatedDarcyFlow::PorousFlowFullySaturatedDarcyFlow ( const InputParameters &  parameters)

Definition at line 26 of file PorousFlowFullySaturatedDarcyFlow.C.

29  _mfrac(getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp")),
30  _dmfrac_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
31  "dPorousFlow_mass_frac_qp_dvar")),
32  _fluid_component(getParam<unsigned int>("fluid_component"))
33 {
35  paramError(
36  "fluid_component",
37  "The Dictator proclaims that the maximum fluid component index in this simulation is ",
39  " whereas you have used ",
41  ". Remember that indexing starts at 0. Happiness equals perfection.");
42 }
unsigned int numComponents() const
The number of fluid components.
PorousFlowFullySaturatedDarcyBase(const InputParameters &parameters)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmfrac_dvar
Derivative of mass fraction wrt wrt PorousFlow variables.
const unsigned int _fluid_component
The fluid component for this Kernel.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.

Member Function Documentation

◆ computeQpJacobian()

Real PorousFlowFullySaturatedDarcyBase::computeQpJacobian ( )
overrideprotectedvirtualinherited

Definition at line 76 of file PorousFlowFullySaturatedDarcyBase.C.

77 {
78  return computeQpOffDiagJacobian(_var.number());
79 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override

◆ computeQpOffDiagJacobian()

Real PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtualinherited

Definition at line 82 of file PorousFlowFullySaturatedDarcyBase.C.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpJacobian().

83 {
85  return 0.0;
86 
87  const unsigned ph = 0;
88  const unsigned pvar = _dictator.porousFlowVariableNum(jvar);
89 
90  const Real mob = mobility();
91  const Real dmob = dmobility(pvar) * _phi[_j][_qp];
92  ;
93 
94  const RealVectorValue flow =
95  _permeability[_qp] * (_grad_p[_qp][ph] - _density[_qp][ph] * _gravity);
96  RealVectorValue dflow = _dpermeability_dvar[_qp][pvar] * _phi[_j][_qp] *
97  (_grad_p[_qp][ph] - _density[_qp][ph] * _gravity);
98  for (unsigned i = 0; i < LIBMESH_DIM; ++i)
99  dflow += _dpermeability_dgradvar[_qp][i][pvar] * _grad_phi[_j][_qp](i) *
100  (_grad_p[_qp][ph] - _density[_qp][ph] * _gravity);
101  dflow += _permeability[_qp] * (_grad_phi[_j][_qp] * _dgrad_p_dgrad_var[_qp][ph][pvar] -
102  _phi[_j][_qp] * _ddensity_dvar[_qp][ph][pvar] * _gravity);
103  dflow += _permeability[_qp] * (_dgrad_p_dvar[_qp][ph][pvar] * _phi[_j][_qp]);
104  return _grad_test[_i][_qp] * (dmob * flow + mob * dflow);
105 }
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
d(permeabiity)/d(grad(PorousFlow variable))
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the PorousFlow variable pvar.
const MaterialProperty< RealTensorValue > & _permeability
Permeability of porous material.
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _dgrad_p_dvar
Derivative of Grad porepressure in each phase wrt PorousFlow variables.
const RealVectorValue _gravity
Gravity pointing downwards.
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables (at the qp) ...
const MaterialProperty< std::vector< RealGradient > > & _grad_p
Gradient of the pore pressure in each phase.
const MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_dvar
d(permeabiity)/d(PorousFlow variable)
const MaterialProperty< std::vector< std::vector< Real > > > & _dgrad_p_dgrad_var
Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables)
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< std::vector< Real > > & _density
Fluid density for each phase (at the qp)

◆ computeQpResidual()

Real PorousFlowFullySaturatedDarcyBase::computeQpResidual ( )
overrideprotectedvirtualinherited

Definition at line 66 of file PorousFlowFullySaturatedDarcyBase.C.

67 {
68  const unsigned ph = 0;
69  const Real mob = mobility();
70  const RealVectorValue flow =
71  _permeability[_qp] * (_grad_p[_qp][ph] - _density[_qp][ph] * _gravity);
72  return _grad_test[_i][_qp] * mob * flow;
73 }
const MaterialProperty< RealTensorValue > & _permeability
Permeability of porous material.
const RealVectorValue _gravity
Gravity pointing downwards.
const MaterialProperty< std::vector< RealGradient > > & _grad_p
Gradient of the pore pressure in each phase.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
const MaterialProperty< std::vector< Real > > & _density
Fluid density for each phase (at the qp)

◆ dmobility()

Real PorousFlowFullySaturatedDarcyFlow::dmobility ( unsigned  pvar) const
overrideprotectedvirtual

The derivative of the mobility with respect to the PorousFlow variable pvar.

Parameters
pvarTake the derivative with respect to this PorousFlow variable

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 52 of file PorousFlowFullySaturatedDarcyFlow.C.

53 {
54  const unsigned ph = 0;
55  const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
56  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
57  return _dmfrac_dvar[_qp][ph][_fluid_component][pvar] * darcy_mob +
58  _mfrac[_qp][ph][_fluid_component] * ddarcy_mob;
59 }
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the PorousFlow variable pvar.
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmfrac_dvar
Derivative of mass fraction wrt wrt PorousFlow variables.
const unsigned int _fluid_component
The fluid component for this Kernel.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase

◆ mobility()

Real PorousFlowFullySaturatedDarcyFlow::mobility ( ) const
overrideprotectedvirtual

The mobility of the fluid = mass_fraction * density / viscosity.

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 45 of file PorousFlowFullySaturatedDarcyFlow.C.

46 {
47  const unsigned ph = 0;
49 }
const unsigned int _fluid_component
The fluid component for this Kernel.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase

Member Data Documentation

◆ _ddensity_dvar

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedDarcyBase::_ddensity_dvar
protectedinherited

Derivative of the fluid density for each phase wrt PorousFlow variables (at the qp)

Definition at line 63 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian(), and PorousFlowFullySaturatedDarcyBase::dmobility().

◆ _density

const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedDarcyBase::_density
protectedinherited

◆ _dgrad_p_dgrad_var

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedDarcyBase::_dgrad_p_dgrad_var
protectedinherited

Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables)

Definition at line 78 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

◆ _dgrad_p_dvar

const MaterialProperty<std::vector<std::vector<RealGradient> > >& PorousFlowFullySaturatedDarcyBase::_dgrad_p_dvar
protectedinherited

Derivative of Grad porepressure in each phase wrt PorousFlow variables.

Definition at line 81 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

◆ _dictator

const PorousFlowDictator& PorousFlowFullySaturatedDarcyBase::_dictator
protectedinherited

◆ _dmfrac_dvar

const MaterialProperty<std::vector<std::vector<std::vector<Real> > > >& PorousFlowFullySaturatedDarcyFlow::_dmfrac_dvar
protected

Derivative of mass fraction wrt wrt PorousFlow variables.

Definition at line 46 of file PorousFlowFullySaturatedDarcyFlow.h.

Referenced by dmobility().

◆ _dpermeability_dgradvar

const MaterialProperty<std::vector<std::vector<RealTensorValue> > >& PorousFlowFullySaturatedDarcyBase::_dpermeability_dgradvar
protectedinherited

d(permeabiity)/d(grad(PorousFlow variable))

Definition at line 57 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

◆ _dpermeability_dvar

const MaterialProperty<std::vector<RealTensorValue> >& PorousFlowFullySaturatedDarcyBase::_dpermeability_dvar
protectedinherited

d(permeabiity)/d(PorousFlow variable)

Definition at line 54 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

◆ _dviscosity_dvar

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedDarcyBase::_dviscosity_dvar
protectedinherited

Derivative of the fluid viscosity wrt PorousFlow variables.

Definition at line 69 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::dmobility().

◆ _fluid_component

const unsigned int PorousFlowFullySaturatedDarcyFlow::_fluid_component
protected

The fluid component for this Kernel.

Definition at line 49 of file PorousFlowFullySaturatedDarcyFlow.h.

Referenced by dmobility(), mobility(), and PorousFlowFullySaturatedDarcyFlow().

◆ _grad_p

const MaterialProperty<std::vector<RealGradient> >& PorousFlowFullySaturatedDarcyBase::_grad_p
protectedinherited

◆ _gravity

const RealVectorValue PorousFlowFullySaturatedDarcyBase::_gravity
protectedinherited

◆ _mfrac

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedDarcyFlow::_mfrac
protected

mass fraction of the components in the phase

Definition at line 43 of file PorousFlowFullySaturatedDarcyFlow.h.

Referenced by dmobility(), and mobility().

◆ _multiply_by_density

const bool PorousFlowFullySaturatedDarcyBase::_multiply_by_density
protectedinherited

If true then the mobility contains the fluid density, otherwise it doesn't.

Definition at line 48 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::dmobility(), and PorousFlowFullySaturatedDarcyBase::mobility().

◆ _permeability

const MaterialProperty<RealTensorValue>& PorousFlowFullySaturatedDarcyBase::_permeability
protectedinherited

◆ _pp

const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedDarcyBase::_pp
protectedinherited

Quadpoint pore pressure in each phase.

Definition at line 72 of file PorousFlowFullySaturatedDarcyBase.h.

◆ _viscosity

const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedDarcyBase::_viscosity
protectedinherited

Viscosity of the fluid at the qp.

Definition at line 66 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::dmobility(), and PorousFlowFullySaturatedDarcyBase::mobility().


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