https://mooseframework.inl.gov
EMJouleHeatingSource.C
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 #include "EMJouleHeatingSource.h"
11 #include "Assembly.h"
12 #include "ElectromagneticEnums.h"
14 #include "Function.h"
15 #include <complex>
16 
17 registerMooseObject("ElectromagneticsApp", EMJouleHeatingSource);
18 
21 {
23  params.addClassDescription("Supplies the heating due to the electic field in the "
24  "form of $(0.5Re(\\sigma E \\cdot E^{*} ))$");
25  params.addRequiredCoupledVar("E_real", "The real component of the electric field.");
26  params.addRequiredCoupledVar("E_imag", "The imaginary component of the electric field.");
27  params.addRequiredParam<std::string>("conductivity",
28  "The real component of the material conductivity.");
29  params.addParam<Real>("value", 1.0, "Coefficient to multiply by heating term.");
30  return params;
31 }
32 
34  : ADKernel(parameters),
35  _E_real(adCoupledVectorValue("E_real")),
36  _E_imag(adCoupledVectorValue("E_imag")),
37  _cond(getADMaterialProperty<Real>(getParam<std::string>("conductivity"))),
38  _scale(getParam<Real>("value"))
39 {
40  mooseDeprecated("This kernel will be deprecated in the near future (10/01/2025) in favor of "
41  "exclusively using the Heat Transfer module's 'ADJouleHeatingSource' for "
42  "coupling electromagnetics to heat transfer problems.");
43 }
44 
45 ADReal
47 {
48  return -_test[_i][_qp] * _scale * 0.5 * _cond[_qp] *
50 }
EMJouleHeatingSource(const InputParameters &parameters)
void mooseDeprecated(Args &&... args) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const ADTemplateVariableTestValue< T > & _test
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
const Real _scale
Coefficient to multiply by heating term.
registerMooseObject("ElectromagneticsApp", EMJouleHeatingSource)
NOTE: This kernel will be deprecated in the near future (10/01/2025) in favor of exclusively using th...
const ADVectorVariableValue & _E_imag
Vector variable of the imaginary component of the electric field.
unsigned int _i
static InputParameters validParams()
virtual ADReal computeQpResidual() override
const ADMaterialProperty< Real > & _cond
Real component of the material conductivity (in S/m)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADVectorVariableValue & _E_real
Vector variable of the real component of the electric field.
void addClassDescription(const std::string &doc_string)
unsigned int _qp