ModelMass¶
- class opstool.pre.ModelMass[source]¶
Bases:
objectA class used to generate node masses. Element mass is distributed equally to each connected node.
Methods
Add mass from tetrahedral or hexahedral elements.
Add mass from two-node line elements.
Add mass from tetrahedral or hexahedral elements.
Add mass from a planar element, including shell.
Add mass to the existing node mass.
Call the OpenSeesPy
loadcommand to generate a nodal gravity load.Call the OpenSeesPy node
masscommand to generate all node masses.Get nodal mass.
Get the total mass of the model.
resetAttributes
Returns: nodal_mass: dict[int, float] The nodal mass dict, the key is nodeTag, value is nodal mass.
Returns: total_mass: float The total mass.
- add_node_mass(node_tag, mass)[source]¶
Add mass to the existing node mass.
Parameters¶
node_tag: int, node tag. mass: float, mass value.
Returns¶
None
- add_mass_from_line(ele_tags, rho, area)[source]¶
Add mass from two-node line elements.
Parameters¶
- ele_tags: Union[list, int]
Element tag or list.
- rho: Union[list, float]
Mass density or list, if list length shoud same as ele_tags.
- area: Union[list, float]
Cross-sectional area or list, if list length shoud same as ele_tags.
- add_mass_from_surf(ele_tags, rho, d)[source]¶
Add mass from a planar element, including shell.
Parameters¶
- ele_tags: Union[list, int]
Element tag or list.
- rho: Union[list, float]
Mass density or list, if list length shoud same as ele_tags.
- d: Union[list, float]
Element thickness or list, if list length shoud same as ele_tags.
- add_mass_from_brick(ele_tags, rho)[source]¶
Add mass from tetrahedral or hexahedral elements.
Parameters¶
- ele_tags: Union[list, int]
Element tag or list.
- rho: Union[list, float]
Mass density or list, if list length shoud same as ele_tags.
- add_mass_from_solid(ele_tags, rho)[source]¶
Add mass from tetrahedral or hexahedral elements.
Parameters¶
- ele_tags: Union[list, int]
Element tag or list.
- rho: Union[list, float]
Mass density or list, if list length shoud same as ele_tags.
- property nodal_mass¶
Returns:¶
- nodal_mass: dict[int, float]
The nodal mass dict, the key is nodeTag, value is nodal mass.
- generate_ops_node_mass()[source]¶
Call the OpenSeesPy node
masscommand to generate all node masses. The inertia moment of the rotational dof will be ignored.Note
This function will use the
masscommand to generate a lumped mass matrix, and does not apply it repeatedly with the mass parameters when the element is defined. This means that if you use this function, please ignore the mass parameter in the element definition, such as the'-mass'option of somebeam--columnelements, and thedensityparameter innDMaterial.Returns¶
None
- generate_ops_gravity_load(direction, factor=-9.81, exclude_nodes=None)[source]¶
Call the OpenSeesPy
loadcommand to generate a nodal gravity load.Parameters¶
- direction: str,
The gravity load direction.
- factor: float, default=-9.81
The factor applied to the mass values, it should be the multiplication of gravitational acceleration and directional indicators, e.g., -9.81, where 9.81 is the gravitational acceleration and -1 indicates along the negative Z axis. Of course, it can be multiplied by an additional factor to account for additional constant loads, e.g., 1.05 * (-9.81).
- exclude_nodes: list, default=None
Excluded node tags, whose masses will not be used to generate gravity loads.
Returns¶
None