Skip to content

GroundMotion

GroundMotion

GroundMotion(motion_type: str)

Bases: ABC

Abstract base class for OpenSees ground motions.

A ground motion defines the displacement, velocity, and/or acceleration history used by OpenSees imposed-motion constraints. Concrete subclasses are responsible for validating their own physical parameters and rendering the corresponding groundMotion Tcl command.

Ground motions intentionally do not self-register and do not assign their own tags. A :class:femora.core.ground_motion_manager.GroundMotionManager owns instance storage, tag assignment, retagging, and deletion. This keeps the base class independent from any particular model and allows separate managers, such as future separate Model instances, to maintain independent ground-motion collections.

Attributes:

Name Type Description
tag Optional[int]

OpenSees ground-motion tag assigned by a GroundMotionManager. It is None until the instance is added to a manager.

motion_type

OpenSees ground-motion type name, such as "Plain" or "Interpolated".

Initialize common ground-motion state.

Parameters:

Name Type Description Default
motion_type str

OpenSees ground-motion type name used by subclasses.

required

Methods:

Name Description
to_tcl

Render the OpenSees groundMotion command.

Methods:

to_tcl abstractmethod

to_tcl() -> str

Render the OpenSees groundMotion command.

Subclasses should call _require_tag() before rendering so unmanaged ground motions fail clearly instead of emitting invalid Tcl.