forces_moments Module
- defines methods to access force/moment/pressure/temperature data:
- get_forces_moments_array(model, p0, load_case_id,
eid_map, nnodes, normals, dependents_nodes, nid_map=None, include_grav=False)
get_pressure_array(model, load_case, eids, stop_on_failure=True)
- get_temperatures_array(model, load_case_id, nid_map=None,
fdtype=’float32’)
get_load_arrays(model, subcase_id, nid_map, eid_map, node_ids, normals)
- pyNastran.bdf.mesh_utils.forces_moments.get_forces_moments_array(model: BDF, p0: np.ndarray, load_case_id: int, eid_map: dict[int, int], nnodes: int, normals: np.ndarray, dependents_nodes, nid_map: dict[int, int] | None = None, include_grav: bool = False, fdtype: str = 'float32') tuple[bool, tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]][source]
Gets the forces/moments on the nodes.
- Parameters:
- p0(3, ) float ndarray
the reference location
- load_case_idint
the load id
- nid_mapdict[int nidint index]
mapping of node id to node index (e.g., forces)
- eid_mapdict[int eidint index]
mapping of element id to array index (e.g., normals)
- nnodesint
the number of nodes in nid_map
- normals(nelements, 3) float ndarray
the normal vectors for the shells what about solids???
- dependents_nodes???
???
- include_gravbool; default=False
is the mass of the elements considered; unused
- Returns:
- is_loads: bool
are there any loads?
- temperature_datatuple(temperature_key, temperatures)
- temperature_keystr
- One of the following:
TEMPERATURE(MATERIAL) TEMPERATURE(INITIAL) TEMPERATURE(LOAD) TEMPERATURE(BOTH)
- temperatures(nnodes, 1) float ndarray
the temperatures
- load_datatuple(centroidal_pressures, forces, moments, spcd)
- centroidal_pressures(nelements, 1) float ndarray
the pressure
- forces/moments(nnodes, 3) float ndarray
the forces/moments
- spcd(nnodes, 3) float ndarray
the SPCD load application
- Considers
- FORCE
- PLOAD2 - CTRIA3, CQUAD4, CSHEAR
- PLOAD4 - CTRIA3, CTRIA6, CTRIAR
CQUAD4, CQUAD8, CQUAD, CQUADR, CSHEAR CTETRA, CPENTA, CHEXA
- SPCD
- pyNastran.bdf.mesh_utils.forces_moments.get_load_arrays(model: BDF, subcase_id: int, eid_map, node_ids, normals, nid_map=None, stop_on_failure: bool = True, fdtype: str = 'float32') tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray][source]
Gets the following load arrays
- Loads include:
Temperature
Pressure (Centroidal)
Forces
SPCD
- Parameters:
- modelBDF()
the BDF object
- subcase_idint
the subcase id
- eid_mapdict[int eidint index]
???
- node_idslist[int] / int ndarray
the node ids in sorted order
- normals(nelements, 3) ndarray?
the normal vectors for the shells what about solids???
- Returns:
- found_loadbool
a flag that indicates if load data was found
- found_temperaturebool
a flag that indicates if temperature data was found
- temperature_datatuple(temperature_key, temperatures)
- temperature_keystr
- One of the following:
TEMPERATURE(MATERIAL) TEMPERATURE(INITIAL) TEMPERATURE(LOAD) TEMPERATURE(BOTH)
- temperatures(nnodes, 1) float ndarray
the temperatures
- load_datatuple(centroidal_pressures, forces, moments, spcd)
- centroidal_pressures(nelements, 1) float ndarray
the pressure
- forces/moments(nnodes, 3) float ndarray
the forces/moments
- spcd(nnodes, 3) float ndarray
the SPCD load application
- pyNastran.bdf.mesh_utils.forces_moments.get_pressure_array(model: BDF, load_case_id: int, eids, stop_on_failure: bool = True, fdtype: str = 'float32') tuple[bool, np.ndarray][source]
Gets the shell pressures for a load case.
- Parameters:
- load_case_idint
the load case to get the pressure contour for
- eids(nelements, ) int ndarray
the element ids in sorted order
- stop_on_failurebool; default=True
crashes if the load_case_id doesn’t exist
- Returns:
- is_pressurebool
is there pressure data
- pressures(nelements, 1) float ndarray
ndarray : the centroidal pressures
- pyNastran.bdf.mesh_utils.forces_moments.get_temperatures_array(model: BDF, load_case_id: int, nid_map: dict[int, int] | None = None, fdtype: str = 'float32') tuple[bool, np.ndarray][source]
Builds the temperature array based on thermal cards.
- Parameters:
- load_case_idint
the load id
- nid_mapdict[node_id, value] default=None -> auto
- node_idint
node id
- valueint
index
- dtypestr; default=’float32’
the type of the temperature array
- Returns:
- is_temperaturesbool
is there temperature data
- temperatures(nnodes, ) float ndarray
the temperatures