Studies and Study Steps
Introduction
In the COMSOL Desktop, you create one or more studies, each with one or more study steps to compute the solution to a model. The studies generate a solver sequence with the solvers and other solver features that correspond to the study steps in the study.
Study and Study Step Types in the COMSOL Multiphysics Reference Manual.
Creating a Study and Adding Study Step
The following commands create a study std1 and adds a Stationary study step to that study:
model.study().create("std1");
model.study("std1").create("stat", "Stationary");
Running (Computing) a Study
To run a study, use
model.study(<tag>).run();
The run() command corresponds to clicking Compute on a Study node in the COMSOL Desktop.
Creating a Reference to a Study Step
You can also create a reference to an existing study step from a solver sequence:
model.sol("sol1").create("st1", "StudyStep");
model.sol("sol1").feature("st1").set("study", "std1");
model.sol("sol1").feature("st1").set("studystep", "stat");
Attaching a Study
It is also possible to attach a study for making a solver sequence or batch feature part of the study sequence:
model.sol("sol1").attach("std1");
The attach() operation implies calling study(<tag>)(see below). You can only have one solver sequence attached to each study but you can have multiple batch features.
Associating a Solver Sequence With a Study
You can associate a solver sequence with a study using the following syntax:
model.sol("sol1").study("std1");
In contrast, attach() (see above) also makes the solver sequence part of the study sequence.
Main Study Feature Settings
For example, use
model.study("std1").setGenConv(true);
to generate convergence plots when computing the solution.
The following table lists the major study steps with links to documentation of available properties for each study step: