create_gravity_load¶
- opstool.pre.create_gravity_load(exclude_nodes=None, direction='Z', factor=-9.81)[source]¶
Applying the gravity loads. The mass values are derived from the extracted mass matrix, including the masses from the nodes and elements. See the blog Do It Your Self-Weight for more details.
Note
This function is a modification of the method described in the previous blog post, which relaxes the restrictions on imposing constraints. This means you can impose constraints at any position.
Parameters¶
- exclude_nodes: list, default=None
Excluded node tags, whose masses will not be used to generate gravity loads.
- direction: str, default=”Z”
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).
Returns¶
- node_loadsdict[int, list[float]]
A dictionary where keys are node tags and values are the gravity loads applied to those nodes. The loads are in the form of a list, with the load in the specified direction and zeros in other directions.
- rtype:
dict[int,list[float]]
- Return type:
dict[int, list[float]]