https://mooseframework.inl.gov
GaussianEnergyFluxBC.C
Go to the documentation of this file.
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 "GaussianEnergyFluxBC.h"
11 #include "Function.h"
12 
13 registerMooseObject("HeatTransferApp", GaussianEnergyFluxBC);
14 
17 {
18  auto params = emptyInputParameters();
19  params.addRequiredParam<Real>("P0", "The total power of the beam.");
20  params.addRequiredParam<Real>(
21  "R", "The radius at which the beam intensity falls to $1/e^2$ of its axis value.");
22  auto beam_coord_doc = [](const std::string & coord)
23  {
24  return "The " + coord +
25  " coordinate of the center of the beam as a function of time. Note that we will pass "
26  "the origin as the spatial argument to the function; any spatial dependence in the "
27  "passed-in function will be ignored";
28  };
29  params.addParam<FunctionName>("x_beam_coord", 0, beam_coord_doc("x"));
30  params.addParam<FunctionName>("y_beam_coord", 0, beam_coord_doc("y"));
31  params.addParam<FunctionName>("z_beam_coord", 0, beam_coord_doc("z"));
32  return params;
33 }
34 
37 {
40  params.addClassDescription("Describes an incoming heat flux beam with a Gaussian profile");
41  return params;
42 }
43 
45  : ADIntegratedBC(params),
46  _P0(getParam<Real>("P0")),
47  _R(getParam<Real>("R")),
48  _x_beam_coord(getFunction("x_beam_coord")),
49  _y_beam_coord(getFunction("y_beam_coord")),
50  _z_beam_coord(getFunction("z_beam_coord"))
51 {
52 }
53 
54 ADReal
56 {
57  return _test[_i][_qp] * beamFlux(*this, _ad_q_points[_qp]);
58 }
registerMooseObject("HeatTransferApp", GaussianEnergyFluxBC)
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
unsigned int _qp
InputParameters emptyInputParameters()
const MooseArray< ADPoint > & _ad_q_points
static InputParameters validParams()
static InputParameters beamParams()
static ADReal beamFlux(const T &flux_obj, const PointType &flux_obj_location)
Computes the beam flux given data from a flux object and the current integration point in the domain...
Describes an incoming heat flux beam with a Gaussian profile.
GaussianEnergyFluxBC(const InputParameters &params)
virtual ADReal computeQpResidual() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADTemplateVariableTestValue< T > & _test
void addClassDescription(const std::string &doc_string)