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: numpy.ndarray, iaxis: numpy.ndarray, jaxis: numpy.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: pyNastran.bdf.bdf.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: pyNastran.bdf.bdf.BDF, elem: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.CQUADR], nplies: int, nids: Dict[int, int], nodes: Dict[int, List[numpy.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: pyNastran.bdf.bdf.BDF, elem: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.CQUADR], nplies: int, nids: Dict[int, int], nodes: Dict[int, List[numpy.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: pyNastran.bdf.bdf.BDF, elem: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.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[numpy.ndarray], bars: List[numpy.ndarray], centroid: numpy.ndarray, iaxis: numpy.ndarray) → int[source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
_get_quad_vectors_mcid
(elem: pyNastran.bdf.cards.elements.shell.CQUAD4)[source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
_get_tri_vectors_mcid
(elem: pyNastran.bdf.cards.elements.shell.CTRIA3)[source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
_load_bdf
(bdf_filename: Union[BDF, str], log: Optional[SimpleLogger] = None, debug: bool = True) → BDF[source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
_make_element_coord_quad
(elem: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.CQUADR], pid_ref, nids, nodes, bars)[source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
_make_element_coord_tri
(elem: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.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: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.CQUADR], pid_ref: Union[pyNastran.bdf.cards.properties.shell.PCOMP, pyNastran.bdf.cards.properties.shell.PCOMPG, pyNastran.bdf.cards.properties.shell.PSHELL], iply: int, imat: numpy.ndarray, jmat: numpy.ndarray, normal: numpy.ndarray, consider_property_rotation: bool = True) → Tuple[numpy.ndarray, numpy.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: Union[pyNastran.bdf.cards.elements.shell.CTRIA3, pyNastran.bdf.cards.elements.shell.CTRIA6, pyNastran.bdf.cards.elements.shell.CQUAD4, pyNastran.bdf.cards.elements.shell.CQUAD8, pyNastran.bdf.cards.elements.shell.CTRIAR, pyNastran.bdf.cards.elements.shell.CQUADR], pid_ref, iply: int, nid, eid, nodes, bars, dxyz: float, centroid: numpy.ndarray, imat: numpy.ndarray, jmat: numpy.ndarray, normal: numpy.ndarray, export_both_axes: bool, export_xaxis: bool, consider_property_rotation: bool) → Tuple[int, int][source]¶
-
pyNastran.bdf.mesh_utils.export_mcids.
export_mcids
(bdf_filename: Union[pyNastran.bdf.bdf.BDF, str], csv_filename: Optional[str] = None, eids: Optional[List[int]] = 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: Union[BDF, str], eids: Optional[List[int]] = None, log: Optional[SimpleLogger] = 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