[S0011] Apply heat transfer boundary condition to the part surfaces

 

Heat transfer boundary conditions are set to define heat transfer from part surfaces. The basic principle is how effectively heat is transferred using the heat transfer coefficient or thermal resistance, but accurate measurement is generally required to obtain these physical properties. For this reason, several presets based on model equations are provided for cooling and part contact, which are commonly used mainly in rotating machines, with a wide range of configurable patterns and parameters.
This script sets heat transfer boundary condition assuming spray cooling for part surfaces which is pre-created as set.

Preconditions

  • One or more 3D thermal analysis studies have been created.
    This script is run for the active study in the project tree.
  • The target surfaces have been created as a set, and the set title is known.
  • The units of the setting values ​​follow the unit system set for the model.

Script Function

  • Set the heat transfer boundary condition for the face set “Heat Transfer Boundary.”
  • Set the reference temperature to a constant value of 11.2.
  • Set the setting type to “Cooling (Splay)” by thermal resistance.
  • Set the spray parameters to flow velocity, 0.1, 0.55 nozzle diameter, 1.2 correction coefficient, and water coolant.
# Copyright (c) 2026 JSOL CORPORATION
#
# This script is released under the MIT License.
# See the full license text at:
# https://www.jmag-international.com/scriptlibrary/jmag_script_library_mit/


def createConditionOfHeatTransfer(study, sel):
    """Create a heat transfer boundary condition for the set of component surfaces passed as arguments."""
    htCond = study.CreateCondition(u"HeatTransfer", u"ht")
    htCond.SetValue(u"RefTemperatureType", "Constant")
    htCond.SetValue(u"Temperature", 11.2)
    htCond.SetValue(u"SettingType", "ThermalResistance")
    htCond.SetValue(u"ResistanceType", "CoolingSpray")
    htCond.SetValue(u"InputFlowType", "FlowVelocity")
    htCond.SetValue(u"ThermalCorrection", 1.2)
    htCond.SetValue(u"FlowVelocity", 0.1)
    htCond.SetValue(u"NozzleDiameter", 0.55)
    htCond.SetValue(u"CoolantType", "Water")
    htCond.ClearParts()
    htCond.AddSet(set, 0)

app = designer.GetApplication()
model = app.GetCurrentModel()
set = model.GetSetList().GetSet(u"Heat Transfer Boundary")
study = app.GetCurrentStudy()
createConditionOfHeatTransfer(study, set)

Download Python source code

How to use script file

Use the JMAG Script Library after reading and agreeing to the following terms of use.

Search Filter

  • All Categories

An engineer's diary
JMAG-Express Online