Temperature (hwx.inspire)#

class Temperature(ents, initTemp, finalTemp, location, **kwds)#

Bases: BoundaryCondition

Creates temperature load on supplied parts.

Use the temperature load to simulate the effects of temperature changes on your model.

Example

from hwx import inspire

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

# create temperature applied to the block
temperature = inspire.Temperature(
  ents=[block], initTemp=100, finalTemp=200,
  location=block.position.origin, loadCase='current'
)

print("Some Temperature values:")
print("Initial temperature:", temperature.GetInitialTemperature())
print("Final temperature", temperature.GetFinalTemperature())

# modify some temperature attributes
temperature.SetInitialTemperature(50, "K")
temperature.SetFinalTemperature(250, "K")

inspire.orientView(direction="bottom")
inspire.fitView()

print("")
print("Temperature values after modification:")
print("Initial temperature:", temperature.GetInitialTemperature())
print("Final temperature", temperature.GetFinalTemperature())