examples.diffusion.steadyState.mesh50x50 package¶
Submodules¶
examples.diffusion.steadyState.mesh50x50.input module¶
This input file again solves a 1D diffusion problem as in:
$ examples/diffusion/steadyState/mesh1D/input.py
The difference being that the mesh is two dimensional.
The result is again tested in the same way:
>>> DiffusionTerm().solve(var)
>>> Lx = nx * dx
>>> x = mesh.cellCenters[0]
>>> analyticalArray = valueLeft + (valueRight - valueLeft) * x / Lx
>>> print(var.allclose(analyticalArray, rtol = 1e-9))
1
examples.diffusion.steadyState.mesh50x50.tri2Dinput module¶
This input file again solves a 1D diffusion problem as in ./examples/diffusion/steadyState/mesh1D/input.py. The difference being that the mesh size is given by
>>> nx = 50
>>> ny = 50
The result is again tested in the same way:
>>> DiffusionTerm().solve(var)
>>> Lx = nx * dx
>>> x = mesh.cellCenters[0]
>>> analyticalArray = valueLeft + (valueRight - valueLeft) * x / Lx
>>> print(var.allclose(analyticalArray, atol = 1e-7))
1
Last updated on Jun 27, 2023.
Created using Sphinx 6.2.1.