This topic describes how to add and edit thermal material properties in HEAT using only script commands. Handling materials using script commands can be useful to completely regenerate a project from script, either for version control or to increase workflow automation. For details about thermal material models see Electrical/Thermal Material Models.
Creating a new thermal material using script
Example: Fluid
This example will re-create the thermal properties of Air, without relying on the material database, and enabling the ideal gas model for thermal expansivity.
1. Create a model material using [addmodelmaterial] or select an existing material without existing thermal material property
addmodelmaterial;
set("name","Air");
set("color",[2/3;1;1;1]);
2. Create a thermal model material property using [addhtmaterialproperty]. To see the available types of thermal properties, use the command without arguments like below:
?addhtmaterialproperty;
The following lines add fluid thermal property to the created material and set its name to Air:
addhtmaterialproperty("Fluid");
set("name","Air");
3. Model parameters may be configured by [select]ing the object and using [set], or using [setnamed] command. To see the available parameters, use command without arguments like below:
?setnamed("::model::materials::Air::Air");
Parameters are named by category, model then model parameter in the form "catergory"."model"."model parameter". The active model for a particular category is determined by the 'active model' parameter. For example, the following lines will first output the current active model for the thermal expansivity of the Air material and then list all the available models for it:
?getnamed("::model::materials::Air::Air","thermal expansivity.active model");
?setnamed("::model::materials::Air::Air","thermal expansivity.active model");
The following lines will set the thermal properties of the Air material to only use constant model (not temperature dependent) and set their values:
select("::model::materials::Air::Air");
set("mass density.constant", 1.17659);
set("specific heat.constant", 1006.43);
set("thermal conductivity.constant", 0.0263);
set("dynamic viscosity.constant", 1.85e-05);
set("thermal expansivity.constant", 1/300);
4. To enable ideal gas model for thermal expansivity of the Air material and set its alpha value, the following lines can be used:
select("::model::materials::Air::Air");
set("thermal expansivity.active model","Ideal Gas");
set("thermal expansivity.ideal gas.alpha", 1);
The final result of running the script is shown below:
Example: Solid
This example will add silicon dioxide from the material database, then enable the Palankovski model for specific heat.
1. Create new model material and add thermal material properties from material database
addmodelmaterial;
set("name","Glass");
addmaterialproperties("HT","SiO2 (Glass) - Sze");
This is how the thermal properties of the Glass material look like after running the scripts:
The Palankovski model is disabled by default.
2. Enable the Palankovski model and set its beta value:
set("specific heat.active model", "Palankovski");
set("specific heat.Palankovski.beta", 1.45);
Which results in the following change in the material properties window:
Creating a new alloy material using script
1. Create a model material using [addmodelmaterial], and an empty solid alloy with thermal properties
addmodelmaterial;
set("name","AlGaN");
addhtmaterialproperty("Solid Alloy");
set("name","AlGaN");
2. Add alloy component-solids (base materials) using [addhtmodelmaterial] from the material database.
select("::model::materials::AlGaN::AlGaN");
addmaterialproperties("HT","AlN (Aluminium Nitride)");
select("::model::materials::AlGaN::AlGaN");
addmaterialproperties("HT","GaN (Gallium Nitride)");
3. Configure alloy components, interpolation, and bowing parameters
select("::model::materials::AlGaN::AlGaN");
set("alloy properties.base material 1","AlN (Aluminium Nitride)");
set("alloy properties.base material 2","GaN (Gallium Nitride)");
set("interpolation","multi valley");
set("mass density.constant",0); #<bowing parameters
set("specific heat.constant",0); #<bowing parameters
set("thermal conductivity.constant.A0",0); #<bowing parameters
set("conductivity.constant",0); #<bowing parameters