mat_set_property
Set one COMSOL material property using a tag, property name, and value expression, including anisotropic or array entries, to define material behavior in a model.
Instructions
Set one material property (a COMSOL expression with units).
Args: tag: material tag, e.g. "mat1". property: property name, e.g. "thermalconductivity", "density", "heatcapacity", "youngsmodulus". Use mat_properties first to see valid names for the material. value: expression string ("400[W/(m*K)]"), number, or list of expressions for anisotropic/array properties (9 values for a 3x3 tensor). group: property group tag (default "def" = Basic). index: optional index for setting one element of an array property. component: component tag (default "comp1"); "" or "global". model: model name/tag (None = current model). Example: mat_set_property(tag="mat1", property="density", value="8000[kg/m^3]")
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tag": "<tag>",
"property": "<property>",
"value": "<value>"
},
"name": "mat_set_property"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | ||
| group | No | def | |
| index | No | ||
| model | No | ||
| value | Yes | ||
| property | Yes | ||
| component | No | comp1 |