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

Base class Material designed to provide the tortuosity and diffusion coefficents. More...

#include <PorousFlowDiffusivityBase.h>

Inheritance diagram for PorousFlowDiffusivityBase:
[legend]

Public Member Functions

 PorousFlowDiffusivityBase (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties () override
 

Protected Attributes

MaterialProperty< std::vector< Real > > & _tortuosity
 Tortuosity tau_0 * tau_{alpha} for fluid phase alpha. More...
 
MaterialProperty< std::vector< std::vector< Real > > > & _dtortuosity_dvar
 Derivative of tortuosity wrt PorousFlow variables. More...
 
MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
 Diffusion coefficients of component k in fluid phase alpha. More...
 
MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _ddiffusion_coeff_dvar
 Derivative of the diffusion coefficients wrt PorousFlow variables. More...
 
const std::vector< Real > _input_diffusion_coeff
 Input diffusion coefficients. 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

Base class Material designed to provide the tortuosity and diffusion coefficents.

Definition at line 21 of file PorousFlowDiffusivityBase.h.

Constructor & Destructor Documentation

◆ PorousFlowDiffusivityBase()

PorousFlowDiffusivityBase::PorousFlowDiffusivityBase ( const InputParameters &  parameters)

Definition at line 28 of file PorousFlowDiffusivityBase.C.

29  : PorousFlowMaterialVectorBase(parameters),
30 
31  _tortuosity(declareProperty<std::vector<Real>>("PorousFlow_tortuosity_qp")),
33  declareProperty<std::vector<std::vector<Real>>>("dPorousFlow_tortuosity_qp_dvar")),
35  declareProperty<std::vector<std::vector<Real>>>("PorousFlow_diffusion_coeff_qp")),
36  _ddiffusion_coeff_dvar(declareProperty<std::vector<std::vector<std::vector<Real>>>>(
37  "dPorousFlow_diffusion_coeff_qp_dvar")),
38  _input_diffusion_coeff(getParam<std::vector<Real>>("diffusion_coeff"))
39 {
40  // Also, the number of diffusion coefficients must be equal to the num_phases * num_components
42  paramError("diffusion_coeff",
43  "The number of diffusion coefficients entered is not equal to the number of phases "
44  "multiplied by the number of fluid components");
45 
46  if (_nodal_material == true)
47  mooseError("PorousFlowRelativeDiffusivity classes are only defined for at_nodes = false");
48 }
const unsigned int _num_phases
Number of phases.
const unsigned int _num_components
Number of fluid components.
MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
PorousFlowMaterialVectorBase(const InputParameters &parameters)
MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _ddiffusion_coeff_dvar
Derivative of the diffusion coefficients wrt PorousFlow variables.
MaterialProperty< std::vector< std::vector< Real > > > & _dtortuosity_dvar
Derivative of tortuosity wrt PorousFlow variables.
MaterialProperty< std::vector< Real > > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
const std::vector< Real > _input_diffusion_coeff
Input diffusion coefficients.

Member Function Documentation

◆ computeQpProperties()

void PorousFlowDiffusivityBase::computeQpProperties ( )
overrideprotectedvirtual

Reimplemented in PorousFlowDiffusivityMillingtonQuirk, and PorousFlowDiffusivityConst.

Definition at line 51 of file PorousFlowDiffusivityBase.C.

Referenced by PorousFlowDiffusivityConst::computeQpProperties(), and PorousFlowDiffusivityMillingtonQuirk::computeQpProperties().

52 {
53  _diffusion_coeff[_qp].resize(_num_phases);
55  _dtortuosity_dvar[_qp].resize(_num_phases);
56 
57  for (unsigned int ph = 0; ph < _num_phases; ++ph)
58  {
59  _diffusion_coeff[_qp][ph].resize(_num_components);
60  _ddiffusion_coeff_dvar[_qp][ph].resize(_num_components);
61  _dtortuosity_dvar[_qp][ph].assign(_num_var, 0.0);
62 
63  for (unsigned int comp = 0; comp < _num_components; ++comp)
64  {
65  _diffusion_coeff[_qp][ph][comp] = _input_diffusion_coeff[ph + comp];
66  _ddiffusion_coeff_dvar[_qp][ph][comp].assign(_num_var, 0.0);
67  }
68  }
69 }
const unsigned int _num_phases
Number of phases.
const unsigned int _num_components
Number of fluid components.
MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
const unsigned int _num_var
Number of PorousFlow variables.
MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _ddiffusion_coeff_dvar
Derivative of the diffusion coefficients wrt PorousFlow variables.
MaterialProperty< std::vector< std::vector< Real > > > & _dtortuosity_dvar
Derivative of tortuosity wrt PorousFlow variables.
const std::vector< Real > _input_diffusion_coeff
Input diffusion coefficients.

Member Data Documentation

◆ _ddiffusion_coeff_dvar

MaterialProperty<std::vector<std::vector<std::vector<Real> > > >& PorousFlowDiffusivityBase::_ddiffusion_coeff_dvar
protected

Derivative of the diffusion coefficients wrt PorousFlow variables.

Definition at line 39 of file PorousFlowDiffusivityBase.h.

Referenced by computeQpProperties().

◆ _diffusion_coeff

MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowDiffusivityBase::_diffusion_coeff
protected

Diffusion coefficients of component k in fluid phase alpha.

Definition at line 36 of file PorousFlowDiffusivityBase.h.

Referenced by computeQpProperties().

◆ _dtortuosity_dvar

MaterialProperty<std::vector<std::vector<Real> > >& PorousFlowDiffusivityBase::_dtortuosity_dvar
protected

Derivative of tortuosity wrt PorousFlow variables.

Definition at line 33 of file PorousFlowDiffusivityBase.h.

Referenced by computeQpProperties(), and PorousFlowDiffusivityMillingtonQuirk::computeQpProperties().

◆ _input_diffusion_coeff

const std::vector<Real> PorousFlowDiffusivityBase::_input_diffusion_coeff
protected

Input diffusion coefficients.

Definition at line 42 of file PorousFlowDiffusivityBase.h.

Referenced by computeQpProperties(), and PorousFlowDiffusivityBase().

◆ _num_components

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited

◆ _num_phases

const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited

◆ _num_var

const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited

◆ _tortuosity

MaterialProperty<std::vector<Real> >& PorousFlowDiffusivityBase::_tortuosity
protected

Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.

Definition at line 30 of file PorousFlowDiffusivityBase.h.

Referenced by PorousFlowDiffusivityConst::computeQpProperties(), and PorousFlowDiffusivityMillingtonQuirk::computeQpProperties().


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