Skip to content

EmbeddedBeamSolidInterface

EmbeddedBeamSolidInterface

EmbeddedBeamSolidInterface(name: str, beam_part: 'MeshPart | str | int', solid_parts: 'List[MeshPart | str | int] | None' = None, shape: str = 'circle', radius: float = 0.5, radius_y: float | None = None, radius_z: float | None = None, width: float | None = None, height: float | None = None, section_points: Sequence[Sequence[float]] | None = None, n_peri: int = 8, n_long: int = 10, penalty_param: float = 1000000000000.0, g_penalty: bool = True, scale_start: float = 1.0, scale_end: float = 1.0, selection_margin: float = 0.35, _diagnostic_geometry: bool = False, _diagnostic_line_mesh: bool = False, region: 'RegionBase | None' = None, write_connectivity: bool = False, write_interface: bool = False, *, meshpart)

Bases: InterfaceBase, HandlesDecompositionMixin

Embedded beam-solid contact interface.

EmbeddedBeamSolidInterface models the kinematic and force contact interaction between line elements (e.g. beam-column piles) and 3D solid elements (e.g. soil). It enforces matching partition cores between the embedded beam elements and overlapping solid elements.

Tcl form

None (renders internally via OpenSees interface-specific TCL commands).

Example
from femora.core.model import Model

model = Model()
# Create an interface for a piles meshpart within the soil domain
interface = model.interface.beam_solid_interface(
    name="pile_soil_interface",
    beam_part="piles",
    radius=0.25,
    n_peri=8,
    n_long=5,
    penalty_param=1.0e12,
    g_penalty=True,
)

Create an EmbeddedBeamSolidInterface.

Parameters:

Name Type Description Default
name str

Unique name of the contact interface.

required
beam_part 'MeshPart | str | int'

The beam part instance, name, or tag.

required
solid_parts 'List[MeshPart | str | int] | None'

Optional list of solid part instances, names, or tags.

None
shape str

Shape profile of the beam cross-section. Production OpenSees export currently supports only "circle". Defaults to "circle".

'circle'
radius float

Radius of the circular beam interface geometry. Defaults to 0.5.

0.5
radius_y float | None

Internal diagnostic ellipse semi-axis in the local section y direction.

None
radius_z float | None

Internal diagnostic ellipse semi-axis in the local section z direction.

None
width float | None

Internal diagnostic rectangle width in the local section y direction.

None
height float | None

Internal diagnostic rectangle height in the local section z direction.

None
section_points Sequence[Sequence[float]] | None

Internal diagnostic polygon vertices as local (y, z) pairs.

None
n_peri int

Number of points along the perimeter of the circular section. Defaults to 8.

8
n_long int

Number of points along the longitudinal axis of the beam. Defaults to 10.

10
penalty_param float

Penalty stiffness parameter for the constraint. Defaults to 1.0e12.

1000000000000.0
g_penalty bool

If True, uses the geometric penalty formulation. Defaults to True.

True
scale_start float

Internal diagnostic interface envelope scale at the first endpoint of the beam path. Production export requires 1.0.

1.0
scale_end float

Internal diagnostic interface envelope scale at the second endpoint of the beam path. Production export requires 1.0.

1.0
selection_margin float

Fraction of each candidate solid cell bounding radius allowed outside the interface envelope during fast solid discovery. Smaller values select tighter neighborhoods. Defaults to 0.35.

0.35
_diagnostic_geometry bool

Internal flag used by visual diagnostics to exercise non-exported envelope shapes and tapered discovery.

False
_diagnostic_line_mesh bool

Internal flag used by visual diagnostics to allow generic line-cell meshparts that are not export-ready.

False
region 'RegionBase | None'

Optional region bounding the interface. Not implemented yet.

None
write_connectivity bool

If True, outputs boundary connectivity maps to file. Defaults to False.

False
write_interface bool

If True, outputs boundary mesh surfaces to file. Defaults to False.

False
meshpart

MeshPart registry manager from the parent model.

required

Raises:

Type Description
ValueError

If beam_part cannot be resolved or if shape is unsupported.

TypeError

If argument types are invalid (e.g. beam_part is not a line mesh).

NotImplementedError

If unsupported parameter configurations are provided.

Methods:

plot

plot(*, show_mesh: bool = True, show_envelope: bool = True, show_edges: bool = True, mesh_opacity: float = 0.08, selected_opacity: float = 0.65, envelope_opacity: float = 0.35, beam_color: str = 'black', selected_color: str = 'orange', envelope_color: str = 'steelblue', off_screen: bool = False, screenshot: str | None = None, window_size: tuple[int, int] = (1400, 900), return_plotter: bool = False) -> pv.Plotter | None

Plot the assembled beam-solid interface selection.

The plot shows the assembled model as a faint reference mesh, the beam cells owned by this interface, the selected surrounding solid cells, and the circular radius envelope used by Femora-side discovery.

Parameters:

Name Type Description Default
show_mesh bool

If True, draw the whole assembled mesh as a faint wireframe.

True
show_envelope bool

If True, draw the radius envelope around each beam segment.

True
show_edges bool

If True, draw edges on selected solid cells.

True
mesh_opacity float

Opacity of the assembled reference mesh.

0.08
selected_opacity float

Opacity of selected solid cells.

0.65
envelope_opacity float

Opacity of the radius envelope.

0.35
beam_color str

Color used for beam cells.

'black'
selected_color str

Color used for selected solid cells.

'orange'
envelope_color str

Color used for the radius envelope.

'steelblue'
off_screen bool

If True, render without opening an interactive window.

False
screenshot str | None

Optional image path to write a screenshot.

None
window_size tuple[int, int]

PyVista window size in pixels.

(1400, 900)
return_plotter bool

If True, return the configured plotter instead of calling show().

False

Returns:

Type Description
Plotter | None

A PyVista plotter when return_plotter is True; otherwise None.

Raises:

Type Description
RuntimeError

If the interface is unmanaged, the model is not assembled, or no embedded interface data has been collected yet.