MPhys DVGeo Component

class pygeo.mphys.mphys_dvgeo.OM_DVGEOCOMP(*args, **kwargs)[source]
initialize()[source]

Set up a geometry component with either 1 DVGeo or multiple DVGeos.

A single DVGeo are initialized by specifying its file and type and, optionally, additional options. Available options can be found in the specific DVGeometry class.

Multiple DVGeos are initialized in a dictionary of these values and must have a unique name. The format is:

>>> DVGeoInfo = {
>>>     "name1": {"file": file1, "type": type1, "options": options1}
>>>     "name2": {"file": file2, "type": type2, "options": options2}
>>> }

The two setup methods cannot currently be used together.

nom_addGlobalDV(dvName, value, func, childName=None, isComposite=False, DVGeoName=None)[source]

Add a global design variable to the DVGeo object. This is a wrapper for the DVGeo.addGlobalDV method.

Parameters:
dvNamestr

See addGlobalDV

valuefloat, or iterable list of floats

See addGlobalDV

funcpython function

See addGlobalDV

childNamestr, optional

Name of the child FFD, if this DV is for a child FFD.

isCompositebool, optional

Whether this DV is to be included in the composite DVs, by default False

DVGeoNamestring, optional

The name of the DVGeo to return, necessary if there are multiple DVGeo objects

Raises:
RuntimeError

Raised if the underlying DVGeo object is not an FFD

nom_addLocalSectionDV(dvName, secIndex, childName=None, axis=1, pointSelect=None, volList=None, orient0=None, orient2='svd', config=None, DVGeoName=None)[source]

Add one or more section local design variables to the DVGeometry object Wrapper for addLocalSectionDV Input parameters are identical to those in wrapped function unless otherwise specified

Parameters:
dvNamestr

Name to give this design variable

secIndexchar or list of chars

See wrapped

childNamestr, optional

Name of the child FFD, if this DV is for a child FFD.

axisint, optional

See wrapped

pointSelectpointSelect object, optional

See wrapped

volListlist, optional

See wrapped

orient0orientation, optional

See wrapped

orient2str, optional

See wrapped

configstr or list, optional

See wrapped

DVGeoNamestring, optional

The name of the DVGeo to return, necessary if there are multiple DVGeo objects

Returns:
nVal, int

number of local section DVs

Raises:
RuntimeError

Raised if the underlying DVGeo parameterization is not FFD-based

nom_addProjectedAreaConstraint(name, axis, scaled=True, surface_name='default', DVGeoName='default', compNames=None)[source]

Add a DVCon projected area constraint to the problem Wrapper for addProjectedAreaConstraint Input parameters are identical to those in wrapped function unless otherwise specified

Parameters:
name

See wrapped

axis

See wrapped

scaledbool, optional

See wrapped

surface_namestr, optional

See wrapped

DVGeoNamestr, optional

See wrapped

compNameslist, optional

See wrapped

nom_addShapeFunctionDV(dvName, shapes, childName=None, config=None, DVGeoName=None)[source]

Add one or more local shape function design variables to the DVGeometry object Wrapper for addShapeFunctionDV Input parameters are identical to those in wrapped function unless otherwise specified

Parameters:
dvNamestr

Name to give this design variable

shapeslist of dictionaries, or a single dictionary

See wrapped

childNamestr, optional

Name of the child FFD, if this DV is for a child FFD.

configstr or list, optional

See wrapped

DVGeoNamestring, optional

The name of the DVGeo to return, necessary if there are multiple DVGeo objects

Returns:
Nint

The number of design variables added.

Raises:
RuntimeError

Raised if the underlying DVGeo parameterization is not FFD-based

nom_addSurfaceAreaConstraint(name, scaled=True, surfaceName='default', DVGeoName='default', compNames=None)[source]

Add a DVCon surface area constraint to the problem Wrapper for addSurfaceAreaConstraint Input parameters are identical to those in wrapped function unless otherwise specified

Parameters:
name

See wrapped

scaledbool, optional

See wrapped

surfaceNamestr, optional

See wrapped

DVGeoNamestr, optional

See wrapped

compNameslist, optional

See wrapped

nom_addVolumeConstraint(name, leList, teList, nSpan=10, nChord=10, scaled=True, surfaceName='default', DVGeoName='default', compNames=None)[source]

Add a DVCon volume constraint to the problem Wrapper for addVolumeConstraint Input parameters are identical to those in wrapped function unless otherwise specified

Parameters:
name

See wrapped

leList

See wrapped

teList

See wrapped

nSpanint, optional

See wrapped

nChordint, optional

See wrapped

scaledbool, optional

See wrapped

surfaceNamestr, optional

See wrapped

DVGeoNamestr, optional

See wrapped

compNameslist, optional

See wrapped

nom_getDVCon()[source]

Gets the DVConstraints object held in the geometry component so DVCon methods can be called directly on it

Returns:
self.DVCon, DVConstraints object

DVConstraints object held by this geometry component

nom_getDVGeo(childName=None, DVGeoName=None)[source]

Gets the DVGeometry object held in the geometry component so DVGeo methods can be called directly on it

Parameters:
DVGeoNamestring, optional

The name of the DVGeo to return, necessary if there are multiple DVGeo objects

childNamestr, optional

Name of the child FFD, if you want a child DVGeo returned

Returns:
DVGeometry object

DVGeometry object held by this geometry component