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

Advection of heat via flux via Darcy flow of a single phase fully-saturated fluid. More...

#include <PorousFlowFullySaturatedHeatAdvection.h>

Inheritance diagram for PorousFlowFullySaturatedHeatAdvection:
[legend]

Public Member Functions

 PorousFlowFullySaturatedHeatAdvection (const InputParameters &parameters)
 

Protected Member Functions

virtual Real mobility () const override
 The mobility of the fluid = 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< Real > > & _enthalpy
 Enthalpy of each phase. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _denthalpy_dvar
 Derivative of the enthalpy wrt PorousFlow variables. 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

Advection of heat via flux via Darcy flow of a single phase fully-saturated fluid.

No upwinding is used.

Definition at line 24 of file PorousFlowFullySaturatedHeatAdvection.h.

Constructor & Destructor Documentation

◆ PorousFlowFullySaturatedHeatAdvection()

PorousFlowFullySaturatedHeatAdvection::PorousFlowFullySaturatedHeatAdvection ( const InputParameters &  parameters)

Definition at line 24 of file PorousFlowFullySaturatedHeatAdvection.C.

27  _enthalpy(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_qp")),
28  _denthalpy_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
29  "dPorousFlow_fluid_phase_enthalpy_qp_dvar"))
30 {
31 }
PorousFlowFullySaturatedDarcyBase(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > & _denthalpy_dvar
Derivative of the enthalpy wrt PorousFlow variables.

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 PorousFlowFullySaturatedHeatAdvection::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 41 of file PorousFlowFullySaturatedHeatAdvection.C.

42 {
43  const unsigned ph = 0;
44  const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
45  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
46  return _denthalpy_dvar[_qp][ph][pvar] * darcy_mob + _enthalpy[_qp][ph] * ddarcy_mob;
47 }
virtual Real dmobility(unsigned pvar) const
The derivative of the mobility with respect to the PorousFlow variable pvar.
const MaterialProperty< std::vector< Real > > & _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > & _denthalpy_dvar
Derivative of the enthalpy wrt PorousFlow variables.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.

◆ mobility()

Real PorousFlowFullySaturatedHeatAdvection::mobility ( ) const
overrideprotectedvirtual

The mobility of the fluid = density / viscosity.

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 34 of file PorousFlowFullySaturatedHeatAdvection.C.

35 {
36  const unsigned ph = 0;
38 }
const MaterialProperty< std::vector< Real > > & _enthalpy
Enthalpy of each phase.
virtual Real mobility() const
The mobility of the fluid = density / viscosity.

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

◆ _denthalpy_dvar

const MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowFullySaturatedHeatAdvection::_denthalpy_dvar
protected

Derivative of the enthalpy wrt PorousFlow variables.

Definition at line 37 of file PorousFlowFullySaturatedHeatAdvection.h.

Referenced by dmobility().

◆ _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

◆ _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().

◆ _enthalpy

const MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedHeatAdvection::_enthalpy
protected

Enthalpy of each phase.

Definition at line 34 of file PorousFlowFullySaturatedHeatAdvection.h.

Referenced by dmobility(), and mobility().

◆ _grad_p

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

◆ _gravity

const RealVectorValue PorousFlowFullySaturatedDarcyBase::_gravity
protectedinherited

◆ _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: