LCOV - code coverage report
Current view: top level - src/auxkernels - EMJouleHeatingHeatGeneratedAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose electromagnetics: #32971 (54bef8) with base c6cf66 Lines: 15 16 93.8 %
Date: 2026-05-29 20:36:10 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "EMJouleHeatingHeatGeneratedAux.h"
      11             : 
      12             : registerMooseObject("ElectromagneticsApp", EMJouleHeatingHeatGeneratedAux);
      13             : 
      14             : InputParameters
      15          19 : EMJouleHeatingHeatGeneratedAux::validParams()
      16             : {
      17          19 :   InputParameters params = AuxKernel::validParams();
      18          19 :   params.addClassDescription("Computes the heating due to the electic field in the "
      19             :                              "form of $(0.5Re(\\sigma E \\cdot E^{*} ))$");
      20          38 :   params.addRequiredCoupledVar("E_real", "The real component of the electric field.");
      21          38 :   params.addRequiredCoupledVar("E_imag", "The imaginary component of the electric field.");
      22          38 :   params.addRequiredParam<std::string>("conductivity",
      23             :                                        "The real component of the material conductivity.");
      24          19 :   return params;
      25           0 : }
      26             : 
      27          10 : EMJouleHeatingHeatGeneratedAux::EMJouleHeatingHeatGeneratedAux(const InputParameters & parameters)
      28             :   : AuxKernel(parameters),
      29          10 :     _E_real(coupledVectorValue("E_real")),
      30          10 :     _E_imag(coupledVectorValue("E_imag")),
      31          30 :     _cond(getADMaterialProperty<Real>(getParam<std::string>("conductivity")))
      32             : {
      33          10 :   mooseDeprecated("This kernel will be deprecated in the near future (10/01/2025) in favor of "
      34             :                   "exclusively using the Heat Transfer module's 'JouleHeatingHeatGeneratedAux' for "
      35             :                   "coupling electromagnetics to heat transfer problems.");
      36          10 : }
      37             : 
      38             : Real
      39        7200 : EMJouleHeatingHeatGeneratedAux::computeValue()
      40             : {
      41        7200 :   return 0.5 * raw_value(_cond[_qp]) * (_E_real[_qp] * _E_real[_qp] + _E_imag[_qp] * _E_imag[_qp]);
      42             : }

Generated by: LCOV version 1.14