study_add_sweep
Adds a parametric, material, batch, or sensitivity sweep step to a COMSOL study before solving; creates the study and a stationary solver step if missing.
Instructions
Add a sweep study step (parametric / material / batch / sensitivity / ...).
The sweep step is inserted before the solving step; if study does
not exist it is created. When the study has no other steps, a
Stationary solver step is appended automatically.
Args:
pname: parameter name(s) to sweep, e.g. "k" or ["k", "Q0"].
plist: parameter values: list like ["1", "2", "3"], a comma string
"1,2,3", a range(...) expression, or a flat list for
multi-parameter sweeps. Values may carry units ("1[W/(mK)]").
punit: optional unit(s) for the sweep values, e.g. "W/(mK)".
sweep_type: "Parametric" (default), "MaterialSweep", "BatchSweep",
"ClusterSweep", "Sensitivity", "Optimization", ...
study: study tag (None = auto-create one, e.g. "std_param1").
step_tag: tag for the sweep step (None = automatic).
properties: extra study-step properties to set on the sweep step.
add_solver_step: append a solver step when the study has no other step.
solver_step_type: type of that solver step (default "Stationary").
solver_step_properties: properties for the appended solver step.
model: model name/tag (None = current model).
Example: study_add_sweep(pname="k", plist=["1", "5", "10"], punit="W/(m*K)", study="std_parametric")
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": {
"pname": "<pname>",
"plist": "<plist>"
},
"name": "study_add_sweep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| plist | Yes | ||
| pname | Yes | ||
| punit | No | ||
| study | No | ||
| step_tag | No | ||
| properties | No | ||
| sweep_type | No | Parametric | |
| add_solver_step | No | ||
| solver_step_type | No | Stationary | |
| solver_step_properties | No |