LCOV - code coverage report
Current view: top level - src/auxkernels - EMJouleHeatingHeatGeneratedAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose electromagnetics: #31405 (292dce) with base fef103 Lines: 15 16 93.8 %
Date: 2025-09-04 07:52:56 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          41 : EMJouleHeatingHeatGeneratedAux::validParams()
      16             : {
      17          41 :   InputParameters params = AuxKernel::validParams();
      18          41 :   params.addClassDescription("Computes the heating due to the electic field in the "
      19             :                              "form of $(0.5Re(\\sigma E \\cdot E^{*} ))$");
      20          82 :   params.addRequiredCoupledVar("E_real", "The real component of the electric field.");
      21          82 :   params.addRequiredCoupledVar("E_imag", "The imaginary component of the electric field.");
      22          82 :   params.addRequiredParam<std::string>("conductivity",
      23             :                                        "The real component of the material conductivity.");
      24          41 :   return params;
      25           0 : }
      26             : 
      27          22 : EMJouleHeatingHeatGeneratedAux::EMJouleHeatingHeatGeneratedAux(const InputParameters & parameters)
      28             :   : AuxKernel(parameters),
      29          22 :     _E_real(coupledVectorValue("E_real")),
      30          22 :     _E_imag(coupledVectorValue("E_imag")),
      31          66 :     _cond(getADMaterialProperty<Real>(getParam<std::string>("conductivity")))
      32             : {
      33          22 :   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          22 : }
      37             : 
      38             : Real
      39       10800 : EMJouleHeatingHeatGeneratedAux::computeValue()
      40             : {
      41       10800 :   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