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 "Kernel.h"
13 #include "JvarMapInterface.h"
15 
16 // Forward Declaration
17 
22 class MatReaction : public DerivativeMaterialInterface<JvarMapKernelInterface<Kernel>>
23 {
24 public:
26 
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 
50 
52  VariableName _eta_name;
53 
56 
59 
61  std::vector<const MaterialProperty<Real> *> _dLdarg;
62 };
static InputParameters validParams()
Definition: MatReaction.C:15
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
Definition: MatReaction.C:47
This kernel adds to the residual a contribution of where is a material property and is a variable ...
Definition: MatReaction.h:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
MatReaction(const InputParameters &parameters)
Definition: MatReaction.C:29
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()
Compute this Kernel&#39;s contribution to the residual at the current quadrature point.
Definition: MatReaction.C:53
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
For coupling standard variables.
Definition: MatReaction.C:68
forward declarations
const bool _is_coupled
is the kernel used in a coupled form?
Definition: MatReaction.h:36
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface class ("Veneer") to provide generator methods for derivative material property names...
std::vector< const MaterialProperty< Real > * > _dLdarg
Reaction rate derivatives w.r.t. other coupled variables.
Definition: MatReaction.h:61
VariableName _eta_name
name of the order parameter (needed to retrieve the derivative material properties) ...
Definition: MatReaction.h:52
const InputParameters & parameters() const
Get the parameters of the object.
const MaterialProperty< Real > & _L
Reaction rate.
Definition: MatReaction.h:49
const VariableValue & _v
Definition: MatReaction.h:45
virtual Real computeQpJacobian()
Compute this Kernel&#39;s contribution to the Jacobian at the current quadrature point.
Definition: MatReaction.C:59