https://mooseframework.inl.gov
RichardsSeffPrimeAux.C
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 // This post processor returns the effective saturation of a region.
11 //
12 #include "RichardsSeffPrimeAux.h"
13 
15 
18 {
20  params.addRequiredCoupledVar("pressure_vars", "List of variables that represent the pressure");
21  params.addRequiredParam<int>(
22  "wrtnum",
23  "This aux kernel will return d(seff)/dP_wrtnum. 0<=wrtnum<number_of_pressure_vars.");
24  params.addRequiredParam<UserObjectName>("seff_UO",
25  "Name of user object that defines effective saturation.");
26  params.addClassDescription("auxillary variable which is effective saturation");
27  return params;
28 }
29 
31  : AuxKernel(parameters),
32  _seff_UO(getUserObject<RichardsSeff>("seff_UO")),
33  _wrt1(getParam<int>("wrtnum")),
34  _pressure_vals(coupledValues("pressure_vars"))
35 {
36  int n = coupledComponents("pressure_vars");
37  if (_wrt1 < 0 || _wrt1 >= n)
38  mooseError("Your wrtnum is ", _wrt1, " but it must obey 0 <= wrtnum < ", n, ".");
39 
40  _mat.resize(n);
41 }
42 
43 Real
45 {
47  return _mat[_wrt1];
48 }
virtual void dseff(std::vector< const VariableValue *> p, unsigned int qp, std::vector< Real > &result) const =0
derivative(s) of effective saturation as a function of porepressure(s) at given quadpoint of the elem...
const std::vector< const VariableValue * > _pressure_vals
the porepressure values (this will be length N where N is the number of arguments that the _seff_UO r...
Base class for effective saturation as a function of porepressure(s) The functions seff...
Definition: RichardsSeff.h:18
void addRequiredParam(const std::string &name, const std::string &doc_string)
int _wrt1
AuxKernel calculates d^2(Seff)/dP_wrt1 so wrt1 is the porepressure number to differentiate wrt to...
std::vector< Real > _mat
array of derivtives: This auxkernel returns _mat[_wrt1]
Calculates derivative of effective saturation wrt a specified porepressure.
RichardsSeffPrimeAux(const InputParameters &parameters)
const RichardsSeff & _seff_UO
The user object that defines effective saturation as function of porepressure (or porepressures in th...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int coupledComponents(const std::string &var_name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
registerMooseObject("RichardsApp", RichardsSeffPrimeAux)
void ErrorVector unsigned int