Skip to content

PlainPattern

PlainPattern

PlainPattern(time_series: TimeSeries, factor: float = 1.0)

Bases: Pattern

OpenSees Plain load pattern with attached load entities.

A plain load pattern is used to apply static or dynamic forces (nodal loads, element loads, single-point constraints) proportional to a specified time series.

Tcl form

pattern Plain <patternTag> <timeSeriesTag> [-fact <factor>] { <loads...> }

Note
  • Plain patterns are standard load patterns that contain nodal loads (load), element loads (eleLoad), and single-point constraints (sp).
  • Nodal or element loads must be associated with the plain pattern's tag to be evaluated under its time series.
Example
from femora.core.model import Model

model = Model()
ts = model.time_series.constant(factor=2.0)
pattern = model.pattern.plain(time_series=ts)
print(pattern.tag)

# Add a nodal load using the pattern load factory proxy
node_load = pattern.add_load.node(node_tag=1, dof=1, value=10.0)
print(node_load.tag)

Create a plain load pattern.

Parameters:

Name Type Description Default
time_series TimeSeries

Managed TimeSeries object referenced by this pattern.

required
factor float

Optional scale factor applied to all loads in this pattern.

1.0

Raises:

Type Description
ValueError

If time_series is invalid or unmanaged.

Attributes

add_load property

add_load: 'PlainPattern._AddLoadProxy'

Return a proxy for creating loads directly on this pattern.

This property provides a convenient factory interface to create and automatically associate various types of loads (node, element, sp) with this PlainPattern instance.

Returns:

Type Description
'PlainPattern._AddLoadProxy'

PlainPattern._AddLoadProxy: An instance of _AddLoadProxy for creating and attaching loads.

Methods:

add_load_instance

add_load_instance(load: Load) -> None

Attach an existing load instance to this pattern.

If the load is already attached to this pattern, this method does nothing.

Parameters:

Name Type Description Default
load Load

Load instance to emit inside the pattern block.

required

Raises:

Type Description
ValueError

If load is not a Load instance.

remove_load

remove_load(load: Load) -> None

Detach a load from this pattern if it is currently attached.

Parameters:

Name Type Description Default
load Load

Attached Load instance to remove.

required

clear_loads

clear_loads() -> None

Detach all loads from this pattern.

get_loads

get_loads() -> List[Load]

Return the loads currently attached to this pattern.

Returns:

Type Description
List[Load]

List[Load]: A list of Load instances attached to this pattern.