https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ExponentialReaction.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#include "ExponentialReaction.h"
11
12registerMooseObject("StochasticToolsTestApp", ExponentialReaction);
13
16{
18 params.addClassDescription("Implements a simple reaction term with the following weak form "
19 "$(\\psi_i,\\frac{\\mu_1}{\\mu_2}\\left[e^{\\mu_2 u_h}-1\\right])$.");
20 params.addParam<Real>("mu1", 0.3, "First coefficient in the nonlinear term.");
21 params.addParam<Real>("mu2", 9, "Second coefficient in the nonlinear term.");
22 params.declareControllable("mu1");
23 params.declareControllable("mu2");
24 return params;
25}
26
28 : Kernel(parameters), _mu1(getParam<Real>("mu1")), _mu2(getParam<Real>("mu2"))
29{
30}
31
32Real
34{
35 return _test[_i][_qp] * _mu1 / _mu2 * (exp(_mu2 * _u[_qp]) - 1);
36}
37
38Real
40{
41 return _test[_i][_qp] * _phi[_j][_qp] * _mu1 * exp(_mu2 * _u[_qp]);
42}
registerMooseObject("StochasticToolsTestApp", ExponentialReaction)
virtual Real computeQpResidual() override
ExponentialReaction(const InputParameters &parameters)
virtual Real computeQpJacobian() override
static InputParameters validParams()
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
const VariablePhiValue & _phi
const VariableTestValue & _test
static InputParameters validParams()
const VariableValue & _u