Base classes for SEs (structmanager.ses.ses)¶
-
class
structmanager.ses.ses.SE(name, eids, model)[source]¶ Bases:
objectStructural Element
Attributes
name str Name. eids list A list containing the elements belonging to this structural element. model ModelThe model containing this SE. all_constraints list A list of strings with all implemented constriants. For each constraint ‘c’ there must be a method self.constrain_cthat will properly handle the creation of each optimization card.constraints dict Only the constraints that should be considered. The dictionary should have the format:
constraints{'vonMises': 1, 'buckling': 3}where
1and3indicate the design constraint set ids for which each respective constraint should be applied.Methods
add_constraint(dcid, dresp, lb, ub)Add a DCONSTR entry to the SE and the optmodel add_deqatn(deqatn)Add a DEQATN entry to the SE and the optmodel add_dresp(dresp)Add a DRESP(123) entry to the SE and the optmodel add_dtable(key, value)Add a DTABLE entry to the SE and the optmodel add_dvar(dvar)Add a DESVAR entry to the SE and the optmodel add_dvprel(dvprel)Add a DVPREL(12) entry to the SE and the optmodel get_central_element()Return the element closest to the SE center of gravity -
add_constraint(dcid, dresp, lb, ub)[source]¶ Add a DCONSTR entry to the SE and the optmodel
Parameters: dcid : int
Design constraint set id.
dresp :
DRESP1,DRESP2orDRESP3The response object.
lb : float or None
Lower boundary for the constraint.
ub : float or None
Upper boundary for the constraint.
-
add_deqatn(deqatn)[source]¶ Add a DEQATN entry to the SE and the optmodel
Parameters: deqatn :
DEQATNThe equation to be added.
-
add_dresp(dresp)[source]¶ Add a DRESP(123) entry to the SE and the optmodel
Parameters: dresp :
DRESP1,DRESP2orDRESP3The response object.
-
add_dtable(key, value)[source]¶ Add a DTABLE entry to the SE and the optmodel
Parameters: key : str
The DTABLE unique key. The algorithm automatically attempts to add a sufix to prevent repeated keys.
value : float
The value corresponding to
key.Returns: key : str
The resulting key.
-
add_dvar(dvar)[source]¶ Add a DESVAR entry to the SE and the optmodel
Parameters: dvar :
DESVARDesign variable object.
-
-
class
structmanager.ses.ses.SE1D(name, eids, model)[source]¶ Bases:
structmanager.ses.ses.SEBase class for all 1D Structural Elements
Methods
add_constraint(dcid, dresp, lb, ub)Add a DCONSTR entry to the SE and the optmodel add_deqatn(deqatn)Add a DEQATN entry to the SE and the optmodel add_dresp(dresp)Add a DRESP(123) entry to the SE and the optmodel add_dtable(key, value)Add a DTABLE entry to the SE and the optmodel add_dvar(dvar)Add a DESVAR entry to the SE and the optmodel add_dvprel(dvprel)Add a DVPREL(12) entry to the SE and the optmodel constrain_stress(Fy[, average])Add a stress constrain constrain_stress_compression(Fcy[, average])Add a compressive stress constraint constrain_stress_tension(Fty[, average])Add a tension stress constraint get_central_element()Return the element closest to the SE center of gravity read_forces()-
constrain_stress(Fy, average=False)[source]¶ Add a stress constrain
Parameters: Fy : float
The stress threshold to be used in the constraint. The sign of
Fywill determine whether this threshold if for tension or compression.average : bool, optional
If False the central element is chosen, otherwise ... #TODO not implemented
-
-
class
structmanager.ses.ses.SE2D(name, eids, model)[source]¶ Bases:
structmanager.ses.ses.SEBase class for all 2D Structural Elements
Methods
add_constraint(dcid, dresp, lb, ub)Add a DCONSTR entry to the SE and the optmodel add_deqatn(deqatn)Add a DEQATN entry to the SE and the optmodel add_dresp(dresp)Add a DRESP(123) entry to the SE and the optmodel add_dtable(key, value)Add a DTABLE entry to the SE and the optmodel add_dvar(dvar)Add a DESVAR entry to the SE and the optmodel add_dvprel(dvprel)Add a DVPREL(12) entry to the SE and the optmodel get_central_element()Return the element closest to the SE center of gravity read_forces()
-
class
structmanager.ses.ses.ShearClipFrame(name, eids, model=None)[source]¶ Bases:
structmanager.ses.ses.SE2DShear Clip Attachment to Frame
Methods
add_constraint(dcid, dresp, lb, ub)Add a DCONSTR entry to the SE and the optmodel add_deqatn(deqatn)Add a DEQATN entry to the SE and the optmodel add_dresp(dresp)Add a DRESP(123) entry to the SE and the optmodel add_dtable(key, value)Add a DTABLE entry to the SE and the optmodel add_dvar(dvar)Add a DESVAR entry to the SE and the optmodel add_dvprel(dvprel)Add a DVPREL(12) entry to the SE and the optmodel get_central_element()Return the element closest to the SE center of gravity read_forces()
-
class
structmanager.ses.ses.ShearClipSkin(name, eids, model=None)[source]¶ Bases:
structmanager.ses.ses.SE1DShear Clip Attachment to Skin
Methods
add_constraint(dcid, dresp, lb, ub)Add a DCONSTR entry to the SE and the optmodel add_deqatn(deqatn)Add a DEQATN entry to the SE and the optmodel add_dresp(dresp)Add a DRESP(123) entry to the SE and the optmodel add_dtable(key, value)Add a DTABLE entry to the SE and the optmodel add_dvar(dvar)Add a DESVAR entry to the SE and the optmodel add_dvprel(dvprel)Add a DVPREL(12) entry to the SE and the optmodel constrain_stress(Fy[, average])Add a stress constrain constrain_stress_compression(Fcy[, average])Add a compressive stress constraint constrain_stress_tension(Fty[, average])Add a tension stress constraint get_central_element()Return the element closest to the SE center of gravity read_forces()