Steady State Diffusion
Summary
Solves a steady state diffusion problem for the temperature profile across a mug with fixed temperatures on two boundaries.
Description
This problem solves the steady state heat equation with strong form:
where , on the base of the mug and at the top of the mug.
In this example, we solve this using the weak form
where
Example File
[Mesh<<<{"href": "../Mesh/index.html"}>>>]
type = MFEMMesh
file = ../mesh/mug.e
dim = 3
[]
[Problem<<<{"href": "../Problem/index.html"}>>>]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables<<<{"href": "../Variables/index.html"}>>>]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables<<<{"href": "../AuxVariables/index.html"}>>>]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels<<<{"href": "../AuxKernels/index.html"}>>>]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[ICs<<<{"href": "../ICs/index.html"}>>>]
[diffused_ic]
type = MFEMScalarIC
coefficient = one
variable = concentration
[]
[]
[Functions<<<{"href": "../Functions/index.html"}>>>]
[one]
type = ParsedFunction<<<{"description": "Function created by parsing a string", "href": "../../source/functions/MooseParsedFunction.html"}>>>
expression<<<{"description": "The user defined function."}>>> = 1.0
[]
[]
[BCs<<<{"href": "../BCs/index.html"}>>>]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[FunctorMaterials<<<{"href": "../FunctorMaterials/index.html"}>>>]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = diffusivity
prop_values = 1.0
block = 'the_domain'
[]
[]
[Kernels<<<{"href": "../Kernels/index.html"}>>>]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner<<<{"href": "../Executioner/index.html"}>>>]
type = MFEMSteady
device = cpu
[]
[Outputs<<<{"href": "../Outputs/index.html"}>>>]
active<<<{"description": "If specified only the blocks named will be visited and made active"}>>> = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Diffusion
vtk_format = ASCII
[]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/VisItDataCollection
[]
[ConduitDataCollection]
type = MFEMConduitDataCollection
file_base = OutputData/ConduitDataCollection/Run
protocol = conduit_bin
[]
[]
(moose/test/tests/mfem/kernels/diffusion.i)