    

 ## On this page

  

 

 # Class ThermalAPI

 Last update: 09.03.2026 

<a id="VM_API_Pre_FE_ThermalAPI"></a>

Namespace: [VM.API.Pre.FE](VM.API.Pre.FE.md)  
Assembly: VM.API.Pre.FE.dll

This class implements APIs for BoundaryCondition class.

```csharp
public static class ThermalAPI

```

#### Inheritance

object ← [ThermalAPI](VM.API.Pre.FE.ThermalAPI.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_), [LinkPropertyItemCache.GetLinkedObjects&lt;T&gt;(object, LinkPropertyType)](VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Methods

### <a id="VM_API_Pre_FE_ThermalAPI_CreateConvectionWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_ConvectionCoefficientUnit_ConvectionCoefficient_VM_Managed_DAFUL_Thermal_TemperatureUnit_Temperature_"></a> CreateConvectionWithFunction(SubSystemDocument, Obj, string, Obj?, Obj?, ConvectionCoefficient, Temperature)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "convectionCoefficientFunction", typeof(Function), "ambientTemperatureFunction", typeof(Function) })]
public static Obj CreateConvectionWithFunction(this SubSystemDocument document, Obj convectionComponent, string convectionName = "", Obj? convectionCoefficientFunction = null, Obj? ambientTemperatureFunction = null, ConvectionCoefficientUnit.ConvectionCoefficient convectionCoefficientUnit = ConvectionCoefficient.WPerm2C, TemperatureUnit.Temperature ambientTemperatureUnit = Temperature.C)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the convection.

`convectionComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The convection component

`convectionName` string

The name of the convection. If empty, default name starts with 'Convection\_' will be generated and used.

`convectionCoefficientFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the convection coefficient function.

`ambientTemperatureFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the ambient temperature function.

`convectionCoefficientUnit` [ConvectionCoefficientUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[ConvectionCoefficient](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the convection coefficient.

`ambientTemperatureUnit` [TemperatureUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[Temperature](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the ambient temperature.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'convectionComponent' arguments are empty.

ArgumentException

Will be thrown if 'convectionCoefficientFunction' argument is not empty and type of 'convectionCoefficientFunction' is not .

ArgumentException

Will be thrown if 'ambientTemperatureFunction' argument is not empty and type of 'ambientTemperatureFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateConvectionWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateConvectionWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateConvectionWithUserSubroutine(this SubSystemDocument document, Obj convectionComponent, Obj usub, string convectionName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the convection.

`convectionComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The convection component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`convectionName` string

The name of the convection. If empty, default name starts with 'Convection\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'convectionComponent' arguments are empty.

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatFlowWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_HeatFlowUnit_HeatFlow_"></a> CreateHeatFlowWithFunction(SubSystemDocument, Obj, string, Obj?, HeatFlow)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "heatFlowFunction", typeof(Function) })]
public static Obj CreateHeatFlowWithFunction(this SubSystemDocument document, Obj heatFlowComponent, string heatFlowName = "", Obj? heatFlowFunction = null, HeatFlowUnit.HeatFlow heatFlowUnit = HeatFlow.W)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat flow.

`heatFlowComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat flow component

`heatFlowName` string

The name of the heat flow. If empty, default name starts with 'HeatFlow\_' will be generated and used.

`heatFlowFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the heat flow function.

`heatFlowUnit` [HeatFlowUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[HeatFlow](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the heat flow.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatFlowComponent' arguments are empty.

ArgumentException

Will be thrown if 'heatFlowFunction' argument is not empty and type of 'heatFlowFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatFlowWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateHeatFlowWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateHeatFlowWithUserSubroutine(this SubSystemDocument document, Obj heatFlowComponent, Obj usub, string heatFlowName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat flow.

`heatFlowComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat flow component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`heatFlowName` string

The name of the heat flow. If empty, default name starts with 'HeatFlow\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatFlowComponent' arguments are empty.

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatFluxWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_HeatFluxUnit_HeatFlux_"></a> CreateHeatFluxWithFunction(SubSystemDocument, Obj, string, Obj?, HeatFlux)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "heatFluxFunction", typeof(Function) })]
public static Obj CreateHeatFluxWithFunction(this SubSystemDocument document, Obj heatFluxComponent, string heatFluxName = "", Obj? heatFluxFunction = null, HeatFluxUnit.HeatFlux heatFluxUnit = HeatFlux.WPermm2)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat flux.

`heatFluxComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat flux component

`heatFluxName` string

The name of the heat flux. If empty, default name starts with 'HeatFlux\_' will be generated and used.

`heatFluxFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the heat flux function.

`heatFluxUnit` [HeatFluxUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[HeatFlux](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the heat flux.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatFluxComponent' arguments are empty.

ArgumentException

Will be thrown if 'heatFluxFunction' argument is not empty and type of 'heatFluxFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatFluxWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateHeatFluxWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateHeatFluxWithUserSubroutine(this SubSystemDocument document, Obj heatFluxComponent, Obj usub, string heatFluxName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat flux.

`heatFluxComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat flux component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`heatFluxName` string

The name of the heat flux. If empty, default name starts with 'HeatFlux\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatFluxComponent' arguments are empty.

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatGenerationWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_HeatGenerationUnit_HeatGeneration_"></a> CreateHeatGenerationWithFunction(SubSystemDocument, Obj, string, Obj?, HeatGeneration)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "heatGenerationFunction", typeof(Function) })]
public static Obj CreateHeatGenerationWithFunction(this SubSystemDocument document, Obj heatGenerationComponent, string heatGenerationName = "", Obj? heatGenerationFunction = null, HeatGenerationUnit.HeatGeneration heatGenerationUnit = HeatGeneration.WPermm3)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat generation.

`heatGenerationComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat generation component

`heatGenerationName` string

The name of the heat generation. If empty, default name starts with 'HeatGeneration\_' will be generated and used.

`heatGenerationFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the heat generation function.

`heatGenerationUnit` [HeatGenerationUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[HeatGeneration](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the heat generation.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatGenerationComponent' arguments are empty.

ArgumentException

Will be thrown if 'heatGenerationFunction' argument is not empty and type of 'heatGenerationFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateHeatGenerationWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateHeatGenerationWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateHeatGenerationWithUserSubroutine(this SubSystemDocument document, Obj heatGenerationComponent, Obj usub, string heatGenerationName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the heat generation.

`heatGenerationComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The heat generation component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`heatGenerationName` string

The name of the heat generation. If empty, default name starts with 'HeatGeneration\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'heatGenerationComponent' arguments are empty.

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateTemperatureWithDFTHFile_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_VM_Managed_DAFUL_Thermal_TemperatureUnit_Temperature_System_String_"></a> CreateTemperatureWithDFTHFile(SubSystemDocument, Obj, string, Temperature, string)

Create  with .dfth file.

```csharp
[ExistFile(new string[] { "dfthFilePath" })]
public static Obj CreateTemperatureWithDFTHFile(this SubSystemDocument document, Obj temperatureComponent, string dfthFilePath, TemperatureUnit.Temperature temperatureUnit = Temperature.C, string temperatureName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the temperature.

`temperatureComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The temperature component

`dfthFilePath` string

The .dfth file path.

`temperatureUnit` [TemperatureUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[Temperature](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the temperature.

`temperatureName` string

The name of the temperature. If empty, default name starts with 'Temperature\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'temperatureComponent' arguments are empty.

ArgumentException

Will be thrown if type of 'temperatureFunction' is not .

FileNotFoundException

Will be thrown if dfthFilePath file is not exist.

### <a id="VM_API_Pre_FE_ThermalAPI_CreateTemperatureWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_TemperatureUnit_Temperature_"></a> CreateTemperatureWithFunction(SubSystemDocument, Obj, string, Obj?, Temperature)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "temperatureFunction", typeof(Function) })]
public static Obj CreateTemperatureWithFunction(this SubSystemDocument document, Obj temperatureComponent, string temperatureName = "", Obj? temperatureFunction = null, TemperatureUnit.Temperature temperatureUnit = Temperature.C)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the temperature.

`temperatureComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The temperature component

`temperatureName` string

The name of the temperature. If empty, default name starts with 'Temperature\_' will be generated and used.

`temperatureFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the temperature function.

`temperatureUnit` [TemperatureUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[Temperature](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the temperature.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'temperatureComponent' arguments are empty.

ArgumentException

Will be thrown if type of 'temperatureFunction' is not .

ArgumentException

Will be thrown if 'temperatureFunction' argument is not empty and type of 'temperatureFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateTemperatureWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateTemperatureWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateTemperatureWithUserSubroutine(this SubSystemDocument document, Obj temperatureComponent, Obj usub, string temperatureName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the temperature.

`temperatureComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The temperature component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`temperatureName` string

The name of the temperature. If empty, default name starts with 'Temperature\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'temperatureComponent' arguments are empty.

ArgumentException

Will be thrown if type of 'temperatureFunction' is not .

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateThermalContactWithFunction_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_System_String_System_Nullable_VM_API_Pre_Obj__VM_Managed_DAFUL_Thermal_ConvectionCoefficientUnit_ConvectionCoefficient_"></a> CreateThermalContactWithFunction(SubSystemDocument, Obj, string, Obj?, ConvectionCoefficient)

Create  with functions.

```csharp
[MatchTypeObj(new object[] { "thermalContactFunction", typeof(Function) })]
public static Obj CreateThermalContactWithFunction(this SubSystemDocument document, Obj thermalContactComponent, string thermalContactName = "", Obj? thermalContactFunction = null, ConvectionCoefficientUnit.ConvectionCoefficient convectionCoefficient = ConvectionCoefficient.WPermm2C)

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the thermal contact.

`thermalContactComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The thermal contact component

`thermalContactName` string

The name of the thermal contact. If empty, default name starts with 'ThermalContact\_' will be generated and used.

`thermalContactFunction` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)?

The name of the thermal contact function.

`convectionCoefficient` [ConvectionCoefficientUnit](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs).[ConvectionCoefficient](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMThermalBase/ThermalFunction.cs)

The unit of the thermal contact conductance coefficient.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'thermalContactComponent' arguments are empty.

ArgumentException

Will be thrown if 'thermalContactFunction' argument is not empty and type of 'thermalContactFunction' is not .

### <a id="VM_API_Pre_FE_ThermalAPI_CreateThermalContactWithUserSubroutine_VM_Managed_DAFUL_SubSystemDocument_VM_API_Pre_Obj_VM_API_Pre_Obj_System_String_"></a> CreateThermalContactWithUserSubroutine(SubSystemDocument, Obj, Obj, string)

Create  with user-subrooutine.

```csharp
[MatchTypeObj(new object[] { "usub", typeof(UserSubroutine) })]
public static Obj CreateThermalContactWithUserSubroutine(this SubSystemDocument document, Obj thermalContactComponent, Obj usub, string thermalContactName = "")

```

#### Parameters

`document` [SubSystemDocument](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/Data/VMDFBase/SubSystemDocument.cs)

The document to create the thermal contact.

`thermalContactComponent` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The thermal contact component

`usub` [Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The name of the user-subrooutine.

`thermalContactName` string

The name of the thermal contact. If empty, default name starts with 'ThermalContact\_' will be generated and used.

#### Returns

[Obj](https://github.com/AnsysVirtualMotion/DAFUL/blob/9110677a5f6a53d7604f8dfd35b4c5fceb59e8e0/DAFUL/ClassicPre/API/VM.API.Pre/Models/Obj.cs)

The new  object that is created by this API.

#### Exceptions

ArgumentNullException

Will be thrown if 'document' or 'thermalContactComponent' arguments are empty.

ArgumentException

Will be thrown if 'usub' argument is not empty and type of 'usub' is not .