export_mcids
Module
- Defines:
nodes, bars = export_mcids(bdf_filename, csv_filename=None)
- pyNastran.bdf.mesh_utils.export_mcids._add_elements(nid: int, eid: int, nodes: list[tuple[int, float, float, float]], bars: list[tuple[int, int, int]], centroid: ndarray, iaxis: ndarray, jaxis: ndarray, export_both_axes: bool, export_xaxis: bool) tuple[int, int] [source]
adds the element data
- pyNastran.bdf.mesh_utils.export_mcids._export_coord_axes(nodes, bars, csv_filename: str)[source]
save the coordinate systems in a csv file
- pyNastran.bdf.mesh_utils.export_mcids._export_quad_mcid(model: BDF, elem, nodes, iply: int, nid: int, eid: int, bars: list[list[int]], export_both_axes: bool, export_xaxis: bool, consider_property_rotation: bool) tuple[int, int] [source]
helper method for
export_mcids
- pyNastran.bdf.mesh_utils.export_mcids._export_quad_mcid_all(model: BDF, elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, nplies: int, nids: dict[int, int], nodes: dict[int, list[ndarray]], bars: dict[int, list[tuple[int, int]]]) None [source]
helper method for
export_mcids
- pyNastran.bdf.mesh_utils.export_mcids._export_tri_mcid_all(model: BDF, elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, nplies: int, nids: dict[int, int], nodes: dict[int, list[ndarray]], bars: dict[int, list[tuple[int, int]]]) None [source]
helper method for
export_mcids
- pyNastran.bdf.mesh_utils.export_mcids._export_tria_mcid(model: BDF, elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, nodes, iply: int, nid: int, eid: int, bars, export_both_axes: bool, export_xaxis: bool, consider_property_rotation: bool) tuple[int, int] [source]
helper method for
export_mcids
- pyNastran.bdf.mesh_utils.export_mcids._export_xaxis(nid: int, nodes: list[ndarray], bars: list[ndarray], centroid: ndarray, iaxis: ndarray) int [source]
- pyNastran.bdf.mesh_utils.export_mcids._load_bdf(bdf_filename: BDF | str, log: SimpleLogger | None = None, debug: bool = True) BDF [source]
- pyNastran.bdf.mesh_utils.export_mcids._make_element_coord_quad(elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, pid_ref, nids, nodes, bars)[source]
- pyNastran.bdf.mesh_utils.export_mcids._make_element_coord_tri(elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, pid_ref, nids, nodes, bars)[source]
- pyNastran.bdf.mesh_utils.export_mcids._rotate_coords(elem: ShellElement, pid_ref, nplies: int, nids: dict[int, int], nodes: dict[int, list[Any]], bars: dict[int, list[Any]], dxyz: float, centroid: np.ndarray, imat: np.ndarray, jmat: np.ndarray, normal: np.ndarray) None [source]
iply Final Label Description ==== =========== =========== -1 0 material coordinate system 0 1 ply 1 1 2 ply 2 2 3 ply 3
#nplies = 3 nids - {-1: 0, 0: 0, 1: 0, 2: 0} nodes = {-1: [], 0: [], 1: [], 2: []} bars = {-1: [], 0: [], 1: [], 2: []}
- pyNastran.bdf.mesh_utils.export_mcids._rotate_mcid(elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, pid_ref: PCOMP | PCOMPG | PSHELL, iply: int, imat: ndarray, jmat: ndarray, normal: ndarray, consider_property_rotation: bool = True) tuple[ndarray, ndarray] [source]
Rotates a material coordinate system. Assumes the element theta/mcid has already been acounted for.
- pyNastran.bdf.mesh_utils.export_mcids._rotate_single_coord(elem: CTRIA3 | CTRIA6 | CQUAD4 | CQUAD8 | CTRIAR | CQUADR, pid_ref, iply: int, nid, eid, nodes, bars, dxyz: float, centroid: ndarray, imat: ndarray, jmat: ndarray, normal: ndarray, export_both_axes: bool, export_xaxis: bool, consider_property_rotation: bool) tuple[int, int] [source]
- pyNastran.bdf.mesh_utils.export_mcids.export_element_cid(bdf_filename: BDF | str, eids: list[int] | None = None, log=None, debug=False)[source]
Exports the element coordinates systems for non-isotropic materials.
Note that for two quads identically oriented/numbered PSHELL quads with theta different between the two, the element cid will be same.
- pyNastran.bdf.mesh_utils.export_mcids.export_mcids(bdf_filename: BDF | str, csv_filename: str | None = None, eids: list[int] | None = None, export_xaxis: bool = True, export_yaxis: bool = True, consider_property_rotation: bool = True, iply: int = 0, log=None, debug=False)[source]
Exports the element material coordinates systems for non-isotropic materials.
- Parameters:
- bdf_filenamestr/BDF
a bdf filename or BDF model
- csv_filenamestr; default=None
str : the path to the output csv None : don’t write a CSV
- eidslist[int]
the element ids to consider
- export_xaxisbool; default=True
export the x-axis
- export_yaxisbool; default=True
export the x-axis
- consider_property_rotationbool; default=True
rotate the coordinate system
- iplyint; default=0
TODO: not validated the ply to consider
- pid_to_npliesdict[int pid, int nplies]; default=None -> auto
optional dictionary to speed up analysis
PSHELL
iply location —- ——–
0 mid1 or mid2 1 mid1 2 mid2 3 mid3 4 mid4
PCOMP/PCOMPG
iply location —- ——– 0 layer1 1 layer2
- Returns:
- nodes(nnodes, 3) float list
the nodes
- bars(nbars, 2) int list
the “bars” that represent the x/y axes of the coordinate systems
- pyNastran.bdf.mesh_utils.export_mcids.export_mcids_all(bdf_filename: BDF | str, eids: list[int] | None = None, log: SimpleLogger | None = None, debug: bool = False)[source]
Exports the element material coordinates systems for non-isotropic materials.
Note that for two quads identically oriented/numbered PSHELL quads with theta different between the two, the mcid will be different.
- Parameters:
- bdf_filenamestr/BDF
a bdf filename or BDF model
- csv_filenamestr; default=None
str : the path to the output csv None : don’t write a CSV
- eidslist[int]
the element ids to consider
PSHELL
iply location —- ——–
0 mid1 or mid2 1 mid1 2 mid2 3 mid3 4 mid4
PCOMP/PCOMPG
iply location —- ——– 0 layer1 1 layer2
- Returns:
- nodes(nnodes, 3) float list
the nodes
- bars(nbars, 2) int list
the “bars” that represent the x/y axes of the coordinate systems