Base classes for SEs (structmanager.ses.ses)

class structmanager.ses.ses.SE(name, eids, model)[source]

Bases: object

Structural Element

Attributes

name str Name.
eids list A list containing the elements belonging to this structural element.
model Model The 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_c that 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 1 and 3 indicate 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, DRESP2 or DRESP3

The 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 : DEQATN

The equation to be added.

add_dresp(dresp)[source]

Add a DRESP(123) entry to the SE and the optmodel

Parameters:

dresp : DRESP1, DRESP2 or DRESP3

The 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 : DESVAR

Design variable object.

add_dvprel(dvprel)[source]

Add a DVPREL(12) entry to the SE and the optmodel

Parameters:

dvprel : DVPREL1 or DVPREL2

Design property-to-variable object.

get_central_element()[source]

Return the element closest to the SE center of gravity

class structmanager.ses.ses.SE1D(name, eids, model)[source]

Bases: structmanager.ses.ses.SE

Base 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 Fy will determine whether this threshold if for tension or compression.

average : bool, optional

If False the central element is chosen, otherwise ... #TODO not implemented

constrain_stress_compression(Fcy, average=False)[source]

Add a compressive stress constraint

Parameters:

Fcy : float

The compression stress threshold to be used in the constraint.

average : bool, optional

If False the central element is chosen, otherwise ... #TODO not implemented

constrain_stress_tension(Fty, average=False)[source]

Add a tension stress constraint

Parameters:

Fty : float

The tension stress threshold to be used in the constraint.

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.SE

Base 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.SE2D

Shear 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.SE1D

Shear 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()