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]
type = MFEMMesh
file = gold/mug.e
dim = 3
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = '1'
value = 1.0
[]
[low_terminal]
type = MFEMScalarDirichletBC
variable = concentration
boundary = '2'
value = 0.0
[]
[]
[Materials]
[Substance]
type = MFEMGenericConstantMaterial
prop_names = diffusivity
prop_values = 1.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Diffusion
vtk_format = ASCII
[]
[]
(test/tests/kernels/diffusion.i)