20 "Material class used to provide the electric field as a material property and computes the " 21 "residual contributions for electromagnetic/electrostatic heating objects.");
24 "The electric field vector or electrostatic potential scalar to produce the field.");
26 "complex_electric_field",
27 "The complex component of the electric field vector for the time-harmonic formulation.");
28 params.
addParam<std::string>(
"electric_field_material_name",
30 "User-specified material property name for the field.");
31 params.
addParam<std::string>(
"electric_field_heating_name",
32 "electric_field_heating",
33 "User-specified material property name for the Joule heating.");
34 params.
addParam<
Real>(
"heating_scaling", 1.0,
"Coefficient to multiply by heating term.");
35 params.
addParam<MaterialPropertyName>(
36 "electrical_conductivity",
37 "electrical_conductivity",
38 "Material property providing electrical conductivity of the material.");
39 MooseEnum formulation(
"time frequency",
"time");
40 MooseEnum solver(
"electrostatic electromagnetic",
"electrostatic");
44 "The domain formulation of the Joule heating, time or frequency (default = time).");
46 "solver", solver,
"Electrostatic or electromagnetic field solver (default = electrostatic).");
52 _electric_field_var(*getFieldVar(
"electric_field", 0)),
53 _is_vector(_electric_field_var.isVector()),
54 _efield(_is_vector ? adCoupledVectorValue(
"electric_field") : _ad_grad_zero),
55 _efield_complex(_is_vector ? adCoupledVectorValue(
"complex_electric_field") : _ad_grad_zero),
56 _grad_potential(_is_vector ? _ad_grad_zero : adCoupledGradient(
"electric_field")),
58 declareADProperty<
RealVectorValue>(getParam<
std::string>(
"electric_field_material_name"))),
60 getParam<
std::string>(
"electric_field_material_name") +
"_complex")),
61 _electric_field_heating(
62 declareADProperty<
Real>(getParam<
std::string>(
"electric_field_heating_name"))),
63 _heating_scaling(getParam<
Real>(
"heating_scaling")),
64 _elec_cond(getADMaterialProperty<
Real>(
"electrical_conductivity")),
65 _formulation(getParam<
MooseEnum>(
"formulation")),
71 mooseError(
"The frequency domain is selected, but the solver type is electrostatic! Please " 77 mooseError(
"The solver type is electromagnetic, but only a scalar potential is provided! " 78 "Please check input file.");
83 mooseError(
"The frequency domain is selected, but only a scalar potential is provided! " 84 "Please check input file.");
const ADVectorVariableValue & _efield
The electric field defined from a vector variable.
static InputParameters validParams()
ADMaterialProperty< RealVectorValue > & _electric_field_complex
Complex electric field material property.
virtual void computeFieldValue()
Function that defines the field depending on supplied variable type.
ADMaterialProperty< RealVectorValue > & _electric_field
Electric field material property.
static InputParameters validParams()
const ADVariableGradient & _grad_potential
The electric field defined from the gradient of a scalar variable.
ElectromagneticHeatingMaterial(const InputParameters ¶meters)
registerMooseObject("HeatTransferApp", ElectromagneticHeatingMaterial)
Material class used to provide the electric field as a material property and computes the residual co...
const Real & _heating_scaling
Coefficient to multiply by heating term.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADMaterialProperty< Real > & _elec_cond
Real component of the material conductivity (in S/m)
void mooseError(Args &&... args) const
virtual void computeJouleHeating()
Function that defines the residual for Joule heating.
virtual void computeQpProperties() override
const ADVectorVariableValue & _efield_complex
The complex component of the electric field, needed for time-harmonic formulations.
ADMaterialProperty< Real > & _electric_field_heating
Joule heating residual material property.
MooseEnum _formulation
The domain formulation of the EM residuals (either TIME or FREQUENCY)
MooseEnum _solver
The solver formulation the electric field (either ELECTROSTATIC or ELECTROMAGNETIC) ...
const bool _is_vector
True if the supplied variable is a vector.