Skip to content

InterpolatedGroundMotion

InterpolatedGroundMotion

InterpolatedGroundMotion(ground_motions: List[GroundMotion], factors: List[float])

Bases: GroundMotion

Interpolated ground motion combining managed ground motions.

An interpolated ground motion combines previously managed ground motions using a list of interpolation factors. Referenced ground motions must already have manager-assigned tags because OpenSees references them by tag inside the interpolation command.

Tcl form

groundMotion <tag> Interpolated <gmTag1> <gmTag2> ... -fact <factor1> <factor2> ...

Note
  • Each referenced ground motion must be created through model.ground_motion.* before interpolation.
  • Interpolated ground motions are commonly attached to multiple-support patterns through add_imposed_motion(...).

Attributes:

Name Type Description
ground_motions

Managed ground motions being combined.

factors

Interpolation factors aligned with ground_motions.

Example
from femora.core.model import Model

model = Model()
ts_a = model.time_series.path(dt=0.01, filePath="gm_a.acc")
ts_b = model.time_series.path(dt=0.01, filePath="gm_b.acc")
gm_a = model.ground_motion.plain(accel=ts_a)
gm_b = model.ground_motion.plain(accel=ts_b)
gm = model.ground_motion.interpolated(
    ground_motions=[gm_a, gm_b],
    factors=[0.6, 0.4],
)
pattern = model.pattern.multiple_support()
pattern.add_imposed_motion(node_tag=10, dof=1, ground_motion=gm)
print(gm.tag)

Create an interpolated ground motion.

Parameters:

Name Type Description Default
ground_motions List[GroundMotion]

Ground motions to combine. Each item must be a GroundMotion instance.

required
factors List[float]

Interpolation factors. Must have the same length as ground_motions.

required

Raises:

Type Description
ValueError

If the ground-motion list is empty, contains invalid objects, the factors list is empty, lengths differ, or factors are not numeric.