examples.diffusion.steadyState.mesh50x50.inputΒΆ
This input file again solves a 1D diffusion problem as in
examples.diffusion.mesh1D
.
The difference being that the mesh is two dimensional.
The result is again tested in the same way:
>>> eq = DiffusionTerm()
>>> solver = eq.getDefaultSolver(tolerance=1e-10)
>>> eq.solve(var, solver=solver)
>>> Lx = nx * dx
>>> x = mesh.cellCenters[0]
>>> analyticalArray = valueLeft + (valueRight - valueLeft) * x / Lx
>>> print(var.allclose(analyticalArray, rtol = 1e-9))
True
Last updated on Feb 06, 2025.
Created using Sphinx 7.1.2.