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

Action for simulation involving a single phase fully saturated fluid. More...

#include <PorousFlowFullySaturated.h>

Inheritance diagram for PorousFlowFullySaturated:
[legend]

Public Member Functions

 PorousFlowFullySaturated (const InputParameters &params)
 
virtual void act () override
 

Protected Types

enum  CouplingTypeEnum { CouplingTypeEnum::Hydro, CouplingTypeEnum::ThermoHydro, CouplingTypeEnum::HydroMechanical, CouplingTypeEnum::ThermoHydroMechanical }
 Determines the coupling type. More...
 
enum  StabilizationEnum { StabilizationEnum::Full, StabilizationEnum::KT }
 

Protected Member Functions

virtual void addKernels () override
 Add all Kernels. More...
 
virtual void addMaterialDependencies () override
 Add all material dependencies so that the correct version of each material can be added. More...
 
virtual void addMaterials () override
 Add all Materials. More...
 
virtual void addUserObjects () override
 Add all other UserObjects. More...
 
virtual void addDictator () override
 Add the PorousFlowDictator object. More...
 
virtual void addAuxObjects () override
 Add all AuxVariables and AuxKernels. More...
 
void addSaturationAux (unsigned phase)
 Add an AuxVariable and AuxKernel to calculate saturation. More...
 
void addDarcyAux (const RealVectorValue &gravity)
 Add AuxVariables and AuxKernels to calculate Darcy velocity. More...
 
void addStressAux ()
 Add AuxVariables and AuxKernels to compute effective stress. More...
 
void addTemperatureMaterial (bool at_nodes)
 Adds a nodal and a quadpoint Temperature material. More...
 
void addMassFractionMaterial (bool at_nodes)
 Adds a nodal and a quadpoint MassFraction material. More...
 
void addEffectiveFluidPressureMaterial (bool at_nodes)
 Adds a nodal and a quadpoint effective fluid pressure material. More...
 
void addVolumetricStrainMaterial (const std::vector< VariableName > &displacements, bool consistent_with_displaced_mesh)
 Adds a quadpoint volumetric strain material. More...
 
void addSingleComponentFluidMaterial (bool at_nodes, unsigned phase, bool compute_density_and_viscosity, bool compute_internal_energy, bool compute_enthalpy, const UserObjectName &fp)
 Adds a single-component fluid Material. More...
 
void addBrineMaterial (const VariableName xnacl, bool at_nodes, unsigned phase, bool compute_density_and_viscosity, bool compute_internal_energy, bool compute_enthalpy)
 Adds a brine fluid Material. More...
 
void addRelativePermeabilityCorey (bool at_nodes, unsigned phase, Real n, Real s_res, Real sum_s_res)
 Adds a relative-permeability Material of the Corey variety. More...
 
void addRelativePermeabilityFLAC (bool at_nodes, unsigned phase, Real m, Real s_res, Real sum_s_res)
 Adds a relative-permeability Material of the FLAC variety. More...
 
void addCapillaryPressureVG (Real m, Real alpha, std::string userobject_name)
 Adds a van Genuchten capillary pressure UserObject. More...
 
void addAdvectiveFluxCalculatorSaturated (unsigned phase, bool multiply_by_density, std::string userobject_name)
 
void addAdvectiveFluxCalculatorUnsaturated (unsigned phase, bool multiply_by_density, std::string userobject_name)
 
void addAdvectiveFluxCalculatorSaturatedHeat (unsigned phase, bool multiply_by_density, std::string userobject_name)
 
void addAdvectiveFluxCalculatorUnsaturatedHeat (unsigned phase, bool multiply_by_density, std::string userobject_name)
 
void addAdvectiveFluxCalculatorSaturatedMultiComponent (unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
 
void addAdvectiveFluxCalculatorUnsaturatedMultiComponent (unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
 

Protected Attributes

const VariableName _pp_var
 Porepressure NonlinearVariable name. More...
 
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type
 
const bool _thermal
 Flags to indicate whether thermal or mechanical effects are included. More...
 
const bool _mechanical
 
const UserObjectName & _fp
 Name of the fluid-properties UserObject. More...
 
const Real _biot_coefficient
 Fluid specific heat capacity at constant volume. More...
 
const bool _add_darcy_aux
 Add a AuxVariables to record Darcy velocity. More...
 
const bool _add_stress_aux
 Add AuxVariables for stress. More...
 
const bool _use_brine
 Use PorousFlowBrine material. More...
 
const unsigned _nacl_index
 Index of NaCl in list of fluid components. More...
 
std::vector< std::string > _included_objects
 List of Kernels, AuxKernels, Materials, etc, that are added in this input file. More...
 
const std::string _dictator_name
 The name of the PorousFlowDictator object to be added. More...
 
const unsigned int _num_aqueous_equilibrium
 Number of aqueous-equilibrium secondary species. More...
 
const unsigned int _num_aqueous_kinetic
 Number of aqeuous-kinetic secondary species that are involved in mineralisation. More...
 
const RealVectorValue _gravity
 Gravity. More...
 
const std::vector< VariableName > & _mass_fraction_vars
 Name of the mass-fraction variables (if any) More...
 
const unsigned _num_mass_fraction_vars
 Number of mass-fraction variables. More...
 
const std::vector< VariableName > & _temperature_var
 Name of the temperature variable (if any) More...
 
const std::vector< VariableName > & _displacements
 Displacement NonlinearVariable names (if any) More...
 
const unsigned _ndisp
 Number of displacement variables supplied. More...
 
std::vector< VariableName > _coupled_displacements
 Displacement Variable names. More...
 
const MooseEnum _flux_limiter_type
 Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme. More...
 
enum PorousFlowActionBase::StabilizationEnum _stabilization
 
Moose::CoordinateSystemType _coord_system
 Coordinate system of the simulation (eg RZ, XYZ, etc) More...
 
bool _transient
 Flag to denote if the simulation is transient. More...
 
DependencyResolver< std::string > _deps
 All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies. More...
 

Detailed Description

Action for simulation involving a single phase fully saturated fluid.

Definition at line 23 of file PorousFlowFullySaturated.h.

Member Enumeration Documentation

◆ CouplingTypeEnum

enum PorousFlowSinglePhaseBase::CouplingTypeEnum
strongprotectedinherited

Determines the coupling type.

Enumerator
Hydro 
ThermoHydro 
HydroMechanical 
ThermoHydroMechanical 

Definition at line 39 of file PorousFlowSinglePhaseBase.h.

39  {
40  Hydro,
41  ThermoHydro,
42  HydroMechanical,
43  ThermoHydroMechanical
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type

◆ StabilizationEnum

enum PorousFlowActionBase::StabilizationEnum
strongprotectedinherited
Enumerator
Full 
KT 

Definition at line 84 of file PorousFlowActionBase.h.

84 { Full, KT } _stabilization;
enum PorousFlowActionBase::StabilizationEnum _stabilization

Constructor & Destructor Documentation

◆ PorousFlowFullySaturated()

PorousFlowFullySaturated::PorousFlowFullySaturated ( const InputParameters &  params)

Definition at line 45 of file PorousFlowFullySaturated.C.

47 {
48 }
PorousFlowSinglePhaseBase(const InputParameters &params)

Member Function Documentation

◆ act()

void PorousFlowActionBase::act ( )
overridevirtualinherited

Definition at line 106 of file PorousFlowActionBase.C.

107 {
108  // Check if the simulation is transient (note: can't do this in the ctor)
109  _transient = _problem->isTransient();
110 
111  // Make sure that all mesh subdomains have the same coordinate system
112  const auto & all_subdomains = _problem->mesh().meshSubdomains();
113  if (all_subdomains.empty())
114  mooseError("No subdomains found");
115  _coord_system = _problem->getCoordSystem(*all_subdomains.begin());
116  for (const auto & subdomain : all_subdomains)
117  if (_problem->getCoordSystem(subdomain) != _coord_system)
118  mooseError(
119  "The PorousFlow Actions require all subdomains to have the same coordinate system.");
120 
121  // Note: this must be called before addMaterials!
123 
124  // Make the vector of added objects unique
125  std::sort(_included_objects.begin(), _included_objects.end());
126  _included_objects.erase(std::unique(_included_objects.begin(), _included_objects.end()),
127  _included_objects.end());
128 
129  if (_current_task == "add_user_object")
130  addUserObjects();
131 
132  if (_current_task == "add_aux_variable" || _current_task == "add_aux_kernel")
133  addAuxObjects();
134 
135  if (_current_task == "add_kernel")
136  addKernels();
137 
138  if (_current_task == "add_material")
139  addMaterials();
140 }
Moose::CoordinateSystemType _coord_system
Coordinate system of the simulation (eg RZ, XYZ, etc)
virtual void addKernels()
Add all Kernels.
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
virtual void addMaterials()
Add all Materials.
bool _transient
Flag to denote if the simulation is transient.
virtual void addAuxObjects()
Add all AuxVariables and AuxKernels.
virtual void addUserObjects()
Add all other UserObjects.
virtual void addMaterialDependencies()
Add all material dependencies so that the correct version of each material can be added...

◆ addAdvectiveFluxCalculatorSaturated()

void PorousFlowActionBase::addAdvectiveFluxCalculatorSaturated ( unsigned  phase,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 555 of file PorousFlowActionBase.C.

Referenced by addUserObjects().

558 {
559  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
560  {
561  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturated";
562  InputParameters params = _factory.getValidParams(userobject_type);
563  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
564  params.set<RealVectorValue>("gravity") = _gravity;
565  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
566  params.set<unsigned>("phase") = phase;
567  params.set<bool>("multiply_by_density") = multiply_by_density;
568  _problem->addUserObject(userobject_type, userobject_name, params);
569  }
570 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAdvectiveFluxCalculatorSaturatedHeat()

void PorousFlowActionBase::addAdvectiveFluxCalculatorSaturatedHeat ( unsigned  phase,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 591 of file PorousFlowActionBase.C.

Referenced by addUserObjects().

594 {
595  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
596  {
597  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturatedHeat";
598  InputParameters params = _factory.getValidParams(userobject_type);
599  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
600  params.set<RealVectorValue>("gravity") = _gravity;
601  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
602  params.set<unsigned>("phase") = phase;
603  params.set<bool>("multiply_by_density") = multiply_by_density;
604  _problem->addUserObject(userobject_type, userobject_name, params);
605  }
606 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAdvectiveFluxCalculatorSaturatedMultiComponent()

void PorousFlowActionBase::addAdvectiveFluxCalculatorSaturatedMultiComponent ( unsigned  phase,
unsigned  fluid_component,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 627 of file PorousFlowActionBase.C.

Referenced by addUserObjects().

631 {
632  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
633  {
634  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent";
635  InputParameters params = _factory.getValidParams(userobject_type);
636  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
637  params.set<RealVectorValue>("gravity") = _gravity;
638  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
639  params.set<unsigned>("phase") = phase;
640  params.set<bool>("multiply_by_density") = multiply_by_density;
641  params.set<unsigned>("fluid_component") = fluid_component;
642  _problem->addUserObject(userobject_type, userobject_name, params);
643  }
644 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAdvectiveFluxCalculatorUnsaturated()

void PorousFlowActionBase::addAdvectiveFluxCalculatorUnsaturated ( unsigned  phase,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 573 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

576 {
577  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
578  {
579  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorUnsaturated";
580  InputParameters params = _factory.getValidParams(userobject_type);
581  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
582  params.set<RealVectorValue>("gravity") = _gravity;
583  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
584  params.set<unsigned>("phase") = phase;
585  params.set<bool>("multiply_by_density") = multiply_by_density;
586  _problem->addUserObject(userobject_type, userobject_name, params);
587  }
588 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAdvectiveFluxCalculatorUnsaturatedHeat()

void PorousFlowActionBase::addAdvectiveFluxCalculatorUnsaturatedHeat ( unsigned  phase,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 609 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

612 {
613  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
614  {
615  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorUnsaturatedHeat";
616  InputParameters params = _factory.getValidParams(userobject_type);
617  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
618  params.set<RealVectorValue>("gravity") = _gravity;
619  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
620  params.set<unsigned>("phase") = phase;
621  params.set<bool>("multiply_by_density") = multiply_by_density;
622  _problem->addUserObject(userobject_type, userobject_name, params);
623  }
624 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAdvectiveFluxCalculatorUnsaturatedMultiComponent()

void PorousFlowActionBase::addAdvectiveFluxCalculatorUnsaturatedMultiComponent ( unsigned  phase,
unsigned  fluid_component,
bool  multiply_by_density,
std::string  userobject_name 
)
protectedinherited

Definition at line 647 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

649 {
650  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
651  {
652  const std::string userobject_type =
653  "PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent";
654  InputParameters params = _factory.getValidParams(userobject_type);
655  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
656  params.set<RealVectorValue>("gravity") = _gravity;
657  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
658  params.set<unsigned>("phase") = phase;
659  params.set<bool>("multiply_by_density") = multiply_by_density;
660  params.set<unsigned>("fluid_component") = fluid_component;
661  _problem->addUserObject(userobject_type, userobject_name, params);
662  }
663 }
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAuxObjects()

void PorousFlowSinglePhaseBase::addAuxObjects ( )
overrideprotectedvirtualinherited

Add all AuxVariables and AuxKernels.

Reimplemented from PorousFlowActionBase.

Reimplemented in PorousFlowUnsaturated.

Definition at line 207 of file PorousFlowSinglePhaseBase.C.

Referenced by PorousFlowUnsaturated::addAuxObjects().

208 {
210 
211  if (_add_darcy_aux)
213 
215  addStressAux();
216 }
void addStressAux()
Add AuxVariables and AuxKernels to compute effective stress.
const bool _add_stress_aux
Add AuxVariables for stress.
const bool _add_darcy_aux
Add a AuxVariables to record Darcy velocity.
void addDarcyAux(const RealVectorValue &gravity)
Add AuxVariables and AuxKernels to calculate Darcy velocity.
const RealVectorValue _gravity
Gravity.
virtual void addAuxObjects()
Add all AuxVariables and AuxKernels.

◆ addBrineMaterial()

void PorousFlowActionBase::addBrineMaterial ( const VariableName  xnacl,
bool  at_nodes,
unsigned  phase,
bool  compute_density_and_viscosity,
bool  compute_internal_energy,
bool  compute_enthalpy 
)
protectedinherited

Adds a brine fluid Material.

Parameters
xnaclthe variable containing the mass fraction of NaCl in the fluid
phasethe phase number of the fluid
compute_density_and_viscositycompute the density and viscosity of the fluid
compute_internal_energycompute the fluid internal energy
compute_enthalpycompute the fluid enthalpy
at_nodesadd a nodal material

Definition at line 464 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addMaterials().

470 {
471  if (_current_task == "add_material")
472  {
473  std::string material_type = "PorousFlowBrine";
474  InputParameters params = _factory.getValidParams(material_type);
475 
476  params.set<std::vector<VariableName>>("xnacl") = {nacl_brine};
477  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
478  params.set<unsigned int>("phase") = phase;
479  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
480  params.set<bool>("compute_internal_energy") = compute_internal_energy;
481  params.set<bool>("compute_enthalpy") = compute_enthalpy;
482 
483  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
484  if (at_nodes)
485  material_name = "PorousFlowActionBase_FluidProperties";
486 
487  params.set<bool>("at_nodes") = at_nodes;
488  _problem->addMaterial(material_type, material_name, params);
489  }
490 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addCapillaryPressureVG()

void PorousFlowActionBase::addCapillaryPressureVG ( Real  m,
Real  alpha,
std::string  userobject_name 
)
protectedinherited

Adds a van Genuchten capillary pressure UserObject.

Parameters
mvan Genuchten exponent
alphavan Genuchten alpha
userobject_namename of the user object

Definition at line 542 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

543 {
544  if (_current_task == "add_user_object")
545  {
546  std::string userobject_type = "PorousFlowCapillaryPressureVG";
547  InputParameters params = _factory.getValidParams(userobject_type);
548  params.set<Real>("m") = m;
549  params.set<Real>("alpha") = alpha;
550  _problem->addUserObject(userobject_type, userobject_name, params);
551  }
552 }

◆ addDarcyAux()

void PorousFlowActionBase::addDarcyAux ( const RealVectorValue &  gravity)
protectedinherited

Add AuxVariables and AuxKernels to calculate Darcy velocity.

Parameters
gravitygravitational acceleration pointing downwards (eg (0, 0, -9.8))

Definition at line 210 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addAuxObjects().

211 {
212  if (_current_task == "add_aux_variable")
213  {
214  _problem->addAuxVariable("darcy_vel_x",
215  FEType(Utility::string_to_enum<Order>("CONSTANT"),
216  Utility::string_to_enum<FEFamily>("MONOMIAL")));
217  _problem->addAuxVariable("darcy_vel_y",
218  FEType(Utility::string_to_enum<Order>("CONSTANT"),
219  Utility::string_to_enum<FEFamily>("MONOMIAL")));
220  _problem->addAuxVariable("darcy_vel_z",
221  FEType(Utility::string_to_enum<Order>("CONSTANT"),
222  Utility::string_to_enum<FEFamily>("MONOMIAL")));
223  }
224 
225  if (_current_task == "add_aux_kernel")
226  {
227  std::string aux_kernel_type = "PorousFlowDarcyVelocityComponent";
228  InputParameters params = _factory.getValidParams(aux_kernel_type);
229 
230  params.set<RealVectorValue>("gravity") = gravity;
231  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
232  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
233 
234  std::string aux_kernel_name = "PorousFlowActionBase_Darcy_x_Aux";
235  params.set<MooseEnum>("component") = "x";
236  params.set<AuxVariableName>("variable") = "darcy_vel_x";
237  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
238 
239  aux_kernel_name = "PorousFlowActionBase_Darcy_y_Aux";
240  params.set<MooseEnum>("component") = "y";
241  params.set<AuxVariableName>("variable") = "darcy_vel_y";
242  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
243 
244  aux_kernel_name = "PorousFlowActionBase_Darcy_z_Aux";
245  params.set<MooseEnum>("component") = "z";
246  params.set<AuxVariableName>("variable") = "darcy_vel_z";
247  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
248  }
249 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addDictator()

void PorousFlowSinglePhaseBase::addDictator ( )
overrideprotectedvirtualinherited

Add the PorousFlowDictator object.

Implements PorousFlowActionBase.

Definition at line 277 of file PorousFlowSinglePhaseBase.C.

278 {
279  const std::string uo_name = _dictator_name;
280  const std::string uo_type = "PorousFlowDictator";
281  InputParameters params = _factory.getValidParams(uo_type);
282  std::vector<VariableName> pf_vars = _mass_fraction_vars;
283  pf_vars.push_back(_pp_var);
284  if (_thermal)
285  pf_vars.push_back(_temperature_var[0]);
286  if (_mechanical)
287  pf_vars.insert(pf_vars.end(), _coupled_displacements.begin(), _coupled_displacements.end());
288  params.set<std::vector<VariableName>>("porous_flow_vars") = pf_vars;
289  params.set<unsigned int>("number_fluid_phases") = 1;
290  params.set<unsigned int>("number_fluid_components") = _num_mass_fraction_vars + 1;
291  params.set<unsigned int>("number_aqueous_equilibrium") = _num_aqueous_equilibrium;
292  params.set<unsigned int>("number_aqueous_kinetic") = _num_aqueous_kinetic;
293  _problem->addUserObject(uo_type, uo_name, params);
294 }
const std::vector< VariableName > & _mass_fraction_vars
Name of the mass-fraction variables (if any)
const VariableName _pp_var
Porepressure NonlinearVariable name.
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
const unsigned int _num_aqueous_kinetic
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
const std::vector< VariableName > & _temperature_var
Name of the temperature variable (if any)
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.

◆ addEffectiveFluidPressureMaterial()

void PorousFlowActionBase::addEffectiveFluidPressureMaterial ( bool  at_nodes)
protectedinherited

Adds a nodal and a quadpoint effective fluid pressure material.

Parameters
at_nodesAdd nodal effective fluid pressure material

Definition at line 399 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addMaterials().

400 {
401  if (_current_task == "add_material")
402  {
403  std::string material_type = "PorousFlowEffectiveFluidPressure";
404  InputParameters params = _factory.getValidParams(material_type);
405 
406  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
407 
408  std::string material_name = "PorousFlowUnsaturated_EffectiveFluidPressure_qp";
409  if (at_nodes)
410  material_name = "PorousFlowUnsaturated_EffectiveFluidPressure";
411 
412  params.set<bool>("at_nodes") = at_nodes;
413  _problem->addMaterial(material_type, material_name, params);
414  }
415 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addKernels()

void PorousFlowFullySaturated::addKernels ( )
overrideprotectedvirtual

Add all Kernels.

Reimplemented from PorousFlowSinglePhaseBase.

Definition at line 75 of file PorousFlowFullySaturated.C.

76 {
78 
80  {
81  const std::string kernel_type = "PorousFlowFullySaturatedDarcyFlow";
82  InputParameters params = _factory.getValidParams(kernel_type);
83  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
84  params.set<RealVectorValue>("gravity") = _gravity;
85 
86  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
87  {
88  const std::string kernel_name = "PorousFlowFullySaturated_DarcyFlow" + Moose::stringify(i);
89  params.set<unsigned int>("fluid_component") = i;
90  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
91  _problem->addKernel(kernel_type, kernel_name, params);
92  }
93 
94  const std::string kernel_name =
95  "PorousFlowFullySaturated_DarcyFlow" + Moose::stringify(_num_mass_fraction_vars);
96  params.set<unsigned int>("fluid_component") = _num_mass_fraction_vars;
97  params.set<NonlinearVariableName>("variable") = _pp_var;
98  _problem->addKernel(kernel_type, kernel_name, params);
99  }
101  {
102  const std::string kernel_type = "PorousFlowFluxLimitedTVDAdvection";
103  InputParameters params = _factory.getValidParams(kernel_type);
104  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
105 
106  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
107  {
108  const std::string kernel_name = "PorousFlowFluxLimited_DarcyFlow" + Moose::stringify(i);
109  params.set<UserObjectName>("advective_flux_calculator") =
110  "PorousFlowFullySaturated_AC_" + Moose::stringify(i);
111  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
112  _problem->addKernel(kernel_type, kernel_name, params);
113  }
114 
115  const std::string kernel_name =
116  "PorousFlowFluxLimited_DarcyFlow" + Moose::stringify(_num_mass_fraction_vars);
117  params.set<NonlinearVariableName>("variable") = _pp_var;
118  params.set<UserObjectName>("advective_flux_calculator") =
119  "PorousFlowFullySaturated_AC_" + Moose::stringify(_num_mass_fraction_vars);
120  _problem->addKernel(kernel_type, kernel_name, params);
121  }
122 
123  if (_transient)
124  {
125  std::string kernel_name = "PorousFlowFullySaturated_MassTimeDerivative";
126  std::string kernel_type = "PorousFlowMassTimeDerivative";
127  InputParameters params = _factory.getValidParams(kernel_type);
128  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
129 
130  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
131  {
132  kernel_name = "PorousFlowFullySaturated_MassTimeDerivative" + Moose::stringify(i);
133  params.set<unsigned int>("fluid_component") = i;
134  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
135  _problem->addKernel(kernel_type, kernel_name, params);
136  }
137 
138  kernel_name =
139  "PorousFlowFullySaturated_MassTimeDerivative" + Moose::stringify(_num_mass_fraction_vars);
140  params.set<unsigned int>("fluid_component") = _num_mass_fraction_vars;
141  params.set<NonlinearVariableName>("variable") = _pp_var;
142  _problem->addKernel(kernel_type, kernel_name, params);
143  }
144 
145  if (_mechanical && _transient)
146  {
147  std::string kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion";
148  std::string kernel_type = "PorousFlowMassVolumetricExpansion";
149  InputParameters params = _factory.getValidParams(kernel_type);
150  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
151 
152  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
153  {
154  kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion" + Moose::stringify(i);
155  params.set<unsigned>("fluid_component") = i;
156  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
157  _problem->addKernel(kernel_type, kernel_name, params);
158  }
159 
160  kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion" +
161  Moose::stringify(_num_mass_fraction_vars);
162  params.set<unsigned>("fluid_component") = _num_mass_fraction_vars;
163  params.set<NonlinearVariableName>("variable") = _pp_var;
164  _problem->addKernel(kernel_type, kernel_name, params);
165  }
166 
167  if (_thermal)
168  {
170  {
171  std::string kernel_name = "PorousFlowFullySaturated_HeatAdvection";
172  std::string kernel_type = "PorousFlowFullySaturatedHeatAdvection";
173  InputParameters params = _factory.getValidParams(kernel_type);
174  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
175  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
176  params.set<RealVectorValue>("gravity") = _gravity;
177  _problem->addKernel(kernel_type, kernel_name, params);
178  }
180  {
181  const std::string kernel_name = "PorousFlowFullySaturated_HeatAdvection";
182  const std::string kernel_type = "PorousFlowFluxLimitedTVDAdvection";
183  InputParameters params = _factory.getValidParams(kernel_type);
184  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
185  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
186  params.set<UserObjectName>("advective_flux_calculator") = "PorousFlowFullySaturatedHeat_AC";
187  _problem->addKernel(kernel_type, kernel_name, params);
188  }
189  }
190 }
const std::vector< VariableName > & _mass_fraction_vars
Name of the mass-fraction variables (if any)
const VariableName _pp_var
Porepressure NonlinearVariable name.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
virtual void addKernels() override
Add all Kernels.
const RealVectorValue _gravity
Gravity.
const std::vector< VariableName > & _temperature_var
Name of the temperature variable (if any)
bool _transient
Flag to denote if the simulation is transient.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addMassFractionMaterial()

void PorousFlowActionBase::addMassFractionMaterial ( bool  at_nodes)
protectedinherited

Adds a nodal and a quadpoint MassFraction material.

Parameters
at_nodesAdd nodal mass-fraction material

Definition at line 374 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addMaterials().

375 {
376  if (_current_task == "add_material")
377  {
378  if (!(parameters().hasDefaultCoupledValue("mass_fraction_vars") ||
379  parameters().hasCoupledValue("mass_fraction_vars")))
380  mooseError("Attempt to add a PorousFlowMassFraction material without setting the "
381  "mass_fraction_vars");
382 
383  std::string material_type = "PorousFlowMassFraction";
384  InputParameters params = _factory.getValidParams(material_type);
385 
386  params.applySpecificParameters(parameters(), {"mass_fraction_vars"});
387  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
388 
389  std::string material_name = "PorousFlowActionBase_MassFraction_qp";
390  if (at_nodes)
391  material_name = "PorousFlowActionBase_MassFraction";
392 
393  params.set<bool>("at_nodes") = at_nodes;
394  _problem->addMaterial(material_type, material_name, params);
395  }
396 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addMaterialDependencies()

void PorousFlowFullySaturated::addMaterialDependencies ( )
overrideprotectedvirtual

Add all material dependencies so that the correct version of each material can be added.

Reimplemented from PorousFlowSinglePhaseBase.

Definition at line 51 of file PorousFlowFullySaturated.C.

52 {
54 
55  // Add necessary objects to list of PorousFlow objects added by this action
56  _included_objects.push_back("PorousFlowFullySaturatedDarcyFlow");
57 
58  if (_transient)
59  _included_objects.push_back("PorousFlowMassTimeDerivative");
60 
61  if (_mechanical && _transient)
62  _included_objects.push_back("PorousFlowMassVolumetricExpansion");
63 
64  if (_thermal)
65  _included_objects.push_back("PorousFlowFullySaturatedHeatAdvection");
66 
68  _included_objects.push_back("PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent");
69 
71  _included_objects.push_back("PorousFlowAdvectiveFluxCalculatorSaturatedHeat");
72 }
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
bool _transient
Flag to denote if the simulation is transient.
virtual void addMaterialDependencies() override
Add all material dependencies so that the correct version of each material can be added...
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addMaterials()

void PorousFlowFullySaturated::addMaterials ( )
overrideprotectedvirtual

Add all Materials.

Reimplemented from PorousFlowSinglePhaseBase.

Definition at line 224 of file PorousFlowFullySaturated.C.

225 {
227 
228  // add Materials
229  if (_deps.dependsOn(_included_objects, "pressure_saturation_qp"))
230  {
231  // saturation is always unity, so is trivially calculated using PorousFlow1PhaseFullySaturated
232  std::string material_type = "PorousFlow1PhaseFullySaturated";
233  InputParameters params = _factory.getValidParams(material_type);
234  std::string material_name = "PorousFlowFullySaturated_1PhaseP_qp";
235  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
236  params.set<std::vector<VariableName>>("porepressure") = {_pp_var};
237  params.set<bool>("at_nodes") = false;
238  _problem->addMaterial(material_type, material_name, params);
239  }
240 
241  if (_deps.dependsOn(_included_objects, "pressure_saturation_nodal"))
242  {
243  std::string material_type = "PorousFlow1PhaseFullySaturated";
244  InputParameters params = _factory.getValidParams(material_type);
245  std::string material_name = "PorousFlowFullySaturated_1PhaseP";
246  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
247  params.set<std::vector<VariableName>>("porepressure") = {_pp_var};
248  params.set<bool>("at_nodes") = true;
249  _problem->addMaterial(material_type, material_name, params);
250  }
251 
252  if (_deps.dependsOn(_included_objects, "volumetric_strain_qp") ||
253  _deps.dependsOn(_included_objects, "volumetric_strain_nodal"))
255 
256  if (_deps.dependsOn(_included_objects, "relative_permeability_qp"))
257  addRelativePermeabilityCorey(false, 0, 0.0, 0.0, 0.0);
258 
259  if (_deps.dependsOn(_included_objects, "relative_permeability_nodal"))
260  addRelativePermeabilityCorey(true, 0, 0.0, 0.0, 0.0);
261 }
virtual void addMaterials() override
Add all Materials.
void addRelativePermeabilityCorey(bool at_nodes, unsigned phase, Real n, Real s_res, Real sum_s_res)
Adds a relative-permeability Material of the Corey variety.
const VariableName _pp_var
Porepressure NonlinearVariable name.
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void addVolumetricStrainMaterial(const std::vector< VariableName > &displacements, bool consistent_with_displaced_mesh)
Adds a quadpoint volumetric strain material.
DependencyResolver< std::string > _deps
All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.

◆ addRelativePermeabilityCorey()

void PorousFlowActionBase::addRelativePermeabilityCorey ( bool  at_nodes,
unsigned  phase,
Real  n,
Real  s_res,
Real  sum_s_res 
)
protectedinherited

Adds a relative-permeability Material of the Corey variety.

Parameters
phasethe phase number of the fluid
nThe Corey exponent
s_resThe residual saturation for this phase
sum_s_resThe sum of residual saturations over all phases

Definition at line 493 of file PorousFlowActionBase.C.

Referenced by addMaterials(), PorousFlowUnsaturated::addMaterials(), and PorousFlowBasicTHM::addMaterials().

496 {
497  if (_current_task == "add_material")
498  {
499  std::string material_type = "PorousFlowRelativePermeabilityCorey";
500  InputParameters params = _factory.getValidParams(material_type);
501 
502  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
503  params.set<Real>("n") = n;
504  params.set<unsigned int>("phase") = phase;
505  params.set<Real>("s_res") = s_res;
506  params.set<Real>("sum_s_res") = sum_s_res;
507 
508  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
509  if (at_nodes)
510  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
511 
512  params.set<bool>("at_nodes") = at_nodes;
513  _problem->addMaterial(material_type, material_name, params);
514  }
515 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addRelativePermeabilityFLAC()

void PorousFlowActionBase::addRelativePermeabilityFLAC ( bool  at_nodes,
unsigned  phase,
Real  m,
Real  s_res,
Real  sum_s_res 
)
protectedinherited

Adds a relative-permeability Material of the FLAC variety.

Parameters
phasethe phase number of the fluid
mThe FLAC exponent
s_resThe residual saturation for this phase
sum_s_resThe sum of residual saturations over all phases

Definition at line 518 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addMaterials().

520 {
521  if (_current_task == "add_material")
522  {
523  std::string material_type = "PorousFlowRelativePermeabilityFLAC";
524  InputParameters params = _factory.getValidParams(material_type);
525 
526  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
527  params.set<Real>("m") = m;
528  params.set<unsigned int>("phase") = phase;
529  params.set<Real>("s_res") = s_res;
530  params.set<Real>("sum_s_res") = sum_s_res;
531 
532  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
533  if (at_nodes)
534  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
535 
536  params.set<bool>("at_nodes") = at_nodes;
537  _problem->addMaterial(material_type, material_name, params);
538  }
539 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addSaturationAux()

void PorousFlowActionBase::addSaturationAux ( unsigned  phase)
protectedinherited

Add an AuxVariable and AuxKernel to calculate saturation.

Parameters
phaseSaturation for this fluid phase

Definition at line 186 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addAuxObjects().

187 {
188  std::string phase_str = Moose::stringify(phase);
189 
190  if (_current_task == "add_aux_variable")
191  _problem->addAuxVariable("saturation" + phase_str,
192  FEType(Utility::string_to_enum<Order>("CONSTANT"),
193  Utility::string_to_enum<FEFamily>("MONOMIAL")));
194 
195  if (_current_task == "add_aux_kernel")
196  {
197  std::string aux_kernel_type = "MaterialStdVectorAux";
198  InputParameters params = _factory.getValidParams(aux_kernel_type);
199 
200  std::string aux_kernel_name = "PorousFlowActionBase_SaturationAux" + phase_str;
201  params.set<MaterialPropertyName>("property") = "PorousFlow_saturation_qp";
202  params.set<unsigned>("index") = phase;
203  params.set<AuxVariableName>("variable") = "saturation" + phase_str;
204  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
205  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
206  }
207 }

◆ addSingleComponentFluidMaterial()

void PorousFlowActionBase::addSingleComponentFluidMaterial ( bool  at_nodes,
unsigned  phase,
bool  compute_density_and_viscosity,
bool  compute_internal_energy,
bool  compute_enthalpy,
const UserObjectName &  fp 
)
protectedinherited

Adds a single-component fluid Material.

Parameters
phasethe phase number of the fluid
fpthe name of the FluidProperties UserObject
compute_density_and_viscositycompute the density and viscosity of the fluid
compute_internal_energycompute the fluid internal energy
compute_enthalpycompute the fluid enthalpy
at_nodesadd a nodal material

Definition at line 435 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addMaterials().

441 {
442  if (_current_task == "add_material")
443  {
444  std::string material_type = "PorousFlowSingleComponentFluid";
445  InputParameters params = _factory.getValidParams(material_type);
446 
447  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
448  params.set<unsigned int>("phase") = phase;
449  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
450  params.set<bool>("compute_internal_energy") = compute_internal_energy;
451  params.set<bool>("compute_enthalpy") = compute_enthalpy;
452  params.set<UserObjectName>("fp") = fp;
453 
454  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
455  if (at_nodes)
456  material_name = "PorousFlowActionBase_FluidProperties";
457 
458  params.set<bool>("at_nodes") = at_nodes;
459  _problem->addMaterial(material_type, material_name, params);
460  }
461 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addStressAux()

void PorousFlowActionBase::addStressAux ( )
protectedinherited

Add AuxVariables and AuxKernels to compute effective stress.

Definition at line 252 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addAuxObjects().

253 {
254  if (_current_task == "add_aux_variable")
255  {
256  _problem->addAuxVariable("stress_xx",
257  FEType(Utility::string_to_enum<Order>("CONSTANT"),
258  Utility::string_to_enum<FEFamily>("MONOMIAL")));
259  _problem->addAuxVariable("stress_xy",
260  FEType(Utility::string_to_enum<Order>("CONSTANT"),
261  Utility::string_to_enum<FEFamily>("MONOMIAL")));
262  _problem->addAuxVariable("stress_xz",
263  FEType(Utility::string_to_enum<Order>("CONSTANT"),
264  Utility::string_to_enum<FEFamily>("MONOMIAL")));
265  _problem->addAuxVariable("stress_yx",
266  FEType(Utility::string_to_enum<Order>("CONSTANT"),
267  Utility::string_to_enum<FEFamily>("MONOMIAL")));
268  _problem->addAuxVariable("stress_yy",
269  FEType(Utility::string_to_enum<Order>("CONSTANT"),
270  Utility::string_to_enum<FEFamily>("MONOMIAL")));
271  _problem->addAuxVariable("stress_yz",
272  FEType(Utility::string_to_enum<Order>("CONSTANT"),
273  Utility::string_to_enum<FEFamily>("MONOMIAL")));
274  _problem->addAuxVariable("stress_zx",
275  FEType(Utility::string_to_enum<Order>("CONSTANT"),
276  Utility::string_to_enum<FEFamily>("MONOMIAL")));
277  _problem->addAuxVariable("stress_zy",
278  FEType(Utility::string_to_enum<Order>("CONSTANT"),
279  Utility::string_to_enum<FEFamily>("MONOMIAL")));
280  _problem->addAuxVariable("stress_zz",
281  FEType(Utility::string_to_enum<Order>("CONSTANT"),
282  Utility::string_to_enum<FEFamily>("MONOMIAL")));
283  }
284 
285  if (_current_task == "add_aux_kernel")
286  {
287  std::string aux_kernel_type = "RankTwoAux";
288  InputParameters params = _factory.getValidParams(aux_kernel_type);
289 
290  params.set<MaterialPropertyName>("rank_two_tensor") = "stress";
291  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
292 
293  std::string aux_kernel_name = "PorousFlowAction_stress_xx";
294  params.set<AuxVariableName>("variable") = "stress_xx";
295  params.set<unsigned>("index_i") = 0;
296  params.set<unsigned>("index_j") = 0;
297  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
298 
299  aux_kernel_name = "PorousFlowAction_stress_xy";
300  params.set<AuxVariableName>("variable") = "stress_xy";
301  params.set<unsigned>("index_i") = 0;
302  params.set<unsigned>("index_j") = 1;
303  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
304 
305  aux_kernel_name = "PorousFlowAction_stress_xz";
306  params.set<AuxVariableName>("variable") = "stress_xz";
307  params.set<unsigned>("index_i") = 0;
308  params.set<unsigned>("index_j") = 2;
309  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
310 
311  aux_kernel_name = "PorousFlowAction_stress_yx";
312  params.set<AuxVariableName>("variable") = "stress_yx";
313  params.set<unsigned>("index_i") = 1;
314  params.set<unsigned>("index_j") = 0;
315  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
316 
317  aux_kernel_name = "PorousFlowAction_stress_yy";
318  params.set<AuxVariableName>("variable") = "stress_yy";
319  params.set<unsigned>("index_i") = 1;
320  params.set<unsigned>("index_j") = 1;
321  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
322 
323  aux_kernel_name = "PorousFlowAction_stress_yz";
324  params.set<AuxVariableName>("variable") = "stress_yz";
325  params.set<unsigned>("index_i") = 1;
326  params.set<unsigned>("index_j") = 2;
327  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
328 
329  aux_kernel_name = "PorousFlowAction_stress_zx";
330  params.set<AuxVariableName>("variable") = "stress_zx";
331  params.set<unsigned>("index_i") = 2;
332  params.set<unsigned>("index_j") = 0;
333  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
334 
335  aux_kernel_name = "PorousFlowAction_stress_zy";
336  params.set<AuxVariableName>("variable") = "stress_zy";
337  params.set<unsigned>("index_i") = 2;
338  params.set<unsigned>("index_j") = 1;
339  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
340 
341  aux_kernel_name = "PorousFlowAction_stress_zz";
342  params.set<AuxVariableName>("variable") = "stress_zz";
343  params.set<unsigned>("index_i") = 2;
344  params.set<unsigned>("index_j") = 2;
345  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
346  }
347 }

◆ addTemperatureMaterial()

void PorousFlowActionBase::addTemperatureMaterial ( bool  at_nodes)
protectedinherited

Adds a nodal and a quadpoint Temperature material.

Parameters
at_nodesAdd nodal temperature Material

Definition at line 350 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::addMaterials().

351 {
352  if (_current_task == "add_material")
353  {
354  if (!parameters().hasDefaultCoupledValue("temperature"))
355  mooseError(
356  "Attempt to add a PorousFlowTemperature material without setting a temperature variable");
357 
358  std::string material_type = "PorousFlowTemperature";
359  InputParameters params = _factory.getValidParams(material_type);
360 
361  params.applySpecificParameters(parameters(), {"temperature"});
362  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
363 
364  std::string material_name = "PorousFlowActionBase_Temperature_qp";
365  if (at_nodes)
366  material_name = "PorousFlowActionBase_Temperature";
367 
368  params.set<bool>("at_nodes") = at_nodes;
369  _problem->addMaterial(material_type, material_name, params);
370  }
371 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

◆ addUserObjects()

void PorousFlowFullySaturated::addUserObjects ( )
overrideprotectedvirtual

Add all other UserObjects.

Reimplemented from PorousFlowActionBase.

Definition at line 193 of file PorousFlowFullySaturated.C.

194 {
196 
197  // add Advective Flux calculator UserObjects, if required
199  {
200  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
201  {
202  const std::string userobject_name = "PorousFlowFullySaturated_AC_" + Moose::stringify(i);
203  addAdvectiveFluxCalculatorSaturatedMultiComponent(0, i, true, userobject_name);
204  }
205 
206  const std::string userobject_name =
207  "PorousFlowFullySaturated_AC_" + Moose::stringify(_num_mass_fraction_vars);
208 
209  if (_num_mass_fraction_vars == 0)
210  addAdvectiveFluxCalculatorSaturated(0, true, userobject_name); // 1 component only
211  else
213  0, _num_mass_fraction_vars, true, userobject_name);
214 
215  if (_thermal)
216  {
217  const std::string userobject_name = "PorousFlowFullySaturatedHeat_AC";
218  addAdvectiveFluxCalculatorSaturatedHeat(0, true, userobject_name);
219  }
220  }
221 }
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
void addAdvectiveFluxCalculatorSaturated(unsigned phase, bool multiply_by_density, std::string userobject_name)
void addAdvectiveFluxCalculatorSaturatedMultiComponent(unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
virtual void addUserObjects()
Add all other UserObjects.
void addAdvectiveFluxCalculatorSaturatedHeat(unsigned phase, bool multiply_by_density, std::string userobject_name)
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addVolumetricStrainMaterial()

void PorousFlowActionBase::addVolumetricStrainMaterial ( const std::vector< VariableName > &  displacements,
bool  consistent_with_displaced_mesh 
)
protectedinherited

Adds a quadpoint volumetric strain material.

Parameters
displacementsthe names of the displacement variables
consistent_with_displaced_meshThe volumetric strain should be consistent with the displaced mesh

Definition at line 418 of file PorousFlowActionBase.C.

Referenced by addMaterials(), PorousFlowUnsaturated::addMaterials(), and PorousFlowBasicTHM::addMaterials().

420 {
421  if (_current_task == "add_material")
422  {
423  std::string material_type = "PorousFlowVolumetricStrain";
424  InputParameters params = _factory.getValidParams(material_type);
425 
426  std::string material_name = "PorousFlowActionBase_VolumetricStrain";
427  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
428  params.set<std::vector<VariableName>>("displacements") = displacements;
429  params.set<bool>("consistent_with_displaced_mesh") = consistent_with_displaced_mesh;
430  _problem->addMaterial(material_type, material_name, params);
431  }
432 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.

Member Data Documentation

◆ _add_darcy_aux

const bool PorousFlowSinglePhaseBase::_add_darcy_aux
protectedinherited

Add a AuxVariables to record Darcy velocity.

Definition at line 57 of file PorousFlowSinglePhaseBase.h.

Referenced by PorousFlowSinglePhaseBase::addAuxObjects(), and PorousFlowSinglePhaseBase::addMaterialDependencies().

◆ _add_stress_aux

const bool PorousFlowSinglePhaseBase::_add_stress_aux
protectedinherited

Add AuxVariables for stress.

Definition at line 60 of file PorousFlowSinglePhaseBase.h.

Referenced by PorousFlowSinglePhaseBase::addAuxObjects(), and PorousFlowSinglePhaseBase::addMaterialDependencies().

◆ _biot_coefficient

const Real PorousFlowSinglePhaseBase::_biot_coefficient
protectedinherited

Fluid specific heat capacity at constant volume.

Definition at line 54 of file PorousFlowSinglePhaseBase.h.

Referenced by PorousFlowSinglePhaseBase::addKernels(), and PorousFlowBasicTHM::addKernels().

◆ _coord_system

Moose::CoordinateSystemType PorousFlowActionBase::_coord_system
protectedinherited

Coordinate system of the simulation (eg RZ, XYZ, etc)

Definition at line 87 of file PorousFlowActionBase.h.

Referenced by PorousFlowActionBase::act(), and PorousFlowSinglePhaseBase::addKernels().

◆ _coupled_displacements

std::vector<VariableName> PorousFlowActionBase::_coupled_displacements
protectedinherited

◆ _coupling_type

enum PorousFlowSinglePhaseBase::CouplingTypeEnum PorousFlowSinglePhaseBase::_coupling_type
protectedinherited

◆ _deps

DependencyResolver<std::string> PorousFlowDependencies::_deps
protectedinherited

◆ _dictator_name

const std::string PorousFlowActionBase::_dictator_name
protectedinherited

◆ _displacements

const std::vector<VariableName>& PorousFlowActionBase::_displacements
protectedinherited

Displacement NonlinearVariable names (if any)

Definition at line 73 of file PorousFlowActionBase.h.

Referenced by PorousFlowSinglePhaseBase::addKernels(), and PorousFlowActionBase::PorousFlowActionBase().

◆ _flux_limiter_type

const MooseEnum PorousFlowActionBase::_flux_limiter_type
protectedinherited

◆ _fp

const UserObjectName& PorousFlowSinglePhaseBase::_fp
protectedinherited

Name of the fluid-properties UserObject.

Definition at line 51 of file PorousFlowSinglePhaseBase.h.

Referenced by PorousFlowSinglePhaseBase::addMaterials(), and PorousFlowSinglePhaseBase::PorousFlowSinglePhaseBase().

◆ _gravity

const RealVectorValue PorousFlowActionBase::_gravity
protectedinherited

◆ _included_objects

std::vector<std::string> PorousFlowActionBase::_included_objects
protectedinherited

List of Kernels, AuxKernels, Materials, etc, that are added in this input file.

This list will be used to determine what Materials need to be added. Actions may add or remove things from this list

Definition at line 49 of file PorousFlowActionBase.h.

Referenced by PorousFlowActionBase::act(), addMaterialDependencies(), PorousFlowSinglePhaseBase::addMaterialDependencies(), PorousFlowUnsaturated::addMaterialDependencies(), PorousFlowBasicTHM::addMaterialDependencies(), PorousFlowActionBase::addMaterialDependencies(), addMaterials(), PorousFlowSinglePhaseBase::addMaterials(), PorousFlowBasicTHM::addMaterials(), and PorousFlowUnsaturated::addMaterials().

◆ _mass_fraction_vars

const std::vector<VariableName>& PorousFlowActionBase::_mass_fraction_vars
protectedinherited

Name of the mass-fraction variables (if any)

Definition at line 64 of file PorousFlowActionBase.h.

Referenced by PorousFlowSinglePhaseBase::addDictator(), addKernels(), PorousFlowUnsaturated::addKernels(), and PorousFlowSinglePhaseBase::addMaterials().

◆ _mechanical

const bool PorousFlowSinglePhaseBase::_mechanical
protectedinherited

◆ _nacl_index

const unsigned PorousFlowSinglePhaseBase::_nacl_index
protectedinherited

Index of NaCl in list of fluid components.

Definition at line 66 of file PorousFlowSinglePhaseBase.h.

Referenced by PorousFlowSinglePhaseBase::addMaterials(), and PorousFlowSinglePhaseBase::PorousFlowSinglePhaseBase().

◆ _ndisp

const unsigned PorousFlowActionBase::_ndisp
protectedinherited

Number of displacement variables supplied.

Definition at line 76 of file PorousFlowActionBase.h.

Referenced by PorousFlowSinglePhaseBase::addKernels(), and PorousFlowActionBase::PorousFlowActionBase().

◆ _num_aqueous_equilibrium

const unsigned int PorousFlowActionBase::_num_aqueous_equilibrium
protectedinherited

Number of aqueous-equilibrium secondary species.

Definition at line 55 of file PorousFlowActionBase.h.

Referenced by PorousFlowSinglePhaseBase::addDictator().

◆ _num_aqueous_kinetic

const unsigned int PorousFlowActionBase::_num_aqueous_kinetic
protectedinherited

Number of aqeuous-kinetic secondary species that are involved in mineralisation.

Definition at line 58 of file PorousFlowActionBase.h.

Referenced by PorousFlowSinglePhaseBase::addDictator().

◆ _num_mass_fraction_vars

const unsigned PorousFlowActionBase::_num_mass_fraction_vars
protectedinherited

◆ _pp_var

const VariableName PorousFlowSinglePhaseBase::_pp_var
protectedinherited

◆ _stabilization

enum PorousFlowActionBase::StabilizationEnum PorousFlowActionBase::_stabilization
protectedinherited

◆ _temperature_var

const std::vector<VariableName>& PorousFlowActionBase::_temperature_var
protectedinherited

◆ _thermal

const bool PorousFlowSinglePhaseBase::_thermal
protectedinherited

◆ _transient

bool PorousFlowActionBase::_transient
protectedinherited

◆ _use_brine

const bool PorousFlowSinglePhaseBase::_use_brine
protectedinherited

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