write_mesh_files Module

Inheritance diagram of pyNastran.bdf.bdf_interface.write_mesh_file
This file defines:
  • WriteMesh
class pyNastran.bdf.bdf_interface.write_mesh_file.WriteMeshs[source]

Bases: pyNastran.bdf.bdf_interface.write_mesh.WriteMesh

Defines methods for writing cards

Major methods:
  • model.write_bdf(…)
  • model.echo_bdf(…)
  • model.auto_reject_bdf(…)

creates methods for writing cards

_write_aero_control_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the aero control surface cards

_write_aero_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the aero cards

_write_bdf_includes(self, out_filenames, bdf_files, relative_dirname=None, is_windows=True)[source]

Writes the INCLUDE files

Parameters:
out_filenames : dict[fname]

fname_in - the nominal bdf that was read fname_out - the bdf that will be written

relative_dirname : str; default=None -> os.curdir

A relative path to reference INCLUDEs. ‘’ : relative to the main bdf None : use the current directory path : absolute path

is_windows : bool; default=None
True/False : Windows has a special format for writing INCLUDE

files, so the format for a BDF that will run on Linux and Windows is different.

None : Check the platform

_write_common_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Write the common outputs so none get missed…

Parameters:
bdf_file : file

the file object

size : int (default=8)

the field width

is_double : bool (default=False)

is this double precision

_write_constraints_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the constraint cards sorted by ID

_write_contact_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the contact cards sorted by ID

_write_coords_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the coordinate cards in a sorted order

_write_dloads_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the dload cards sorted by ID

_write_dmigs_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the DMIG cards

Parameters:
size : int

large field (16) or small field (8)

_write_dynamic_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the dynamic cards sorted by ID

_write_elements_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the elements in a sorted order

_write_flutter_file(self, bdf_files, size=8, is_double=False, write_aero_in_flutter=True, is_long_ids=None)[source]

Writes the flutter cards

_write_grids_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the GRID-type cards

_write_gust_file(self, bdf_files, size=8, is_double=False, write_aero_in_gust=True, is_long_ids=None)[source]

Writes the gust cards

_write_loads_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the load cards sorted by ID

_write_masses_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the mass cards sorted by ID

_write_materials_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the materials in a sorted order

_write_nodes_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the NODE-type cards

_write_nsm_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the nsm in a sorted order

_write_optimization_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the optimization cards sorted by ID

_write_params_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the PARAM cards

_write_properties_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the properties in a sorted order

_write_rejects_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the rejected (processed) cards and the rejected unprocessed cardlines

_write_rigid_elements_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the rigid elements in a sorted order

_write_sets_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the SETx cards sorted by ID

_write_static_aero_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the static aero cards

_write_superelements_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the Superelement cards

Parameters:
size : int

large field (16) or small field (8)

_write_tables_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the TABLEx cards sorted by ID

_write_thermal_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the thermal cards

_write_thermal_materials_file(self, bdf_files, size=8, is_double=False, is_long_ids=None)[source]

Writes the thermal materials in a sorted order

write_bdfs(self, out_filenames, relative_dirname=None, encoding=None, size=8, is_double=False, enddata=None, close=True, is_windows=None)[source]

Writes the BDF.

Parameters:
out_filename : varies; default=None

str - the name to call the output bdf file - a file object StringIO() - a StringIO object None - pops a dialog

relative_dirname : str; default=None -> os.curdir

A relative path to reference INCLUDEs. ‘’ : relative to the main bdf None : use the current directory path : absolute path

encoding : str; default=None -> system specified encoding

the unicode encoding latin1, and utf8 are generally good options

size : int; {8, 16}

the field size

is_double : bool; default=False

False : small field True : large field

enddata : bool; default=None

bool - enable/disable writing ENDDATA None - depends on input BDF

close : bool; default=True

should the output file be closed

is_windows : bool; default=None
True/False : Windows has a special format for writing INCLUDE

files, so the format for a BDF that will run on Linux and Windows is different.

None : Check the platform

pyNastran.bdf.bdf_interface.write_mesh_file._get_ifiles_dict(cards_dict)[source]

gets the ids for a dictionary by file number

pyNastran.bdf.bdf_interface.write_mesh_file._get_ifiles_dict_list(cards)[source]

gets the ids for a dictionary of lists by file number

pyNastran.bdf.bdf_interface.write_mesh_file._map_filenames_to_ifile_filname_dict(out_filenames, active_filenames)[source]

Converts a old_filename->new_filename dict to a ifile->new_filename dict.

pyNastran.bdf.bdf_interface.write_mesh_file._open_bdf_files(ifile_out_filenames, active_filenames, encoding)[source]

opens N bdf files

pyNastran.bdf.bdf_interface.write_mesh_file._write_bdf_dict_cards(bdf_file, cards, size, is_double, is_long_ids)[source]

writes a dictionary

pyNastran.bdf.bdf_interface.write_mesh_file.write_bdf_dict_ids(bdf_file, cards, ids, size, is_double, is_long_ids)[source]

writes a dictionary by ifile

pyNastran.bdf.bdf_interface.write_mesh_file.write_bdfs_dict(bdf_files, cards, size, is_double, is_long_ids)[source]

writes a dictionary by ifile

pyNastran.bdf.bdf_interface.write_mesh_file.write_bdfs_dict_list(bdf_files, cards, size, is_double, is_long_ids)[source]

writes a dictionary of lists by ifile

pyNastran.bdf.bdf_interface.write_mesh_file.write_bdfs_list(bdf_files, cards, size, is_double, is_long_ids)[source]

writes a list by ifile

pyNastran.bdf.bdf_interface.write_mesh_file.write_xpoints_file(bdf_files, cardtype, points, comment='')[source]

writes SPOINTs/EPOINTs