https://mooseframework.inl.gov
MatReaction.h
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 #pragma once
11 
12 #include "GenericKernel.h"
13 #include "JvarMapInterface.h"
15 
20 template <bool is_ad>
21 class MatReactionTempl : public GenericKernel<is_ad>
22 {
23 public:
25 
27 
28 protected:
30 
33 
40 
42 };
43 
45  : public DerivativeMaterialInterface<JvarMapKernelInterface<MatReactionTempl<false>>>
46 {
47 public:
49 
51 
52  virtual void initialSetup();
53 
54 protected:
55  virtual Real computeQpJacobian();
56  virtual Real computeQpOffDiagJacobian(unsigned int jvar);
57 
59  const bool _is_coupled;
60 
66  std::string _v_name;
67  unsigned int _v_var;
68 
71 
74 
76  std::vector<const MaterialProperty<Real> *> _drate_darg;
77 };
78 
const MaterialProperty< Real > & _drate_dv
Reaction rate derivative w.r.t. the variable being added by this kernel.
Definition: MatReaction.h:73
Moose::GenericType< Real, is_ad > GenericReal
Definition: MooseTypes.h:693
virtual GenericReal< is_ad > computeQpResidual()
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: MatReaction.C:41
MatReactionTempl(const InputParameters &parameters)
Definition: MatReaction.C:30
static InputParameters validParams()
Definition: MatReaction.C:47
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
Definition: MatReaction.C:69
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MatReaction(const InputParameters &parameters)
Definition: MatReaction.C:54
unsigned int _v_var
Definition: MatReaction.h:67
std::vector< const MaterialProperty< Real > * > _drate_darg
Reaction rate derivatives w.r.t. other coupled variables.
Definition: MatReaction.h:76
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition: MooseTypes.h:707
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
MatReactionTempl< true > ADMatReaction
Definition: MatReaction.h:79
std::string _v_name
Kernel variable (can be nonlinear or coupled variable) (For constrained Allen-Cahn problems...
Definition: MatReaction.h:66
const MaterialProperty< Real > & _drate_du
Reaction rate derivative w.r.t. primal variable.
Definition: MatReaction.h:70
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
For coupling standard variables.
Definition: MatReaction.C:84
const bool _is_coupled
is the kernel used in a coupled form?
Definition: MatReaction.h:59
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface class ("Veneer") to provide generator methods for derivative material property names...
const GenericVariableValue< is_ad > & _v
Kernel variable (can be nonlinear or coupled variable) (For constrained Allen-Cahn problems...
Definition: MatReaction.h:39
This kernel adds to the residual a contribution of where is a material property and is a variable ...
Definition: MatReaction.h:21
const GenericMaterialProperty< Real, is_ad > & _rate
Reaction rate.
Definition: MatReaction.h:32
static InputParameters validParams()
Definition: MatReaction.C:17
virtual Real computeQpJacobian()
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: MatReaction.C:75