bdf_equivalence Module

defines:
model = bdf_equivalence_nodes(bdf_filename, bdf_filename_out, tol,
renumber_nodes=False, neq_max=4, xref=True, node_set=None, size=8, is_double=False, remove_collapsed_elements=False, avoid_collapsed_elements=False, crash_on_collapse=False, log=None, debug=True)
pyNastran.bdf.mesh_utils.bdf_equivalence._check_for_referenced_nodes(model, node_set, nids, all_nids, nodes_xyz)[source]

helper function for _eq_nodes_setup

pyNastran.bdf.mesh_utils.bdf_equivalence._eq_nodes_final(nid_pairs, model, tol, node_set=None, debug=False)[source]

apply nodal equivalencing to model

pyNastran.bdf.mesh_utils.bdf_equivalence._eq_nodes_setup_node(model, renumber_nodes=False)[source]

helper function for _eq_nodes_setup

pyNastran.bdf.mesh_utils.bdf_equivalence._eq_nodes_setup_node_set(model, node_set, renumber_nodes=False)[source]

helper function for _eq_nodes_setup

pyNastran.bdf.mesh_utils.bdf_equivalence._get_tree(nodes_xyz, msg='')[source]

gets the kdtree

pyNastran.bdf.mesh_utils.bdf_equivalence._get_xyz_cid0(model, nids)[source]

gets xyz_cid0

pyNastran.bdf.mesh_utils.bdf_equivalence._nodes_xyz_nids_to_nid_pairs(nodes_xyz, nids, tol, log, inew, node_set=None, neq_max=4, debug=False)[source]

helper for equivalencing

pyNastran.bdf.mesh_utils.bdf_equivalence.bdf_equivalence_nodes(bdf_filename, bdf_filename_out, tol, renumber_nodes=False, neq_max=4, xref=True, node_set=None, size=8, is_double=False, remove_collapsed_elements=False, avoid_collapsed_elements=False, crash_on_collapse=False, log=None, debug=True)[source]

Equivalences nodes; keeps the lower node id; creates two nodes with the same

Parameters:
bdf_filename : str / BDF

str : bdf file path BDF : a BDF model that is fully valid (see xref)

bdf_filename_out : str

a bdf_filename to write

tol : float

the spherical tolerance

renumber_nodes : bool

should the nodes be renumbered (default=False)

neq_max : int

the number of “close” points (default=4)

xref : bool

does the model need to be cross_referenced (default=True; only applies to model option)

node_set : List[int] / (n, ) ndarray; default=None

the list/array of nodes to consider (not supported with renumber_nodes=True)

size : int; {8, 16}; default=8

the bdf write precision

is_double : bool; default=False

the field precision to write

remove_collapsed_elements : bool; default=False (unsupported)
True : 1D/2D/3D elements will not be collapsed;

CELASx/CDAMP/MPC/etc. are not considered

False : no elements will be removed

avoid_collapsed_elements : bool; default=False (unsupported)
True : only collapses that don’t break 1D/2D/3D elements will be considered;

CELASx/CDAMP/MPC/etc. are considered

False : element can be collapsed

crash_on_collapse : bool; default=False
stop if nodes have been collapsed

False: blindly move on True: rereads the BDF which catches doubled nodes (temporary);

in the future collapse=True won’t need to double read; an alternative is to do Patran’s method of avoiding collapse)

debug : bool

bdf debugging

log : logger(); default=None

bdf logging

Returns:
model : BDF()

The BDF model corresponding to bdf_filename_out

Warning

I doubt SPOINTs/EPOINTs work correctly ..

Warning

xref not fully implemented (assumes cid=0) ..

Todo

node_set stil does work on the all the nodes in the big kdtree loop, which is very inefficient

Todo

remove_collapsed_elements is not supported ..

Todo

avoid_collapsed_elements is not supported ..