cleanup_model Module

pyNastran.bdf.mesh_utils.cleanup_model.cleanup_model(model: BDF) None[source]

The model is in in an invalid state (e.g., missing nodes/elements), so trace all the following cards and clean them up (e.g., delete SPCs or PLOAD4s that reference invalid nodes/elements).

Fixes:
  • loads: - LOAD, PLOAD4

  • constraints - SPC

Assumptions:
  • subcase is correct (you can fix it by hand)

  • elements are correct

pyNastran.bdf.mesh_utils.cleanup_model.remove_element_chain(model: BDF, nodes_all: set[int], element_types: str | set[str]) tuple[set[int], list[int]][source]
pyNastran.bdf.mesh_utils.cleanup_model.remove_missing_loads(model: BDF) None[source]
removes loads where:
  • PLOAD2s missing elements - eids=1,THRU,10 with 5-10 missing becomes eids=1,THRU,4 (on separate cards)

pyNastran.bdf.mesh_utils.cleanup_model.remove_mpc_chain(model: BDF, nodes: list[int]) list[int][source]

deletes any MPC connected to a given set of nodes

pyNastran.bdf.mesh_utils.cleanup_model.remove_rbe_chain(model: BDF, nodes: list[int]) tuple[set[int], list[int]][source]

deletes any RBE2, RBE3, RBAR, etc. connected to a given set of nodes