Simply supported beam — Thermal analysis — 2D Shell elements
Steady-state heat conduction through a beam modelled as a plate (L x b, t = h). Fixed temperatures at both ends: T_hot = 373.15 K (100 C) at x = 0 T_cold = 293.15 K (20 C) at x = L
Note: Thermal BCs are independent of mechanical supports. The analytical solution is identical to the cantilever thermal case.
Analytical (1D steady-state conduction): T(x) = T_hot + (T_cold - T_hot) * x / L

The model before it is solved: its parts, supports (red) and loads (blue).
![The result: the model coloured by temperature (T [K])](/examples/reference-cases/benchmarks/simply-supported-thermal-2d-results.webp)
The model, coloured by temperature (T [K]), in xfea’s 3D viewer.
Open in 3D turn it, cut it, pick any field: in xfea's viewer, in your browser
Verification
Section titled “Verification”In the latest verification run, on 2026-11-21, through the conversion service as users solve, 2 of 2 checks pass.
| Quantity / reference from | xfea | Reference | Deviation | Tolerance | |
|---|---|---|---|---|---|
| Min temperature (x=L) [K] analytical | 293.15 | 293.15 | 0.00 % | 1 % | |
| Max temperature (x=0) [K] analytical | 373.15 | 373.15 | 0.00 % | 1 % |
The script
Section titled “The script”examples/scripts/04_reference_cases/benchmarks/simply_supported_thermal_2d.py. Run it from the repository with uv run python examples/scripts/04_reference_cases/benchmarks/simply_supported_thermal_2d.py, or, with xfea-examples installed, xfea-examples run 04_reference_cases/benchmarks/simply_supported_thermal_2d.py.
from xfea.geometry import Mesh
from xfea.meshing import MeshingSettingsfrom xfea.model import Model, Part, ShellSectionfrom xfea.problem import HeatTransferStep, Problemfrom xfea.results import TemperatureFieldResults
from _bench_utils import ( BEAM_HEIGHT, BEAM_WIDTH, SS_LENGTH, T_COLD, T_HOT, compare, out_dir, thermal_material,)from xfea_examples.models import _nodes_at_extreme
# ── Model ─────────────────────────────────────────────────────────────────L = SS_LENGTHb = BEAM_WIDTHh = BEAM_HEIGHTnx = 40ny = 2
mat = thermal_material()sec = ShellSection(t=h, material=mat, int_points=3)
model = Model(name="bench_ss_thermal_2d")with model: part = model.add_part(Part(name="plate")) part.base_geometry = Mesh.from_meshgrid(L, nx, b, ny) part.mesh(settings=MeshingSettings(min=20, max=60), section=sec)
hot_nodes = _nodes_at_extreme(part.nodes, axis="x", mode="min")cold_nodes = _nodes_at_extreme(part.nodes, axis="x", mode="max")
model.add_uniform_thermal_ics_field(T0=T_COLD, nodes=part.nodes)model.add_thermal_bc(nodes=hot_nodes, temperature=T_HOT)model.add_thermal_bc(nodes=cold_nodes, temperature=T_COLD)
# ── Problem ───────────────────────────────────────────────────────────────problem = model.add_problem(Problem(name="ss_thermal_2d"))step = problem.add_step( HeatTransferStep( name="steady_state", steady_state=True, ))
temp = TemperatureFieldResults()step.add_field_outputs([temp])
problem.analyse_and_extract(path=out_dir(model.name), verbose=True)
# ── Comparison ────────────────────────────────────────────────────────────print()print("=" * 65)print("Simply Supported Beam — Thermal (Steady-State) — 2D Shell Elements")print("=" * 65)print()
min_temp = temp.get_min_result("T")max_temp = temp.get_max_result("T")
fea_min_K = float(min_temp.T)fea_max_K = float(max_temp.T)
compare("Min temperature (x=L) [K]", fea_min_K, T_COLD, tol_pct=1.0)compare("Max temperature (x=0) [K]", fea_max_K, T_HOT, tol_pct=1.0)
# Mid-span temperature checkT_mid_ref = (T_HOT + T_COLD) / 2.0mid_x = L / 2.0mid_temps = []for r in temp.results: if abs(r.node.x - mid_x) < 5.0: val = float(r.T) mid_temps.append(val)if mid_temps: fea_mid_K = sum(mid_temps) / len(mid_temps) compare("Mid-span temperature [K]", fea_mid_K, T_mid_ref, tol_pct=1.0)else: print(f" Expected mid-span temperature: {T_mid_ref:.2f} K ({T_mid_ref - 273.15:.1f} C)") print(" (No nodes found near mid-span to verify)")© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them