bdf Package¶
This is the pyNastran.bdf.rst file.
bdf Module¶
bdf_Methods Module¶
bdf_replacer Module¶
caseControlDeck Module¶
deprecated Module¶
fieldWriter Module¶
field_writer_8 Module¶
field_writer_16 Module¶
field_writer_double Module¶
Defines functions for double precision 16 character field writing.
- pyNastran.bdf.field_writer_double.print_card_double(fields, wipe_fields=True)[source]¶
Prints a nastran-style card with 16-character width fields.
Parameters: - fields – all the fields in the BDF card (no trailing Nones)
- wipe_fields – some cards (e.g. PBEAM) have ending fields that need to be there, others cannot have them.
Note
An internal field value of None or ‘’ will be treated as a blank field
Note
A large field format follows the 8-16-16-16-16-8 = 80 format where the first 8 is the card name or blank (continuation). The last 8-character field indicates an optional continuation, but because it’s a left-justified unneccessary field, print_card doesnt use it.
>>> fields = ['DUMMY', 1, 2, 3, None, 4, 5, 6, 7, 8.] >>> print_card_double(fields) DUMMY* 1 2 3 * 4 5 6 7 * 8.0000000000D+00 *
subcase Module¶
Subcase creation/extraction class
- class pyNastran.bdf.subcase.Subcase(id=0)[source]¶
Bases: object
Subcase creation/extraction class
- cross_reference(model)[source]¶
Method crossReference:
Parameters: - self – the Subcase object
- model – the BDF object
Note
this is not integrated and probably never will be as it’s not really that necessary. it’s only really useful when running an analysis.
- finish_subcase()[source]¶
Removes the subcase parameter from the subcase to avoid printing it in a funny spot
Parameters: self – the Subcase object
- get_analysis_code(sol)[source]¶
Maps the solution number to the OP2 analysis code.
- 8 - post-buckling (maybe 7 depending on NLPARM???)
- # not important
- 3/4 - differential stiffness (obsolete)
- 11 - old geometric nonlinear statics
- 12 - contran (???)
Todo
verify
- get_device_code(options, value)[source]¶
Gets the device code of a given set of options and value
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- get_format_code(options, value)[source]¶
Gets the format code that will be used by the op2 based on the options.
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
Todo
not done...only supports REAL, IMAG, PHASE, not RANDOM
- get_parameter(param_name)[source]¶
Gets the [value, options] for a subcase.
Parameters: - self – the Subcase object
- param_name – the case control parameter to check for
model = BDF() model.read_bdf(bdf_filename) case_control = model.caseControlDeck subcase1 = case_control.subcases[1] value, options = subcase1['LOAD']
- get_sort_code(options, value)[source]¶
Gets the sort code of a given set of options and value
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- get_stress_code(key, options, value)[source]¶
Method get_stress_code:
Note
the individual element must take the stress_code and reduce
it to what the element can return. For example, for an isotropic CQUAD4 the fiber field doesnt mean anything.
BAR - no von mises/fiber ISOTROPIC - no fiber
Todo
how does the MATERIAL bit get turned on? I’m assuming it’s element dependent...
- get_table_code(sol, table_name, options)[source]¶
Gets the table code of a given parameter. For example, the DISPLACMENT(PLOT,POST)=ALL makes an OUGV1 table and stores the displacement. This has an OP2 table code of 1, unless you’re running a modal solution, in which case it makes an OUGV1 table of eigenvectors and has a table code of 7.
Parameters: - self – the Subcase object
- options – the options for a parameter
- value – the value of the parameter
- print_param(key, param)[source]¶
Prints a single entry of the a subcase from the global or local subcase list.
Parameters: self – the Subcase object
- solCodeMap = {64: 106, 1: 101, 66: 106, 68: 106, 76: 101, 144: 101, 21: 101, 24: 101, 26: 101, 99: 129, 187: 101, 61: 101}¶
utils Module¶
write_path Module¶
- Defines following useful methods:
- write_include
- pyNastran.bdf.write_path._split_path(abspath)[source]¶
Takes a path and splits it into the various components.
This is a helper method for write_include
- pyNastran.bdf.write_path.write_include(filename, is_windows=True)[source]¶
Writes a bdf INCLUDE file line given an imported filename.
Parameters: - filename – the filename to write
- is_windows – Windows has a special format for writing INCLUDE files so the format for a BDF that will run on Linux and Windows is different. We could check the platform, but since you might need to change platforms, it’s an option (default=True)
For a model that will run on Linux:
..code-blocK:: python
fname = r’/opt/NASA/test1/test2/test3/test4/formats/pynastran_v0.6/pyNastran/bdf/model.inc’ write_include(fname, is_windows=False)We want:
..code-blocK:: python
- INCLUDE /opt/NASA/test1/test2/test3/test4/formats/pynastran_v0.6/
- pyNastran/bdf/model.inc
- bdfInterface Package
- cards Package
- aero Module
- baseCard Module
- bdf_sets Module
- bdf_tables Module
- constraints Module
- contact Module
- coordinateSystems Module
- dmig Module
- dynamic Module
- materials Module
- material_deps Module
- methods Module
- nodes Module
- optimization Module
- params Module
- utils Module
- test Package