subcase
Module¶
Subcase creation/extraction class
-
class
pyNastran.bdf.subcase.
Subcase
(id=0)[source]¶ Bases:
object
Subcase creation/extraction class
-
allowed_param_types
= ['SET-type', 'CSV-type', 'SUBCASE-type', 'KEY-type', 'STRESS-type', 'STRING-type', 'OBJ-type']¶
-
finish_subcase
(self)[source]¶ Removes the subcase parameter from the subcase to avoid printing it in a funny spot
-
get_parameter
(self, param_name, msg='', obj=False)[source]¶ Gets the [value, options] for a subcase.
Parameters: - param_name : str
the case control parameters to get
- obj : bool; default=False
should the object be returned
Returns: - value : varies
the value of the parameter ‘ALL’ in STRESS(PLOT,PRINT) = ALL
- options : List[varies]
the values in parentheses [‘PLOT’, ‘PRINT’] in STRESS(PLOT,PRINT) = ALL
-
has_parameter
(self, *param_names)[source]¶ Checks to see if one or more parameter names are in the subcase.
Parameters: - param_names : str; List[str]
the case control parameters to check for
Returns: - exists : List[bool]
do the parameters exist
-
print_param
(self, key, param)[source]¶ Prints a single entry of the a subcase from the global or local subcase list.
-
solCodeMap
= {1: 101, 21: 101, 24: 101, 26: 101, 61: 101, 64: 106, 66: 106, 68: 106, 76: 101, 99: 129, 144: 101, 187: 101}¶
-
subcase_sorted
(self, lst)[source]¶ Does a “smart” sort on the keys such that SET cards increment in numerical order. Also puts the sets first.
Parameters: - lst : List[str]
the list of subcase list objects (list_a)
Returns: - list_b : List[str]
the sorted version of list_a
-
-
pyNastran.bdf.subcase.
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
-
pyNastran.bdf.subcase.
get_device_code
(options, unused_value)[source]¶ Gets the device code of a given set of options and value
Parameters: - options : list[int/float/str]
the options for a parameter
- unused_value : int/float/str
the value of the parameter
Returns: - device_code : int
The OP2 device code
0 - No output 1 - PRINT 2 - PLOT 3 - PRINT, PLOT 4 - PUNCH 5 - PRINT, PUNCH 6 - PRINT, PLOT, PUNCH
-
pyNastran.bdf.subcase.
get_format_code
(options, unused_value)[source]¶ Gets the format code that will be used by the op2 based on the options.
Parameters: - options : list[int/float/str]
the options for a parameter
- unused_value : int/float/str
the value of the parameter
- .. todo:: not done…only supports REAL, IMAG, PHASE, not RANDOM
-
pyNastran.bdf.subcase.
get_sort_code
(options, unused_value)[source]¶ Gets the sort code of a given set of options and value
Parameters: - options : List[int/str]
the options for a parameter
- unused_value : int; str
the value of the parameter
-
pyNastran.bdf.subcase.
get_stress_code
(key, options, unused_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…
-
pyNastran.bdf.subcase.
get_table_code
(sol, table_name, unused_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: - options : list[int/float/str]
the options for a parameter
- value : int/float/str
the value of the parameter
Returns: - table_code : int
the OP2 table_code