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 = MFEMFileMesh
file = ../mesh/mug.e
[]
[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
[]
[]
[BCs<<<{"href": "../BCs/index.html"}>>>]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[Kernels<<<{"href": "../Kernels/index.html"}>>>]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[]
[Solvers]
inactive = 'jacobi'
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner<<<{"href": "../Executioner/index.html"}>>>]
type = MFEMSteady
device = cpu
[]
[Postprocessors<<<{"href": "../Postprocessors/index.html"}>>>]
[solution_l2_norm]
type = MFEML2Error
variable = concentration
function = 0
[]
[]
[VectorPostprocessors<<<{"href": "../VectorPostprocessors/index.html"}>>>]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'concentration'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 101
[]
[]
[Outputs<<<{"href": "../Outputs/index.html"}>>>]
active<<<{"description": "If specified only the blocks named will be visited and made active"}>>> = CSV
[CSV]
type = CSV<<<{"description": "Output for postprocessors, vector postprocessors, and scalar variables using comma seperated values (CSV).", "href": "../../source/outputs/CSV.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/diffusion
[]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ParaViewDataCollection
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)