add_thermal_profiles#
- Lifecycle.add_thermal_profiles(project: str, thermal_profiles: list[tuple[str, str, str, str, str, list[tuple[str, str, float, float]]]]) int #
Add thermal profiles to a life cycle phase.
Available Since: 2023R2
- Parameters:
project (str) – Name of the Sherlock project.
thermal_profiles (list[tuple[str, str, str, str, str, list[tuple[str, str, float, float]]]]) –
Thermal profiles consisting of these properties:
- phase_name: str
Name of the life cycle phase to add the thermal profile to.
- event_name: str
Name of the thermal event.
- profile_name: str
Name of the thermal profile.
- time_units: str
Time units. Options are
"ms"
,"sec"
,"min"
,"hr"
,"day"
, and"year"
.
- temp_units: str
Temperature units. Options are
"C"
,"F"
, and"K"
.
- thermal_profile_entries: list[tuple[str, str, float, float]]
Thermal profile entries consisting of these properties:
- step: str
Name of the thermal step.
- type: str
Type of the thermal step. Options are
"HOLD"
and"RAMP"
.
- time: float
Duration of the thermal step expressed in time units.
- temperature: float
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), ], )] )