Transient Heat Transfer (Mixed Form)
Summary
Solves a transient heat conduction problem using a mixed weak form, representing temperature on piecewise constant conforming finite elements, and heat fluxes on conforming Raviart-Thomas elements.
Description
This problem solves the transient heat equation with strong form:
where and , subject to the initial condition .
In this example, we solve this by introducing the heat flux to generate the mixed weak form of the transient heat equation
where
and the polynomial order of the FEs used to represent and is one order higher than and .
Notably, in contrast to the primal weak form for the transient heat equation solved here, the heat flux on is strongly imposed via a Dirichlet condition, and temperatures on boundaries are imposed weakly via boundary integrals.
Example File
[Mesh<<<{"href": "../Mesh/index.html"}>>>]
type = MFEMMesh
file = ../mesh/square.e
[]
[Problem<<<{"href": "../Problem/index.html"}>>>]
type = MFEMProblem
[]
[FESpaces<<<{"href": "../FESpaces/index.html"}>>>]
[HDivFESpace]
type = MFEMVectorFESpace<<<{"description": "Convenience class to construct vector finite element spaces, abstracting away some of the mathematical complexity of specifying the dimensions.", "href": "../../source/mfem/fespaces/MFEMVectorFESpace.html"}>>>
fec_type<<<{"description": "Specifies the family of FE shape functions."}>>> = RT
fec_order<<<{"description": "Order of the FE shape function to use."}>>> = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace<<<{"description": "Convenience class to construct scalar finite element spaces.", "href": "../../source/mfem/fespaces/MFEMScalarFESpace.html"}>>>
fec_type<<<{"description": "Specifies the family of FE shape functions."}>>> = L2
fec_order<<<{"description": "Order of the FE shape function to use."}>>> = CONSTANT
[]
[]
[Variables<<<{"href": "../Variables/index.html"}>>>]
[time_integrated_heat_flux]
type = MFEMVariable<<<{"description": "Class for adding MFEM variables to the problem (`mfem::ParGridFunction`s).", "href": "../../source/mfem/variables/MFEMVariable.html"}>>>
fespace<<<{"description": "The finite element space this variable is defined on."}>>> = HDivFESpace
time_derivative<<<{"description": "Optional name to assign to the time derivative of the variable in transient problems."}>>> = heat_flux
[]
[temperature]
type = MFEMVariable<<<{"description": "Class for adding MFEM variables to the problem (`mfem::ParGridFunction`s).", "href": "../../source/mfem/variables/MFEMVariable.html"}>>>
fespace<<<{"description": "The finite element space this variable is defined on."}>>> = L2FESpace
[]
[]
[Kernels<<<{"href": "../Kernels/index.html"}>>>]
[dT_dt,T']
type = MFEMTimeDerivativeMassKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the bilinear form $(k \\dot{u}, v)_\\Omega$ arising from the weak form of the operator $k \\dot{u}$.", "href": "../../source/mfem/kernels/MFEMTimeDerivativeMassKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = temperature
[]
[divh,T']
type = MFEMVectorFEDivergenceKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the mixed bilinear form $(k \\vec \\nabla \\cdot \\vec u, v)_\\Omega$ arising from the weak form of the divergence operator $k \\vec \\nabla \\cdot \\vec u$.", "href": "../../source/mfem/kernels/MFEMVectorFEDivergenceKernel.html"}>>>
trial_variable<<<{"description": "The trial variable this kernel is acting on and which will be solved for. If empty (default), it will be the same as the test variable."}>>> = heat_flux
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = temperature
[]
[h,h']
type = MFEMTimeDerivativeVectorFEMassKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the bilinear form $(k \\dot{\\vec u}, \\vec v)_\\Omega$ arising from the weak form of the operator $k \\dot{\\vec u}$.", "href": "../../source/mfem/kernels/MFEMTimeDerivativeVectorFEMassKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = time_integrated_heat_flux
[]
[-T,div.h']
type = MFEMVectorFEDivergenceKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the mixed bilinear form $(k \\vec \\nabla \\cdot \\vec u, v)_\\Omega$ arising from the weak form of the divergence operator $k \\vec \\nabla \\cdot \\vec u$.", "href": "../../source/mfem/kernels/MFEMVectorFEDivergenceKernel.html"}>>>
trial_variable<<<{"description": "The trial variable this kernel is acting on and which will be solved for. If empty (default), it will be the same as the test variable."}>>> = temperature
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = time_integrated_heat_flux
coefficient<<<{"description": "Name of property k to use. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = -1.0
transpose<<<{"description": "If true, adds the transpose of the integrator to the system instead."}>>> = true
[]
[]
[BCs<<<{"href": "../BCs/index.html"}>>>]
[right]
type = MFEMVectorFEBoundaryFluxIntegratedBC<<<{"description": "Adds the boundary integrator to an MFEM problem for the linear form $(f, \\vec v \\cdot \\hat n)_{\\partial\\Omega}$", "href": "../../source/mfem/bcs/MFEMVectorFEBoundaryFluxIntegratedBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = time_integrated_heat_flux
coefficient<<<{"description": "The coefficient which will be used in the integrated BC. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = 0.0
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = 2
[]
[left]
type = MFEMVectorFEBoundaryFluxIntegratedBC<<<{"description": "Adds the boundary integrator to an MFEM problem for the linear form $(f, \\vec v \\cdot \\hat n)_{\\partial\\Omega}$", "href": "../../source/mfem/bcs/MFEMVectorFEBoundaryFluxIntegratedBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = time_integrated_heat_flux
coefficient<<<{"description": "The coefficient which will be used in the integrated BC. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = -1.0
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = 4
[]
[topbottom]
type = MFEMVectorDirichletBC<<<{"description": "Applies a Dirichlet condition to all components of a vector variable.", "href": "../../source/mfem/bcs/MFEMVectorDirichletBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = heat_flux
vector_coefficient<<<{"description": "Vector coefficient specifying the values the variable takes on the boundary. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a numeric vector value (enclosed in curly braces)."}>>> = '0.0 0.0'
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = '1 3'
[]
[]
[Solver<<<{"href": "../Solver/index.html"}>>>]
type = MFEMSuperLU
[]
[Executioner<<<{"href": "../Executioner/index.html"}>>>]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 0.03
start_time = 0.0
end_time = 0.09
[]
[Outputs<<<{"href": "../Outputs/index.html"}>>>]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection<<<{"description": "Output for controlling export to an mfem::ParaViewDataCollection.", "href": "../../source/mfem/outputs/MFEMParaViewDataCollection.html"}>>>
file_base<<<{"description": "The desired solution output name without an extension. If not provided, MOOSE sets it with Outputs/file_base when available. Otherwise, MOOSE uses input file name and this object name for a master input or uses master file_base, the subapp name and this object name for a subapp input to set it."}>>> = OutputData/MixedHeatTransfer
vtk_format<<<{"description": "Select VTK data format to use, choosing between BINARY, BINARY32, and ASCII."}>>> = ASCII
[]
[](test/tests/mfem/kernels/mixed_heattransfer.i)