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  SimulationTypeChoiceEnum { SimulationTypeChoiceEnum::STEADY, SimulationTypeChoiceEnum::TRANSIENT }
 whether steady or transient simulation More...
 

Protected Member Functions

virtual void addDictator () override
 add the PorousFlowDictator object 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 addJoiner (bool at_nodes, const std::string &material_property, const std::string &output_name)
 Adds a PorousFlowJoiner for the material_property Material. More...
 
void joinDensity (bool at_nodes)
 Adds a PorousFlowJoiner for the fluid density. More...
 
void joinViscosity (bool at_nodes)
 Adds a PorousFlowJoiner for the fluid viscosity. More...
 
void joinRelativePermeability (bool at_nodes)
 Adds a PorousFlowJoiner for the fluid relative permeability. More...
 
void joinInternalEnergy (bool at_nodes)
 Adds a PorousFlowJoiner for the fluid internal energy. More...
 
void joinEnthalpy (bool at_nodes)
 Adds a PorousFlowJoiner for the fluid enthalpy. More...
 

Protected Attributes

const NonlinearVariableName _pp_var
 porepressure NonlinearVariable name More...
 
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type
 
enum PorousFlowSinglePhaseBase::SimulationTypeChoiceEnum _simulation_type
 
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 > _objects_to_add
 List of Kernels, AuxKernels, Materials, etc, to be added. More...
 
const std::string _dictator_name
 The name of the PorousFlowDictator object to be added. 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< NonlinearVariableName > & _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...
 
Moose::CoordinateSystemType _coord_system
 Coordinate system of the simulation (eg RZ, XYZ, etc) 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 20 of file PorousFlowFullySaturated.h.

Member Enumeration Documentation

enum PorousFlowSinglePhaseBase::CouplingTypeEnum
strongprotectedinherited

Determines the coupling type.

Enumerator
Hydro 
ThermoHydro 
HydroMechanical 
ThermoHydroMechanical 

Definition at line 34 of file PorousFlowSinglePhaseBase.h.

34  {
35  Hydro,
36  ThermoHydro,
37  HydroMechanical,
38  ThermoHydroMechanical
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type

whether steady or transient simulation

Enumerator
STEADY 
TRANSIENT 

Definition at line 42 of file PorousFlowSinglePhaseBase.h.

42 { STEADY, TRANSIENT } _simulation_type;
enum PorousFlowSinglePhaseBase::SimulationTypeChoiceEnum _simulation_type

Constructor & Destructor Documentation

PorousFlowFullySaturated::PorousFlowFullySaturated ( const InputParameters &  params)

Definition at line 30 of file PorousFlowFullySaturated.C.

32 {
33  _objects_to_add.push_back("PorousFlowFullySaturatedDarcyFlow");
35  _objects_to_add.push_back("PorousFlowMassTimeDerivative");
39  _objects_to_add.push_back("PorousFlowMassVolumetricExpansion");
42  _objects_to_add.push_back("PorousFlowFullySaturatedHeatAdvection");
43 }
std::vector< std::string > _objects_to_add
List of Kernels, AuxKernels, Materials, etc, to be added.
PorousFlowSinglePhaseBase(const InputParameters &params)
enum PorousFlowSinglePhaseBase::SimulationTypeChoiceEnum _simulation_type
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type

Member Function Documentation

void PorousFlowFullySaturated::act ( )
overridevirtual

Reimplemented from PorousFlowSinglePhaseBase.

Definition at line 46 of file PorousFlowFullySaturated.C.

47 {
49 
50  // add the kernels
51  if (_current_task == "add_kernel")
52  {
53  std::string kernel_name = "PorousFlowFullySaturated_DarcyFlow";
54  std::string kernel_type = "PorousFlowFullySaturatedDarcyFlow";
55  InputParameters params = _factory.getValidParams(kernel_type);
56  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
57  params.set<RealVectorValue>("gravity") = _gravity;
58 
59  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
60  {
61  kernel_name = "PorousFlowFullySaturated_DarcyFlow" + Moose::stringify(i);
62  params.set<unsigned int>("fluid_component") = i;
63  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
64  _problem->addKernel(kernel_type, kernel_name, params);
65  }
66  kernel_name = "PorousFlowFullySaturated_DarcyFlow" + Moose::stringify(_num_mass_fraction_vars);
67  params.set<unsigned int>("fluid_component") = _num_mass_fraction_vars;
68  params.set<NonlinearVariableName>("variable") = _pp_var;
69  _problem->addKernel(kernel_type, kernel_name, params);
70  }
71  if (_current_task == "add_kernel" && _simulation_type == SimulationTypeChoiceEnum::TRANSIENT)
72  {
73  std::string kernel_name = "PorousFlowFullySaturated_MassTimeDerivative";
74  std::string kernel_type = "PorousFlowMassTimeDerivative";
75  InputParameters params = _factory.getValidParams(kernel_type);
76  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
77 
78  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
79  {
80  kernel_name = "PorousFlowFullySaturated_MassTimeDerivative" + Moose::stringify(i);
81  params.set<unsigned int>("fluid_component") = i;
82  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
83  _problem->addKernel(kernel_type, kernel_name, params);
84  }
85  kernel_name =
86  "PorousFlowFullySaturated_MassTimeDerivative" + Moose::stringify(_num_mass_fraction_vars);
87  params.set<unsigned int>("fluid_component") = _num_mass_fraction_vars;
88  params.set<NonlinearVariableName>("variable") = _pp_var;
89  _problem->addKernel(kernel_type, kernel_name, params);
90  }
91 
94  _current_task == "add_kernel" && _simulation_type == SimulationTypeChoiceEnum::TRANSIENT)
95  {
96  std::string kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion";
97  std::string kernel_type = "PorousFlowMassVolumetricExpansion";
98  InputParameters params = _factory.getValidParams(kernel_type);
99  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
100  for (unsigned i = 0; i < _num_mass_fraction_vars; ++i)
101  {
102  kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion" + Moose::stringify(i);
103  params.set<unsigned>("fluid_component") = i;
104  params.set<NonlinearVariableName>("variable") = _mass_fraction_vars[i];
105  _problem->addKernel(kernel_type, kernel_name, params);
106  }
107  kernel_name = "PorousFlowFullySaturated_MassVolumetricExpansion" +
108  Moose::stringify(_num_mass_fraction_vars);
109  params.set<unsigned>("fluid_component") = _num_mass_fraction_vars;
110  params.set<NonlinearVariableName>("variable") = _pp_var;
111  _problem->addKernel(kernel_type, kernel_name, params);
112  }
113 
116  _current_task == "add_kernel")
117  {
118  std::string kernel_name = "PorousFlowFullySaturated_HeatAdvection";
119  std::string kernel_type = "PorousFlowFullySaturatedHeatAdvection";
120  InputParameters params = _factory.getValidParams(kernel_type);
121  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
122  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
123  params.set<RealVectorValue>("gravity") = _gravity;
124  _problem->addKernel(kernel_type, kernel_name, params);
125  }
126 
127  // add Materials
128  if (_deps.dependsOn(_objects_to_add, "PorousFlowPS_qp") && _current_task == "add_material")
129  {
130  // saturation is always unity, so is trivially calculated using PorousFlow1PhaseFullySaturated
131  std::string material_type = "PorousFlow1PhaseFullySaturated";
132  InputParameters params = _factory.getValidParams(material_type);
133  std::string material_name = "PorousFlowFullySaturated_1PhaseP_qp";
134  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
135  params.set<std::vector<VariableName>>("porepressure") = {_pp_var};
136  _problem->addMaterial(material_type, material_name, params);
137  }
138  if (_deps.dependsOn(_objects_to_add, "PorousFlowPS_nodal") && _current_task == "add_material")
139  {
140  std::string material_type = "PorousFlow1PhaseFullySaturated";
141  InputParameters params = _factory.getValidParams(material_type);
142  std::string material_name = "PorousFlowFullySaturated_1PhaseP";
143  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
144  params.set<std::vector<VariableName>>("porepressure") = {_pp_var};
145  params.set<bool>("at_nodes") = true;
146  _problem->addMaterial(material_type, material_name, params);
147  }
148 
149  if (_deps.dependsOn(_objects_to_add, "PorousFlowVolumetricStrain_qp") ||
150  _deps.dependsOn(_objects_to_add, "PorousFlowVolumetricStrain_nodal"))
152 
153  if (_deps.dependsOn(_objects_to_add, "PorousFlowRelativePermeability_qp"))
154  addRelativePermeabilityCorey(false, 0, 0.0, 0.0, 0.0);
155  if (_deps.dependsOn(_objects_to_add, "PorousFlowRelativePermeability_nodal"))
156  addRelativePermeabilityCorey(true, 0, 0.0, 0.0, 0.0);
157 }
const std::vector< VariableName > & _mass_fraction_vars
Name of the mass-fraction variables (if any)
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.
std::vector< VariableName > _coupled_displacements
displacement Variable names
std::vector< std::string > _objects_to_add
List of Kernels, AuxKernels, Materials, etc, to be added.
const NonlinearVariableName _pp_var
porepressure NonlinearVariable name
const RealVectorValue _gravity
gravity
const std::vector< VariableName > & _temperature_var
Name of the temperature variable (if any)
enum PorousFlowSinglePhaseBase::SimulationTypeChoiceEnum _simulation_type
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.
void addVolumetricStrainMaterial(const std::vector< VariableName > &displacements, bool consistent_with_displaced_mesh)
Adds a quadpoint volumetric strain material.
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type
DependencyResolver< std::string > _deps
All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.
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 369 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

375 {
376  if (_current_task == "add_material")
377  {
378  std::string material_type = "PorousFlowBrine";
379  InputParameters params = _factory.getValidParams(material_type);
380 
381  params.set<std::vector<VariableName>>("xnacl") = {nacl_brine};
382  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
383  params.set<unsigned int>("phase") = phase;
384  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
385  params.set<bool>("compute_internal_energy") = compute_internal_energy;
386  params.set<bool>("compute_enthalpy") = compute_enthalpy;
387 
388  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
389  if (at_nodes)
390  material_name = "PorousFlowActionBase_FluidProperties";
391 
392  params.set<bool>("at_nodes") = at_nodes;
393  _problem->addMaterial(material_type, material_name, params);
394  }
395 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
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 447 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::act().

448 {
449  if (_current_task == "add_user_object")
450  {
451  std::string userobject_type = "PorousFlowCapillaryPressureVG";
452  InputParameters params = _factory.getValidParams(userobject_type);
453  params.set<Real>("m") = m;
454  params.set<Real>("alpha") = alpha;
455  _problem->addUserObject(userobject_type, userobject_name, params);
456  }
457 }
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 115 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

116 {
117  if (_current_task == "add_aux_variable")
118  {
119  _problem->addAuxVariable("darcy_vel_x",
120  FEType(Utility::string_to_enum<Order>("CONSTANT"),
121  Utility::string_to_enum<FEFamily>("MONOMIAL")));
122  _problem->addAuxVariable("darcy_vel_y",
123  FEType(Utility::string_to_enum<Order>("CONSTANT"),
124  Utility::string_to_enum<FEFamily>("MONOMIAL")));
125  _problem->addAuxVariable("darcy_vel_z",
126  FEType(Utility::string_to_enum<Order>("CONSTANT"),
127  Utility::string_to_enum<FEFamily>("MONOMIAL")));
128  }
129 
130  if (_current_task == "add_aux_kernel")
131  {
132  std::string aux_kernel_type = "PorousFlowDarcyVelocityComponent";
133  InputParameters params = _factory.getValidParams(aux_kernel_type);
134 
135  params.set<RealVectorValue>("gravity") = gravity;
136  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
137  params.set<MultiMooseEnum>("execute_on") = "timestep_end";
138 
139  std::string aux_kernel_name = "PorousFlowActionBase_Darcy_x_Aux";
140  params.set<MooseEnum>("component") = "x";
141  params.set<AuxVariableName>("variable") = "darcy_vel_x";
142  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
143 
144  aux_kernel_name = "PorousFlowActionBase_Darcy_y_Aux";
145  params.set<MooseEnum>("component") = "y";
146  params.set<AuxVariableName>("variable") = "darcy_vel_y";
147  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
148 
149  aux_kernel_name = "PorousFlowActionBase_Darcy_z_Aux";
150  params.set<MooseEnum>("component") = "z";
151  params.set<AuxVariableName>("variable") = "darcy_vel_z";
152  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
153  }
154 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void PorousFlowSinglePhaseBase::addDictator ( )
overrideprotectedvirtualinherited

add the PorousFlowDictator object

Implements PorousFlowActionBase.

Definition at line 275 of file PorousFlowSinglePhaseBase.C.

276 {
277  std::string uo_name = _dictator_name;
278  std::string uo_type = "PorousFlowDictator";
279  InputParameters params = _factory.getValidParams(uo_type);
280  std::vector<VariableName> pf_vars = _mass_fraction_vars;
281  pf_vars.push_back(_pp_var);
284  pf_vars.push_back(_temperature_var[0]);
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  _problem->addUserObject(uo_type, uo_name, params);
292 }
const std::vector< VariableName > & _mass_fraction_vars
Name of the mass-fraction variables (if any)
std::vector< VariableName > _coupled_displacements
displacement Variable names
const NonlinearVariableName _pp_var
porepressure NonlinearVariable name
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.
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type
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 304 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

305 {
306  if (_current_task == "add_material")
307  {
308  std::string material_type = "PorousFlowEffectiveFluidPressure";
309  InputParameters params = _factory.getValidParams(material_type);
310 
311  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
312 
313  std::string material_name = "PorousFlowUnsaturated_EffectiveFluidPressure_qp";
314  if (at_nodes)
315  material_name = "PorousFlowUnsaturated_EffectiveFluidPressure";
316 
317  params.set<bool>("at_nodes") = at_nodes;
318  _problem->addMaterial(material_type, material_name, params);
319  }
320 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void PorousFlowActionBase::addJoiner ( bool  at_nodes,
const std::string &  material_property,
const std::string &  output_name 
)
protectedinherited

Adds a PorousFlowJoiner for the material_property Material.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material
material_propertyJoin this PorousFlow Material
output_nameThe name given to this PorousFlowJoiner in the input file

Definition at line 460 of file PorousFlowActionBase.C.

Referenced by PorousFlowActionBase::joinDensity(), PorousFlowActionBase::joinEnthalpy(), PorousFlowActionBase::joinInternalEnergy(), PorousFlowActionBase::joinRelativePermeability(), and PorousFlowActionBase::joinViscosity().

463 {
464  if (_current_task == "add_material")
465  {
466  std::string material_type = "PorousFlowJoiner";
467  InputParameters params = _factory.getValidParams(material_type);
468  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
469  params.set<bool>("at_nodes") = at_nodes;
470  params.set<std::string>("material_property") = material_property;
471  _problem->addMaterial(material_type, output_name, params);
472  }
473 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
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 279 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

280 {
281  if (_current_task == "add_material")
282  {
283  if (!(parameters().hasDefaultCoupledValue("mass_fraction_vars") ||
284  parameters().hasCoupledValue("mass_fraction_vars")))
285  mooseError("Attempt to add a PorousFlowMassFraction material without setting the "
286  "mass_fraction_vars");
287 
288  std::string material_type = "PorousFlowMassFraction";
289  InputParameters params = _factory.getValidParams(material_type);
290 
291  params.applySpecificParameters(parameters(), {"mass_fraction_vars"});
292  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
293 
294  std::string material_name = "PorousFlowActionBase_MassFraction_qp";
295  if (at_nodes)
296  material_name = "PorousFlowActionBase_MassFraction";
297 
298  params.set<bool>("at_nodes") = at_nodes;
299  _problem->addMaterial(material_type, material_name, params);
300  }
301 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
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 398 of file PorousFlowActionBase.C.

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

401 {
402  if (_current_task == "add_material")
403  {
404  std::string material_type = "PorousFlowRelativePermeabilityCorey";
405  InputParameters params = _factory.getValidParams(material_type);
406 
407  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
408  params.set<Real>("n") = n;
409  params.set<unsigned int>("phase") = phase;
410  params.set<Real>("s_res") = s_res;
411  params.set<Real>("sum_s_res") = sum_s_res;
412 
413  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
414  if (at_nodes)
415  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
416 
417  params.set<bool>("at_nodes") = at_nodes;
418  _problem->addMaterial(material_type, material_name, params);
419  }
420 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
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 423 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::act().

425 {
426  if (_current_task == "add_material")
427  {
428  std::string material_type = "PorousFlowRelativePermeabilityFLAC";
429  InputParameters params = _factory.getValidParams(material_type);
430 
431  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
432  params.set<Real>("m") = m;
433  params.set<unsigned int>("phase") = phase;
434  params.set<Real>("s_res") = s_res;
435  params.set<Real>("sum_s_res") = sum_s_res;
436 
437  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
438  if (at_nodes)
439  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
440 
441  params.set<bool>("at_nodes") = at_nodes;
442  _problem->addMaterial(material_type, material_name, params);
443  }
444 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void PorousFlowActionBase::addSaturationAux ( unsigned  phase)
protectedinherited

Add an AuxVariable and AuxKernel to calculate saturation.

Parameters
phaseSaturation for this fluid phase

Definition at line 91 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::act().

92 {
93  std::string phase_str = Moose::stringify(phase);
94 
95  if (_current_task == "add_aux_variable")
96  _problem->addAuxVariable("saturation" + phase_str,
97  FEType(Utility::string_to_enum<Order>("CONSTANT"),
98  Utility::string_to_enum<FEFamily>("MONOMIAL")));
99 
100  if (_current_task == "add_aux_kernel")
101  {
102  std::string aux_kernel_type = "MaterialStdVectorAux";
103  InputParameters params = _factory.getValidParams(aux_kernel_type);
104 
105  std::string aux_kernel_name = "PorousFlowActionBase_SaturationAux" + phase_str;
106  params.set<MaterialPropertyName>("property") = "PorousFlow_saturation_qp";
107  params.set<unsigned>("index") = phase;
108  params.set<AuxVariableName>("variable") = "saturation" + phase_str;
109  params.set<MultiMooseEnum>("execute_on") = "timestep_end";
110  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
111  }
112 }
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 340 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

346 {
347  if (_current_task == "add_material")
348  {
349  std::string material_type = "PorousFlowSingleComponentFluid";
350  InputParameters params = _factory.getValidParams(material_type);
351 
352  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
353  params.set<unsigned int>("phase") = phase;
354  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
355  params.set<bool>("compute_internal_energy") = compute_internal_energy;
356  params.set<bool>("compute_enthalpy") = compute_enthalpy;
357  params.set<UserObjectName>("fp") = fp;
358 
359  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
360  if (at_nodes)
361  material_name = "PorousFlowActionBase_FluidProperties";
362 
363  params.set<bool>("at_nodes") = at_nodes;
364  _problem->addMaterial(material_type, material_name, params);
365  }
366 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void PorousFlowActionBase::addStressAux ( )
protectedinherited

Add AuxVariables and AuxKernels to compute effective stress.

Definition at line 157 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

158 {
159  if (_current_task == "add_aux_variable")
160  {
161  _problem->addAuxVariable("stress_xx",
162  FEType(Utility::string_to_enum<Order>("CONSTANT"),
163  Utility::string_to_enum<FEFamily>("MONOMIAL")));
164  _problem->addAuxVariable("stress_xy",
165  FEType(Utility::string_to_enum<Order>("CONSTANT"),
166  Utility::string_to_enum<FEFamily>("MONOMIAL")));
167  _problem->addAuxVariable("stress_xz",
168  FEType(Utility::string_to_enum<Order>("CONSTANT"),
169  Utility::string_to_enum<FEFamily>("MONOMIAL")));
170  _problem->addAuxVariable("stress_yx",
171  FEType(Utility::string_to_enum<Order>("CONSTANT"),
172  Utility::string_to_enum<FEFamily>("MONOMIAL")));
173  _problem->addAuxVariable("stress_yy",
174  FEType(Utility::string_to_enum<Order>("CONSTANT"),
175  Utility::string_to_enum<FEFamily>("MONOMIAL")));
176  _problem->addAuxVariable("stress_yz",
177  FEType(Utility::string_to_enum<Order>("CONSTANT"),
178  Utility::string_to_enum<FEFamily>("MONOMIAL")));
179  _problem->addAuxVariable("stress_zx",
180  FEType(Utility::string_to_enum<Order>("CONSTANT"),
181  Utility::string_to_enum<FEFamily>("MONOMIAL")));
182  _problem->addAuxVariable("stress_zy",
183  FEType(Utility::string_to_enum<Order>("CONSTANT"),
184  Utility::string_to_enum<FEFamily>("MONOMIAL")));
185  _problem->addAuxVariable("stress_zz",
186  FEType(Utility::string_to_enum<Order>("CONSTANT"),
187  Utility::string_to_enum<FEFamily>("MONOMIAL")));
188  }
189 
190  if (_current_task == "add_aux_kernel")
191  {
192  std::string aux_kernel_type = "RankTwoAux";
193  InputParameters params = _factory.getValidParams(aux_kernel_type);
194 
195  params.set<MaterialPropertyName>("rank_two_tensor") = "stress";
196  params.set<MultiMooseEnum>("execute_on") = "timestep_end";
197 
198  std::string aux_kernel_name = "PorousFlowAction_stress_xx";
199  params.set<AuxVariableName>("variable") = "stress_xx";
200  params.set<unsigned>("index_i") = 0;
201  params.set<unsigned>("index_j") = 0;
202  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
203 
204  aux_kernel_name = "PorousFlowAction_stress_xy";
205  params.set<AuxVariableName>("variable") = "stress_xy";
206  params.set<unsigned>("index_i") = 0;
207  params.set<unsigned>("index_j") = 1;
208  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
209 
210  aux_kernel_name = "PorousFlowAction_stress_xz";
211  params.set<AuxVariableName>("variable") = "stress_xz";
212  params.set<unsigned>("index_i") = 0;
213  params.set<unsigned>("index_j") = 2;
214  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
215 
216  aux_kernel_name = "PorousFlowAction_stress_yx";
217  params.set<AuxVariableName>("variable") = "stress_yx";
218  params.set<unsigned>("index_i") = 1;
219  params.set<unsigned>("index_j") = 0;
220  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
221 
222  aux_kernel_name = "PorousFlowAction_stress_yy";
223  params.set<AuxVariableName>("variable") = "stress_yy";
224  params.set<unsigned>("index_i") = 1;
225  params.set<unsigned>("index_j") = 1;
226  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
227 
228  aux_kernel_name = "PorousFlowAction_stress_yz";
229  params.set<AuxVariableName>("variable") = "stress_yz";
230  params.set<unsigned>("index_i") = 1;
231  params.set<unsigned>("index_j") = 2;
232  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
233 
234  aux_kernel_name = "PorousFlowAction_stress_zx";
235  params.set<AuxVariableName>("variable") = "stress_zx";
236  params.set<unsigned>("index_i") = 2;
237  params.set<unsigned>("index_j") = 0;
238  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
239 
240  aux_kernel_name = "PorousFlowAction_stress_zy";
241  params.set<AuxVariableName>("variable") = "stress_zy";
242  params.set<unsigned>("index_i") = 2;
243  params.set<unsigned>("index_j") = 1;
244  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
245 
246  aux_kernel_name = "PorousFlowAction_stress_zz";
247  params.set<AuxVariableName>("variable") = "stress_zz";
248  params.set<unsigned>("index_i") = 2;
249  params.set<unsigned>("index_j") = 2;
250  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
251  }
252 }
void PorousFlowActionBase::addTemperatureMaterial ( bool  at_nodes)
protectedinherited

Adds a nodal and a quadpoint Temperature material.

Parameters
at_nodesAdd nodal temperature Material

Definition at line 255 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

256 {
257  if (_current_task == "add_material")
258  {
259  if (!parameters().hasDefaultCoupledValue("temperature"))
260  mooseError(
261  "Attempt to add a PorousFlowTemperature material without setting a temperature variable");
262 
263  std::string material_type = "PorousFlowTemperature";
264  InputParameters params = _factory.getValidParams(material_type);
265 
266  params.applySpecificParameters(parameters(), {"temperature"});
267  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
268 
269  std::string material_name = "PorousFlowActionBase_Temperature_qp";
270  if (at_nodes)
271  material_name = "PorousFlowActionBase_Temperature";
272 
273  params.set<bool>("at_nodes") = at_nodes;
274  _problem->addMaterial(material_type, material_name, params);
275  }
276 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
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 323 of file PorousFlowActionBase.C.

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

325 {
326  if (_current_task == "add_material")
327  {
328  std::string material_type = "PorousFlowVolumetricStrain";
329  InputParameters params = _factory.getValidParams(material_type);
330 
331  std::string material_name = "PorousFlowActionBase_VolumetricStrain";
332  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
333  params.set<std::vector<VariableName>>("displacements") = displacements;
334  params.set<bool>("consistent_with_displaced_mesh") = consistent_with_displaced_mesh;
335  _problem->addMaterial(material_type, material_name, params);
336  }
337 }
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void PorousFlowActionBase::joinDensity ( bool  at_nodes)
protectedinherited

Adds a PorousFlowJoiner for the fluid density.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material

Definition at line 476 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

477 {
478  if (at_nodes)
479  addJoiner(at_nodes,
480  "PorousFlow_fluid_phase_density_nodal",
481  "PorousFlowActionBase_fluid_phase_density_all");
482  else
483  addJoiner(at_nodes,
484  "PorousFlow_fluid_phase_density_qp",
485  "PorousFlowActionBase_fluid_phase_density_qp_all");
486 }
void addJoiner(bool at_nodes, const std::string &material_property, const std::string &output_name)
Adds a PorousFlowJoiner for the material_property Material.
void PorousFlowActionBase::joinEnthalpy ( bool  at_nodes)
protectedinherited

Adds a PorousFlowJoiner for the fluid enthalpy.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material

Definition at line 524 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

525 {
526  if (at_nodes)
527  addJoiner(at_nodes,
528  "PorousFlow_fluid_phase_enthalpy_nodal",
529  "PorousFlowActionBase_fluid_phase_enthalpy_all");
530  else
531  addJoiner(at_nodes,
532  "PorousFlow_fluid_phase_enthalpy_qp",
533  "PorousFlowActionBase_fluid_phase_enthalpy_qp_all");
534 }
void addJoiner(bool at_nodes, const std::string &material_property, const std::string &output_name)
Adds a PorousFlowJoiner for the material_property Material.
void PorousFlowActionBase::joinInternalEnergy ( bool  at_nodes)
protectedinherited

Adds a PorousFlowJoiner for the fluid internal energy.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material

Definition at line 511 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

512 {
513  if (at_nodes)
514  addJoiner(at_nodes,
515  "PorousFlow_fluid_phase_internal_energy_nodal",
516  "PorousFlowActionBase_fluid_phase_internal_energy_all");
517  else
518  addJoiner(at_nodes,
519  "PorousFlow_fluid_phase_internal_energy_qp",
520  "PorousFlowActionBase_fluid_phase_internal_energy_qp_all");
521 }
void addJoiner(bool at_nodes, const std::string &material_property, const std::string &output_name)
Adds a PorousFlowJoiner for the material_property Material.
void PorousFlowActionBase::joinRelativePermeability ( bool  at_nodes)
protectedinherited

Adds a PorousFlowJoiner for the fluid relative permeability.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material

Definition at line 498 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

499 {
500  if (at_nodes)
501  addJoiner(at_nodes,
502  "PorousFlow_relative_permeability_nodal",
503  "PorousFlowActionBase_relative_permeability_all");
504  else
505  addJoiner(at_nodes,
506  "PorousFlow_relative_permeability_qp",
507  "PorousFlowActionBase_relative_permeability_qp_all");
508 }
void addJoiner(bool at_nodes, const std::string &material_property, const std::string &output_name)
Adds a PorousFlowJoiner for the material_property Material.
void PorousFlowActionBase::joinViscosity ( bool  at_nodes)
protectedinherited

Adds a PorousFlowJoiner for the fluid viscosity.

Parameters
at_nodesif true: the Joiner should produce a nodal material, otherwise: produce a QP material

Definition at line 489 of file PorousFlowActionBase.C.

Referenced by PorousFlowSinglePhaseBase::act().

490 {
491  if (at_nodes)
492  addJoiner(at_nodes, "PorousFlow_viscosity_nodal", "PorousFlowActionBase_viscosity_all");
493  else
494  addJoiner(at_nodes, "PorousFlow_viscosity_qp", "PorousFlowActionBase_viscosity_qp_all");
495 }
void addJoiner(bool at_nodes, const std::string &material_property, const std::string &output_name)
Adds a PorousFlowJoiner for the material_property Material.

Member Data Documentation

const bool PorousFlowSinglePhaseBase::_add_darcy_aux
protectedinherited

add a AuxVariables to record Darcy velocity

Definition at line 51 of file PorousFlowSinglePhaseBase.h.

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

const bool PorousFlowSinglePhaseBase::_add_stress_aux
protectedinherited

add AuxVariables for stress

Definition at line 54 of file PorousFlowSinglePhaseBase.h.

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

const Real PorousFlowSinglePhaseBase::_biot_coefficient
protectedinherited

fluid specific heat capacity at constant volume

Definition at line 48 of file PorousFlowSinglePhaseBase.h.

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

Moose::CoordinateSystemType PorousFlowActionBase::_coord_system
protectedinherited

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

Definition at line 65 of file PorousFlowActionBase.h.

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

std::vector<VariableName> PorousFlowActionBase::_coupled_displacements
protectedinherited
enum PorousFlowSinglePhaseBase::CouplingTypeEnum PorousFlowSinglePhaseBase::_coupling_type
protectedinherited
DependencyResolver<std::string> PorousFlowDependencies::_deps
protectedinherited

All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.

Definition at line 36 of file PorousFlowDependencies.h.

Referenced by act(), PorousFlowSinglePhaseBase::act(), PorousFlowUnsaturated::act(), PorousFlowBasicTHM::act(), and PorousFlowDependencies::PorousFlowDependencies().

const std::string PorousFlowActionBase::_dictator_name
protectedinherited
const std::vector<NonlinearVariableName>& PorousFlowActionBase::_displacements
protectedinherited

displacement NonlinearVariable names (if any)

Definition at line 56 of file PorousFlowActionBase.h.

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

const UserObjectName& PorousFlowSinglePhaseBase::_fp
protectedinherited

Name of the fluid-properties UserObject.

Definition at line 45 of file PorousFlowSinglePhaseBase.h.

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

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

Name of the mass-fraction variables (if any)

Definition at line 47 of file PorousFlowActionBase.h.

Referenced by act(), PorousFlowSinglePhaseBase::act(), PorousFlowUnsaturated::act(), and PorousFlowSinglePhaseBase::addDictator().

const unsigned PorousFlowSinglePhaseBase::_nacl_index
protectedinherited

index of NaCl in list of fluid components

Definition at line 60 of file PorousFlowSinglePhaseBase.h.

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

const unsigned PorousFlowActionBase::_ndisp
protectedinherited

number of displacement variables supplied

Definition at line 59 of file PorousFlowActionBase.h.

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

const unsigned PorousFlowActionBase::_num_mass_fraction_vars
protectedinherited
std::vector<std::string> PorousFlowActionBase::_objects_to_add
protectedinherited

List of Kernels, AuxKernels, Materials, etc, to be added.

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 38 of file PorousFlowActionBase.h.

Referenced by act(), PorousFlowSinglePhaseBase::act(), PorousFlowUnsaturated::act(), PorousFlowBasicTHM::act(), PorousFlowBasicTHM::PorousFlowBasicTHM(), PorousFlowFullySaturated(), PorousFlowSinglePhaseBase::PorousFlowSinglePhaseBase(), and PorousFlowUnsaturated::PorousFlowUnsaturated().

const NonlinearVariableName PorousFlowSinglePhaseBase::_pp_var
protectedinherited

porepressure NonlinearVariable name

Definition at line 31 of file PorousFlowSinglePhaseBase.h.

Referenced by act(), PorousFlowUnsaturated::act(), PorousFlowBasicTHM::act(), and PorousFlowSinglePhaseBase::addDictator().

enum PorousFlowSinglePhaseBase::SimulationTypeChoiceEnum PorousFlowSinglePhaseBase::_simulation_type
protectedinherited
const std::vector<VariableName>& PorousFlowActionBase::_temperature_var
protectedinherited
const bool PorousFlowSinglePhaseBase::_use_brine
protectedinherited

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