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 porous-flow 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(porous-flow variable) More...
 
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
 d(permeabiity)/d(grad(porous-flow 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_porousflow_dictator
 PorousFlow 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 23 of file PorousFlowFullySaturatedDarcyFlow.h.

Constructor & Destructor Documentation

PorousFlowFullySaturatedDarcyFlow::PorousFlowFullySaturatedDarcyFlow ( const InputParameters &  parameters)

Definition at line 22 of file PorousFlowFullySaturatedDarcyFlow.C.

25  _mfrac(getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp")),
26  _dmfrac_dvar(getMaterialProperty<std::vector<std::vector<std::vector<Real>>>>(
27  "dPorousFlow_mass_frac_qp_dvar")),
28  _fluid_component(getParam<unsigned int>("fluid_component"))
29 {
31  mooseError("PorousFlowFullySaturatedDarcyFlow: The dictator proclaims the number of fluid "
32  "components is ",
34  " whereas you set the fluid_component = ",
36  ". Happyness equals perfection.");
37 }
unsigned int numComponents() const
the number of fluid components
PorousFlowFullySaturatedDarcyBase(const InputParameters &parameters)
const PorousFlowDictator & _porousflow_dictator
PorousFlow UserObject.
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

Member Function Documentation

Real PorousFlowFullySaturatedDarcyBase::computeQpJacobian ( )
overrideprotectedvirtualinherited

Definition at line 73 of file PorousFlowFullySaturatedDarcyBase.C.

74 {
75  return computeQpOffDiagJacobian(_var.number());
76 }
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Real PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtualinherited

Definition at line 79 of file PorousFlowFullySaturatedDarcyBase.C.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpJacobian().

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

Definition at line 63 of file PorousFlowFullySaturatedDarcyBase.C.

64 {
65  const unsigned ph = 0;
66  const Real mob = mobility();
67  const RealVectorValue flow =
68  _permeability[_qp] * (_grad_p[_qp][ph] - _density[_qp][ph] * _gravity);
69  return _grad_test[_i][_qp] * mob * flow;
70 }
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)
Real PorousFlowFullySaturatedDarcyFlow::dmobility ( unsigned  pvar) const
overrideprotectedvirtual

The derivative of the mobility with respect to the porous-flow variable pvar.

Parameters
pvarTake the derivative with respect to this porous-flow variable

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 47 of file PorousFlowFullySaturatedDarcyFlow.C.

48 {
49  const unsigned ph = 0;
50  const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
51  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
52  return _dmfrac_dvar[_qp][ph][_fluid_component][pvar] * darcy_mob +
53  _mfrac[_qp][ph][_fluid_component] * ddarcy_mob;
54 }
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the porous-flow 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.
const MaterialProperty< std::vector< std::vector< Real > > > & _mfrac
mass fraction of the components in the phase
Real PorousFlowFullySaturatedDarcyFlow::mobility ( ) const
overrideprotectedvirtual

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

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 40 of file PorousFlowFullySaturatedDarcyFlow.C.

41 {
42  const unsigned ph = 0;
44 }
virtual Real mobility() const
The mobility of the fluid = density / viscosity.
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

Member Data Documentation

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 61 of file PorousFlowFullySaturatedDarcyBase.h.

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

const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedDarcyBase::_density
protectedinherited
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 76 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

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 79 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

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

Derivative of mass fraction wrt wrt PorousFlow variables.

Definition at line 44 of file PorousFlowFullySaturatedDarcyFlow.h.

Referenced by dmobility().

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

d(permeabiity)/d(grad(porous-flow variable))

Definition at line 55 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

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

d(permeabiity)/d(porous-flow variable)

Definition at line 52 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian().

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

Derivative of the fluid viscosity wrt PorousFlow variables.

Definition at line 67 of file PorousFlowFullySaturatedDarcyBase.h.

Referenced by PorousFlowFullySaturatedDarcyBase::dmobility().

const unsigned int PorousFlowFullySaturatedDarcyFlow::_fluid_component
protected

The fluid component for this Kernel.

Definition at line 47 of file PorousFlowFullySaturatedDarcyFlow.h.

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

const MaterialProperty<std::vector<RealGradient> >& PorousFlowFullySaturatedDarcyBase::_grad_p
protectedinherited
const RealVectorValue PorousFlowFullySaturatedDarcyBase::_gravity
protectedinherited
const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedDarcyFlow::_mfrac
protected

mass fraction of the components in the phase

Definition at line 41 of file PorousFlowFullySaturatedDarcyFlow.h.

Referenced by dmobility(), and mobility().

const bool PorousFlowFullySaturatedDarcyBase::_multiply_by_density
protectedinherited

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

Definition at line 46 of file PorousFlowFullySaturatedDarcyBase.h.

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

const MaterialProperty<RealTensorValue>& PorousFlowFullySaturatedDarcyBase::_permeability
protectedinherited
const PorousFlowDictator& PorousFlowFullySaturatedDarcyBase::_porousflow_dictator
protectedinherited
const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedDarcyBase::_pp
protectedinherited

Quadpoint pore pressure in each phase.

Definition at line 70 of file PorousFlowFullySaturatedDarcyBase.h.

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

Viscosity of the fluid at the qp.

Definition at line 64 of file PorousFlowFullySaturatedDarcyBase.h.

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


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