14 #include "libmesh/string_to_enum.h" 31 "multiply_by_density",
33 "If true, then the Kernels for fluid flow are multiplied by " 34 "the fluid density. If false, this multiplication is not " 35 "performed, which means the problem becomes more linear, but care must be taken when using " 36 "other PorousFlow objects, since MOOSE will be computing volume fluxes, not mass fluxes.");
38 "Adds Kernels and fluid-property Materials necessary to simulate a " 39 "single-phase fully-saturated flow problem. Numerical stabilization options for the fluid " 40 "and heat flow are: no upwinding, full-upwinding or KT stabilization. No Kernels for " 41 "diffusion and dispersion of " 42 "fluid components are added. To run a simulation you will also " 43 "need to provide various other Materials for each mesh " 44 "block, depending on your simulation type, viz: permeability, " 45 "porosity, elasticity tensor, strain calculator, stress calculator, " 46 "matrix internal energy, thermal conductivity, diffusivity");
88 _included_objects.push_back(
"PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent");
101 const std::string kernel_type =
"PorousFlowFullySaturatedDarcyFlow";
109 const std::string kernel_name =
"PorousFlowFullySaturated_DarcyFlow" +
Moose::stringify(i);
110 params.
set<
unsigned int>(
"fluid_component") = i;
112 _problem->addKernel(kernel_type, kernel_name, params);
115 const std::string kernel_name =
118 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
119 _problem->addKernel(kernel_type, kernel_name, params);
123 const std::string kernel_type =
"PorousFlowFullySaturatedAdvectiveFlux";
131 const std::string kernel_name =
133 params.
set<
unsigned int>(
"fluid_component") = i;
135 _problem->addKernel(kernel_type, kernel_name, params);
138 const std::string kernel_name =
141 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
142 _problem->addKernel(kernel_type, kernel_name, params);
146 const std::string kernel_type =
"PorousFlowFluxLimitedTVDAdvection";
152 const std::string kernel_name =
"PorousFlowFluxLimited_DarcyFlow" +
Moose::stringify(i);
153 params.
set<UserObjectName>(
"advective_flux_calculator") =
156 _problem->addKernel(kernel_type, kernel_name, params);
159 const std::string kernel_name =
161 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
162 params.
set<UserObjectName>(
"advective_flux_calculator") =
164 _problem->addKernel(kernel_type, kernel_name, params);
169 std::string kernel_name =
"PorousFlowFullySaturated_MassTimeDerivative";
170 std::string kernel_type =
"PorousFlowMassTimeDerivative";
180 kernel_name =
"PorousFlowFullySaturated_MassTimeDerivative" +
Moose::stringify(i);
181 params.
set<
unsigned int>(
"fluid_component") = i;
185 _problem->addKernel(kernel_type, kernel_name, params);
191 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
193 params.
set<std::vector<AuxVariableName>>(
"save_in") = {
195 _problem->addKernel(kernel_type, kernel_name, params);
200 std::string kernel_name =
"PorousFlowFullySaturated_MassVolumetricExpansion";
201 std::string kernel_type =
"PorousFlowMassVolumetricExpansion";
209 kernel_name =
"PorousFlowFullySaturated_MassVolumetricExpansion" +
Moose::stringify(i);
210 params.
set<
unsigned>(
"fluid_component") = i;
212 _problem->addKernel(kernel_type, kernel_name, params);
215 kernel_name =
"PorousFlowFullySaturated_MassVolumetricExpansion" +
218 params.
set<NonlinearVariableName>(
"variable") =
_pp_var;
219 _problem->addKernel(kernel_type, kernel_name, params);
226 std::string kernel_name =
"PorousFlowFullySaturated_HeatAdvection";
227 std::string kernel_type =
"PorousFlowFullySaturatedHeatAdvection";
232 params.
set<
bool>(
"multiply_by_density") =
true;
233 _problem->addKernel(kernel_type, kernel_name, params);
237 std::string kernel_name =
"PorousFlowFullySaturatedUpwind_HeatAdvection";
238 std::string kernel_type =
"PorousFlowFullySaturatedUpwindHeatAdvection";
243 _problem->addKernel(kernel_type, kernel_name, params);
247 const std::string kernel_name =
"PorousFlowFullySaturated_HeatAdvection";
248 const std::string kernel_type =
"PorousFlowFluxLimitedTVDAdvection";
252 params.
set<UserObjectName>(
"advective_flux_calculator") =
"PorousFlowFullySaturatedHeat_AC";
253 _problem->addKernel(kernel_type, kernel_name, params);
268 const std::string userobject_name =
"PorousFlowFullySaturated_AC_" +
Moose::stringify(i);
273 const std::string userobject_name =
285 const std::string userobject_name =
"PorousFlowFullySaturatedHeat_AC";
300 std::string material_type =
"PorousFlow1PhaseFullySaturated";
302 std::string material_name =
"PorousFlowFullySaturated_1PhaseP_qp";
304 params.
set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
305 params.
set<
bool>(
"at_nodes") =
false;
306 _problem->addMaterial(material_type, material_name, params);
311 std::string material_type =
"PorousFlow1PhaseFullySaturated";
313 std::string material_name =
"PorousFlowFullySaturated_1PhaseP";
315 params.
set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
316 params.
set<
bool>(
"at_nodes") =
true;
317 _problem->addMaterial(material_type, material_name, params);
static InputParameters validParams()
virtual void addKernels() override
Add all Kernels.
virtual void addMaterials() override
Add all Materials.
virtual void addUserObjects() override
Add all other UserObjects.
InputParameters getValidParams(const std::string &name) const
bool dependsOn(const std::string &key, const std::string &value)
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...
const VariableName _pp_var
Porepressure NonlinearVariable name.
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
registerMooseAction("PorousFlowApp", PorousFlowFullySaturated, "add_user_object")
const std::vector< AuxVariableName > _save_component_rate_in
Name of the variables (if any) that will record the fluid-components' rate of change.
const bool _thermal
Flags to indicate whether thermal or mechanical effects are included.
void addAdvectiveFluxCalculatorSaturated(unsigned phase, bool multiply_by_density, std::string userobject_name)
Action for simulation involving a single phase fully saturated fluid.
void addAdvectiveFluxCalculatorSaturatedMultiComponent(unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
const bool _multiply_by_density
Base class for actions involving a single fluid phase.
virtual void addKernels() override
Add all Kernels.
virtual void addMaterials() override
Add all Materials.
static InputParameters validParams()
std::string stringify(const T &t)
PorousFlowFullySaturated(const InputParameters ¶ms)
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.
virtual void addMaterialDependencies() override
Add all material dependencies so that the correct version of each material can be added...
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.
void addVolumetricStrainMaterial(const std::vector< VariableName > &displacements, const std::string &base_name)
Adds a quadpoint volumetric strain material.
const unsigned _num_mass_fraction_vars
Number of mass-fraction variables.
std::shared_ptr< FEProblemBase > & _problem
virtual void addMaterialDependencies() override
Add all material dependencies so that the correct version of each material can be added...
virtual void addUserObjects()
Add all other UserObjects.
void addAdvectiveFluxCalculatorSaturatedHeat(unsigned phase, bool multiply_by_density, std::string userobject_name)
const std::string _base_name
base_name used in the TensorMechanics strain calculator
enum PorousFlowActionBase::StabilizationEnum _stabilization
const std::vector< VariableName > _mass_fraction_vars
Name of the mass-fraction variables (if any)
DependencyResolver< std::string > _deps
All dependencies of kernels, auxkernels, materials, etc, are stored in _dependencies.