add_thermal_profiles#
- Lifecycle.add_thermal_profiles(project, thermal_profiles)#
Add thermal profiles to a life cycle phase.
Available Since: 2023R2
- Parameters:
project (str) – Name of the Sherlock project.
thermal_profiles (list) –
List of thermal profiles consisting of these properties:
- phase_namestr
Name of the life cycle phase to add the thermal profile to.
- event_namestr
Name of the thermal event.
- profile_namestr
Name of the thermal profile.
- time_unitsstr
Time units. Options are
"ms"
,"sec"
,"min"
,"hr"
,"day"
, and"year"
.
- temp_unitsstr
Temperature units. Options are
"C"
,"F"
, and"K"
.
- thermal_profile_entrieslist
List of thermal profile entries consisting of these properties:
- stepstr
Name of the thermal step.
- typestr
Type of the thermal step. Options are
"HOLD"
and"RAMP"
.
- timefloat
Duration of the thermal step expressed in time units.
- temperaturefloat
Temperature of the step expressed in temperature units.
- Returns:
Status code of the response. 0 for success.
- Return type:
int
Examples
>>> from ansys.sherlock.core.launcher import launch_sherlock >>> sherlock = launch_sherlock() >>> sherlock.project.import_odb_archive( "ODB++ Tutorial.tgz", True, True, True, True, project="Test", ) >>> sherlock.lifecycle.create_life_phase( "Test", "Example", 1.5, "year", 4.0, "COUNT", ) >>> sherlock.lifecycle.add_thermal_event( "Test", "Example", "Event1", 4.0, "PER YEAR", "STORAGE", ) >>> sherlock.lifecycle.add_thermal_profiles( "Test", [( "Example", "Event1", "Profile1", "sec", "F", [ ("Steady1", "HOLD", 40, 40), ("Steady", "HOLD", 20, 20), ("Back", "RAMP", 20, 40), ], )] )