https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMConvectiveHeatFluxBC.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#ifdef MOOSE_MFEM_ENABLED
11
13#include "MFEMProblem.h"
14
16
19{
21 // FIXME: Should these really be specified via properties? T_infinity in particular? Use functions
22 // instead?
24 "Convective heat transfer boundary condition with temperature and heat "
25 "transfer coefficent given by material properties to add to MFEM problems.");
26 params.addParam<MFEMScalarCoefficientName>(
27 "T_infinity", "0.", "Name of a coefficient specifying the far-field temperature");
28 params.addParam<MFEMScalarCoefficientName>(
29 "heat_transfer_coefficient",
30 "1.",
31 "Name of the coefficient specifying the heat transfer coefficient");
32 return params;
33}
34
36 : MFEMIntegratedBC(parameters),
37 _heat_transfer_coef(getScalarCoefficient("heat_transfer_coefficient")),
38 _T_inf_coef(getScalarCoefficient("T_infinity")),
39 _external_heat_flux_coef(
40 getMFEMProblem().getCoefficients().declareScalar<mfem::ProductCoefficient>(
41 "__ConvectiveHeatFluxBC_" + parameters.get<std::string>(MooseBase::unique_name_param),
42 _heat_transfer_coef,
43 _T_inf_coef))
44{
45}
46
47// Create a new MFEM integrator to apply to the RHS of the weak form. Ownership managed by the
48// caller.
49mfem::LinearFormIntegrator *
51{
52 return new mfem::BoundaryLFIntegrator(_external_heat_flux_coef);
53}
54
55// Create a new MFEM integrator to apply to LHS of the weak form. Ownership managed by the caller.
56mfem::BilinearFormIntegrator *
58{
59 return new mfem::BoundaryMassIntegrator(_heat_transfer_coef);
60}
61
62#endif
registerMooseObject("MooseApp", MFEMConvectiveHeatFluxBC)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
virtual mfem::BilinearFormIntegrator * createBFIntegrator() override
Create MFEM integrator to apply to the LHS of the weak form. Ownership managed by the caller.
mfem::Coefficient & _heat_transfer_coef
static InputParameters validParams()
MFEMConvectiveHeatFluxBC(const InputParameters &parameters)
virtual mfem::LinearFormIntegrator * createLFIntegrator() override
Create MFEM integrator to apply to the RHS of the weak form. Ownership managed by the caller.
mfem::ProductCoefficient & _external_heat_flux_coef
static InputParameters validParams()
Base class for everything in MOOSE with a name and a type.
Definition MooseBase.h:50