Studies and solving
A Study holds one study step, an optional Parametric Sweep, and optional Solver Configurations. A model can have several studies, for example a stationary solve and an eigenfrequency analysis of the same geometry. Each study keeps its own solutions and its own dataset under Results › Datasets.
Study steps
| Step | Settings | Elmer |
|---|---|---|
Stationary |
For coupled physics: Max coupling iterations, Coupling tolerance, Coupling damping factor |
Steady state |
Time Dependent |
Time unit, Output times ( |
Transient, BDF time stepping; the time step runs from one output time to the next (divided by the solver steps per output step) |
Eigenfrequency |
Desired number of eigenfrequencies, Search for eigenfrequencies around (Hz) |
Eigen analysis (ARPACK) |
Frequency Domain |
Frequency unit, Frequencies (a value, a list or |
Harmonic, scanned over the frequencies |
Every step has a Physics and Variables Selection table, to leave an interface out of this study.
Add a study with . Add steps with , and a sweep with .
Starting from another study’s solution
A Stationary or Time Dependent step can start from another study’s last solution: set Values of Dependent Variables › Initial values from the solution of to that study. It is the initial state of a time-dependent study, or the initial guess of a nonlinear stationary one, as COMSOL’s Solution option does. The other study must be computed first, and on the same mesh. Otherwise Compute stops and says which. When the other study is computed again later, this study is marked out of date.
With several components, a step solves each component that has a ticked physics interface. A component whose settings use another component’s coupling operator (comp1.aveop1(T)) is solved after it. See Several components.
Parametric Sweep
A sweep solves the study once for each parameter value:
-
Parameter name and Parameter value list: values like
5 6 7, orrange(5,1,10)(start, step, stop), and a Parameter unit (the values are in that unit). -
More parameters to sweep several at once:
-
Sweep type Specified combinations: the i-th values of every parameter go together;
-
All combinations: every combination (2 × 3 values = 6 runs).
-
-
Reuse solution from previous step Automatic: each stationary run starts from the previous parameter’s solution when the mesh hasn’t changed. Nonlinear problems, such as electrode kinetics, then converge in a few iterations. Off starts every run from the initial values.
Geometry, mesh and physics follow the swept parameters. When a parameter changes the geometry, it is rebuilt and remeshed for each value. Use Box Selections for features whose boundaries may be renumbered.
The results of a sweep are in one dataset, with one solution per value. Plots show one value at a time (Solution selection). Global evaluations and Global plots show all of them, against the parameter in its own unit.
Coupled physics
When a study solves several physics that depend on each other (Joule heating, thermal stress, tertiary current distribution, …), Elmer solves them one after the other and repeats until the coupling converges:
-
Max coupling iterations: an upper limit, 30 by default;
-
Coupling tolerance: the relative change at which the iteration stops;
-
Coupling damping factor: under-relaxation between iterations. Lower it (0.5, 0.25) if the iteration oscillates and grows. A loop with gain G > 1 needs a factor below 2/(1 + G).
A coupled stationary run saves its result once, at the end.
Solver configurations
adds Solver Configurations to the study with a Solver node per Elmer solver. Without them, Elmer Studio picks the settings itself: direct solvers for small models and iterative ones for large models. Each Solver node can override:
-
Linear solver: Automatic, Direct (UMFPACK, MUMPS, banded LAPACK) or Iterative (BiCGStab, BiCGStab(l), GCR, CG, GMRES, TFQMR, IDR(s)), with Preconditioner (ILU0–2, ILUT, Jacobi, none), Relative tolerance and Maximum number of iterations;
-
Maximum nonlinear iterations, Nonlinear tolerance, Damping (relaxation) factor;
-
Additional SIF keywords for the solver section.
Computing
-
(Ctrl+=) solves the study that the selected node belongs to, or the first study when the selected node is outside any study. Right-click a study and choose Compute to pick one.
-
cancels the run, and any geometry or mesh builds waiting to run. A geometry or mesh build that is already running cannot be interrupted; it finishes in the background and its result is discarded.
-
deletes the solutions.
When the solver does not converge
Elmer Studio accepts a solution only when Elmer converged:
-
A linear solver that reaches its maximum number of iterations without meeting its tolerance stops the study with an error (Elmer’s own default, Linear System Abort Not Converged). A direct solver never does.
-
Nonlinear (Newton) iterations that reach Maximum nonlinear iterations without meeting the Nonlinear tolerance, and coupling iterations that reach Max coupling iterations without meeting the Coupling tolerance, also stop the study. Elmer only reports these at an output level Studio does not log, so Studio reads them from the iteration history: in a coupled study, only the Newton iterations of the last coupling iteration count.
To look at such a solution anyway, set When nonlinear or coupling iterations do not converge on the Study node to Keep the solution, marked not converged. The solution is then shown, and Messages warns that it is not converged each time you plot it. Each solution folder records its status (converged, not converged or failed) and the reasons in meta.json, next to solver.log.
During the run:
-
Progress shows the step, sweep value or time step;
-
Convergence Plot shows the nonlinear and coupling convergence of each Elmer solver;
-
Log streams ElmerSolver’s output;
-
Messages reports the solution time, or the error if Elmer stops.
When the study finishes, default plot groups are created for the solved physics (turn off Generate default plots on the Study to skip that).
Parallel computing
Set Number of MPI processes on the Study node to run Elmer on several cores. It needs an MPI-enabled Elmer (ElmerSolver_mpi and mpiexec). Elmer Studio partitions the mesh with ElmerGrid, runs mpiexec -n N ElmerSolver_mpi, and reads the partitioned results back as one solution. Without an MPI-enabled Elmer it warns and runs serially.
Looking at the Elmer files
-
shows the generated
.siffor the study. -
opens the folder where the study ran: mesh,
.sif, Elmer’s log and the result files.
See Elmer under the hood for how the files are made and what they contain.