https://mooseframework.inl.gov
NLBoundaryConvectiveHeatFluxIntegrator.h
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 
12 #pragma once
13 
14 #pragma once
15 #include "libmesh/ignore_warnings.h"
16 #include <mfem.hpp>
17 #include "libmesh/restore_warnings.h"
18 
19 namespace Moose::MFEM
20 {
26 class NLBoundaryConvectiveHeatFluxIntegrator : public mfem::NonlinearFormIntegrator
27 {
28 public:
30  NLBoundaryConvectiveHeatFluxIntegrator(mfem::Coefficient & k,
31  mfem::Coefficient & dk_du,
32  mfem::Coefficient & duinf_du,
33  mfem::Coefficient & gf_offset,
34  mfem::Coefficient & gf);
35 
36  virtual void AssembleElementVector(const mfem::FiniteElement & el,
37  mfem::ElementTransformation & Tr,
38  const mfem::Vector & elfun,
39  mfem::Vector & elvect) override;
40  virtual void AssembleElementGrad(const mfem::FiniteElement & el,
41  mfem::ElementTransformation & Tr,
42  const mfem::Vector & elfun,
43  mfem::DenseMatrix & elmat) override;
44 
45 protected:
47  mfem::SumCoefficient _shifted_gf_coef;
49  mfem::ProductCoefficient _k_uinf_coef;
51  mfem::ProductCoefficient _net_flux_du_coef;
53  mfem::ProductCoefficient _k_duinf_du_coef;
55  mfem::ProductCoefficient _duinf_du_flux_coef;
57  mfem::BoundaryLFIntegrator _inwards_flux;
59  mfem::BoundaryMassIntegrator _outwards_flux;
61  mfem::BoundaryMassIntegrator _jacobian_k_component;
63  mfem::BoundaryMassIntegrator _jacobian_dk_du_component;
65  mfem::BoundaryMassIntegrator _jacobian_duinf_du_component;
67  mfem::SumIntegrator _jacobian_action{0};
68 };
69 }
70 
71 #endif
virtual void AssembleElementVector(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::Vector &elvect) override
mfem::BoundaryMassIntegrator _jacobian_dk_du_component
Jacobian contribution from the dh/dT term.
NLBoundaryConvectiveHeatFluxIntegrator(mfem::Coefficient &k, mfem::Coefficient &dk_du, mfem::Coefficient &duinf_du, mfem::Coefficient &gf_offset, mfem::Coefficient &gf)
Construct the nonlinear convective heat flux residual and Jacobian action.
mfem::SumCoefficient _shifted_gf_coef
Coefficient for the shifted state, u - u_inf.
mfem::ProductCoefficient _net_flux_du_coef
Coefficient for the dk/du contribution, dk/du * (u - u_inf).
mfem::ProductCoefficient _k_duinf_du_coef
Coefficient for the d u_inf / du contribution, k(u) * d u_inf / du.
mfem::ProductCoefficient _duinf_du_flux_coef
Negated coefficient for the d u_inf / du Jacobian term, -k(u) * d u_inf / du.
mfem::BoundaryMassIntegrator _jacobian_duinf_du_component
Jacobian contribution from the dT_inf/dT term.
mfem::BoundaryLFIntegrator _inwards_flux
Boundary load integrator for the inwards flux term.
mfem::ProductCoefficient _k_uinf_coef
Coefficient for the inwards flux contribution, k(u) * u_inf.
virtual void AssembleElementGrad(const mfem::FiniteElement &el, mfem::ElementTransformation &Tr, const mfem::Vector &elfun, mfem::DenseMatrix &elmat) override
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
mfem::SumIntegrator _jacobian_action
Sum of the boundary mass integrators forming the Jacobian action.
mfem::BoundaryMassIntegrator _outwards_flux
Boundary mass integrator for the outwards flux term.
mfem::BoundaryMassIntegrator _jacobian_k_component
Jacobian contribution from the h(T) term.