SOL200 optimization model (structmanager.sol200.sol200)¶
-
class
structmanager.sol200.sol200.SOL200[source]¶ Bases:
objectSOL200 optimization model
This class corresponds to an optimization model.
Attribute Description dobjDESOBJobjectdvprelsdictofDVPREL1andDVPREL2objectsdeqatnsdictofDEQATNobjectsdtableDTABLEthat will be created based on thedtablesdictionarydtablesdictthat will be used to build a unique DTABLEdtable_prefixesdictcarries IDs to prevent repeated DTABLE constants.drespsdictofDRESP1,DRESP2orDRESP3objectsgroupssetcontaining the externl subroutines that are used in the current optimization modeldconstrsdictofDCONSTRobjectsdvarsdictofDVARobjectsdvar_codesdictclassifying theDVARobjects by- their unique codes
dlinksdictofDLINKobjectsnewpropsdictwith different NASTRAN cards, seereset_newprops()nodal_displdictwith the nodal displacements constraints as detailed innodal_displ_from_excel()loads_listlistcontaining the load cases’ idsnum_cyclesintindicating the number of design cyclesoutputdirstrpath to the output directorysol200filepathstrpath to SOL200’s output filesol200filefilehandler 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.