12 #include "FEProblem.h"
13 #include "Conversion.h"
14 #include "libmesh/string_to_enum.h"
31 params.addParam<
bool>(
"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 linearises, but that care "
36 "must be taken when using other PorousFlow objects.");
37 params.addClassDescription(
"Adds Kernels and fluid-property Materials necessary to simulate a "
38 "single-phase, single-component fully-saturated flow problem. No "
39 "upwinding and no mass lumping of the fluid mass are used. 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";
82 InputParameters params = _factory.getValidParams(kernel_type);
84 params.set<RealVectorValue>(
"gravity") =
_gravity;
86 params.set<NonlinearVariableName>(
"variable") =
_pp_var;
87 _problem->addKernel(kernel_type, kernel_name, params);
91 std::string kernel_name =
"PorousFlowBasicTHM_MassTimeDerivative";
92 std::string kernel_type =
"PorousFlowFullySaturatedMassTimeDerivative";
93 InputParameters params = _factory.getValidParams(kernel_type);
95 params.set<NonlinearVariableName>(
"variable") =
_pp_var;
98 params.set<MooseEnum>(
"coupling_type") = parameters().get<MooseEnum>(
"coupling_type");
99 _problem->addKernel(kernel_type, kernel_name, params);
104 std::string kernel_name =
"PorousFlowBasicTHM_HeatAdvection";
105 std::string kernel_type =
"PorousFlowFullySaturatedHeatAdvection";
106 InputParameters params = _factory.getValidParams(kernel_type);
108 params.set<UserObjectName>(
"PorousFlowDictator") =
_dictator_name;
109 params.set<RealVectorValue>(
"gravity") =
_gravity;
110 _problem->addKernel(kernel_type, kernel_name, params);
121 std::string material_type =
"PorousFlow1PhaseFullySaturated";
122 InputParameters params = _factory.getValidParams(material_type);
123 std::string material_name =
"PorousFlowBasicTHM_1PhaseP_qp";
124 params.set<UserObjectName>(
"PorousFlowDictator") =
_dictator_name;
125 params.set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
126 params.set<
bool>(
"at_nodes") =
false;
127 _problem->addMaterial(material_type, material_name, params);
132 std::string material_type =
"PorousFlow1PhaseFullySaturated";
133 InputParameters params = _factory.getValidParams(material_type);
134 std::string material_name =
"PorousFlowBasicTHM_1PhaseP";
135 params.set<UserObjectName>(
"PorousFlowDictator") =
_dictator_name;
136 params.set<std::vector<VariableName>>(
"porepressure") = {
_pp_var};
137 params.set<
bool>(
"at_nodes") =
true;
138 _problem->addMaterial(material_type, material_name, params);