www.mooseframework.org
CoupledSwitchingTimeDerivative.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "CoupledTimeDerivative.h"
14 #include "JvarMapInterface.h"
16 
17 // Forward Declaration
18 
30 template <bool is_ad>
32  typename std::conditional<is_ad, ADCoupledTimeDerivative, CoupledTimeDerivative>::type;
33 
34 template <bool is_ad>
37  JvarMapKernelInterface<CoupledSwitchingTimeDerivativeBase<is_ad>>>
38 {
39 public:
41 
43  virtual void initialSetup() override;
44 
45 protected:
48  const VariableName _v_name;
49 
51  std::vector<MaterialPropertyName> _Fj_names;
52 
54  const unsigned int _num_j;
55 
57  std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_Fj;
58 
60  std::vector<MaterialPropertyName> _hj_names;
61 
63  std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_dhjdetai;
64 
66 };
67 
69 {
70 public:
72  virtual void initialSetup() override;
73 
74 protected:
75  virtual Real computeQpResidual() override;
76  virtual Real computeQpJacobian() override;
77  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
79  std::vector<const MaterialProperty<Real> *> _prop_dFjdv;
80 
82  std::vector<std::vector<const MaterialProperty<Real> *>> _prop_dFjdarg;
83 
85  std::vector<const MaterialProperty<Real> *> _prop_d2hjdetai2;
86 
88  std::vector<std::vector<const MaterialProperty<Real> *>> _prop_d2hjdetaidarg;
89 };
90 
92 {
93 public:
95 
96 protected:
97  virtual ADReal precomputeQpResidual() override;
98 };
std::vector< MaterialPropertyName > _hj_names
switching function names
CoupledSwitchingTimeDerivativeTempl(const InputParameters &parameters)
std::vector< MaterialPropertyName > _Fj_names
Names of functions for each phase .
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< const MaterialProperty< Real > * > _prop_dFjdv
Derivatives of the functions wrt the nonlinear variable for this kernel.
CoupledSwitchingTimeDerivative(const InputParameters &parameters)
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
Second derivatives of the switching functions (needed for off-diagonal Jacobians) ...
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
Derivatives of the functions (needed for off-diagonal Jacobians)
typename std::conditional< is_ad, ADCoupledTimeDerivative, CoupledTimeDerivative >::type CoupledSwitchingTimeDerivativeBase
This kernel adds a contribution where are the phases, are the switching functions, is the order parameter that is the nonlinear variable, is time, and are functions for each phase.
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_Fj
Values of the functions for each phase .
const unsigned int _num_j
Number of phases.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _v_name
name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material pr...
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
Second derivatives of the switching functions wrt the order parameter for this kernel.