14#include "libmesh/string_to_enum.h"
30 params.
addParam<
bool>(
"multiply_by_density",
32 "If true, then the Kernels for fluid flow are multiplied by "
33 "the fluid density. If false, this multiplication is not "
34 "performed, which means the problem linearises, but that care "
35 "must be taken when using other PorousFlow objects.");
36 params.
addClassDescription(
"Adds Kernels and fluid-property Materials necessary to simulate a "
37 "single-phase, single-component fully-saturated flow problem. No "
38 "upwinding and no mass lumping of the fluid mass are used (the "
39 "stabilization input parameter is ignored). The "
40 "fluid-mass time derivative is close to linear, and is perfectly "
41 "linear if multiply_by_density=false. These features mean the "
42 "results may differ slightly from the "
43 "Unsaturated Action case. To run a simulation "
44 "you will also need to provide various other Materials for each mesh "
45 "block, depending on your simulation type, viz: permeability, "
46 "constant Biot modulus, constant thermal expansion coefficient, "
47 "porosity, elasticity tensor, strain calculator, stress calculator, "
48 "matrix internal energy, thermal conductivity, diffusivity");
56 mooseError(
"PorousFlowBasicTHM can only be used for a single-component fluid, so that no "
57 "mass-fraction variables should be provided");
80 std::string kernel_name =
"PorousFlowBasicTHM_DarcyFlow";
81 std::string kernel_type =
"PorousFlowFullySaturatedDarcyBase";
88 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
89 _problem->addKernel(kernel_type, kernel_name, params);
93 std::string kernel_name =
"PorousFlowBasicTHM_MassTimeDerivative";
94 std::string kernel_type =
"PorousFlowFullySaturatedMassTimeDerivative";
99 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
105 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
106 _problem->addKernel(kernel_type, kernel_name, params);
111 std::string kernel_name =
"PorousFlowBasicTHM_HeatAdvection";
112 std::string kernel_type =
"PorousFlowFullySaturatedHeatAdvection";
119 _problem->addKernel(kernel_type, kernel_name, params);
130 std::string material_type =
"PorousFlow1PhaseFullySaturated";
131 std::string material_name =
"PorousFlowBasicTHM_1PhaseP_qp";
136 params.
set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
137 params.
set<
bool>(
"at_nodes") =
false;
138 _problem->addMaterial(material_type, material_name, params);
143 std::string material_type =
"PorousFlow1PhaseFullySaturated";
144 std::string material_name =
"PorousFlowBasicTHM_1PhaseP";
149 params.
set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
150 params.
set<
bool>(
"at_nodes") =
true;
151 _problem->addMaterial(material_type, material_name, params);
registerMooseAction("PorousFlowApp", PorousFlowBasicTHM, "add_user_object")
std::shared_ptr< FEProblemBase > & _problem
bool dependsOn(const T &key, const T &value)
InputParameters getValidParams(const std::string &name) const
const InputParameters & parameters() const
void mooseError(Args &&... args) const
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 tha...
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains
const bool _subdomain_names_set
indicates, if the vector of subdomain names is set (dont set block restrictions, if not)
const std::vector< VariableName > _temperature_var
Name of the temperature variable (if any)
bool _transient
Flag to denote if the simulation is transient.
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
const std::string _dictator_name
The name of the PorousFlowDictator object to be added.
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
void addVolumetricStrainMaterial(const std::vector< VariableName > &displacements, const std::string &base_name)
Adds a quadpoint volumetric strain material.
const RealVectorValue _gravity
Gravity.
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
Action for simulation involving a single phase, single component, fully saturated fluid,...
const bool _multiply_by_density
static InputParameters validParams()
virtual void addKernels() override
Add all Kernels.
virtual void addMaterials() override
Add all Materials.
virtual void addMaterialDependencies() override
Add all material dependencies so that the correct version of each material can be added.
PorousFlowBasicTHM(const InputParameters ¶ms)
DependencyResolver< std::string > _deps
All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.
Base class for actions involving a single fluid phase.
const std::vector< AuxVariableName > _save_component_rate_in
Name of the variables (if any) that will record the fluid-components' rate of change.
static InputParameters validParams()
const VariableName _pp_var
Porepressure NonlinearVariable name.
virtual void addKernels() override
Add all Kernels.
const std::string _base_name
base_name used in the TensorMechanics strain calculator
const Real _biot_coefficient
Fluid specific heat capacity at constant volume.
virtual void addMaterials() override
Add all Materials.
virtual void addMaterialDependencies() override
Add all material dependencies so that the correct version of each material can be added.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.