https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
20template <bool is_ad>
43
45 : public DerivativeMaterialInterface<JvarMapKernelInterface<MatReactionTempl<false>>>
46{
47public:
49
50 MatReaction(const InputParameters & parameters);
51
52 virtual void initialSetup();
53
54protected:
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
MatReactionTempl< true > ADMatReaction
Definition MatReaction.h:79
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
Definition MooseTypes.h:712
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:698
Interface class ("Veneer") to provide generator methods for derivative material property names.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This kernel adds to the residual a contribution of where is a material property and is a variable ...
Definition MatReaction.h:22
const GenericVariableValue< is_ad > & _v
Kernel variable (can be nonlinear or coupled variable) (For constrained Allen-Cahn problems,...
Definition MatReaction.h:39
static InputParameters validParams()
Definition MatReaction.C:17
const GenericMaterialProperty< Real, is_ad > & _rate
Reaction rate.
Definition MatReaction.h:32
virtual GenericReal< is_ad > computeQpResidual()
Compute this Kernel's contribution to the residual at the current quadrature point.
Definition MatReaction.C:41
virtual void initialSetup()
Definition MatReaction.C:69
unsigned int _v_var
Definition MatReaction.h:67
const bool _is_coupled
is the kernel used in a coupled form?
Definition MatReaction.h:59
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition MatReaction.C:84
static InputParameters validParams()
Definition MatReaction.C:47
std::string _v_name
Kernel variable (can be nonlinear or coupled variable) (For constrained Allen-Cahn problems,...
Definition MatReaction.h:66
virtual Real computeQpJacobian()
Definition MatReaction.C:75
const MaterialProperty< Real > & _drate_du
Reaction rate derivative w.r.t. primal variable.
Definition MatReaction.h:70
std::vector< const MaterialProperty< Real > * > _drate_darg
Reaction rate derivatives w.r.t. other coupled variables.
Definition MatReaction.h:76
const MaterialProperty< Real > & _drate_dv
Reaction rate derivative w.r.t. the variable being added by this kernel.
Definition MatReaction.h:73
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131