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(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_all(model: pyNastran.bdf.bdf.BDF, elem, 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_all(model: pyNastran.bdf.bdf.BDF, elem, 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(model: pyNastran.bdf.bdf.BDF, elem, 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, nodes, bars, centroid, iaxis)[source]
pyNastran.bdf.mesh_utils.export_mcids._get_elements(model, eids)[source]
pyNastran.bdf.mesh_utils.export_mcids._get_quad_vectors(elem: pyNastran.bdf.cards.elements.shell.CQUAD4)[source]
pyNastran.bdf.mesh_utils.export_mcids._get_tri_vectors(elem: pyNastran.bdf.cards.elements.shell.CTRIA3)[source]
pyNastran.bdf.mesh_utils.export_mcids._make_element_coord_quad(elem, pid_ref, nids, nodes, bars)[source]
pyNastran.bdf.mesh_utils.export_mcids._make_element_coord_tri(elem, pid_ref, nids, nodes, bars)[source]
pyNastran.bdf.mesh_utils.export_mcids._rotate_coords(elem, pid_ref, nplies, nids, nodes, bars, dxyz, centroid, imat, jmat, normal)[source]
pyNastran.bdf.mesh_utils.export_mcids._rotate_mcid(elem, 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)[source]

rotates a material coordinate system

pyNastran.bdf.mesh_utils.export_mcids._rotate_single_coord(elem, pid_ref, iply: int, nid, eid, nodes, bars, dxyz, centroid, imat, jmat, normal, 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[pyNastran.bdf.bdf.BDF, str], eids: Optional[List[int]] = None, 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

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.get_pid_ref_prop_type(model: pyNastran.bdf.bdf.BDF, elem) → Tuple[Union[pyNastran.bdf.cards.properties.shell.PCOMP, pyNastran.bdf.cards.properties.shell.PCOMPG, pyNastran.bdf.cards.properties.shell.PSHELL], str][source]

helper method for export_mcids

pyNastran.bdf.mesh_utils.export_mcids.get_pid_to_nplies(model: pyNastran.bdf.bdf.BDF) → Tuple[Dict[int, int], int][source]