This topic describes how to add and edit electrical material properties in CHARGE 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 electrical material models see Electrical/Thermal Material Models.
Creating a new electrical material using script
Example: Conductor
This example will re-create the electrical properties of Aluminium, without relying on the material database.
1. Create a model material using [addmodelmaterial] or select an existing material without existing electrical material property
addmodelmaterial;
set("name","Aluminium");
set("color",[2/3;1;1;1]);
2. Create an electrical model material property using [addctmaterialproperty]. To see the available types of electrical properties, use the command without arguments like below:
?addctmaterialproperty;
The following lines add conductor electrical property to the created material and set its name to Al:
addctmaterialproperty("Conductor");
set("name","Al");
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::Aluminium::Al");
The following lines will set the work function parameter from electronic properties of the created material to 4.28 eV:
select("::model::materials::Aluminium::Al");
set("work function", 4.28);
The final result of running the script is shown below:
Example: Semiconductor
This example will add silicon from the material database, then enable the Monotonic high field model for electron mobility.
1. Create new model material and add electrical material properties from material database
addmodelmaterial;
set("name","Silicon");
addmaterialproperties("CT","Si (Silicon)");
This is how the electrical properties of the Silicon material look like after running the scripts:
The high mobility models are disabled by default.
For electronic properties, parameters are named by category (electronic), Ec valley, property, sub-property(if available), model, and then model parameter in the form "electronic"."Ec valley"."property"."sub-property"."model"."model parameter".
The active model for a particular category is determined by the 'active model' parameter.
Similarly, for recombination properties, parameters are named by category (recombination), recombination type, property(if available), sub-property(if available), model, and then model parameter in the form "recombination"."type"."property"."sub-property"."model"."model parameter".
For example, the following lines will first output the current active model for the X valley high field electron mobility of the Silicon material and then list all the available models for it:
?getnamed("::model::materials::Silicon::Si (Silicon)",
"electronic.x.mun.high field.active model");
?setnamed("::model::materials::Silicon::Si (Silicon)",
"electronic.x.mun.high field.active model");
2. Enable the Monotonic model and set its beta value:
set("electronic.x.mun.high field.active model", "Monotonic");
set("electronic.x.mun.high field.monotonic.beta", 2);
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 ternary alloy with electrical properties
addmodelmaterial;
set("name","SiGe");
addctmaterialproperty("Ternary Alloy");
set("name","SiGe");
2. Add alloy components (base materials) using [addctmodelmaterial] from the material database.
select("::model::materials::SiGe::SiGe");
addmaterialproperties("CT","Si (Silicon)");
select("::model::materials::SiGe::SiGe");
addmaterialproperties("CT","Ge (Germanium)");
3. Configure alloy components, interpolation, and bowing parameters (here only done for the X valley).
select("::model::materials::SiGe::SiGe");
set("alloy properties.base material 1","Si (Silicon)");
set("alloy properties.base material 2","Ge (Germanium)");
set("electronic.interpolation","multi valley");
set("electronic.x.mn.bowing",-0.183); #<bowing parameters
set("electronic.x.mp.bowing",-0.096); #<bowing parameters
set("electronic.x.Eg.bowing",-0.4); #<bowing parameters
set("electronic.x.mup.lattice.bowing",100); #<bowing parameters
set("electronic.x.mun.lattice.bowing",0); #<bowing parameters;
Which results in the following change in the material properties window: