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"))),
59 _electric_field_complex(declareADProperty<RealVectorValue>(
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.");
registerMooseObject("HeatTransferApp", ElectromagneticHeatingMaterial)
Material class used to provide the electric field as a material property and computes the residual co...
static InputParameters validParams()
const bool _is_vector
True if the supplied variable is a vector.
ADMaterialProperty< RealVectorValue > & _electric_field_complex
Complex electric field material property.
const ADVectorVariableValue & _efield
The electric field defined from a vector variable.
virtual void computeQpProperties() override
ElectromagneticHeatingMaterial(const InputParameters ¶meters)
const ADVectorVariableValue & _efield_complex
The complex component of the electric field, needed for time-harmonic formulations.
MooseEnum _solver
The solver formulation the electric field (either ELECTROSTATIC or ELECTROMAGNETIC)
const ADVariableGradient & _grad_potential
The electric field defined from the gradient of a scalar variable.
ADMaterialProperty< Real > & _electric_field_heating
Joule heating residual material property.
virtual void computeFieldValue()
Function that defines the field depending on supplied variable type.
virtual void computeJouleHeating()
Function that defines the residual for Joule heating.
const Real & _heating_scaling
Coefficient to multiply by heating term.
MooseEnum _formulation
The domain formulation of the EM residuals (either TIME or FREQUENCY)
ADMaterialProperty< RealVectorValue > & _electric_field
Electric field material property.
const ADMaterialProperty< Real > & _elec_cond
Real component of the material conductivity (in S/m)
static InputParameters validParams()
void mooseError(Args &&... args) const