https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowActionBase.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "Action.h"
14#include "MooseEnum.h"
15
16#include "libmesh/vector_value.h"
17
31{
32public:
34
36
37 virtual void act() override;
38
40 virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override;
41
42protected:
48 std::vector<std::string> _included_objects;
49
51 const std::string _dictator_name;
52
54 std::vector<SubdomainName> _subdomain_names;
55
58
60 const unsigned int _num_aqueous_equilibrium;
61
63 const unsigned int _num_aqueous_kinetic;
64
66 const RealVectorValue _gravity;
67
69 const std::vector<VariableName> _mass_fraction_vars;
70
73
75 const std::vector<VariableName> _temperature_var;
76
78 const std::vector<VariableName> & _displacements;
79
81 const unsigned _ndisp;
82
84 std::vector<VariableName> _coupled_displacements;
85
88
90
93
96
99
103 virtual void addDictator() = 0;
104
108 virtual void addUserObjects();
109
113 virtual void addAuxObjects();
114
118 virtual void addKernels();
119
124 virtual void addMaterialDependencies();
125
129 virtual void addMaterials();
130
135 void addSaturationAux(unsigned phase);
136
141 void addDarcyAux(const RealVectorValue & gravity);
142
146 void addStressAux();
147
152 void addTemperatureMaterial(bool at_nodes);
153
158 void addMassFractionMaterial(bool at_nodes);
159
164 void addEffectiveFluidPressureMaterial(bool at_nodes);
165
170
177 void addVolumetricStrainMaterial(const std::vector<VariableName> & displacements,
178 const std::string & base_name);
179
192 void addSingleComponentFluidMaterial(bool at_nodes,
193 unsigned phase,
194 bool compute_density_and_viscosity,
195 bool compute_internal_energy,
196 bool compute_enthalpy,
197 const UserObjectName & fp,
198 const MooseEnum & temperature_unit,
199 const MooseEnum & pressure_unit,
200 const MooseEnum & time_unit);
201
212 void addBrineMaterial(const VariableName xnacl,
213 bool at_nodes,
214 unsigned phase,
215 bool compute_density_and_viscosity,
216 bool compute_internal_energy,
217 bool compute_enthalpy,
218 const MooseEnum & temperature_unit);
219
228 void addRelativePermeabilityConst(bool at_nodes, unsigned phase, Real kr);
229
238 void
239 addRelativePermeabilityCorey(bool at_nodes, unsigned phase, Real n, Real s_res, Real sum_s_res);
240
249 void
250 addRelativePermeabilityFLAC(bool at_nodes, unsigned phase, Real m, Real s_res, Real sum_s_res);
251
259 void addCapillaryPressureVG(Real m, Real alpha, std::string userobject_name, Real sat_lr = 0.0);
260
261 void addAdvectiveFluxCalculatorSaturated(unsigned phase,
262 bool multiply_by_density,
263 std::string userobject_name);
264
265 void addAdvectiveFluxCalculatorUnsaturated(unsigned phase,
266 bool multiply_by_density,
267 std::string userobject_name);
268
269 void addAdvectiveFluxCalculatorSaturatedHeat(unsigned phase,
270 bool multiply_by_density,
271 std::string userobject_name);
272
274 bool multiply_by_density,
275 std::string userobject_name);
276
278 unsigned fluid_component,
279 bool multiply_by_density,
280 std::string userobject_name);
281
283 unsigned fluid_component,
284 bool multiply_by_density,
285 std::string userobject_name);
286};
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type)
Base class for PorousFlow actions.
enum PorousFlowActionBase::StabilizationEnum _stabilization
void addAdvectiveFluxCalculatorSaturatedHeat(unsigned phase, bool multiply_by_density, std::string userobject_name)
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.
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.
virtual void addKernels()
Add all Kernels.
Moose::CoordinateSystemType _coord_system
Coordinate system of the simulation (eg RZ, XYZ, etc)
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.
void addSaturationAux(unsigned phase)
Add an AuxVariable and AuxKernel to calculate saturation.
virtual void addDictator()=0
Add the PorousFlowDictator object.
void addAdvectiveFluxCalculatorSaturated(unsigned phase, bool multiply_by_density, std::string userobject_name)
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 std::vector< VariableName > & _displacements
Displacement NonlinearVariable names (if any)
const unsigned _ndisp
Number of displacement variables supplied.
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
void addTemperatureMaterial(bool at_nodes)
Adds a nodal and a quadpoint Temperature material.
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains
void addAdvectiveFluxCalculatorSaturatedMultiComponent(unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
static InputParameters validParams()
const bool _subdomain_names_set
indicates, if the vector of subdomain names is set (dont set block restrictions, if not)
const std::vector< VariableName > _mass_fraction_vars
Name of the mass-fraction variables (if any)
const MooseEnum _flux_limiter_type
Flux limiter type in the Kuzmin-Turek FEM-TVD stabilization scheme.
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.
const std::vector< VariableName > _temperature_var
Name of the temperature variable (if any)
void addAdvectiveFluxCalculatorUnsaturated(unsigned phase, bool multiply_by_density, std::string userobject_name)
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.
void addAdvectiveFluxCalculatorUnsaturatedMultiComponent(unsigned phase, unsigned fluid_component, bool multiply_by_density, std::string userobject_name)
void addMassFractionMaterial(bool at_nodes)
Adds a nodal and a quadpoint MassFraction material.
std::vector< VariableName > _coupled_displacements
Displacement Variable names.
const bool _strain_at_nearest_qp
Evaluate strain at the nearest quadpoint for porosity that depends on strain.
const unsigned int _num_aqueous_kinetic
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
void addVolumetricStrainMaterial(const std::vector< VariableName > &displacements, const std::string &base_name)
Adds a quadpoint volumetric strain material.
void addEffectiveFluidPressureMaterial(bool at_nodes)
Adds a nodal and a quadpoint effective fluid pressure material.
void addStressAux()
Add AuxVariables and AuxKernels to compute effective stress.
void addDarcyAux(const RealVectorValue &gravity)
Add AuxVariables and AuxKernels to calculate Darcy velocity.
const RealVectorValue _gravity
Gravity.
virtual void addUserObjects()
Add all other UserObjects.
virtual void addMaterials()
Add all Materials.
virtual void addMaterialDependencies()
Add all material dependencies so that the correct version of each material can be added.
void addNearestQpMaterial()
Adds a PorousFlowNearestQp material.
std::vector< std::string > _included_objects
List of Kernels, AuxKernels, Materials, etc, that are added in this input file.
virtual void act() override
void addCapillaryPressureVG(Real m, Real alpha, std::string userobject_name, Real sat_lr=0.0)
Adds a van Genuchten capillary pressure UserObject.
virtual void addAuxObjects()
Add all AuxVariables and AuxKernels.
void addAdvectiveFluxCalculatorUnsaturatedHeat(unsigned phase, bool multiply_by_density, std::string userobject_name)
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.
Holds the PorousFlow dependencies of kernels, auxkernels, materials, etc.
RelationshipManagerType
CoordinateSystemType