www.mooseframework.org
PorousFlowExponentialDecay.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 
11 
12 #include "MooseVariable.h"
13 
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<Kernel>();
21  params.addCoupledVar("rate", 1.0, "Rate of exponential decay");
22  params.addCoupledVar("reference", 0.0, "Reference value of the variable");
23  params.addClassDescription("Residual = rate * (variable - reference). Useful for modelling "
24  "exponential decay of a variable");
25  return params;
26 }
27 
28 PorousFlowExponentialDecay::PorousFlowExponentialDecay(const InputParameters & parameters)
29  : Kernel(parameters), _rate(coupledValue("rate")), _reference(coupledValue("reference"))
30 {
31 }
32 
33 Real
35 {
36  return _test[_i][_qp] * _rate[_qp] * (_u[_qp] - _reference[_qp]);
37 }
38 
39 Real
41 {
42  return _test[_i][_qp] * _rate[_qp] * _phi[_j][_qp];
43 }
PorousFlowExponentialDecay.h
PorousFlowExponentialDecay::_reference
const VariableValue & _reference
The reference.
Definition: PorousFlowExponentialDecay.h:35
PorousFlowExponentialDecay::computeQpJacobian
virtual Real computeQpJacobian() override
Definition: PorousFlowExponentialDecay.C:40
PorousFlowExponentialDecay::_rate
const VariableValue & _rate
The decay rate.
Definition: PorousFlowExponentialDecay.h:32
validParams< PorousFlowExponentialDecay >
InputParameters validParams< PorousFlowExponentialDecay >()
Definition: PorousFlowExponentialDecay.C:18
PorousFlowExponentialDecay::computeQpResidual
virtual Real computeQpResidual() override
Definition: PorousFlowExponentialDecay.C:34
PorousFlowExponentialDecay
Kernel = _rate * (variable - reference)
Definition: PorousFlowExponentialDecay.h:22
PorousFlowExponentialDecay::PorousFlowExponentialDecay
PorousFlowExponentialDecay(const InputParameters &parameters)
Definition: PorousFlowExponentialDecay.C:28
registerMooseObject
registerMooseObject("PorousFlowApp", PorousFlowExponentialDecay)