StructProblem

class baseclasses.StructProblem(name, loadFile=None, loadFactor=None, evalFuncs=None)[source]

The main purpose of this class is to represent all relevant information for a structural analysis. This will include information defining the loading condition as well as various other pieces of information.

Parameters:
namestr

Name of this structural problem

loadFilestr

Filename of the (static) external load file. Should be generated from either ADflow or Tripan.

Examples

>>> sp = StructProblem('lc0', loadFile='loads.txt')
addDV(key, value=None, lower=None, upper=None, scale=1.0, name=None)[source]

No design variable functions yet.

Parameters:
keystr

Name of variable to add. See above for possible ones

valuefloat. Default is None

Initial value for variable. If not given, current value of the attribute will be used.

lowerfloat. Default is None

Optimization lower bound. Default is unbonded.

upperfloat. Default is None

Optimization upper bound. Default is unbounded.

scalefloat. Default is 1.0

Set scaling parameter for the optimization to use.

namestr. Default is None

Overwrite the default auto-generated name of this variable.

addVariablesPyOpt(optProb)[source]

Add the current set of variables to the optProb object.

Parameters:
optProbpyOpt_optimization class

Optimization problem definition to which variables are added

evalFunctions(funcs, evalFuncs, ignoreMissing=False)[source]

No current functions

Parameters:
funcsdict

Dictionary into which the functions are save

evalFuncsiterable object containing strings

The functions that the user wants evaluated

evalFunctionsSens(funcsSens, evalFuncs, ignoreMissing=False)[source]

Evaluate the sensitivity of the desired functions

Parameters:
funcsSensdict

Dictionary into which the function sensitivities are saved

evalFuncsiterable object containing strings

The functions that the user wants evaluated

setDesignVars(x)[source]

Set the variables in the x-dict for this object.

Parameters:
xdict

Dictionary of variables which may or may not contain the design variable names this object needs