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 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< 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(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

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

No upwinding is used.

Definition at line 22 of file PorousFlowFullySaturatedHeatAdvection.h.

Constructor & Destructor Documentation

PorousFlowFullySaturatedHeatAdvection::PorousFlowFullySaturatedHeatAdvection ( const InputParameters &  parameters)

Definition at line 20 of file PorousFlowFullySaturatedHeatAdvection.C.

23  _enthalpy(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_qp")),
24  _denthalpy_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
25  "dPorousFlow_fluid_phase_enthalpy_qp_dvar"))
26 {
27 }
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

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

38 {
39  const unsigned ph = 0;
40  const Real darcy_mob = PorousFlowFullySaturatedDarcyBase::mobility();
41  const Real ddarcy_mob = PorousFlowFullySaturatedDarcyBase::dmobility(pvar);
42  return _denthalpy_dvar[_qp][ph][pvar] * darcy_mob + _enthalpy[_qp][ph] * ddarcy_mob;
43 }
const MaterialProperty< std::vector< Real > > & _enthalpy
Enthalpy of each phase.
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< Real > > > & _denthalpy_dvar
Derivative of the enthalpy wrt PorousFlow variables.
Real PorousFlowFullySaturatedHeatAdvection::mobility ( ) const
overrideprotectedvirtual

The mobility of the fluid = density / viscosity.

Reimplemented from PorousFlowFullySaturatedDarcyBase.

Definition at line 30 of file PorousFlowFullySaturatedHeatAdvection.C.

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

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> > >& PorousFlowFullySaturatedHeatAdvection::_denthalpy_dvar
protected

Derivative of the enthalpy wrt PorousFlow variables.

Definition at line 35 of file PorousFlowFullySaturatedHeatAdvection.h.

Referenced by dmobility().

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<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 MaterialProperty<std::vector<Real> >& PorousFlowFullySaturatedHeatAdvection::_enthalpy
protected

Enthalpy of each phase.

Definition at line 32 of file PorousFlowFullySaturatedHeatAdvection.h.

Referenced by dmobility(), and mobility().

const MaterialProperty<std::vector<RealGradient> >& PorousFlowFullySaturatedDarcyBase::_grad_p
protectedinherited
const RealVectorValue PorousFlowFullySaturatedDarcyBase::_gravity
protectedinherited
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: