www.mooseframework.org
MatReaction.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef MATREACTION_H
8 #define MATREACTION_H
9 
10 #include "Kernel.h"
11 #include "JvarMapInterface.h"
12 #include "DerivativeMaterialInterface.h"
13 
14 // Forward Declaration
15 class MatReaction;
16 
17 template <>
18 InputParameters validParams<MatReaction>();
19 
24 class MatReaction : public DerivativeMaterialInterface<JvarMapKernelInterface<Kernel>>
25 {
26 public:
27  MatReaction(const InputParameters & parameters);
28  virtual void initialSetup();
29 
30 protected:
31  virtual Real computeQpResidual();
32  virtual Real computeQpJacobian();
33  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
34 
36  const bool _is_coupled;
37 
44  std::string _v_name;
45  const VariableValue & _v;
46  unsigned int _v_var;
47 
49  const MaterialProperty<Real> & _L;
50 
52  VariableName _eta_name;
53 
55  const MaterialProperty<Real> & _dLdop;
56 
58  const MaterialProperty<Real> & _dLdv;
59 
61  const unsigned int _nvar;
62 
64  std::vector<const MaterialProperty<Real> *> _dLdarg;
65 };
66 
67 #endif // MATREACTION_H
const unsigned int _nvar
number of coupled variables
Definition: MatReaction.h:61
virtual void initialSetup()
Definition: MatReaction.C:45
This kernel adds to the residual a contribution of where is a material property and is a variable ...
Definition: MatReaction.h:24
MatReaction(const InputParameters &parameters)
Definition: MatReaction.C:23
unsigned int _v_var
Definition: MatReaction.h:46
const MaterialProperty< Real > & _dLdv
Reaction rate derivative w.r.t. the variable being added by this kernel.
Definition: MatReaction.h:58
std::string _v_name
Kernel variable (can be nonlinear or coupled variable) (For constrained Allen-Cahn problems...
Definition: MatReaction.h:44
const MaterialProperty< Real > & _dLdop
Reaction rate derivative w.r.t. order parameter.
Definition: MatReaction.h:55
virtual Real computeQpResidual()
Definition: MatReaction.C:51
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: MatReaction.C:66
const bool _is_coupled
is the kernel used in a coupled form?
Definition: MatReaction.h:36
std::vector< const MaterialProperty< Real > * > _dLdarg
Reaction rate derivatives w.r.t. other coupled variables.
Definition: MatReaction.h:64
InputParameters validParams< MatReaction >()
Definition: MatReaction.C:11
VariableName _eta_name
name of the order parameter (needed to retrieve the derivative material properties) ...
Definition: MatReaction.h:52
const MaterialProperty< Real > & _L
Reaction rate.
Definition: MatReaction.h:49
const VariableValue & _v
Definition: MatReaction.h:45
virtual Real computeQpJacobian()
Definition: MatReaction.C:57