examples.diffusion.steadyState.mesh50x50.tri2DinputΒΆ
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 Nov 20, 2024.
Created using Sphinx 7.1.2.