delete_bad_elements
Module¶
- defines:
- model = delete_bad_shells(model, max_theta=175., max_skew=70., max_aspect_ratio=100.,
max_taper_ratio=4.0)
- eids_to_delete = get_bad_shells(model, xyz_cid0, nid_map, max_theta=175., max_skew=70.,
max_aspect_ratio=100., max_taper_ratio=4.0)
-
pyNastran.bdf.mesh_utils.delete_bad_elements.
delete_bad_shells
(model: pyNastran.bdf.bdf.BDF, min_theta: float = 0.1, max_theta: float = 175.0, max_skew: float = 70.0, max_aspect_ratio: float = 100.0, max_taper_ratio: float = 4.0) → pyNastran.bdf.bdf.BDF[source]¶ Removes bad CQUAD4/CTRIA3 elements
- Parameters
- modelBDF ()
this should be equivalenced
- min_thetafloat; default=0.1
the maximum interior angle (degrees)
- max_thetafloat; default=175.
the maximum interior angle (degrees)
- max_skewfloat; default=70.
the maximum skew angle (degrees)
- max_aspect_ratiofloat; default=100.
the max aspect ratio
- taper_ratiofloat; default=4.0
the taper ratio; applies to CQUAD4s only
-
pyNastran.bdf.mesh_utils.delete_bad_elements.
element_quality
(model, nids=None, xyz_cid0=None, nid_map=None)[source]¶ Gets various measures of element quality
- Parameters
- modelBDF()
a cross-referenced model
- nids(nnodes, ) int ndarray; default=None
the nodes of the model in sorted order includes GRID, SPOINT, & EPOINTs
- xyz_cid0(nnodes, 3) float ndarray; default=None
the associated global xyz locations
- nid_mapDict[nid]->index; default=None
a mapper dictionary
- Returns
- qualityDict[name](nelements, ) float ndarray
Various quality metrics names : min_interior_angle, max_interior_angle, dideal_theta,
max_skew_angle, max_aspect_ratio, area_ratio, taper_ratio, min_edge_length
- valuesThe result is
np.nan
if element type does not define the parameter. For example, CELAS1 doesn’t have an aspect ratio.
- valuesThe result is
Notes
pulled from nastran_io.py
-
pyNastran.bdf.mesh_utils.delete_bad_elements.
get_bad_shells
(model: pyNastran.bdf.bdf.BDF, xyz_cid0, nid_map, min_theta: float = 0.1, max_theta: float = 175.0, max_skew: float = 70.0, max_aspect_ratio: float = 100.0, max_taper_ratio: float = 4.0) → List[int][source]¶ Get the bad shell elements
- Parameters
- modelBDF()
the model object
- xyz_cid0(N, 3) float ndarray
the xyz coordinates in cid=0
- nid_mapdict[nid]index
- nidint
the node id
- indexint
the index of the node id in xyz_cid0
- min_thetafloat; default=0.1
the maximum interior angle (degrees)
- max_thetafloat; default=175.
the maximum interior angle (degrees)
- max_skewfloat; default=70.
the maximum skew angle (degrees)
- max_aspect_ratiofloat; default=100.
the max aspect ratio
- taper_ratiofloat; default=4.0
the taper ratio; applies to CQUAD4s only
- Returns
- eids_failedList[int]
element ids that fail the criteria
- shells with a edge length=0.0 are automatically added
-
pyNastran.bdf.mesh_utils.delete_bad_elements.
get_min_max_theta
(faces, all_node_ids, nid_map, xyz_cid0)[source]¶ get the min/max thetas for CTETRA, CPENTA, CHEXA, CPYRAM