www.mooseframework.org
RichardsSeffAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "RichardsSeffAux.h"
13 
14 registerMooseObject("RichardsApp", RichardsSeffAux);
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<AuxKernel>();
21  params.addRequiredCoupledVar("pressure_vars", "List of variables that represent the pressure");
22  params.addRequiredParam<UserObjectName>("seff_UO",
23  "Name of user object that defines effective saturation.");
24  params.addClassDescription("auxillary variable which is effective saturation");
25  return params;
26 }
27 
28 RichardsSeffAux::RichardsSeffAux(const InputParameters & parameters)
29  : AuxKernel(parameters), _seff_UO(getUserObject<RichardsSeff>("seff_UO"))
30 {
31  int n = coupledComponents("pressure_vars");
32  _pressure_vals.resize(n);
33 
34  for (int i = 0; i < n; ++i)
35  _pressure_vals[i] = &coupledValue("pressure_vars", i);
36 }
37 
38 Real
40 {
41  return _seff_UO.seff(_pressure_vals, _qp);
42 }
RichardsSeffAux
Calculates effective saturation for a specified variable.
Definition: RichardsSeffAux.h:25
RichardsSeffAux::computeValue
virtual Real computeValue()
Definition: RichardsSeffAux.C:39
RichardsSeffAux::_pressure_vals
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...
Definition: RichardsSeffAux.h:45
RichardsSeff
Base class for effective saturation as a function of porepressure(s) The functions seff,...
Definition: RichardsSeff.h:23
RichardsSeffAux::RichardsSeffAux
RichardsSeffAux(const InputParameters &parameters)
Definition: RichardsSeffAux.C:28
validParams< RichardsSeffAux >
InputParameters validParams< RichardsSeffAux >()
Definition: RichardsSeffAux.C:18
RichardsSeffAux::_seff_UO
const RichardsSeff & _seff_UO
The user object that defines effective saturation as function of porepressure (or porepressures in th...
Definition: RichardsSeffAux.h:38
registerMooseObject
registerMooseObject("RichardsApp", RichardsSeffAux)
RichardsSeffAux.h
RichardsSeff::seff
virtual Real seff(std::vector< const VariableValue * > p, unsigned int qp) const =0
effective saturation as a function of porepressure(s) at given quadpoint of the element