Common Study Step Settings
The study step nodes’ Settings windows contain the following sections (in addition to specific study settings for each type of study step):
The Study Steps Settings Windows’ Toolbar
On top of the study steps Settings windows, a toolbar contains the following commands:
Click Compute () or press F8 to compute the entire study. If there is an enabled Solver node under Solver Configurations, that solver sequence will be executed. Otherwise a new solver sequence will first be generated. See Computing a Solution.
Click Update Solution () or press F5 (when applicable) to update the current study. See Updating a Solution.
Study Settings
Include Geometric Nonlinearity Check Box
If you have a license for the Acoustics Module, MEMS Module, or Structural Mechanics Module (including any add-on modules such as the Nonlinear Structural Materials Module) and your model involves structural mechanics, then the Study Settings section includes an Include geometric nonlinearity check box.
Select the Include geometric nonlinearity check box to enable a geometrically nonlinear analysis for the study step. Some physics designs force a geometrically nonlinear analysis, in which case it is not possible to clear the Include geometric nonlinearity check box. For further details, see the theory sections for the respective physics interface in the applicable modules’ manuals.
Results While Solving
Select the Plot check box to allow plotting of results while solving in the Graphics window. Then select what to plot from the Plot group list and, for time-dependent simulations, at which time steps to update the plot: the output times or the time steps taken by the solver. The software plots the dataset of the selected plot group as soon as the results become available. You can also control which probes to tabulate and plot the values from. The default is to tabulate and plot the values from all probes in the Table window and a Probe Plot window.
Use the Probes list to select any probes to evaluate. The default is All, which selects all probes for plotting and tabulation of probe data. Select Manual to open a list with all available probes. Use the Move Up (), Move Down (), Delete (), and Add () buttons to make the list contain the probes that you want to see results from while solving. Select None to not include any probe.
Physics and Variables Selection
See Physics and Variables Selection for detailed information about this section. You can control and specify different cases where the physics interface to solve for is varied, or, for various analysis cases, which variables and physics features (for example, boundary conditions and sources) to use. The default is to solve for all physics interfaces that are compatible with the study step type.
Values of Dependent Variables
When you have physics interfaces in a study step that you do not solve for but that provide degrees of freedom, you can specify how the COMSOL Multiphysics software handles the values of such degrees of freedom (dependent variables).
The settings in this section determine how the solver handles dependent variables that you do not solve for. This is applicable in, for example, a solver configuration where you only solve for a subset of the dependent variables in each step. You can also specify the initial values of variables that you do solve for.
By default, the COMSOL Multiphysics software determines these values heuristically depending on the physics as, for example, the specified initial values or a solution from an earlier study step. Under Initial values of variables solved for, the default value of the Settings list is Physics controlled. To specify the initial values of the dependent variables that you solve for, select User controlled from the Settings list.
The Initial values of variables solved for settings have no effect when using the eigenvalue solver.
Similarly, to specify the values of dependent variables that you do not solve for, select User controlled from the Settings list under Values of variables not solved for.
Then use the Method list to specify how to compute the initial values of variables solved for and the values of variables not solved for. Select:
Initial expression to use the expressions specified on the Initial Values nodes for the physics interface in the model.
Solution to use initial values as specified by a solution object (a solution from a study step).
Use the Study list to specify what study to use:
Select Zero solution to initialize all variables to zero.
Then use the Solution list to specify what solution object to use if Study has been set to a study:
-
Current to use the current solution.
-
Depending on the solution object to use, you can choose different solutions to use. If a solution has nodes for storing solutions in its sequence, you can choose which solution to use using the Use list. The Current value is the value that the solution has at the moment the value is read. The other values are the values stored in the respective nodes of the sequence. Choose Manual to enter the index for the solution that you want to use. The index can be a global parameter that is swept in a Parametric sweep with solution number inputs to it.
Depending on the study type of the solution that you selected, you can choose different solutions from a list underneath the Study list (and the Solution and Use lists, if present):
For a Stationary study, from the Selection list, select one of the following options:
Automatic (single selection) (the default) to select one solution on the Dependent Variables node depending on a global evaluation to find the current value of the parameters in the input solution or, if that is not possible, the last (typically the only) solution.
Automatic (all solutions) to use all (typically just one) solutions from that study (see below for more details).
First to use the first (typically the only) solution
Last to use the last (typically the only) solution, select From list to pick solutions from a list.
Interpolated to specify an interpolated value in the text field below.
Manual to use a specific solution number that you specify in the Index field.
1 to use the first (typically the only) solution. If you use a parametric continuation of the stationary study, there can be additional solutions to choose from.
For a Time Dependent study, from the Time list, select one of the following options:
Automatic (single selection) (the default) to select one solution on the Dependent Variables node depending on a global evaluation to find the current value of the parameters in the input solution or, if that is not possible, the solution for the last time.
Automatic (all solutions) to use all solutions from that study (see below for more details).
First to use the first solution.
Last to use the last solution.
Interpolated to specify a time in the text field below.
Manual to use a specific solution number that you specify in the Index field.
For an Eigenvalue or Eigenfrequency study, from the Eigenvalues list, select one of the following options:
Automatic (single selection) (the default) to select one solution on the Dependent Variables node depending on a global evaluation to find the current value of the parameters in the input solution or, if that is not possible, to use the solution for the first eigenvalue or eigenfrequency and its associated eigensolution.
Automatic (all solutions) to use all solutions from that study (see below for more details).
First to use the first solution.
Last to use the last solution.
Interpolated to specify an eigenvalue of eigenfrequency in the text field below.
Manual to use a specific solution number that you specify in the Index field.
For a parametric or Frequency Domain study, from the Parameter value list, select one of the following options:
Automatic (single selection) (the default) to select one solution on the Dependent Variables node depending on a global evaluation to find the current value of the parameters in the input solution or, if that is not possible, the solution for the last parameter value set or frequency.
Automatic (all solutions) to use all solutions from that study (see below for more details).
First to use the first solution.
Last to use the last solution.
Interpolated to specify a time in the text field below.
Manual to use a specific solution number that you specify in the Index field.
For the Automatic (all selections) option, all solutions are passed down to the solver, and the solver selects the initial values based on if there is a match to the current parameter tuple. This makes it possible to pass multiple initial values or guesses to the solver, which can be useful if you are doing a parametric study using multiple parameters and the convergence of each parameter tuple is dependent on a good initial guess. It can also be used together with the time-dependent parametric solver to use different initial values for each parameter tuple.
Under Store fields in output, you can specify to store the field variables that you solve only for some parts of the geometry (a boundary, for example, if the solution in the domain is not of interest). You define the parts of the geometry for which to store the fields as selection nodes. From the Settings list, choose All (the default) to store all fields in all parts of the geometry where they are defined, or choose For selections to choose one or more selections that you add to the list. Click the Add button () to open an Add dialog box that contains all available selections. Select the selections that you want to add and then click OK. You can also delete selections from the list using the Delete button () and move them using the Move Up () and Move Down () buttons. See also the Field node, where you can also control what to store in the output, if the corresponding Dependent Variables uses user-defined settings.
If you use For selection and store the solution only for some parts of the geometry, it is not possible to continue with another study step.
Mesh Selection
Specify — for each geometry — which mesh to use for the study step. For each geometry listed in the Component column, select a mesh from the list of meshes in the Mesh column. Each list of meshes contains the meshes defined for the geometry that you find on the same row.
Adaptation and Error Estimates
These are settings for mesh adaptation and error estimates, available for stationary, eigenfrequency, eigenvalue, and frequency-domain study steps. Depending on the type of adaptation, meshing sequences for the adaptive mesh refinements, using Adapt or Size Expression nodes, and corresponding solutions are created for inspection and possible modification. Error estimates are available as variables for postprocessing (for example, freq.errtot for the total error estimate in a Frequency Domain study). The adaptive mesh refinement solutions become available in a separate Solution dataset (Study 1/Adaptive Mesh Refinement Solutions 1, for example). When using that dataset for postprocessing, you can choose to use any of the available adaptive mesh refinement solutions from a Parameter selection (Refinement level) list.
From the Adaptation and error estimates list, select Error estimates if you want to use error estimation and select Adaptation and error estimates if you want to use adaptive mesh refinement. In the latter case, error estimates that are used in the adaptation algorithm are also available for postprocessing. Choose None for no adaptation or error estimation. The internal name for the refinement level parameter is adaptlevel. It is added by the adaptation solver method to separate the solutions for the different meshes. In the case that there is a user-defined parameter with that name in the model, a unique name for the refinement level parameter is made by adding a digit to adaptlevel. You can use it to access the solutions from different mesh refinement levels using the withsol() operator with, for example, the following syntax: withsol('sol1',expr,setval(adaptlevel,2)) to evaluate an expression expr with the solution in sol1 for the mesh adaptation level 2.
Adapt — the Adapt node in a meshing sequence also provides mesh adaptation. It includes a selection of geometric entities, which can be useful if you want to limit the mesh adaptation to certain geometric entities (some but not all domains, for example).
The software performs adaptive mesh refinement in one geometry only. Use the Adaptation in geometry list to specify that geometry. If you do not want to perform the mesh adaptation in the entire geometry, use the settings in the Geometric Entity Selection for Adaptation section below.
Use the Error estimate list to control how the error estimate is computed:
Select L2 norm of error squared to use the squared L2 norm of the error. This is the only option for Eigenvalue studies. Use the Scaling factor field to enter a space-separated list of scaling factors, one for each field variable (default: 1). The error estimate for each field variable is divided by this factor. Also, the L2 norm error estimate is based on a stability estimate for the PDE. Use the Stability estimate derivative order field to specify its order (default: 2).
Select Functional and specify a Functional type. Available functional types are Predefined and Manual. This option adapts the mesh toward improved accuracy in the expression for the functional. Select Manual to specify a globally available scalar-valued expression in the Functional field (for example, the name of a global variable probe). If you select Predefined, you can choose from a predefined list of functional from the Solution functional list:
-
Integral (the default)
-
L2 norm
-
L1 norm
-
Approximate max norm
For a Stationary study step stat, a global variable is defined for the functional with the name stat.gfunc (and similarly for a frequency-domain study step). The functional can be evaluated under Results>Derived Values by adding a Global Evaluation node and, in the Expressions section in its Settings window, selecting Global Definitions>
Error estimation>stat.gfunc - Functional - Stationary
.
Select Error indicator to specify an error indicator using an error expression, which you add to the Error expression table below using the Add () button. The error expression can be any expression, including field variables and their derivatives, defined in the domain. Select the Active check box for the error expressions that should be part of the error indicator. Use the Move Up (), Move Down (), and Delete () buttons as needed to rearrange and remove error expressions.
By default, the software automatically determines the order of decrease in equation residuals on basis of the shape function orders in the geometry. To specify a residual order manually, select the Residual order check box and specify a nonnegative integer in the accompanying field (available when Error estimate is L2 norm of error squared or Functional).
From the Solution selection list, select which solution that should be used to evaluate error estimates:
Select Use last (the default for all study types except Eigenvalue) to use the last solution.
Select Use first to use the first solution.
Select All (the default for Eigenvalue studies) to use all solutions from that study.
Select Manual to use a specific solution number that you specify as solution indices in the Indices field.
In the Weights field (only available when Solution selection is Manual or All), enter weights as a space-separated list of positive (relative) weights so that the error estimate is a weighted sum of the error estimates for the various solutions (eigenmodes). The default value is 1, which means that the weight is put on all solutions (eigenmodes). If the number of weights is larger than 1 but less then the number of solutions, the omitted weights are treated as zero weights.
From the Adjoint solution error estimate list (only available when Error estimate is Functional), select an error estimate method for the adjoint solution. Select PPR for Lagrange (the default) to use the polynomial preserving recovery technique when possible (that is, for fields represented using Lagrange elements). Select Interpolation error to always use an estimate based on the interpolation error. For details, see The Functional Error Estimate.
The Save solution on every adapted mesh check box is selected per default. Clear this check box if you do not want to save solution on every adapted mesh. In that case, the last two solutions are saved (the finest one and the second finest) regardless of the total number of solutions.
Under Mesh adaptation, the following settings are available.
Use the Adaptation method list to control how to adaptively refine mesh elements. Select one of these methods:
General modification, to use the current mesh as a starting point and modify it by refinements, coarsening, topology modification, and point smoothing. Use the Allow coarsening check box to control if mesh coarsening is used. If the mesh contains anisotropic elements (for example, a boundary layer mesh), it is best to disable mesh coarsening to preserve the anisotropic structure. If you have selected to allow coarsening, specify the Maximum coarsening factor (a value of 5 by default) to scale the refined mesh size in the regions where refinement is not needed.
Rebuild mesh, to set up a size expression describing the error and rebuild the meshing sequence using the size expression as input. Note that structured meshes, such as mapped and swept meshes, in general are not appropriately refined. This method is not supported on imported meshes. The size of the refined mesh is the minimum of the size of the original mesh (previous refined mesh) and the size defined by the refinement. Specify the Maximum coarsening factor (a value of 3 by default) to scale the refined mesh size in the regions where refinement is not needed.
Regular refinement, to make the solver refine elements in a regular pattern by bisecting all edges of an element that needs refinement.
Longest edge refinement, to make the solver refine only the longest edge of an element by recursively bisecting the longest edge of edge elements that need refinement. This method is less suitable for models with nonsimplex elements. This is the default method.
For all adaptation methods except Rebuild mesh, you can specify the maximum number of refinements of the mesh elements (default: 5) in the Maximum number of refinements field.
Use the Element selection list to specify how the solver should select which elements to refine. Select:
Rough global minimum to minimize the error by refining a fraction of the elements with the largest error in such a way that the total number of elements increases roughly by the factor specified in the accompanying Element count growth factor field. The default value is 1.7, which means that number of elements increases by about 70%.
Fraction of worst error to refine elements whose local error indicator is larger than a given fraction of the largest local error indicator. Use the accompanying Element fraction field to specify the fraction. The default value is 0.5, which means that the fraction contains the elements with more than 50% of the largest local error.
Fraction of elements to refine a given fraction of the elements. Use the accompanying Element fraction field to specify the fraction. The default value is 0.5, which means that the solver refines about 50% of the elements.
Use the Maximum number of elements field to specify the maximum number of elements in the refined mesh. If the number of elements exceeds this number, the solver stops even if it has not reached the number specified in the Maximum number of adaptations field. The default value is 10,000,000 (ten million) elements.
With the settings in the Goal-oriented termination list you or the physics interfaces can add a number of global goal-oriented quantities so that the mesh adaptation will terminate when these are stable to a requested accuracy instead of after a fixed number of adaptation iterations. Choose Off (the default), Auto, or Manual to control. You, when the list is set to Manual, or the physics, when the list is set to Auto, can add a number of global goal-oriented quantities, and the mesh adaptation will terminate when these are stable to a requested accuracy. These goal-oriented quantities could, for example, for an RF simulation be the S-parameters or another quantity of interest. The goal-oriented termination can be used with any of the available error estimation methods. When the Goal-oriented termination list is set to Manual, you can add goal-oriented terminal expressions in the table at the bottom of this section. Click the Add button () to add an expression (default: 1) that you can edit in the Goal-oriented termination expression column. If desired, adjust the tolerance (default: 0.01) in the Tolerance column, and the type of tolerance in the Tolerance type column: Relative (the default) or Absolute. Use the Active buttons to manage which goal-oriented termination expressions to include. The mesh adaptation will run until the relative changes for all expressions (applied individually for all expressions) go below their respective thresholds, unless the maximum number of adaptations limit is met, in which case the algorithm terminates with a warning.
Use the Maximum number of adaptations field to specify the maximum number of adaptive mesh refinement iterations. The default value is 5 in 1D, 2 in 2D, and 1 in 3D. With the Goal-oriented termination set to Auto, the default value is set to 20 in 1D, 15 in 2D, and 10 in 3D.
With the Goal-oriented termination set to Auto or Manual, you can control the display of convergence from the adaptation when the Output goal-oriented termination increments check box is selected. It is possible to choose the plot window to display the convergence as well as the table to be used by the plot from the Plot window — select New window (the default) or Graphics — and Output table lists, respectively. If you choose New from the Output table list, two new tables are created, one for the adaptation convergence plot and one for providing verbose information.
Also choose the level of detail for the log from the Goal-oriented termination log list: Minimal, Normal (the default), or Detailed. Choose Detailed if you want to include the evaluations for all the parameters, frequencies, or eigenvalues in the log.
Geometric Entity Selection for Adaptation
From the Geometric entity level list, choose the geometric entity on which you want to do adaptive mesh refinement: Entire geometry (the default), Domain, Boundary, or Edge (3D only). For example, selecting Boundary can be useful if the model includes a physics interface defined on boundaries (surfaces) and you want to base the adaptation on that physics interface. For all levels except Entire geometry, select the geometric entities to include using the Selection list and selection tools below.
Study Extensions
These are extensions to the study’s main solver, such as adaptive mesh refinement and automatic remeshing. The options vary depending on the study type.
Auxiliary Sweep
Select the Auxiliary sweep check box to enable an auxiliary parameter sweep, which corresponds to a Parametric solver attribute node. For each set of parameter values, the chosen Sweep type is solved for. This is available for Stationary, Time Dependent, and Frequency Domain studies.
Select a Sweep type to specify the type of sweep to perform:
Specified combinations (the default) solves for a number of given combinations of values as given for each parameter in the list. The parameter lists are combined in the order given, that is, the first combination contains the first value in each list, the second combination contains all second values, and so on.
All combinations solves for all combinations of values; that is, all values for each parameter are combined with all values for the other parameters. Using all combinations can lead to a very large number of solutions (equal to the product of the lengths of the parameter lists).
In the table, specify the Parameter name, Parameter value list, and (optional) Parameter unit for the parametric solver. Click the Add button () to add a row to the table. When you click in the Parameter value list column to define the parameter values, click the Range button () to define a range of parameter values. The parameter unit overrides the unit of the global parameter. If no parameter unit is given, parameter values without explicit dimensions are considered dimensionless.
If you choose Specified combinations, the list of values must have equal length.
An alternative to specifying parameter names and values directly in the table is to specify them in a text file. Use the Load from File button () to browse to such a text file. The read names and values are appended to the current table. The format of the text file must be such that the parameter names appear in the first column and the values for each parameter appear row-wise with a space separating the name and values and a space separating the values.
Click the Save to File button () to save the contents of the table to a text file (or to a Microsoft Excel Workbook spreadsheet if the license includes LiveLink™ for Excel®).
Loading and saving the parameter table data using Excel include the units in the Parameter unit column. The unit column is ignored when saving and loading parameter data to *.txt, *.csv, and *.dat files.
For a Stationary or Frequency Domain study, select an option from the Run continuation for list: No parameter or one of the parameters given in the list.
Reuse Solution from Previous Step List
This option is useful for parameters not handled with continuation. Select an option from the Reuse solution from previous step list.
No (the default for a Stationary study) to reset the solution to the initial values before each step or continuation sweep. The initial values will not be recalculated by the parametric solver for subsequent parameter values. Parameter dependence of the initial values can be accomplished by using parametric sweep.
Yes to always use the converged solution from the previous step, or the last solution from the previous continuation sweep (that is, never reset the solution).
Automatic (the default for a Frequency Domain study) to normally use the converged solution from the previous step or sweep. However, when multiple parameters are used, the solution from the first step of each parameter list is always used for the first step of the next list.
The difference between the three options is shown in Figure 20-2 for a 3-by-4 two-parameter sweep using the different choices for Reuse solution from previous step without continuation:
Figure 20-2: The difference between the three options for a two-parameter sweep without continuation.
When continuation is enabled by setting Run continuation for to one of the parameters, the converged solutions are always reused for the steps along the continuation sweep in this parameter. The setting for Reuse solution from previous step then determines how the solutions are reused between multiple continuation sweeps, if there are additional parameters to sweep over, as shown in Figure 20-3.
Figure 20-3: The difference between the three options for a two-parameter sweep with continuation.
For the Frequency Domain study, the auxiliary sweep is merged with the frequency sweep into a multiparameter sweep with the frequency as the parameter at the innermost level.
See About the Parametric Solver for more information.