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

Base class for actions involving a single fluid phase. More...

#include <PorousFlowSinglePhaseBase.h>

Inheritance diagram for PorousFlowSinglePhaseBase:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 PorousFlowSinglePhaseBase (const InputParameters &params)
 
virtual void act () override
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type) override
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void timedAct ()
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
PerfGraphperfGraph ()
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Types

enum  CouplingTypeEnum { CouplingTypeEnum::Hydro, CouplingTypeEnum::ThermoHydro, CouplingTypeEnum::HydroMechanical, CouplingTypeEnum::ThermoHydroMechanical }
 Determines the coupling type. More...
 
enum  FluidPropertiesTypeEnum { FluidPropertiesTypeEnum::PorousFlowSingleComponentFluid, FluidPropertiesTypeEnum::PorousFlowBrine, FluidPropertiesTypeEnum::Custom }
 Determines the fluid-properties type. More...
 
enum  StabilizationEnum { StabilizationEnum::None, StabilizationEnum::Full, StabilizationEnum::KT }
 

Protected Member Functions

virtual void addDictator () override
 Add the PorousFlowDictator object. More...
 
virtual void addKernels () override
 Add all Kernels. More...
 
virtual void addAuxObjects () override
 Add all AuxVariables and AuxKernels. 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...
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
virtual void addUserObjects ()
 Add all other UserObjects. 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 addNearestQpMaterial ()
 Adds a PorousFlowNearestQp material. More...
 
void addVolumetricStrainMaterial (const std::vector< VariableName > &displacements, const std::string &base_name)
 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, const MooseEnum &temperature_unit, const MooseEnum &pressure_unit, const MooseEnum &time_unit)
 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, const MooseEnum &temperature_unit)
 Adds a brine fluid Material. More...
 
void addRelativePermeabilityConst (bool at_nodes, unsigned phase, Real kr)
 Adds a relative-permeability Material of the constant variety (primarily to add kr = 1 in actions that add a default relatively permeability for objects that require kr even when the flow is fully saturated with a single phase) 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)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

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
 
enum PorousFlowSinglePhaseBase::FluidPropertiesTypeEnum _fluid_properties_type
 
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...
 
VariableName _nacl_name
 Name of the NaCl variable. More...
 
const std::vector< AuxVariableName > _save_component_rate_in
 Name of the variables (if any) that will record the fluid-components' rate of change. More...
 
const MooseEnum _temperature_unit
 Unit used for temperature. More...
 
const MooseEnum _pressure_unit
 Unit used for porepressure. More...
 
const MooseEnum _time_unit
 Unit used for time. More...
 
const std::string _base_name
 base_name used in the TensorMechanics strain calculator 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
 
const bool _strain_at_nearest_qp
 Evaluate strain at the nearest quadpoint for porosity that depends on strain. More...
 
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...
 
std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 
DependencyResolver< std::string > _deps
 All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies. More...
 

Detailed Description

Base class for actions involving a single fluid phase.

Definition at line 17 of file PorousFlowSinglePhaseBase.h.

Member Enumeration Documentation

◆ CouplingTypeEnum

Determines the coupling type.

Enumerator
Hydro 
ThermoHydro 
HydroMechanical 
ThermoHydroMechanical 

Definition at line 35 of file PorousFlowSinglePhaseBase.h.

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

◆ FluidPropertiesTypeEnum

Determines the fluid-properties type.

Enumerator
PorousFlowSingleComponentFluid 
PorousFlowBrine 
Custom 

Definition at line 47 of file PorousFlowSinglePhaseBase.h.

47  {
50  Custom
PorousFlowSingleComponentFluidTempl< false > PorousFlowSingleComponentFluid
Fluid properties of Brine.
enum PorousFlowSinglePhaseBase::FluidPropertiesTypeEnum _fluid_properties_type

◆ StabilizationEnum

enum PorousFlowActionBase::StabilizationEnum
strongprotectedinherited
Enumerator
None 
Full 
KT 

Definition at line 83 of file PorousFlowActionBase.h.

83 { None, Full, KT } _stabilization;
enum PorousFlowActionBase::StabilizationEnum _stabilization

Constructor & Destructor Documentation

◆ PorousFlowSinglePhaseBase()

PorousFlowSinglePhaseBase::PorousFlowSinglePhaseBase ( const InputParameters params)

Definition at line 111 of file PorousFlowSinglePhaseBase.C.

112  : PorousFlowActionBase(params),
113  _pp_var(getParam<VariableName>("porepressure")),
114  _coupling_type(getParam<MooseEnum>("coupling_type").getEnum<CouplingTypeEnum>()),
120  getParam<MooseEnum>("fluid_properties_type").getEnum<FluidPropertiesTypeEnum>()),
121  _biot_coefficient(getParam<Real>("biot_coefficient")),
122  _add_darcy_aux(getParam<bool>("add_darcy_aux")),
123  _add_stress_aux(getParam<bool>("add_stress_aux")),
124  _save_component_rate_in(getParam<std::vector<AuxVariableName>>("save_component_rate_in")),
125  _temperature_unit(getParam<MooseEnum>("temperature_unit")),
126  _pressure_unit(getParam<MooseEnum>("pressure_unit")),
127  _time_unit(getParam<MooseEnum>("time_unit")),
128  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : "")
129 {
130  if (_thermal && _temperature_var.size() != 1)
131  mooseError("PorousFlowSinglePhaseBase: You need to specify a temperature variable to perform "
132  "non-isothermal simulations");
133 
135  {
136  if (params.isParamValid("nacl_name"))
137  paramError("nacl_name",
138  "PorousFlowSinglePhaseBase: You should not specify a nacl_name when "
139  "fluid_properties_type = PorousFlowSingleComponentFluid");
140  if (!params.isParamValid("fp"))
141  paramError("fp",
142  "PorousFlowSinglePhaseBase: You must specify fp when fluid_properties_type = "
143  "PorousFlowSingleComponentFluid");
144  _fp = getParam<UserObjectName>("fp");
145  }
146 
148  {
149  if (!params.isParamValid("nacl_name"))
150  paramError("nacl_name",
151  "PorousFlowSinglePhaseBase: You must specify nacl_name when "
152  "fluid_properties_type = PorousFlowBrine");
153  if (params.isParamValid("fp"))
154  paramError("fp",
155  "PorousFlowSinglePhaseBase: You should not specify fp when "
156  "fluid_properties_type = PorousFlowBrine");
157  if (_pressure_unit != "Pa")
158  paramError("pressure_unit",
159  "Must use pressure_unit = Pa for fluid_properties_type = PorousFlowBrine");
160  if (_time_unit != "seconds")
161  paramError("time_unit",
162  "Must use time_unit = seconds for fluid_properties_type = PorousFlowBrine");
163  _nacl_name = getParam<VariableName>("nacl_name");
164  }
165 
166  auto save_component_rate_in_size = _save_component_rate_in.size();
167  if (save_component_rate_in_size && save_component_rate_in_size != _num_mass_fraction_vars + 1)
168  paramError("save_component_rate_in",
169  "The number of save_component_rate_in variables must be the number of fluid "
170  "components + 1");
171 }
UserObjectName _fp
Name of the fluid-properties UserObject.
const Real _biot_coefficient
Fluid specific heat capacity at constant volume.
PorousFlowActionBase(const InputParameters &params)
const bool _add_stress_aux
Add AuxVariables for stress.
const MooseEnum _temperature_unit
Unit used for temperature.
const VariableName _pp_var
Porepressure NonlinearVariable name.
const std::vector< AuxVariableName > _save_component_rate_in
Name of the variables (if any) that will record the fluid-components&#39; rate of change.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
bool isParamValid(const std::string &name) const
VariableName _nacl_name
Name of the NaCl variable.
const bool _add_darcy_aux
Add a AuxVariables to record Darcy velocity.
const T & getParam(const std::string &name) const
const MooseEnum _time_unit
Unit used for time.
void paramError(const std::string &param, Args... args) const
const std::vector< VariableName > _temperature_var
Name of the temperature variable (if any)
const MooseEnum _pressure_unit
Unit used for porepressure.
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
void mooseError(Args &&... args) const
enum PorousFlowSinglePhaseBase::CouplingTypeEnum _coupling_type
enum PorousFlowSinglePhaseBase::FluidPropertiesTypeEnum _fluid_properties_type
const std::string _base_name
base_name used in the TensorMechanics strain calculator
bool isParamValid(const std::string &name) const

Member Function Documentation

◆ act()

void PorousFlowActionBase::act ( )
overridevirtualinherited

Implements Action.

Definition at line 133 of file PorousFlowActionBase.C.

134 {
135  // Check if the simulation is transient (note: can't do this in the ctor)
136  _transient = _problem->isTransient();
137 
138  // Make sure that all mesh subdomains have the same coordinate system
139  const auto & all_subdomains = _problem->mesh().meshSubdomains();
140  if (all_subdomains.empty())
141  mooseError("No subdomains found");
142  _coord_system = _problem->getCoordSystem(*all_subdomains.begin());
143  for (const auto & subdomain : all_subdomains)
144  if (_problem->getCoordSystem(subdomain) != _coord_system)
145  mooseError(
146  "The PorousFlow Actions require all subdomains to have the same coordinate system.");
147 
148  // Note: this must be called before addMaterials!
150 
151  // Make the vector of added objects unique
152  std::sort(_included_objects.begin(), _included_objects.end());
153  _included_objects.erase(std::unique(_included_objects.begin(), _included_objects.end()),
154  _included_objects.end());
155 
156  if (_current_task == "add_user_object")
157  addUserObjects();
158 
159  if (_current_task == "add_aux_variable" || _current_task == "add_aux_kernel")
160  addAuxObjects();
161 
162  if (_current_task == "add_kernel")
163  addKernels();
164 
165  if (_current_task == "add_material")
166  addMaterials();
167 }
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.
const std::string & _current_task
bool _transient
Flag to denote if the simulation is transient.
virtual void addAuxObjects()
Add all AuxVariables and AuxKernels.
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
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 616 of file PorousFlowActionBase.C.

Referenced by PorousFlowFullySaturated::addUserObjects().

619 {
620  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
621  {
622  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturated";
623  InputParameters params = _factory.getValidParams(userobject_type);
624  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
625  params.set<RealVectorValue>("gravity") = _gravity;
626  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
627  params.set<unsigned>("phase") = phase;
628  params.set<bool>("multiply_by_density") = multiply_by_density;
629  _problem->addUserObject(userobject_type, userobject_name, params);
630  }
631 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
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 652 of file PorousFlowActionBase.C.

Referenced by PorousFlowFullySaturated::addUserObjects().

655 {
656  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
657  {
658  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturatedHeat";
659  InputParameters params = _factory.getValidParams(userobject_type);
660  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
661  params.set<RealVectorValue>("gravity") = _gravity;
662  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
663  params.set<unsigned>("phase") = phase;
664  params.set<bool>("multiply_by_density") = multiply_by_density;
665  _problem->addUserObject(userobject_type, userobject_name, params);
666  }
667 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
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 688 of file PorousFlowActionBase.C.

Referenced by PorousFlowFullySaturated::addUserObjects().

692 {
693  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
694  {
695  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent";
696  InputParameters params = _factory.getValidParams(userobject_type);
697  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
698  params.set<RealVectorValue>("gravity") = _gravity;
699  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
700  params.set<unsigned>("phase") = phase;
701  params.set<bool>("multiply_by_density") = multiply_by_density;
702  params.set<unsigned>("fluid_component") = fluid_component;
703  _problem->addUserObject(userobject_type, userobject_name, params);
704  }
705 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
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 634 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

637 {
638  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
639  {
640  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorUnsaturated";
641  InputParameters params = _factory.getValidParams(userobject_type);
642  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
643  params.set<RealVectorValue>("gravity") = _gravity;
644  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
645  params.set<unsigned>("phase") = phase;
646  params.set<bool>("multiply_by_density") = multiply_by_density;
647  _problem->addUserObject(userobject_type, userobject_name, params);
648  }
649 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
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 670 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

673 {
674  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
675  {
676  const std::string userobject_type = "PorousFlowAdvectiveFluxCalculatorUnsaturatedHeat";
677  InputParameters params = _factory.getValidParams(userobject_type);
678  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
679  params.set<RealVectorValue>("gravity") = _gravity;
680  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
681  params.set<unsigned>("phase") = phase;
682  params.set<bool>("multiply_by_density") = multiply_by_density;
683  _problem->addUserObject(userobject_type, userobject_name, params);
684  }
685 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
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 708 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

710 {
711  if (_stabilization == StabilizationEnum::KT && _current_task == "add_user_object")
712  {
713  const std::string userobject_type =
714  "PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent";
715  InputParameters params = _factory.getValidParams(userobject_type);
716  params.set<MooseEnum>("flux_limiter_type") = _flux_limiter_type;
717  params.set<RealVectorValue>("gravity") = _gravity;
718  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
719  params.set<unsigned>("phase") = phase;
720  params.set<bool>("multiply_by_density") = multiply_by_density;
721  params.set<unsigned>("fluid_component") = fluid_component;
722  _problem->addUserObject(userobject_type, userobject_name, params);
723  }
724 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const RealVectorValue _gravity
Gravity.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addAuxObjects()

void PorousFlowSinglePhaseBase::addAuxObjects ( )
overrideprotectedvirtual

Add all AuxVariables and AuxKernels.

Reimplemented from PorousFlowActionBase.

Reimplemented in PorousFlowUnsaturated.

Definition at line 291 of file PorousFlowSinglePhaseBase.C.

Referenced by PorousFlowUnsaturated::addAuxObjects().

292 {
294 
295  if (_add_darcy_aux)
297 
299  addStressAux();
300 }
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,
const MooseEnum temperature_unit 
)
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
temperature_unitthe unit of temperature (Kelvin or Celsius)

Definition at line 504 of file PorousFlowActionBase.C.

Referenced by addMaterials().

511 {
512  if (_current_task == "add_material")
513  {
514  std::string material_type = "PorousFlowBrine";
515  InputParameters params = _factory.getValidParams(material_type);
516 
517  params.set<std::vector<VariableName>>("xnacl") = {nacl_brine};
518  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
519  params.set<unsigned int>("phase") = phase;
520  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
521  params.set<bool>("compute_internal_energy") = compute_internal_energy;
522  params.set<bool>("compute_enthalpy") = compute_enthalpy;
523  params.set<MooseEnum>("temperature_unit") = temperature_unit;
524 
525  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
526  if (at_nodes)
527  material_name = "PorousFlowActionBase_FluidProperties";
528 
529  params.set<bool>("at_nodes") = at_nodes;
530  _problem->addMaterial(material_type, material_name, params);
531  }
532 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ 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 603 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addUserObjects().

604 {
605  if (_current_task == "add_user_object")
606  {
607  std::string userobject_type = "PorousFlowCapillaryPressureVG";
608  InputParameters params = _factory.getValidParams(userobject_type);
609  params.set<Real>("m") = m;
610  params.set<Real>("alpha") = alpha;
611  _problem->addUserObject(userobject_type, userobject_name, params);
612  }
613 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string alpha
Definition: NS.h:126
std::shared_ptr< FEProblemBase > & _problem

◆ 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 248 of file PorousFlowActionBase.C.

Referenced by addAuxObjects().

249 {
250  if (_current_task == "add_aux_variable")
251  {
252  auto var_params = _factory.getValidParams("MooseVariableConstMonomial");
253 
254  _problem->addAuxVariable("MooseVariableConstMonomial", "darcy_vel_x", var_params);
255  _problem->addAuxVariable("MooseVariableConstMonomial", "darcy_vel_y", var_params);
256  _problem->addAuxVariable("MooseVariableConstMonomial", "darcy_vel_z", var_params);
257  }
258 
259  if (_current_task == "add_aux_kernel")
260  {
261  std::string aux_kernel_type = "PorousFlowDarcyVelocityComponent";
262  InputParameters params = _factory.getValidParams(aux_kernel_type);
263 
264  params.set<RealVectorValue>("gravity") = gravity;
265  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
266  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
267 
268  std::string aux_kernel_name = "PorousFlowActionBase_Darcy_x_Aux";
269  params.set<MooseEnum>("component") = "x";
270  params.set<AuxVariableName>("variable") = "darcy_vel_x";
271  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
272 
273  aux_kernel_name = "PorousFlowActionBase_Darcy_y_Aux";
274  params.set<MooseEnum>("component") = "y";
275  params.set<AuxVariableName>("variable") = "darcy_vel_y";
276  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
277 
278  aux_kernel_name = "PorousFlowActionBase_Darcy_z_Aux";
279  params.set<MooseEnum>("component") = "z";
280  params.set<AuxVariableName>("variable") = "darcy_vel_z";
281  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
282  }
283 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ addDictator()

void PorousFlowSinglePhaseBase::addDictator ( )
overrideprotectedvirtual

Add the PorousFlowDictator object.

Implements PorousFlowActionBase.

Definition at line 377 of file PorousFlowSinglePhaseBase.C.

378 {
379  const std::string uo_name = _dictator_name;
380  const std::string uo_type = "PorousFlowDictator";
381  InputParameters params = _factory.getValidParams(uo_type);
382  std::vector<VariableName> pf_vars = _mass_fraction_vars;
383  pf_vars.push_back(_pp_var);
384  if (_thermal)
385  pf_vars.push_back(_temperature_var[0]);
386  if (_mechanical)
387  pf_vars.insert(pf_vars.end(), _coupled_displacements.begin(), _coupled_displacements.end());
388  params.set<std::vector<VariableName>>("porous_flow_vars") = pf_vars;
389  params.set<unsigned int>("number_fluid_phases") = 1;
390  params.set<unsigned int>("number_fluid_components") = _num_mass_fraction_vars + 1;
391  params.set<unsigned int>("number_aqueous_equilibrium") = _num_aqueous_equilibrium;
392  params.set<unsigned int>("number_aqueous_kinetic") = _num_aqueous_kinetic;
393  _problem->addUserObject(uo_type, uo_name, params);
394 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
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.
Factory & _factory
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.
std::shared_ptr< FEProblemBase > & _problem
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.
const std::vector< VariableName > _mass_fraction_vars
Name of the mass-fraction variables (if any)

◆ 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 416 of file PorousFlowActionBase.C.

Referenced by addMaterials().

417 {
418  if (_current_task == "add_material")
419  {
420  std::string material_type = "PorousFlowEffectiveFluidPressure";
421  InputParameters params = _factory.getValidParams(material_type);
422 
423  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
424 
425  std::string material_name = "PorousFlowUnsaturated_EffectiveFluidPressure_qp";
426  if (at_nodes)
427  material_name = "PorousFlowUnsaturated_EffectiveFluidPressure";
428 
429  params.set<bool>("at_nodes") = at_nodes;
430  _problem->addMaterial(material_type, material_name, params);
431  }
432 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ addKernels()

void PorousFlowSinglePhaseBase::addKernels ( )
overrideprotectedvirtual

Add all Kernels.

Reimplemented from PorousFlowActionBase.

Reimplemented in PorousFlowBasicTHM, PorousFlowUnsaturated, and PorousFlowFullySaturated.

Definition at line 204 of file PorousFlowSinglePhaseBase.C.

Referenced by PorousFlowFullySaturated::addKernels(), PorousFlowUnsaturated::addKernels(), and PorousFlowBasicTHM::addKernels().

205 {
207 
208  if (_mechanical)
209  {
210  for (unsigned i = 0; i < _ndisp; ++i)
211  {
212  std::string kernel_name = "PorousFlowUnsaturated_grad_stress" + Moose::stringify(i);
213  std::string kernel_type = "StressDivergenceTensors";
215  kernel_type = "StressDivergenceRZTensors";
216  InputParameters params = _factory.getValidParams(kernel_type);
217  params.set<NonlinearVariableName>("variable") = _displacements[i];
218  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
219  if (_thermal)
220  {
221  params.set<std::vector<VariableName>>("temperature") = _temperature_var;
222  if (parameters().isParamValid("eigenstrain_names"))
223  {
224  params.set<std::vector<MaterialPropertyName>>("eigenstrain_names") =
225  getParam<std::vector<MaterialPropertyName>>("eigenstrain_names");
226  }
227  }
228  params.set<unsigned>("component") = i;
229  params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
230  _problem->addKernel(kernel_type, kernel_name, params);
231 
232  if (_gravity(i) != 0)
233  {
234  kernel_name = "PorousFlowUnsaturated_gravity" + Moose::stringify(i);
235  kernel_type = "Gravity";
236  params = _factory.getValidParams(kernel_type);
237  params.set<NonlinearVariableName>("variable") = _displacements[i];
238  params.set<Real>("value") = _gravity(i);
239  params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
240  _problem->addKernel(kernel_type, kernel_name, params);
241  }
242 
243  kernel_name = "PorousFlowUnsaturated_EffStressCoupling" + Moose::stringify(i);
244  kernel_type = "PorousFlowEffectiveStressCoupling";
245  params = _factory.getValidParams(kernel_type);
246  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
247  params.set<NonlinearVariableName>("variable") = _displacements[i];
248  params.set<Real>("biot_coefficient") = _biot_coefficient;
249  params.set<unsigned>("component") = i;
250  params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
251  _problem->addKernel(kernel_type, kernel_name, params);
252  }
253  }
254 
255  if (_thermal)
256  {
257  std::string kernel_name = "PorousFlowUnsaturated_HeatConduction";
258  std::string kernel_type = "PorousFlowHeatConduction";
259  InputParameters params = _factory.getValidParams(kernel_type);
260  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
261  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
262  _problem->addKernel(kernel_type, kernel_name, params);
263 
264  if (_transient)
265  {
266  kernel_name = "PorousFlowUnsaturated_EnergyTimeDerivative";
267  kernel_type = "PorousFlowEnergyTimeDerivative";
268  params = _factory.getValidParams(kernel_type);
269  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
270  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
271  params.set<bool>("strain_at_nearest_qp") = _strain_at_nearest_qp;
272  if (!_base_name.empty())
273  params.set<std::string>("base_name") = _base_name;
274  _problem->addKernel(kernel_type, kernel_name, params);
275  }
276  }
277 
278  if (_thermal && _mechanical && _transient)
279  {
280  std::string kernel_name = "PorousFlowUnsaturated_HeatVolumetricExpansion";
281  std::string kernel_type = "PorousFlowHeatVolumetricExpansion";
282  InputParameters params = _factory.getValidParams(kernel_type);
283  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
284  params.set<NonlinearVariableName>("variable") = _temperature_var[0];
285  params.set<bool>("strain_at_nearest_qp") = _strain_at_nearest_qp;
286  _problem->addKernel(kernel_type, kernel_name, params);
287  }
288 }
Moose::CoordinateSystemType _coord_system
Coordinate system of the simulation (eg RZ, XYZ, etc)
virtual void addKernels()
Add all Kernels.
const Real _biot_coefficient
Fluid specific heat capacity at constant volume.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
Factory & _factory
const unsigned _ndisp
Number of displacement variables supplied.
const T & getParam(const std::string &name) const
std::string stringify(const T &t)
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
const bool _strain_at_nearest_qp
Evaluate strain at the nearest quadpoint for porosity that depends on strain.
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
const std::vector< VariableName > & _displacements
Displacement NonlinearVariable names (if any)
const std::string _base_name
base_name used in the TensorMechanics strain calculator
bool isParamValid(const std::string &name) const

◆ 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 391 of file PorousFlowActionBase.C.

Referenced by addMaterials().

392 {
393  if (_current_task == "add_material")
394  {
395  if (!(parameters().hasDefaultCoupledValue("mass_fraction_vars") ||
396  parameters().hasCoupledValue("mass_fraction_vars")))
397  mooseError("Attempt to add a PorousFlowMassFraction material without setting the "
398  "mass_fraction_vars");
399 
400  std::string material_type = "PorousFlowMassFraction";
401  InputParameters params = _factory.getValidParams(material_type);
402 
403  params.applySpecificParameters(parameters(), {"mass_fraction_vars"});
404  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
405 
406  std::string material_name = "PorousFlowActionBase_MassFraction_qp";
407  if (at_nodes)
408  material_name = "PorousFlowActionBase_MassFraction";
409 
410  params.set<bool>("at_nodes") = at_nodes;
411  _problem->addMaterial(material_type, material_name, params);
412  }
413 }
void applySpecificParameters(const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const

◆ addMaterialDependencies()

void PorousFlowSinglePhaseBase::addMaterialDependencies ( )
overrideprotectedvirtual

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

Reimplemented from PorousFlowActionBase.

Reimplemented in PorousFlowBasicTHM, PorousFlowUnsaturated, and PorousFlowFullySaturated.

Definition at line 174 of file PorousFlowSinglePhaseBase.C.

Referenced by PorousFlowFullySaturated::addMaterialDependencies(), PorousFlowUnsaturated::addMaterialDependencies(), and PorousFlowBasicTHM::addMaterialDependencies().

175 {
177 
178  // Add necessary objects to list of PorousFlow objects added by this action
179  if (_mechanical)
180  {
181  _included_objects.push_back("StressDivergenceTensors");
182  _included_objects.push_back("Gravity");
183  _included_objects.push_back("PorousFlowEffectiveStressCoupling");
184  }
185 
186  if (_thermal)
187  {
188  _included_objects.push_back("PorousFlowHeatConduction");
189  if (_transient)
190  _included_objects.push_back("PorousFlowEnergyTimeDerivative");
191  }
192 
193  if (_thermal && _mechanical && _transient)
194  _included_objects.push_back("PorousFlowHeatVolumetricExpansion");
195 
196  if (_add_darcy_aux)
197  _included_objects.push_back("PorousFlowDarcyVelocityComponent");
198 
200  _included_objects.push_back("StressAux");
201 }
const bool _add_stress_aux
Add AuxVariables for stress.
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.
const bool _add_darcy_aux
Add a AuxVariables to record Darcy velocity.
bool _transient
Flag to denote if the simulation is transient.
virtual void addMaterialDependencies()
Add all material dependencies so that the correct version of each material can be added...

◆ addMaterials()

void PorousFlowSinglePhaseBase::addMaterials ( )
overrideprotectedvirtual

Add all Materials.

Reimplemented from PorousFlowActionBase.

Reimplemented in PorousFlowBasicTHM, PorousFlowUnsaturated, and PorousFlowFullySaturated.

Definition at line 303 of file PorousFlowSinglePhaseBase.C.

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

304 {
306 
307  // add Materials
308  if (_deps.dependsOn(_included_objects, "temperature_qp"))
309  addTemperatureMaterial(false);
310 
311  if (_deps.dependsOn(_included_objects, "temperature_nodal"))
313 
314  if (_deps.dependsOn(_included_objects, "mass_fraction_qp"))
316 
317  if (_deps.dependsOn(_included_objects, "mass_fraction_nodal"))
319 
320  const bool compute_rho_mu_qp = _deps.dependsOn(_included_objects, "density_qp") ||
321  _deps.dependsOn(_included_objects, "viscosity_qp");
322  const bool compute_e_qp = _deps.dependsOn(_included_objects, "internal_energy_qp");
323  const bool compute_h_qp = _deps.dependsOn(_included_objects, "enthalpy_qp");
324 
325  if (compute_rho_mu_qp || compute_e_qp || compute_h_qp)
326  {
329  _nacl_name, false, 0, compute_rho_mu_qp, compute_e_qp, compute_h_qp, _temperature_unit);
332  0,
333  compute_rho_mu_qp,
334  compute_e_qp,
335  compute_h_qp,
336  _fp,
339  _time_unit);
340  }
341 
342  const bool compute_rho_mu_nodal = _deps.dependsOn(_included_objects, "density_nodal") ||
343  _deps.dependsOn(_included_objects, "viscosity_nodal");
344  const bool compute_e_nodal = _deps.dependsOn(_included_objects, "internal_energy_nodal");
345  const bool compute_h_nodal = _deps.dependsOn(_included_objects, "enthalpy_nodal");
346 
347  if (compute_rho_mu_nodal || compute_e_nodal || compute_h_nodal)
348  {
351  true,
352  0,
353  compute_rho_mu_nodal,
354  compute_e_nodal,
355  compute_h_nodal,
359  0,
360  compute_rho_mu_nodal,
361  compute_e_nodal,
362  compute_h_nodal,
363  _fp,
366  _time_unit);
367  }
368 
369  if (_deps.dependsOn(_included_objects, "effective_pressure_qp"))
371 
372  if (_deps.dependsOn(_included_objects, "effective_pressure_nodal"))
374 }
UserObjectName _fp
Name of the fluid-properties UserObject.
const MooseEnum _temperature_unit
Unit used for temperature.
void addEffectiveFluidPressureMaterial(bool at_nodes)
Adds a nodal and a quadpoint effective fluid pressure material.
bool dependsOn(const std::string &key, const std::string &value)
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.
void addSingleComponentFluidMaterial(bool at_nodes, unsigned phase, bool compute_density_and_viscosity, bool compute_internal_energy, bool compute_enthalpy, const UserObjectName &fp, const MooseEnum &temperature_unit, const MooseEnum &pressure_unit, const MooseEnum &time_unit)
Adds a single-component fluid Material.
VariableName _nacl_name
Name of the NaCl variable.
void addBrineMaterial(const VariableName xnacl, bool at_nodes, unsigned phase, bool compute_density_and_viscosity, bool compute_internal_energy, bool compute_enthalpy, const MooseEnum &temperature_unit)
Adds a brine fluid Material.
const MooseEnum _time_unit
Unit used for time.
void addTemperatureMaterial(bool at_nodes)
Adds a nodal and a quadpoint Temperature material.
void addMassFractionMaterial(bool at_nodes)
Adds a nodal and a quadpoint MassFraction material.
const MooseEnum _pressure_unit
Unit used for porepressure.
enum PorousFlowSinglePhaseBase::FluidPropertiesTypeEnum _fluid_properties_type
DependencyResolver< std::string > _deps
All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.

◆ addNearestQpMaterial()

void PorousFlowActionBase::addNearestQpMaterial ( )
protectedinherited

Adds a PorousFlowNearestQp material.

Definition at line 435 of file PorousFlowActionBase.C.

Referenced by PorousFlowActionBase::addMaterials().

436 {
437  if (_current_task == "add_material")
438  {
439  std::string material_type = "PorousFlowNearestQp";
440  InputParameters params = _factory.getValidParams(material_type);
441 
442  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
443  params.set<bool>("nodal_material") = true;
444 
445  std::string material_name = "PorousFlowActionBase_NearestQp";
446  _problem->addMaterial(material_type, material_name, params);
447  }
448 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ addRelationshipManagers() [1/3]

virtual void Action::addRelationshipManagers
inherited

◆ addRelationshipManagers() [2/3]

bool Action::addRelationshipManagers
inherited

◆ addRelationshipManagers() [3/3]

void PorousFlowActionBase::addRelationshipManagers ( Moose::RelationshipManagerType  when_type)
overridevirtualinherited

Reimplemented from Action.

Definition at line 124 of file PorousFlowActionBase.C.

125 {
127  ? _factory.getValidParams("PorousFlowAdvectiveFluxCalculatorSaturated")
129  addRelationshipManagers(input_rm_type, ips);
130 }
InputParameters getValidParams(const std::string &name) const
InputParameters emptyInputParameters()
Factory & _factory
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
enum PorousFlowActionBase::StabilizationEnum _stabilization

◆ addRelativePermeabilityConst()

void PorousFlowActionBase::addRelativePermeabilityConst ( bool  at_nodes,
unsigned  phase,
Real  kr 
)
protectedinherited

Adds a relative-permeability Material of the constant variety (primarily to add kr = 1 in actions that add a default relatively permeability for objects that require kr even when the flow is fully saturated with a single phase)

Parameters
at_nodeswhether the material is nodal
phasethe phase number of the fluid
krthe relative permeability

Definition at line 535 of file PorousFlowActionBase.C.

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

536 {
537  if (_current_task == "add_material")
538  {
539  std::string material_type = "PorousFlowRelativePermeabilityConst";
540  InputParameters params = _factory.getValidParams(material_type);
541 
542  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
543  params.set<unsigned int>("phase") = phase;
544  params.set<Real>("kr") = kr;
545  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
546  if (at_nodes)
547  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
548 
549  params.set<bool>("at_nodes") = at_nodes;
550  _problem->addMaterial(material_type, material_name, params);
551  }
552 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ 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
at_nodeswhether the material is nodal
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 555 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addMaterials().

557 {
558  if (_current_task == "add_material")
559  {
560  std::string material_type = "PorousFlowRelativePermeabilityCorey";
561  InputParameters params = _factory.getValidParams(material_type);
562 
563  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
564  params.set<Real>("n") = n;
565  params.set<unsigned int>("phase") = phase;
566  params.set<Real>("s_res") = s_res;
567  params.set<Real>("sum_s_res") = sum_s_res;
568 
569  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
570  if (at_nodes)
571  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
572 
573  params.set<bool>("at_nodes") = at_nodes;
574  _problem->addMaterial(material_type, material_name, params);
575  }
576 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ 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
at_nodeswhether the material is nodal
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 579 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addMaterials().

581 {
582  if (_current_task == "add_material")
583  {
584  std::string material_type = "PorousFlowRelativePermeabilityFLAC";
585  InputParameters params = _factory.getValidParams(material_type);
586 
587  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
588  params.set<Real>("m") = m;
589  params.set<unsigned int>("phase") = phase;
590  params.set<Real>("s_res") = s_res;
591  params.set<Real>("sum_s_res") = sum_s_res;
592 
593  std::string material_name = "PorousFlowActionBase_RelativePermeability_qp";
594  if (at_nodes)
595  material_name = "PorousFlowActionBase_RelativePermeability_nodal";
596 
597  params.set<bool>("at_nodes") = at_nodes;
598  _problem->addMaterial(material_type, material_name, params);
599  }
600 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ addSaturationAux()

void PorousFlowActionBase::addSaturationAux ( unsigned  phase)
protectedinherited

Add an AuxVariable and AuxKernel to calculate saturation.

Parameters
phaseSaturation for this fluid phase

Definition at line 223 of file PorousFlowActionBase.C.

Referenced by PorousFlowUnsaturated::addAuxObjects().

224 {
225  std::string phase_str = Moose::stringify(phase);
226 
227  if (_current_task == "add_aux_variable")
228  {
229  auto var_params = _factory.getValidParams("MooseVariableConstMonomial");
230  _problem->addAuxVariable("MooseVariableConstMonomial", "saturation" + phase_str, var_params);
231  }
232 
233  if (_current_task == "add_aux_kernel")
234  {
235  std::string aux_kernel_type = "MaterialStdVectorAux";
236  InputParameters params = _factory.getValidParams(aux_kernel_type);
237 
238  std::string aux_kernel_name = "PorousFlowActionBase_SaturationAux" + phase_str;
239  params.set<MaterialPropertyName>("property") = "PorousFlow_saturation_qp";
240  params.set<unsigned>("index") = phase;
241  params.set<AuxVariableName>("variable") = "saturation" + phase_str;
242  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
243  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
244  }
245 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
std::string stringify(const T &t)
std::shared_ptr< FEProblemBase > & _problem

◆ addSingleComponentFluidMaterial()

void PorousFlowActionBase::addSingleComponentFluidMaterial ( bool  at_nodes,
unsigned  phase,
bool  compute_density_and_viscosity,
bool  compute_internal_energy,
bool  compute_enthalpy,
const UserObjectName &  fp,
const MooseEnum temperature_unit,
const MooseEnum pressure_unit,
const MooseEnum time_unit 
)
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
temperature_unitthe unit of temperature (Kelvin or Celsius)
pressure_unitthe unit of pressure (MPa or Pa)
time_unitthe unit of time (seconds, days, hours, etc)

Definition at line 469 of file PorousFlowActionBase.C.

Referenced by addMaterials().

478 {
479  if (_current_task == "add_material")
480  {
481  std::string material_type = "PorousFlowSingleComponentFluid";
482  InputParameters params = _factory.getValidParams(material_type);
483 
484  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
485  params.set<unsigned int>("phase") = phase;
486  params.set<bool>("compute_density_and_viscosity") = compute_density_and_viscosity;
487  params.set<bool>("compute_internal_energy") = compute_internal_energy;
488  params.set<bool>("compute_enthalpy") = compute_enthalpy;
489  params.set<UserObjectName>("fp") = fp;
490  params.set<MooseEnum>("temperature_unit") = temperature_unit;
491  params.set<MooseEnum>("pressure_unit") = pressure_unit;
492  params.set<MooseEnum>("time_unit") = time_unit;
493 
494  std::string material_name = "PorousFlowActionBase_FluidProperties_qp";
495  if (at_nodes)
496  material_name = "PorousFlowActionBase_FluidProperties";
497 
498  params.set<bool>("at_nodes") = at_nodes;
499  _problem->addMaterial(material_type, material_name, params);
500  }
501 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ addStressAux()

void PorousFlowActionBase::addStressAux ( )
protectedinherited

Add AuxVariables and AuxKernels to compute effective stress.

Definition at line 286 of file PorousFlowActionBase.C.

Referenced by addAuxObjects().

287 {
288  if (_current_task == "add_aux_variable")
289  {
290  auto var_params = _factory.getValidParams("MooseVariableConstMonomial");
291  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_xx", var_params);
292  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_xy", var_params);
293  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_xz", var_params);
294  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_yx", var_params);
295  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_yy", var_params);
296  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_yz", var_params);
297  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_zx", var_params);
298  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_zy", var_params);
299  _problem->addAuxVariable("MooseVariableConstMonomial", "stress_zz", var_params);
300  }
301 
302  if (_current_task == "add_aux_kernel")
303  {
304  std::string aux_kernel_type = "RankTwoAux";
305  InputParameters params = _factory.getValidParams(aux_kernel_type);
306 
307  params.set<MaterialPropertyName>("rank_two_tensor") = "stress";
308  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
309 
310  std::string aux_kernel_name = "PorousFlowAction_stress_xx";
311  params.set<AuxVariableName>("variable") = "stress_xx";
312  params.set<unsigned>("index_i") = 0;
313  params.set<unsigned>("index_j") = 0;
314  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
315 
316  aux_kernel_name = "PorousFlowAction_stress_xy";
317  params.set<AuxVariableName>("variable") = "stress_xy";
318  params.set<unsigned>("index_i") = 0;
319  params.set<unsigned>("index_j") = 1;
320  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
321 
322  aux_kernel_name = "PorousFlowAction_stress_xz";
323  params.set<AuxVariableName>("variable") = "stress_xz";
324  params.set<unsigned>("index_i") = 0;
325  params.set<unsigned>("index_j") = 2;
326  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
327 
328  aux_kernel_name = "PorousFlowAction_stress_yx";
329  params.set<AuxVariableName>("variable") = "stress_yx";
330  params.set<unsigned>("index_i") = 1;
331  params.set<unsigned>("index_j") = 0;
332  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
333 
334  aux_kernel_name = "PorousFlowAction_stress_yy";
335  params.set<AuxVariableName>("variable") = "stress_yy";
336  params.set<unsigned>("index_i") = 1;
337  params.set<unsigned>("index_j") = 1;
338  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
339 
340  aux_kernel_name = "PorousFlowAction_stress_yz";
341  params.set<AuxVariableName>("variable") = "stress_yz";
342  params.set<unsigned>("index_i") = 1;
343  params.set<unsigned>("index_j") = 2;
344  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
345 
346  aux_kernel_name = "PorousFlowAction_stress_zx";
347  params.set<AuxVariableName>("variable") = "stress_zx";
348  params.set<unsigned>("index_i") = 2;
349  params.set<unsigned>("index_j") = 0;
350  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
351 
352  aux_kernel_name = "PorousFlowAction_stress_zy";
353  params.set<AuxVariableName>("variable") = "stress_zy";
354  params.set<unsigned>("index_i") = 2;
355  params.set<unsigned>("index_j") = 1;
356  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
357 
358  aux_kernel_name = "PorousFlowAction_stress_zz";
359  params.set<AuxVariableName>("variable") = "stress_zz";
360  params.set<unsigned>("index_i") = 2;
361  params.set<unsigned>("index_j") = 2;
362  _problem->addAuxKernel(aux_kernel_type, aux_kernel_name, params);
363  }
364 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
std::shared_ptr< FEProblemBase > & _problem

◆ 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 367 of file PorousFlowActionBase.C.

Referenced by addMaterials().

368 {
369  if (_current_task == "add_material")
370  {
371  if (!parameters().hasDefaultCoupledValue("temperature"))
372  mooseError("Attempt to add a PorousFlowTemperature material without setting a temperature "
373  "variable");
374 
375  std::string material_type = "PorousFlowTemperature";
376  InputParameters params = _factory.getValidParams(material_type);
377 
378  params.applySpecificParameters(parameters(), {"temperature"});
379  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
380 
381  std::string material_name = "PorousFlowActionBase_Temperature_qp";
382  if (at_nodes)
383  material_name = "PorousFlowActionBase_Temperature";
384 
385  params.set<bool>("at_nodes") = at_nodes;
386  _problem->addMaterial(material_type, material_name, params);
387  }
388 }
void applySpecificParameters(const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const

◆ addUserObjects()

void PorousFlowActionBase::addUserObjects ( )
protectedvirtualinherited

Add all other UserObjects.

Reimplemented in PorousFlowUnsaturated, and PorousFlowFullySaturated.

Definition at line 200 of file PorousFlowActionBase.C.

Referenced by PorousFlowActionBase::act(), PorousFlowFullySaturated::addUserObjects(), and PorousFlowUnsaturated::addUserObjects().

201 {
202  addDictator();
203 }
virtual void addDictator()=0
Add the PorousFlowDictator object.

◆ addVolumetricStrainMaterial()

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

Adds a quadpoint volumetric strain material.

Parameters
displacementsthe names of the displacement variables
base_nameThe base_name used in the TensorMechanics strain calculator displaced mesh

Definition at line 451 of file PorousFlowActionBase.C.

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

453 {
454  if (_current_task == "add_material")
455  {
456  std::string material_type = "PorousFlowVolumetricStrain";
457  InputParameters params = _factory.getValidParams(material_type);
458 
459  std::string material_name = "PorousFlowActionBase_VolumetricStrain";
460  params.set<UserObjectName>("PorousFlowDictator") = _dictator_name;
461  params.set<std::vector<VariableName>>("displacements") = displacements;
462  if (!base_name.empty())
463  params.set<std::string>("base_name") = base_name;
464  _problem->addMaterial(material_type, material_name, params);
465  }
466 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & _current_task
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::shared_ptr< FEProblemBase > & _problem

◆ validParams()

InputParameters PorousFlowSinglePhaseBase::validParams ( )
static

Definition at line 17 of file PorousFlowSinglePhaseBase.C.

Referenced by PorousFlowFullySaturated::validParams(), PorousFlowUnsaturated::validParams(), and PorousFlowBasicTHM::validParams().

18 {
20  params.addParam<bool>("add_darcy_aux", true, "Add AuxVariables that record Darcy velocity");
21  params.addParam<bool>("add_stress_aux", true, "Add AuxVariables that record effective stress");
22  params.addDeprecatedParam<bool>("use_brine",
23  false,
24  "Whether to use a PorousFlowBrine Material",
25  "This parameter should no longer be used. Instead use "
26  "fluid_properties_type = PorousFlowBrine");
27  params.addRequiredParam<VariableName>("porepressure", "The name of the porepressure variable");
28  MooseEnum coupling_type("Hydro ThermoHydro HydroMechanical ThermoHydroMechanical", "Hydro");
29  params.addParam<MooseEnum>("coupling_type",
30  coupling_type,
31  "The type of simulation. For simulations involving Mechanical "
32  "deformations, you will need to supply the correct Biot coefficient. "
33  "For simulations involving Thermal flows, you will need an associated "
34  "ConstantThermalExpansionCoefficient Material");
35  MooseEnum fluid_properties_type("PorousFlowSingleComponentFluid PorousFlowBrine Custom",
36  "PorousFlowSingleComponentFluid");
37  params.addParam<MooseEnum>(
38  "fluid_properties_type",
39  fluid_properties_type,
40  "Type of fluid properties to use. For 'PorousFlowSingleComponentFluid' you must provide a "
41  "fp UserObject. For 'PorousFlowBrine' you must supply a nacl_name. For "
42  "'Custom' your input file must include a Material that provides fluid properties such as "
43  "density, viscosity, enthalpy and internal energy");
44  MooseEnum simulation_type_choice("steady transient", "transient");
46  "simulation_type",
47  simulation_type_choice,
48  "Whether a transient or steady-state simulation is being performed",
49  "The execution type is now determined automatically. This parameter should no longer be "
50  "used");
51  params.addParam<UserObjectName>(
52  "fp",
53  "The name of the user object for fluid "
54  "properties. Only needed if fluid_properties_type = PorousFlowSingleComponentFluid");
55  params.addCoupledVar("mass_fraction_vars",
56  {},
57  "List of variables that represent the mass fractions. With only one fluid "
58  "component, this may be left empty. With N fluid components, the format is "
59  "'f_0 f_1 f_2 ... f_(N-1)'. That is, the N^th component need not be "
60  "specified because f_N = 1 - (f_0 + f_1 + ... + f_(N-1)). It is best "
61  "numerically to choose the N-1 mass fraction variables so that they "
62  "represent the fluid components with small concentrations. This Action "
63  "will associated the i^th mass fraction variable to the equation for the "
64  "i^th fluid component, and the pressure variable to the N^th fluid "
65  "component.");
66  params.addDeprecatedParam<unsigned>(
67  "nacl_index",
68  0,
69  "Index of NaCl variable in mass_fraction_vars, for "
70  "calculating brine properties. Only required if use_brine is true.",
71  "This parameter should no longer be used. Instead use nacl_name = the_nacl_variable_name");
72  params.addParam<VariableName>(
73  "nacl_name",
74  "Name of the NaCl variable. Only required if fluid_properties_type = PorousFlowBrine");
75  params.addParam<Real>(
76  "biot_coefficient",
77  1.0,
78  "The Biot coefficient (relevant only for mechanically-coupled simulations)");
79  params.addParam<std::vector<AuxVariableName>>(
80  "save_component_rate_in",
81  {},
82  "List of AuxVariables into which the rate-of-change of each fluid component at each node "
83  "will be saved. There must be exactly N of these to match the N fluid components. The "
84  "result will be measured in kg/s, where the kg is the mass of the fluid component at the "
85  "node (or m^3/s if multiply_by_density=false). Note that this saves the result from the "
86  "MassTimeDerivative Kernels, but NOT from the MassVolumetricExpansion Kernels.");
87  MooseEnum temp_unit_choice("Kelvin Celsius", "Kelvin");
88  params.addParam<MooseEnum>(
89  "temperature_unit", temp_unit_choice, "The unit of the temperature variable");
90  MooseEnum p_unit_choice("Pa MPa", "Pa");
91  params.addParam<MooseEnum>(
92  "pressure_unit",
93  p_unit_choice,
94  "The unit of the pressure variable used everywhere in the input file "
95  "except for in the FluidProperties-module objects. This can be set to the non-default value "
96  "only for fluid_properties_type = PorousFlowSingleComponentFluid");
97  MooseEnum time_unit_choice("seconds hours days years", "seconds");
98  params.addParam<MooseEnum>(
99  "time_unit",
100  time_unit_choice,
101  "The unit of time used everywhere in the input file except for in the "
102  "FluidProperties-module objects. This can be set to the non-default value only for "
103  "fluid_properties_type = PorousFlowSingleComponentFluid");
104  params.addParam<std::string>("base_name",
105  "The base_name used in the TensorMechanics strain calculator. This "
106  "is only relevant for mechanically-coupled models.");
107  params.addClassDescription("Base class for single-phase simulations");
108  return params;
109 }
void addDeprecatedParam(const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void addCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _add_darcy_aux

const bool PorousFlowSinglePhaseBase::_add_darcy_aux
protected

Add a AuxVariables to record Darcy velocity.

Definition at line 60 of file PorousFlowSinglePhaseBase.h.

Referenced by addAuxObjects(), and addMaterialDependencies().

◆ _add_stress_aux

const bool PorousFlowSinglePhaseBase::_add_stress_aux
protected

Add AuxVariables for stress.

Definition at line 63 of file PorousFlowSinglePhaseBase.h.

Referenced by addAuxObjects(), and addMaterialDependencies().

◆ _base_name

const std::string PorousFlowSinglePhaseBase::_base_name
protected

◆ _biot_coefficient

const Real PorousFlowSinglePhaseBase::_biot_coefficient
protected

Fluid specific heat capacity at constant volume.

Definition at line 57 of file PorousFlowSinglePhaseBase.h.

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

◆ _coord_system

Moose::CoordinateSystemType PorousFlowActionBase::_coord_system
protectedinherited

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

Definition at line 89 of file PorousFlowActionBase.h.

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

◆ _coupled_displacements

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

◆ _coupling_type

enum PorousFlowSinglePhaseBase::CouplingTypeEnum PorousFlowSinglePhaseBase::_coupling_type
protected

◆ _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 72 of file PorousFlowActionBase.h.

Referenced by addKernels().

◆ _fluid_properties_type

enum PorousFlowSinglePhaseBase::FluidPropertiesTypeEnum PorousFlowSinglePhaseBase::_fluid_properties_type
protected

◆ _flux_limiter_type

const MooseEnum PorousFlowActionBase::_flux_limiter_type
protectedinherited

◆ _fp

UserObjectName PorousFlowSinglePhaseBase::_fp
protected

Name of the fluid-properties UserObject.

Definition at line 54 of file PorousFlowSinglePhaseBase.h.

Referenced by addMaterials(), and PorousFlowSinglePhaseBase().

◆ _gravity

const RealVectorValue PorousFlowActionBase::_gravity
protectedinherited

◆ _included_objects

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

◆ _mass_fraction_vars

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

Name of the mass-fraction variables (if any)

Definition at line 63 of file PorousFlowActionBase.h.

Referenced by addDictator(), PorousFlowFullySaturated::addKernels(), and PorousFlowUnsaturated::addKernels().

◆ _mechanical

const bool PorousFlowSinglePhaseBase::_mechanical
protected

◆ _nacl_name

VariableName PorousFlowSinglePhaseBase::_nacl_name
protected

Name of the NaCl variable.

Definition at line 66 of file PorousFlowSinglePhaseBase.h.

Referenced by addMaterials(), and PorousFlowSinglePhaseBase().

◆ _ndisp

const unsigned PorousFlowActionBase::_ndisp
protectedinherited

Number of displacement variables supplied.

Definition at line 75 of file PorousFlowActionBase.h.

Referenced by addKernels().

◆ _num_aqueous_equilibrium

const unsigned int PorousFlowActionBase::_num_aqueous_equilibrium
protectedinherited

Number of aqueous-equilibrium secondary species.

Definition at line 54 of file PorousFlowActionBase.h.

Referenced by 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 57 of file PorousFlowActionBase.h.

Referenced by addDictator().

◆ _num_mass_fraction_vars

const unsigned PorousFlowActionBase::_num_mass_fraction_vars
protectedinherited

◆ _pp_var

const VariableName PorousFlowSinglePhaseBase::_pp_var
protected

◆ _pressure_unit

const MooseEnum PorousFlowSinglePhaseBase::_pressure_unit
protected

Unit used for porepressure.

Definition at line 75 of file PorousFlowSinglePhaseBase.h.

Referenced by addMaterials(), and PorousFlowSinglePhaseBase().

◆ _save_component_rate_in

const std::vector<AuxVariableName> PorousFlowSinglePhaseBase::_save_component_rate_in
protected

Name of the variables (if any) that will record the fluid-components' rate of change.

Definition at line 69 of file PorousFlowSinglePhaseBase.h.

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

◆ _stabilization

enum PorousFlowActionBase::StabilizationEnum PorousFlowActionBase::_stabilization
protectedinherited

◆ _strain_at_nearest_qp

const bool PorousFlowActionBase::_strain_at_nearest_qp
protectedinherited

Evaluate strain at the nearest quadpoint for porosity that depends on strain.

Definition at line 86 of file PorousFlowActionBase.h.

Referenced by PorousFlowFullySaturated::addKernels(), addKernels(), PorousFlowUnsaturated::addKernels(), PorousFlowActionBase::addMaterialDependencies(), and PorousFlowActionBase::addMaterials().

◆ _temperature_unit

const MooseEnum PorousFlowSinglePhaseBase::_temperature_unit
protected

Unit used for temperature.

Definition at line 72 of file PorousFlowSinglePhaseBase.h.

Referenced by addMaterials().

◆ _temperature_var

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

◆ _thermal

const bool PorousFlowSinglePhaseBase::_thermal
protected

◆ _time_unit

const MooseEnum PorousFlowSinglePhaseBase::_time_unit
protected

Unit used for time.

Definition at line 78 of file PorousFlowSinglePhaseBase.h.

Referenced by addMaterials(), and PorousFlowSinglePhaseBase().

◆ _transient

bool PorousFlowActionBase::_transient
protectedinherited

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