loads Module
- Defines:
- sum_forces_moments
find the net force/moment on the model
- sum_forces_moments_elements
find the net force/moment on the model for a subset of elements
- pyNastran.bdf.mesh_utils.loads.get_ndof(model: BDF, subcase: Subcase) tuple[int, int, int][source]
gets the size of the DOFs
- pyNastran.bdf.mesh_utils.loads.get_static_force_vector_from_subcase_id(model: BDF, subcase_id: int) np.ndarray[source]
- solves for F in:
[K]{x} = {F}
- pyNastran.bdf.mesh_utils.loads.sum_forces_moments(model: BDF, p0: int | np.ndarray, loadcase_id: int, cid: int = 0, include_grav: bool = False, xyz_cid0: dict[int, NDArray3float] | None = None) tuple[NDArray3float, NDArray3float][source]
Sums applied forces & moments about a reference point p0 for all load cases.
- Considers:
FORCE, FORCE1, FORCE2
MOMENT, MOMENT1, MOMENT2
PLOAD, PLOAD2, PLOAD4
LOAD
- Parameters:
- modelBDF()
a BDF object
- p0NUMPY.NDARRAY shape=(3,) or integer (node ID)
the reference point
- loadcase_idint
the LOAD=ID to analyze
- cidint; default=0
the coordinate system for the summation
- include_gravbool; default=False
includes gravity in the summation (not supported)
- xyz_cid0None / dict[int] = (3, ) ndarray
the nodes in the global coordinate system
- Returns:
- forcesNUMPY.NDARRAY shape=(3,)
the forces
- momentsNUMPY.NDARRAY shape=(3,)
the moments
Warning
not full validated ..
Todo
It’s super slow for cid != 0. We can speed this up a lot if we calculate the normal, area, centroid based on precomputed node locations.
- Pressure acts in the normal direction per model/real/loads.bdf and loads.f06
- pyNastran.bdf.mesh_utils.loads.sum_forces_moments_elements(model: BDF, p0: int | np.ndarray, loadcase_id: int, eids: list[int] | None, nids: list[int] | None, cid: int = 0, include_grav: bool = False, xyz_cid0: dict[int, NDArray3float] | None = None) tuple[NDArray3float, NDArray3float][source]
Sum the forces/moments based on a list of nodes and elements.
- Parameters:
- modelBDF()
a BDF object
- eidslist[int]
the list of elements to include (e.g. the loads due to a PLOAD4)
- nidslist[int]
the list of nodes to include (e.g. the loads due to a FORCE card)
- p0int; (3,) ndarray
the point to sum moments about type = int
sum moments about the specified grid point
- type = (3, ) ndarray/list (e.g. [10., 20., 30]):
the x, y, z location in the global frame
- loadcase_idint
the LOAD=ID to analyze
- include_gravbool; default=False
includes gravity in the summation (not supported)
- xyz_cid0None / dict[int] = (3, ) ndarray
the nodes in the global coordinate system
- Returns:
- forcesNUMPY.NDARRAY shape=(3,)
the forces
- momentsNUMPY.NDARRAY shape=(3,)
the moments
- Nodal TypesFORCE, FORCE1, FORCE2,
MOMENT, MOMENT1, MOMENT2, PLOAD
- Element Types: PLOAD1, PLOAD2, PLOAD4, GRAV
- If you have a CQUAD4 (eid=3) with a PLOAD4 (sid=3) and a FORCE
- card (nid=5) acting on it, you can include the PLOAD4, but
- not the FORCE card by using:
- For just pressure:
- For just force:
- or both:
Note
If you split the model into sections and sum the loads on each section, you may not get the same result as if you summed the loads on the total model. This is due to the fact that nodal loads on the boundary are double/triple/etc. counted depending on how many breaks you have.
Todo
not done… ..