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 "SourceCurrentHeating.h" 11 : #include "Function.h" 12 : 13 : registerMooseObject("ElectromagneticsApp", SourceCurrentHeating); 14 : 15 : InputParameters 16 41 : SourceCurrentHeating::validParams() 17 : { 18 41 : InputParameters params = AuxKernel::validParams(); 19 41 : params.addClassDescription(("Computes the heating due to the electic field in the " 20 : "form of $(0.5Re(J \\cdot E^{*} ))$")); 21 82 : params.addRequiredCoupledVar("E_real", "The real component of the electric field."); 22 82 : params.addRequiredCoupledVar("E_imag", "The imaginary component of the electric field."); 23 82 : params.addRequiredParam<FunctionName>("source_real", "Current Source vector, real component"); 24 82 : params.addRequiredParam<FunctionName>("source_imag", 25 : "Current Source vector, imaginary component"); 26 41 : return params; 27 0 : } 28 : 29 22 : SourceCurrentHeating::SourceCurrentHeating(const InputParameters & parameters) 30 : : AuxKernel(parameters), 31 22 : _E_real(coupledVectorValue("E_real")), 32 22 : _E_imag(coupledVectorValue("E_imag")), 33 22 : _source_real(getFunction("source_real")), 34 44 : _source_imag(getFunction("source_imag")) 35 : { 36 22 : } 37 : 38 : Real 39 8100 : SourceCurrentHeating::computeValue() 40 : { 41 8100 : return 0.5 * (_source_real.vectorValue(_t, _q_point[_qp]) * _E_real[_qp] + 42 8100 : _source_imag.vectorValue(_t, _q_point[_qp]) * _E_imag[_qp]); 43 : }