Constants#

This section lists constants that are commonly used in PyAEDT.

Example of constants usage:

from ansys.aedt.core import constants
ipk = Icepak()
# Use of AXIS Constant
cylinder = ipk.modeler.create_cylinder(constants.AXIS.X, [0,0,0],10,3)
# Use of PLANE Constant
ipk.modeler.split(cylinder, constants.PLANE.YZ, sides="Both")
...
ipk.release_desktop()
class ansys.aedt.core.generic.constants.AXIS#

CoordinateSystemAxis Enumerator class.

class ansys.aedt.core.generic.constants.AllowedMarkers(value)#

An enumeration.

class ansys.aedt.core.generic.constants.BasisOrder#

Enumeration-class for HFSS basis order settings.

Warning: the value single has been renamed to Single for consistency. Please update references to single.

class ansys.aedt.core.generic.constants.CATEGORIESQ3D#

Plot Categories for Q2d and Q3d.

class ansys.aedt.core.generic.constants.CROSSSECTION#

CROSSSECTION Enumerator class.

class ansys.aedt.core.generic.constants.CSMODE#

COORDINATE SYSTEM MODE Enumerator class.

class ansys.aedt.core.generic.constants.EnumUnits(value)#

An enumeration.

class ansys.aedt.core.generic.constants.FILLET#

FilletType Enumerator class.

class ansys.aedt.core.generic.constants.FlipChipOrientation#

Chip orientation enumerator class.

class ansys.aedt.core.generic.constants.GLOBALCS#

GlobalCS Enumerator class.

class ansys.aedt.core.generic.constants.GRAVITY#

GravityDirection Enumerator class.

class ansys.aedt.core.generic.constants.INFINITE_SPHERE_TYPE#

INFINITE_SPHERE_TYPE Enumerator class.

class ansys.aedt.core.generic.constants.LineStyle#

Provides trace line style constants.

class ansys.aedt.core.generic.constants.MATRIXOPERATIONSQ2D#

Matrix Reduction types.

class ansys.aedt.core.generic.constants.MATRIXOPERATIONSQ3D#

Matrix Reduction types.

class ansys.aedt.core.generic.constants.NodeType#

Type of node for source creation.

class ansys.aedt.core.generic.constants.PLANE#

CoordinateSystemPlane Enumerator class.

class ansys.aedt.core.generic.constants.SEGMENTTYPE#

CROSSSECTION Enumerator class.

class ansys.aedt.core.generic.constants.SETUPS#

Provides constants for the default setup types.

class ansys.aedt.core.generic.constants.SOLUTIONS#

Provides the names of default solution types.

class Circuit#

Provides Circuit solution types.

class Hfss#

Provides HFSS solution types.

class Icepak#

Provides Icepak solution types.

class Maxwell2d#

Provides Maxwell 2D solution types.

class Maxwell3d#

Provides Maxwell 3D solution types.

class Mechanical#

Provides Mechanical solution types.

class ansys.aedt.core.generic.constants.SWEEPDRAFT#

SweepDraftType Enumerator class.

class ansys.aedt.core.generic.constants.SolverType#

Provides solver type classes.

class ansys.aedt.core.generic.constants.SourceType#

Type of excitation enumerator.

class ansys.aedt.core.generic.constants.SymbolStyle#

Provides symbol style constants.

class ansys.aedt.core.generic.constants.TraceType#

Provides trace type constants.

class ansys.aedt.core.generic.constants.VIEW#

View Enumerator class.

ansys.aedt.core.generic.constants.cel2kel(val, inverse=True)#

Convert a temperature from Celsius to Kelvin.

Parameters:
valfloat

Temperature value in Celsius.

inversebool, optional

The default is True.

Returns:
float

Temperature value converted to Kelvin.

ansys.aedt.core.generic.constants.db10(x, inverse=True)#

Convert db10 to decimal and vice versa.

ansys.aedt.core.generic.constants.db20(x, inverse=True)#

Convert db20 to decimal and vice versa.

ansys.aedt.core.generic.constants.dbm(x, inverse=True)#

Convert W to decimal and vice versa.

ansys.aedt.core.generic.constants.dbw(x, inverse=True)#

Convert W to decimal and vice versa.

ansys.aedt.core.generic.constants.fah2kel(val, inverse=True)#

Convert a temperature from Fahrenheit to Kelvin.

Parameters:
valfloat

Temperature value in Fahrenheit.

inversebool, optional

The default is True.

Returns:
float

Temperature value converted to Kelvin.

ansys.aedt.core.generic.constants.scale_units(scale_to_unit)#

Find the scale_to_unit into main system unit.

Parameters:
scale_to_unitstr

Unit to Scale.

Returns:
float

Return the scaling factor if any.

ansys.aedt.core.generic.constants.unit_converter(values, unit_system='Length', input_units='meter', output_units='mm')#

Convert unit in specified unit system.

Parameters:
valuesfloat, list

Values to convert.

unit_systemstr

Unit system. Default is “Length”.

input_unitsstr

Input units. Default is “meter”.

output_unitsstr

Output units. Default is “mm”.

Returns:
float, list

Converted value.

ansys.aedt.core.generic.constants.unit_system(units)#

Retrieve the name of the unit system associated with a unit string.

Parameters:
unitsstr

Units for retrieving the associated unit system name.

Returns:
str

Key from the AEDT_units when successful. For example, "AngularSpeed".

False when the units specified are not defined in AEDT units.
ansys.aedt.core.generic.constants.validate_enum_class_value(cls, value)#

Check whether the value for the class enumeration-class is valid.

Parameters:
clsclass

Enumeration-style class with integer members in range(0, N) where cls.Invalid equals N-1.

valueint

Value to check.

Returns:
bool

True when the value is valid for the enumeration-class, False otherwise.