Masonry/concrete infill panel in a steel frame — application demo
Part 7 of the unilateral-elements series; the 2D counterpart of
03_cross_braced_panel.py.
A one-bay moment-resisting steel frame (four BeamElement members
with rectangular section) is infilled with a single plain-concrete
panel modelled as one four-node CompressionOnlyMembraneElement,
which carries no force in tension.
Under lateral load the panel mobilises a diagonal compressive strut
from the loaded top corner down to the opposite base corner — the
classic equivalent-strut picture of infilled frames. When the load
is reversed the strut flips to the other diagonal. The same panel
carries both cases because its nonlinearity is directional
(principal-stress cutoff), not element-level: the tensile diagonal
of the panel simply slacks out while the compressive diagonal
stiffens the frame.
n_tl ─────── top chord ─────── n_tr ← lateral load ±P applied here │ │ │ ░░░░░░░░░░░░░░░ │ │ ░░░░░░░░░░░░░░░ │ │ ░ concrete ░ │ │ ░ infill ░ │ columns and chords are steel │ ░░░░░░░░░░░░░░░ │ beams (rectangular section, │ ░░░░░░░░░░░░░░░ │ fixed base); the bay is filled │ │ with a single │ │ CompressionOnlyMembraneElement. n_bl ──── bottom chord ──── n_br (both fixed)Three cases are solved: (a) bare frame, +P at n_tr (no infill — just the portal frame). (b) infilled frame, +P at n_tr (panel activates strut bl→tr). (c) infilled frame, −P at n_tr (panel activates strut br→tl).
Expected outcome: the infill drastically reduces top-corner drift compared to the bare frame (the panel contributes a diagonal-strut stiffness on top of the frame’s 12EI/L³ lateral stiffness), and cases (b) and (c) give equal drift magnitudes by symmetry.
Why beams instead of trusses for the frame: a rectangle of four pin- jointed trusses (no diagonal) is a kinematic mechanism under lateral load — zero stiffness, nothing converges. Real infilled frames have moment-resisting columns anyway, so beams are the physically correct choice for this demo.
Units: mm / N / MPa.

The model before it is solved: its parts, supports (red) and loads (blue).
![The result: the model coloured by displacement (magnitude [mm])](/examples/core-concepts/unilateral-elements/07-infill-panel-frame-results.webp)
The model, coloured by displacement (magnitude [mm]), in xfea’s 3D viewer.
Open in 3D turn it, cut it, pick any field: in xfea's viewer, in your browser
The script
Section titled “The script”examples/scripts/02_core_concepts/unilateral_elements/07_infill_panel_frame.py. Run it from the repository with uv run python examples/scripts/02_core_concepts/unilateral_elements/07_infill_panel_frame.py, or, with xfea-examples installed, xfea-examples run 02_core_concepts/unilateral_elements/07_infill_panel_frame.py.
from __future__ import annotations
import mathfrom pathlib import Path
from xfea.model import ( BeamElement, CompressionOnlyMembraneElement, CompressionOnlyMembraneSection, ElasticIsotropic, Model, Node, Part, RectangularSection,)from xfea.problem import Problem, StaticStepfrom xfea.results import DisplacementFieldResults
from xfea_examples import out_dir
# Geometry / materials / loadW = 3_000.0 # [mm] bay widthH = 3_000.0 # [mm] bay heightW_COL = 200.0 # [mm] column / chord widthH_COL = 200.0 # [mm] column / chord depth (strong axis = out of plane)T_INFILL = 150.0 # [mm] infill panel thicknessP = 50_000.0 # [N] lateral load at n_tr
steel = ElasticIsotropic(E=210_000.0, v=0.3, density=7.85e-9, name="steel")concrete = ElasticIsotropic(E=30_000.0, v=0.2, density=2.4e-9, name="concrete")
def build_frame(tag: str, *, with_infill: bool) -> tuple[Model, dict[str, Node]]: """Build the one-bay frame, optionally adding a compression-only infill panel.
The four corner nodes are shared between the truss chords and the panel's membrane element, so no tie-MPC is needed: the panel is naturally bonded to the frame through its corners. """ model = Model(name=f"infill_frame_{tag}") part = model.add_part(Part(name="frame"))
nodes = { "bl": part.add_node(Node(xyz=[0.0, 0.0, 0.0])), "br": part.add_node(Node(xyz=[W, 0.0, 0.0])), "tl": part.add_node(Node(xyz=[0.0, 0.0, H])), "tr": part.add_node(Node(xyz=[W, 0.0, H])), }
section = RectangularSection(w=W_COL, h=H_COL, material=steel) # Orientation = [0, 1, 0]: local y axis of the beam section points # out of the frame plane, so bending about the strong axis occurs # in the xz plane (the loading plane). orient = [0, 1, 0] part.add_element(BeamElement(nodes=[nodes["bl"], nodes["br"]], section=section, orientation=orient)) part.add_element(BeamElement(nodes=[nodes["tl"], nodes["tr"]], section=section, orientation=orient)) part.add_element(BeamElement(nodes=[nodes["bl"], nodes["tl"]], section=section, orientation=orient)) part.add_element(BeamElement(nodes=[nodes["br"], nodes["tr"]], section=section, orientation=orient))
if with_infill: infill = CompressionOnlyMembraneSection(t=T_INFILL, material=concrete) # Counter-clockwise node order as seen from +y (the frame sits # in the xz plane); avoids a negative Jacobian. part.add_element( CompressionOnlyMembraneElement( nodes=[nodes["bl"], nodes["br"], nodes["tr"], nodes["tl"]], section=infill, ) )
# Fix the base in all 6 DOF (moment-resisting column base). The # top nodes are left free in plane so the frame can drift under # the lateral load, but restrained out-of-plane so the membrane # (which has no bending stiffness) stays flat. model.add_fix_bc(nodes=[nodes["bl"], nodes["br"]]) model.add_rollerXZ_bc(nodes=[nodes["tl"], nodes["tr"]]) return model, nodes
def solve_case(tag: str, *, with_infill: bool, load_x: float) -> dict: model, nodes = build_frame(tag, with_infill=with_infill)
problem = model.add_problem(Problem(name=f"{model.name}_run")) step = problem.add_step( StaticStep( name=tag, nlgeom=True, initial_inc_size=0.25, max_inc_size=1.0, min_inc_size=1e-4, max_increments=60, ) ) step.add_uniform_forcefield(nodes=[nodes["tr"]], x=load_x, load_case=tag)
disp = DisplacementFieldResults() step.add_field_outputs([disp])
out = Path(out_dir(model.name)) try: problem.analyse_and_extract(path=out, verbose=False) except Exception as exc: return {"ok": False, "error": f"{type(exc).__name__}: {exc}"}
STEP_END = 1.0 u_tr = disp.get_result_at(nodes["tr"], time=STEP_END) u_tl = disp.get_result_at(nodes["tl"], time=STEP_END) drift_tr = float(u_tr.x) drift_tl = float(u_tl.x) # Vertical motion of the top corners is a proxy for which diagonal # of the panel is in compression: the strut shortens the bay along # its axis, so the top node closer to the loaded corner rides down. return { "ok": True, "drift_tr": drift_tr, "drift_tl": drift_tl, "dz_tr": float(getattr(u_tr, "z", 0.0) or 0.0), "dz_tl": float(getattr(u_tl, "z", 0.0) or 0.0), }
def _print_case(label: str, res: dict): print(f"--- {label} ---") if not res["ok"]: print(f" solver failure: {res['error']}") return print(f" top-right drift δx : {res['drift_tr']:+.4f} mm") print(f" top-left drift δx : {res['drift_tl']:+.4f} mm") print(f" top-right settlement : {res['dz_tr']:+.4f} mm") print(f" top-left settlement : {res['dz_tl']:+.4f} mm") print()
if __name__ == "__main__": print("Infilled-frame demo — moment-resisting steel portal +") print("plain-concrete infill panel as a compression-only membrane.") print(f" bay : {W:.0f} × {H:.0f} mm") print(f" columns : steel, {W_COL:.0f} × {H_COL:.0f} mm rectangular") print(f" infill : concrete, t = {T_INFILL:.0f} mm, E = {concrete.E:.0f} MPa") print(f" load : ±{P:.0f} N in x at n_tr") print()
# Very rough reference for the bare portal: two columns fixed at # the base with a rigid beam at the top (shear-building idealisation) # have a lateral stiffness K_bare = 2 · 12·E·I / H³. Not exact — # the top beam here is flexible, not rigid — but right order of # magnitude. I_col = W_COL * H_COL**3 / 12.0 # strong-axis in the loading plane K_bare = 2.0 * 12.0 * steel.E * I_col / H**3 drift_bare_ref = P / K_bare print("Shear-building reference for the bare portal (rigid top beam):") print(f" I_col = {I_col:.0f} mm⁴ (strong axis)") print(f" K_bare ≈ 2·12EI/H³ = {K_bare:.1f} N/mm") print(f" drift (bare ref) ≈ {drift_bare_ref:+.4f} mm") print()
# Equivalent-strut reference for the infill contribution: an # idealised strut along the loaded diagonal with effective width # w_eff (Stafford-Smith rule-of-thumb w_eff ≈ L_diag/3). Acts in # parallel with the bare-frame stiffness. theta = math.atan2(H, W) L_diag = math.hypot(W, H) w_eff = L_diag / 3.0 A_strut_eff = w_eff * T_INFILL # Horizontal stiffness projection of an axial strut of area A_eff: # K_h = (E·A_eff / L_diag) · cos²θ. K_strut_h = concrete.E * A_strut_eff / L_diag * math.cos(theta) ** 2 K_total = K_bare + K_strut_h drift_infill_ref = P / K_total print("Equivalent-strut reference (Stafford-Smith w≈L_diag/3):") print(f" w_eff = {w_eff:.1f} mm") print(f" K_strut_h ≈ EA/L·cos²θ = {K_strut_h:.1f} N/mm") print(f" K_total = K_bare + K_strut_h = {K_total:.1f} N/mm") print(f" drift (infilled ref) ≈ {drift_infill_ref:+.4f} mm") print()
res_bare = solve_case("bare_push_right", with_infill=False, load_x=+P) _print_case("Bare frame, +P at n_tr (no infill)", res_bare)
res_push_right = solve_case("infill_push_right", with_infill=True, load_x=+P) _print_case("Infilled frame, +P (compressive strut bl → tr)", res_push_right)
res_push_left = solve_case("infill_push_left", with_infill=True, load_x=-P) _print_case("Infilled frame, −P (compressive strut br → tl)", res_push_left)
if all(r["ok"] for r in (res_bare, res_push_right, res_push_left)): bare = abs(res_bare["drift_tr"]) right = abs(res_push_right["drift_tr"]) left = abs(res_push_left["drift_tr"]) stiffening = bare / right if right else float("inf") sym = abs(right - left) print(f"Stiffening factor (bare / infilled) : {stiffening:.1f}×") print(f"Symmetry check ||δ(+P)| − |δ(−P)|| : {sym:.4f} mm")
print() print( "Interpretation:\n" " The bare moment-resisting portal has a well-defined lateral\n" " stiffness (two cantilever columns in parallel). Dropping a\n" " single compression-only panel into the bay mobilises a\n" " diagonal compressive strut through the panel body and stacks\n" " its horizontal stiffness on top of the bare-portal stiffness,\n" " cutting drift sharply under the same load. Flipping the\n" " load sign flips the active strut to the other diagonal;\n" " because the material law is principal-stress based, the\n" " *same* single panel handles both directions and the two\n" " drifts are equal in magnitude. This is the 2D analogue of\n" " the cross-braced tie panel in 03_cross_braced_panel.py, but\n" " expressed with one 2D element per panel instead of two\n" " unilateral diagonals — closer to how plain-concrete infills\n" " actually carry lateral load.\n" )© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them