www.mooseframework.org
ConstantRate.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "ConstantRate.h"
16 
17 template <>
20 {
22  params.addRequiredParam<Real>("rate", "The constant rate in 'du/dt = rate'");
23  params.declareControllable("rate");
24  return params;
25 }
26 
28  : NodalKernel(parameters), _rate(getParam<Real>("rate"))
29 {
30 }
31 
32 Real
34 {
35  return -_rate;
36 }
37 
38 Real
40 {
41  return 0;
42 }
virtual Real computeQpResidual() override
The user can override this function to compute the residual at a node.
Definition: ConstantRate.C:33
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< NodalKernel >()
Definition: NodalKernel.C:24
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
virtual Real computeQpJacobian() override
The user can override this function to compute the "on-diagonal" Jacobian contribution.
Definition: ConstantRate.C:39
InputParameters validParams< ConstantRate >()
Definition: ConstantRate.C:19
void declareControllable(const std::string &name)
Declare the given parameters as controllable.
ConstantRate(const InputParameters &parameters)
Constructor initializes the rate.
Definition: ConstantRate.C:27
const Real & _rate
The rate.
Definition: ConstantRate.h:43
Base class for creating new types of boundary conditions.
Definition: NodalKernel.h:50