model.study(<tag>).feature(
<ftag>).getAllowedPropertyValues(
property);
model.study stores a list of studies, each of which consists of a number of study steps. Each study step, in turn, defines a solver-ready problem. This means that a study step can be turned into an extended mesh, and a basic solver (Stationary, Time, Eigenvalue, Modal, AWE, Optimization) can be applied, resulting in a solution object.
The central property of a study step is its study type, which on one hand controls the equations generated by physics interfaces, and on the other hand triggers automatic selection of a suitable solver. Another important property of a study step is which mesh to use (for each geometry in the model). Other fundamental simulation parameters can also be found among the study step settings, like the time span for a Time Dependent study type and frequency range for a Frequency Domain study type.
Under a study step, you can add multigrid levels. The parent node still defines the problem to be solved (for example, the study type and the mesh). Therefore, the added multigrid levels must necessarily be coarser than the parent study step.
Most physics features and also some other parts of the model object (for example expression features) must support a step member, which (in analogy to the spatial
selection) controls for which study steps the feature is active. In many ways, the study selection can be seen as a fourth, discrete, dimension.
model.study().create(<tag>) creates a new study sequence.
model.study(<tag>).run() computes the study.
model.study(<tag>).runNoGen() runs the attached solver sequence without regenerating it.
model.study(<tag>).createAutoSequences(type) creates an attached solver sequence or job using default solver settings if the solver sequence has not been edited. This command is similar to
Compute in the COMSOL Desktop. The argument
type is one of
all,
jobs, or
sol, corresponding to creating both jobs and solver sequences or one of them.
model.study(<tag>).showAutoSequences(type) generates a new attached solver sequence or job using default solver settings. This command is similar to
Show Default Solver in the COMSOL Desktop; that is, it always creates unedited solver sequences. See
createAutoSequences above for information about the
type argument.
model.study(<tag>).getSolverSequences(type) returns a list of tags for solver sequences (see
model.sol()) connected to this study. The
type argument is one of
SolverSequence,
CopySolution,
ParametricStore,
Stored,
Parametric,
None, or
All.
model.study(<tag>).setStoreSolution(boolean) inserts a Solution Store node between each study step in a multistep study if set to
true. If set to
false, Solution Store nodes are only inserted in certain cases. Use
model.study(<tag>).isStoreSolution() to check if a Solution Store node is inserted between each study step (it then returns
true).
model.study(<tag>).setPlotUndefVals(boolean) creates a plot that indicates the location of undefined values such as Inf and NaN, if set to
true.
model.study(<tag>).create(<ftag>,type) creates a new study step of the given type within the specified sequence. The set of allowed values should be limited to study types supported by at least one physics interface present in the model (Stationary, Time, Frequency, and Eigenvalue should always be allowed).
model.study(<tag>).feature().move(<ftag>,position) moves the feature
<ftag> to the zero indexed position
<position> in the list.
boolean model.study(<tag>).feature(<ftag>).loadFile(String filePath) and
boolean model.study(<tag>).feature(<ftag>).SaveFile(String filePath) both work if the type of feature is a Parametric Sweep and then loads or saves information concerning either All Combinations or Specified Combinations. These methods return
false if the type of feature is not a Parametric Sweep. They also return
false if the operation is not successful.
step = model.study(<tag>).feature(<ftag>) obtains a reference to a specified study step.
model.study(<tag>).feature(<ftag>)).
getAllowedPropertyValues(property) returns the set of allowed values for a property if the set is a finite set of strings; otherwise, it returns null.
step.mesh(<geom>,<mesh>) specifies which mesh to use for geometry
<geom> in the model.
step.activate(<physpath>,<bool>) activates or deactivates a physics interface or a physics feature. The string
<physpath> is a path to a node in a physics interface. Currently only the tag of the physics interface tag itself is supported.
step.discretization(<physpath>,<discr>) assigns discretization for a physics interface. The string
<physpath> is the path of a physics interface. The string
<discr> is a tag of a discretization feature under a physics mode. The default
<discr> the physics interface tag. It can be changed to the tag of a discretization node under a physics interface.
step.mglevel.create(<mglevel>) adds a (coarser) multigrid level to a study.
step.mglevel(<mglevel>).mesh(<geom>,<mesh>) specifies a mesh for the multigrid level. The set of allowed values must, in addition to the actual meshes, include an option “from parent”. This should be the default choice and indicates that the multigrid level uses the same mesh as the parent study.
step.mglevel(<mglevel>).discretization(<physpath>,<discr>) assigns discretization for a multigrid level. The string
<physpath> is the path of a physics interface. The string
<discr> is a tag of a discretization feature under a physics mode. The default
<discr> the physics interface tag. It can be changed to the tag of a discretization node under a physics interface.
step.type() returns the study type.
step.mesh(<geom>) returns the mesh selected for the given geometry.
step.activate(<physpath>) returns activation status of a physics interface or a physics interface feature. Currently only the tag of the physics interface tag itself is supported.
step.mglevel(<mglevel>).mesh(<geom>) returns the mesh for the selected multigrid level and geometry.
step.mglevel(<mglevel>).discretization(<discpath>) returns activation status of a discretization feature.