GLoad (hwx.inspire)#

class GLoad(location, direction, magnitude=None, **kwds)#

Bases: BoundaryCondition

BoundaryCondition object storing g-load direction and magnitude.

Absence of a GLoad object in a LoadCase signifies no g-load. GLoads are used to simulate a model undergoing acceleration, which imparts a force on all of the parts in the model.

Attribute Table#

Name

Type

magnitude

Double

Example

from hwx import inspire

model = inspire.newModel()
block = model.createSolidBlock()
block.SetTransparency(0.9)

# apply gload
gLoad = inspire.GLoad((0.5, 0.0, 0.5), (0.0, 1.0, 0.0), loadCase='current')
gLoad.SetMagnitude(10.0, "MKS")

print("Some GLoad values:")
print("Location:", gLoad.location)
print("Direction:", gLoad.direction)
print("Magnitude:", gLoad.GetMagnitude())

# modify some pressure attributes
gLoad.location = block.location
gLoad.direction = (0.0, 0.0, 1.0)
gLoad.SetMagnitude(50.0, "MKS")
inspire.fitView()

print("")
print("GLoad values after modification:")
print("Location:", gLoad.location)
print("Direction:", gLoad.direction)
print("Magnitude:", gLoad.GetMagnitude())
property magnitude#

The magnitude of the GLoad.