SOL200 optimization model (structmanager.sol200.sol200
)¶
-
class
structmanager.sol200.sol200.
SOL200
[source]¶ Bases:
object
SOL200 optimization model
This class corresponds to an optimization model.
Attribute Description dobj
DESOBJ
objectdvprels
dict
ofDVPREL1
andDVPREL2
objectsdeqatns
dict
ofDEQATN
objectsdtable
DTABLE
that will be created based on thedtables
dictionarydtables
dict
that will be used to build a unique DTABLEdtable_prefixes
dict
carries IDs to prevent repeated DTABLE constants.dresps
dict
ofDRESP1
,DRESP2
orDRESP3
objectsgroups
set
containing the externl subroutines that are used in the current optimization modeldconstrs
dict
ofDCONSTR
objectsdvars
dict
ofDVAR
objectsdvar_codes
dict
classifying theDVAR
objects by- their unique codes
dlinks
dict
ofDLINK
objectsnewprops
dict
with different NASTRAN cards, seereset_newprops()
nodal_displ
dict
with the nodal displacements constraints as detailed innodal_displ_from_excel()
loads_list
list
containing the load cases’ idsnum_cycles
int
indicating the number of design cyclesoutputdir
str
path to the output directorysol200filepath
str
path to SOL200’s output filesol200file
file
handler to SOL200’s output fileMethods
constrain_pbar
(dcid, pid, name, rtype, ...)Add constraints to all stress recovery points of a bar property. constrain_pcomp
(dcid, pid, eltype, rtype, names)Add constraints to the bottom and top faces of a pcomp property. constrain_pshell
(dcid, pid, eltype, rtype, names)Add constraints to the bottom and top faces of a shell property. constrain_two_vars
(dcid, var1, var2, maxdiff)Constrain two vars in order to keep a maximum relative difference create_dobj
()Create the design objective. pickle_dump
(path)pickle_load
(path)print_model
()Print the whole model. reset_newprops
()Reset the dictionary newprops
.set_output_file
(path)Define the data related to the output file. -
constrain_pbar
(dcid, pid, name, rtype, eltype, allow_C, allow_T)[source]¶ Add constraints to all stress recovery points of a bar property.
Parameters: dcid : int
Design constraint set identification number.
pid : int
Property id.
name : str or list
The name of the constraint.
rtype : str
The type of response. For bar elements it is usually
'STRESS'
.eltype : str
The section type:
'RECT'
,'CIRCLE'
, etc.allow_C : float
The allowable for compression.
allow_T : float
The allowable for tension.
-
constrain_pcomp
(dcid, pid, eltype, rtype, names, lallow=None, uallow=None)[source]¶ Add constraints to the bottom and top faces of a pcomp property.
Parameters: dcid : int
Design constraint set identification number.
pid : int
Property id.
eltype : str
Element type (‘CQUAD4’, ‘CTRIA3’, etc).
rtype : str
The type of response. For shells it is usually
'STRESS'
.names : str or list of strings
The name of the constraint, as in the quick reference guide, reproduced in module
atd.sol200.output_codes
.lallow : float or None, optional
Lower bound on the response quantity.
uallow : float or None, optional
Upper bound on the response quantity.
-
constrain_pshell
(dcid, pid, eltype, rtype, names, lallow=None, uallow=None)[source]¶ Add constraints to the bottom and top faces of a shell property.
Parameters: dcid : int
Design constraint set identification number.
pid : int
Property id.
eltype : str
Element type (‘CQUAD4’, ‘CTRIA3’, etc).
rtype : str
The type of response. For shells it is usually
'STRESS'
.names : str or list of strings
The name of the constraint, as in the quick reference guide, reproduced in module
atd.sol200.output_codes
.lallow : float or None, optional
Lower bound on the response quantity.
uallow : float or None, optional
Upper bound on the response quantity.
-
constrain_two_vars
(dcid, var1, var2, maxdiff)[source]¶ Constrain two vars in order to keep a maximum relative difference
Parameters: dcid : int
Design constraint set identification number.
var1, var2 : int or str
The variables id (int) or code (str).
maxdiff : float
The maximum relative difference that ‘var1’ and ‘var2’ must respect.
-
reset_newprops
()[source]¶ Reset the dictionary
newprops
.This dictionary contains NASTRAN property cards that should be created along with the optimization model.
The supported cards are those corresponding to the classes defined in
cards_solver
.