www.mooseframework.org
RichardsApp.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "RichardsApp.h"
9 #include "Moose.h"
10 #include "AppFactory.h"
11 #include "MooseSyntax.h"
12 
13 // Actions
14 #include "Q2PAction.h"
15 
16 // UserObjects
17 #include "RichardsVarNames.h"
20 #include "RichardsDensityIdeal.h"
22 #include "RichardsDensityVDW.h"
24 #include "RichardsRelPermPower.h"
25 #include "RichardsRelPermVG.h"
26 #include "RichardsRelPermVG1.h"
27 #include "RichardsRelPermBW.h"
29 #include "Q2PRelPermPowerGas.h"
30 #include "RichardsSeff1VG.h"
31 #include "RichardsSeff1VGcut.h"
32 #include "RichardsSeff1BWsmall.h"
33 #include "RichardsSeff1RSC.h"
34 #include "RichardsSeff2waterVG.h"
35 #include "RichardsSeff2gasVG.h"
38 #include "RichardsSeff2waterRSC.h"
39 #include "RichardsSeff2gasRSC.h"
40 #include "RichardsSat.h"
41 #include "RichardsSUPGnone.h"
42 #include "RichardsSUPGstandard.h"
43 #include "RichardsSumQuantity.h"
44 
45 // AuxKernels
46 #include "RichardsSatAux.h"
47 #include "RichardsSatPrimeAux.h"
48 #include "RichardsSeffAux.h"
49 #include "RichardsSeffPrimeAux.h"
51 #include "RichardsDensityAux.h"
54 #include "RichardsRelPermAux.h"
57 #include "DarcyFluxComponent.h"
58 
59 // Materials
60 #include "RichardsMaterial.h"
61 #include "PoroFullSatMaterial.h" // Used for mechanical coupling
62 #include "DarcyMaterial.h"
63 #include "Q2PMaterial.h"
64 
65 // DiracKernels
66 #include "RichardsBorehole.h"
67 #include "RichardsPolyLineSink.h"
68 #include "Q2PBorehole.h"
69 
70 // Functions
71 #include "RichardsExcavGeom.h"
72 #include "GradParsedFunction.h"
73 #include "Grad2ParsedFunction.h"
74 
75 // Postprocessors
76 #include "RichardsMass.h"
79 #include "RichardsExcavFlow.h"
80 #include "RichardsPlotQuantity.h"
82 
83 // Kernels
84 #include "RichardsMassChange.h"
86 #include "RichardsFlux.h"
88 #include "RichardsPPenalty.h"
89 #include "PoroFullSatTimeDerivative.h" // Used for mechanical coupling
90 #include "DarcyFlux.h"
91 #include "Q2PPorepressureFlux.h"
92 #include "Q2PSaturationFlux.h"
93 #include "Q2PSaturationDiffusion.h"
94 #include "Q2PNodalMass.h"
96 
97 // BoundaryConditions
98 #include "RichardsExcav.h"
101 #include "Q2PPiecewiseLinearSink.h"
102 
103 // Problems
105 
106 template <>
107 InputParameters
109 {
110  InputParameters params = validParams<MooseApp>();
111  return params;
112 }
113 
114 RichardsApp::RichardsApp(const InputParameters & parameters) : MooseApp(parameters)
115 {
116  Moose::registerObjects(_factory);
118 
119  Moose::associateSyntax(_syntax, _action_factory);
120  RichardsApp::associateSyntax(_syntax, _action_factory);
121 
122  mooseDeprecated("Please use the PorousFlow module instead. If Richards contains functionality "
123  "not included in PorousFlow, please contact the moose-users google group");
124 }
125 
127 
128 void
130 {
131  registerApp(RichardsApp);
132 }
133 
134 void
136 {
137  // UserObjects
138  registerUserObject(RichardsVarNames);
139  registerUserObject(RichardsDensityConstBulk);
140  registerUserObject(RichardsDensityConstBulkCut);
141  registerUserObject(RichardsDensityIdeal);
142  registerUserObject(RichardsDensityMethane20degC);
143  registerUserObject(RichardsDensityVDW);
144  registerUserObject(RichardsRelPermMonomial);
145  registerUserObject(RichardsRelPermPower);
146  registerUserObject(RichardsRelPermVG);
147  registerUserObject(RichardsRelPermVG1);
148  registerUserObject(RichardsRelPermBW);
149  registerUserObject(RichardsRelPermPowerGas);
150  registerUserObject(Q2PRelPermPowerGas);
151  registerUserObject(RichardsSeff1VG);
152  registerUserObject(RichardsSeff1VGcut);
153  registerUserObject(RichardsSeff1BWsmall);
154  registerUserObject(RichardsSeff1RSC);
155  registerUserObject(RichardsSeff2waterVG);
156  registerUserObject(RichardsSeff2gasVG);
157  registerUserObject(RichardsSeff2waterVGshifted);
158  registerUserObject(RichardsSeff2gasVGshifted);
159  registerUserObject(RichardsSeff2waterRSC);
160  registerUserObject(RichardsSeff2gasRSC);
161  registerUserObject(RichardsSat);
162  registerUserObject(RichardsSUPGnone);
163  registerUserObject(RichardsSUPGstandard);
164  registerUserObject(RichardsSumQuantity);
165 
166  // AuxKernels
167  registerAux(RichardsSatAux);
168  registerAux(RichardsSatPrimeAux);
169  registerAux(RichardsSeffAux);
170  registerAux(RichardsSeffPrimeAux);
171  registerAux(RichardsSeffPrimePrimeAux);
172  registerAux(RichardsDensityAux);
173  registerAux(RichardsDensityPrimeAux);
174  registerAux(RichardsDensityPrimePrimeAux);
175  registerAux(RichardsRelPermAux);
176  registerAux(RichardsRelPermPrimeAux);
177  registerAux(RichardsRelPermPrimePrimeAux);
178  registerAux(DarcyFluxComponent);
179 
180  // Materials
181  registerMaterial(RichardsMaterial);
182  registerMaterial(PoroFullSatMaterial); // Used for mechanical coupling
183  registerMaterial(DarcyMaterial);
184  registerMaterial(Q2PMaterial);
185 
186  // DiracKernels
187  registerDiracKernel(RichardsPolyLineSink);
188  registerDiracKernel(RichardsBorehole);
189  registerDiracKernel(Q2PBorehole);
190 
191  // Functions
192  registerFunction(RichardsExcavGeom);
193  registerFunction(GradParsedFunction);
194  registerFunction(Grad2ParsedFunction);
195 
196  // Postprocessors
197  registerPostprocessor(RichardsMass);
198  registerPostprocessor(RichardsPiecewiseLinearSinkFlux);
199  registerPostprocessor(RichardsHalfGaussianSinkFlux);
200  registerPostprocessor(RichardsExcavFlow);
201  registerPostprocessor(RichardsPlotQuantity);
202  registerPostprocessor(Q2PPiecewiseLinearSinkFlux);
203 
204  // Kernels
205  registerKernel(RichardsMassChange);
206  registerKernel(RichardsLumpedMassChange);
207  registerKernel(RichardsFlux);
208  registerKernel(RichardsFullyUpwindFlux);
209  registerKernel(RichardsPPenalty);
210  registerKernel(PoroFullSatTimeDerivative); // Used for mechanical coupling
211  registerKernel(DarcyFlux);
212  registerKernel(Q2PPorepressureFlux);
213  registerKernel(Q2PSaturationFlux);
214  registerKernel(Q2PSaturationDiffusion);
215  registerKernel(Q2PNodalMass);
216  registerKernel(Q2PNegativeNodalMassOld);
217 
218  // BoundaryConditions
219  registerBoundaryCondition(RichardsExcav);
220  registerBoundaryCondition(RichardsPiecewiseLinearSink);
221  registerBoundaryCondition(RichardsHalfGaussianSink);
222  registerBoundaryCondition(Q2PPiecewiseLinearSink);
223 
224  // Problems
225  registerProblem(RichardsMultiphaseProblem);
226 }
227 
228 void
229 RichardsApp::associateSyntax(Syntax & syntax, ActionFactory & action_factory)
230 {
231  registerSyntaxTask("Q2PAction", "Q2P", "add_kernel");
232  registerSyntaxTask("Q2PAction", "Q2P", "add_aux_variable");
233  registerSyntaxTask("Q2PAction", "Q2P", "add_function");
234  registerSyntaxTask("Q2PAction", "Q2P", "add_postprocessor");
235 
236  registerAction(Q2PAction, "add_kernel");
237  registerAction(Q2PAction, "add_aux_variable");
238  registerAction(Q2PAction, "add_function");
239  registerAction(Q2PAction, "add_postprocessor");
240 }
Fluid Saturation as a function of effective saturation.
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
Approximates a polyline by a sequence of Dirac Points the mass flux from each Dirac Point is _sink_fu...
Shifted van-Genuchten water effective saturation as a function of (Pwater, Pgas), and its derivs wrt ...
Kernel = grad(permeability*relativepermeability/viscosity * (grad(pressure) - density*gravity)) This ...
Definition: RichardsFlux.h:24
InputParameters validParams< RichardsApp >()
Definition: RichardsApp.C:108
Methane density - a quadratic fit to expressions in: "Results of (pressure, density, temperature) measurements on methane and on nitrogen in the temperature range from 273.15K to 323.15K at pressures up to 12MPa using new apparatus for accurate gas-density" This is only valid for p>=0, which is the physical region.
Saturation of a phase as a function of effective saturation of that phase, and its derivatives wrt ef...
Definition: RichardsSat.h:23
Relative Permeability as a function of effective saturation.
Calculates derivative of effective saturation wrt specified porepressures.
Van-Genuchten form of relative permeability as a function of effective saturation.
Derivative of fluid Saturation wrt effective saturation.
Rogers-Stallybrass-Clements version of effective saturation for single-phase simulations as a functio...
Material designed to calculate and store all the quantities needed for the fluid-flow part of poromec...
van-Genuchten water effective saturation as a function of (Pwater, Pgas), and its derivs wrt to those...
This is a fully upwinded flux Kernel The Variable of this Kernel should be the porepressure.
Records total mass flow into an excavation defined by a RichardsExcavGeom function.
Kernel = grad(permeability*(grad(pressure) - weight)) This is mass flow according to the Darcy equati...
Definition: DarcyFlux.h:23
Fluid density assuming constant bulk modulus.
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels...
Van-Genuchten form of relative permeability when seff <= _scut cubic relative permeability for seff >...
"Broadbridge-White" form of effective saturation for Kn small as a function of porepressure (not capi...
returns the central difference approx to the derivative (direction.nabla)^2 function viz (f(t...
Applies a fully-upwinded flux sink to a boundary The sink is a piecewise linear function of porepress...
This is a fully upwinded flux Kernel The Variable of this Kernel should be the saturation.
Postprocessor that records the mass flux from porespace to a half-gaussian sink.
returns the central difference approx to the derivative of the function, ie (f(t, p + direction) - f(...
Allows specification of Dirichlet BCs on an evolving boundary RichardsExcav is applied on a sideset...
Definition: RichardsExcav.h:26
Kernel = (mass - mass_old)/dt where mass = porosity*density*saturation This is used for the time deri...
Power form of relative permeability, usually used for water.
Relative Permeability as a function of effective saturation.
RichardsApp(const InputParameters &parameters)
Definition: RichardsApp.C:114
-fluid_mass_old/dt with the fluid mass being lumped to the nodes.
This postprocessor computes the fluid mass by integrating the density over the volume.
Definition: RichardsMass.h:24
van-Genuchten gas effective saturation as a function of (Pwater, Pgas), and its derivs wrt to those p...
Effective saturation as a function of porepressure using the van Genuchten formula.
Monomial form of relative permeability relperm = Seff^n for 0<Seff<=1, where S = (S - simm)/(1 - simm...
Kernel = a*(lower - variable) for variable<lower, and zero otherwise This is an attempt to enforce va...
Allows a constraint u>=v to be enforced during the nonlinear iteration process.
Calculates derivative of effective saturation wrt a specified porepressure.
static void registerObjects(Factory &factory)
Definition: RichardsApp.C:135
static void registerApps()
Definition: RichardsApp.C:129
Diffusive Kernel that models nonzero capillary pressure in Q2P models The Variable of this Kernel sho...
Computes a component of the Darcy flux: -k_ij/mu (nabla_j P - w_j) where k_ij is the permeability ten...
Fluid density of an ideal gas.
d(fluid mass in porespace)/dt with the fluid mass being lumped to the nodes.
Effective saturation as a function of porepressure using the van Genuchten formula, but when p<p_cut use a linear instead, seff = a + b*p, which matches value and derivative at p=p_cut This is so seff=0 at a finite value of p rather than p=-infinity.
PowerGas form of relative permeability Define s = (seff - simm)/(1 - simm).
This postprocessor computes the fluid flux to a Q2PPiecewiseLinearSink.
no Richards SUPG.
standard SUPG relationships valid for the Richards equation.
Applies a flux sink to a boundary The sink is a piecewise linear function of porepressure (the "varia...
Kernel = biot_coefficient*d(volumetric_strain)/dt + (1/biot_modulus)*d(porepressure)/dt this is the t...
Applies a fluid sink to the boundary.
This postprocessor computes the fluid flux to a RichardsPiecewiseLinearSink.
Derivative of relative Permeability wrt effective saturation.
Derivative of fluid density wrt porepressure.
Approximates a borehole by a sequence of Dirac Points.
Definition: Q2PBorehole.h:25
PowerGas form of relative permeability Define s = seff/(1 - simm).
Rogers-Stallybrass-Clements version of effective saturation of water phase as a function of (Pwater...
Defines the permeability tensor used in Darcy flow.
Definition: DarcyMaterial.h:22
Density of a gas according to the van der Waals expression (P + n^2 a/V^2)(V - nb) = nRT How density ...
Shifted van-Genuchten water effective saturation as a function of (Pwater, Pgas), and its derivs wrt ...
fluid_mass/dt lumped to the nodes
Definition: Q2PNodalMass.h:24
static void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Definition: RichardsApp.C:229
Defines excavation geometry.
This is a fully upwinded version of RichardsFlux.
Second derivative of fluid density wrt porepressure.
Fluid density assuming constant bulk modulus, for p>cut_limit Then following a cubic for zero_point <...
The Richards equation is a nonlinear diffusion equation that models multiphase flow through porous ma...
Definition: RichardsApp.h:22
Extracts the value from RichardsSumQuantity userobject.
"Broadbridge-White" form of relative permeability as a function of effective saturation P Broadbridge...
Q2P Material.
Definition: Q2PMaterial.h:22
Fluid density as a function of porepressure.
Calculates effective saturation for a specified variable.
virtual ~RichardsApp()
Definition: RichardsApp.C:126
Approximates a borehole by a sequence of Dirac Points.