Combine Solutions
Use a Combine Solutions node () to manipulate solutions. The supported operations include concatenation, convert outer to inner solution, summation, weighted summation, general summation, and remove solutions:
You can use concatenation to merge (concatenate) solutions. There are three different cases of concatenation, depending on the type of solutions that are merged:
-
You can use concatenation to concatenate simple solutions. Simple solutions here means that the solutions are not from a Parametric Solutions node or outer solutions listed under a Parametric Solutions node. For example, you can concatenate two time-dependent solutions that cover two disjunct time intervals so that it is possible to analyze and postprocess a combined solution over both time intervals. Or you can concatenate two eigenfrequency or eigenvalue solutions.
-
You can also use concatenation to concatenate solutions from Parametric Solutions nodes or outer solutions listed under a Parametric Solutions node. A new Parametric Solutions node is generated, which includes all the outer solutions from the first solution, and all, or some, of the outer solutions from the second solution, depending on the concatenation method.
-
Additionally, you can use concatenation to concatenate a simple solution with a solution from a Parametric Solutions node or with an outer solution listed under a Parametric Solutions node. A new Parametric Solutions node is generated.
You can use convert outer to inner solutions to convert a solution from a Parametric Solutions node or any outer solution listed under a Parametric Solutions node into one simple solution.
You can use summation (a plain or weighted summation, or general summation) to sum a number of eigensolutions, for example, for further analysis.
You can also remove solutions from a time-dependent solution, for example.
This node is also available in the solver configuration as a solver utility node, see Combine Solutions (Utility Node). By default, such Combine Solution nodes are generated from a corresponding Combine Solution node at the study level.
Parameter and variable definitions are copied from the source solution when the Combine Solutions node is computed. Use Update Solution (see Updating a Solution) to update parameters and variables to their current values.
The Settings window contains the following section:
Combine Solutions Settings
From the Solution operation list, choose Concatenation (the default), Convert outer to inner solution, Summation, Weighted summation, General summation, or Remove solutions.
Concatenation
For a concatenation of two solutions, specify the two solutions from the First solution and Second solution lists. The lists contain all available solutions and Solution Store nodes (from this and other studies in the model), including Current, which is the default and is the output from the preceding study step.
The default for both solutions is Current, which is not a valid setting: the concatenation should be of two different time-dependent, parametric, or eigenvalue solutions, one of which may be the Current option. Stationary solutions cannot be combined.
When the source solution is a Parametric Solutions node, from the Use list, choose All (the default), From list or Manual. If you choose All, all outer solutions listed under the selected Parametric Solutions node are included in the destination Parametric Solutions node. If you choose From list, select the outer solutions to include in the destination Parametric Solutions node from the list below. If you choose Manual, enter outer solutions as indices (integers) in the Index field.
From the Concatenation method list, choose First solution has precedence (the default) or Include all solutions.
For concatenation of two simple solutions, use First solution has precedence to exclude solution numbers from the second solution whose parametric values can be found in the first solution. Use Include all solutions to include all solution numbers from the first and second solution.
For concatenation of solutions from Parametric Solutions nodes or any outer solutions, use First solution has precedence to exclude outer solutions from the Second solution whose outer and inner parameter values can be found in any of the outer solution from the First solution. Use Include all solutions to include all outer solutions in the first and the second solution to the destination Parametric Solutions node.
For concatenation of a simple solution with a solution from a Parametric Solutions node or an outer solution, it is required to set the outer parameter values for the single solution. From the Outer parameter values list, choose Automatic (the default) or Manual. When you choose Automatic, the values are evaluated automatically and correspond to the parameter values at the time when the simple solution is computed. If you choose Manual, enter the value for each parameter below. Note that, for outer parameters that are defined at the time when the single solution is computed, the manual input values are required to be the same as the values that are evaluated automatically. For outer parameters that are not defined at the time when the simple solution is computed, the manual input values can be arbitrary. Use First solution has precedence to exclude solutions from the second solution whose inner parameter values and outer parameters can be found in any of the solutions in the first solution. Use Include all solutions to include all solutions in the first and the second solution in the destination Parametric Solutions node.
For a pure time-dependent solution with parameter size = 1, in the case of First solution has precedence:
For an overlapping interval, the First solution shadows the overlapped interval from the Second solution.
If the Add interpolated solution at intersection times checkbox is selected (see below), an interpolation is done for the Second solution at the interval boundaries of the First solution when these boundaries are also in the interval for the second solution.
Regarding concatenation of time-parametric solutions or multiparametric solutions with one continuous parameter: For solution numbers whose values of a discontinuous parameters in the First solution and Second solution lists are the same, the concatenation follows the rule for concatenation of continuous single-parametric solutions. For solution numbers whose values of discontinuous parameters in the First solution and Second solution lists are different, solutions from both the First solution and Second solution lists are kept in the concatenated solution.
The Add interpolated solution at intersection points for continuous parameter intervals checkbox is selected by default. This checkbox is only available when you have selected First solution has precedence, and it appears when the source solutions are parametric solutions with a continuous parameter that is not time. When selected, interpolation is done for the second solution at the intersection points for the continuous parameter. The results are always sorted for the continuous parameter values following the same order as it in the first solution.
The Add interpolated solution at intersection times checkbox is selected by default. This checkbox is only available when you have selected First solution has precedence, and it appears when the source solutions are time-dependent solutions. When selected, interpolation is done for the second solution at the intersection times. The results are always sorted for time following the same order as it in the first solution.
The Sort discontinuous single-parameter values checkbox is selected by default. This checkbox is available for both the First solution has precedence and Include all solutions methods. It appears when the source solutions are single-parametric solutions whose parameter is not continuous and is not an eigenvalue. When selected, the discontinuous parameter values are sorted in the combined solution.
If you concatenate solutions of an eigenvalue type, the following settings are available:
The Sort eigenvalues checkbox is selected by default. This checkbox is available for both the First solution has precedence and Include all solutions methods. It appears when the source solutions have only one parameter and are eigenvalue types of solutions like eigenvalue, eigenfrequency, or mode analysis. When selected, the relative parameter is sorted in the combined solution. The eigenvalues can be sorted in Ascending (the default) or Descending order depending on the Ordering setting. When the Sorting method is Predefined, you can choose to Sort primarily based on the Real part, Imaginary part, Real part magnitude, Imaginary part magnitude, or Absolute value. The same settings are available for the Secondarily option, which is used to resolve conflicts. The defaults for eigenvalues are Real part for Sort primarily and Imaginary part magnitude for Secondarily. For eigenfrequencies, the defaults are Imaginary part for Sort primarily and Imaginary part magnitude for Secondarily. Also, the Sort based on transformed eigenvalues checkbox is selected by default to take and eigenvalue transformation into account when sorting. Alternatively, if you choose User defined as the Sorting method, you can define an arbitrary number of (ordered) custom sorting priority expressions in the table that appears. In the Sorting priority expression column, add expressions for the sorting in order of priority. Those expressions can be functions of the eigenvalue lambda or eigenfrequency freq. For example, you can specify an expression such as abs(freq-1) to sort according to the distance from a given shift (1 in this case). If desired, add some descriptive text in the Description column for the expressions. Select the Conjugate-pair consecutive sort checkbox to make complex-conjugate eigenpairs appear one after the other, regardless of the sorting rules.
You can also control the solution type and select the corresponding checkboxes manually before running the combine solution operation. From the Interpolation and sort list, choose Automatic or Manual. The default is Automatic, and it determines which of the checkboxes mentioned above that appear. For the Manual method, all applicable checkboxes are listed for each solution type. However, only relevant checkboxes are applied when computing the combined solution. From the Solution type list, choose Parametric, Time, or Eigenvalue. When the Solution type is Parametric, it means that the source solutions are parametric solutions with or without a continuous parameter. When the Solution type is Time, it means that the source solutions are time-dependent solutions, including time–parametric solutions. When the Solution type is Eigenvalue, it means that the source solutions are eigenvalue types of solutions, including eigenvalue–parametric solutions.
Convert Outer to Inner Solutions
To convert an outer solution to an inner solution, choose the solution to convert from the Solution list. The list contains all available solutions from a Parametric Sweep, that is, any Parametric Solutions nodes and any outer solutions listed under a Parametric Solutions node (from this and other studies in the model).
When the source solution is a Parametric Solutions node, from the Use list, choose All (the default), From list or Manual to decide which outer solutions to convert. If you choose All, all outer solutions listed under the selected Parametric Solutions node are converted. If you choose From list, select the outer solutions to convert from the list below. If you choose Manual, enter outer solutions as indices (integers) in the Index field.
Summation and Weighted Summation
For a summation of solutions, from the Solution list, choose the source solution to sum up all solutions in that source solution. The default is Current, to use the current solution.
Additionally, for a weighted summation, choose a method for the weights from the Weights method list: One expression or List of expressions.
Choose One expression to use a single expression, in the Expression field, to define the weights for all solutions. The expression can be, for example, a constant value like 0.1 or a parameter-based scalar value like t. The result of the expression has to be a scalar. Weighted summation with the weights method set to One expression and Expression being 1 is the same as Summation.
Choose List of expressions to define a list of expressions in the table below. The Indices column contains the solution numbers whose solutions are to be summed up. Solution whose solution numbers are not shown in the table will not be summed up. The expressions in the List of expressions column define how the weights are calculated. Different solution numbers can have their own weight expressions. Each expression should result in a scalar number. The status of the checkboxes in the Active column determines whether the corresponding solution number is taken into account in the summation or not.
If you only want to use the combined solution for a weighted summation, select the Clear source solution checkbox.
General Summation
Use this option to sum up all solutions in the source solution based on Component expressions, which are used to compute the corresponding DOFs in the solution vectors. You can use different expressions for different component names in the table that appears. For example, by default, the Component expressions are the component names themselves, in which case the general summation produces the same result as Summation and Weighted summation with weight 1. The Component expressions can also be the function of the component names like (comp1.u)^2 or abs(comp1.u), for which the general summation sum up the squares of all solutions or the absolute value of all solutions, respectively.
From the Solution list, choose the source solution of the general summation. The default is Current, to use the current solution.
The General summation option is only available for Combine Solution nodes that are added under a Solution node.
Remove Solutions
If you choose Remove solutions, you can remove some solutions (such as some eigenmodes, parametric solutions, or time steps) from the input solution. When using the Remove Solutions operation, from the Exclude or include list, choose Exclude (the default) or Include to use the criteria for choosing solutions as the ones to exclude or include.
From the Exclude method or Include method list, choose Explicit (the default) or Implicit to use an explicit choice of solutions or an implicit choice using Boolean expressions for the solutions to exclude or include.
For Explicit, choose All, From list, or Manual from the Selection list. For From list, choose solutions to exclude or include from the list. For Manual, enter solutions as indices (integers) in the Index field.
For Implicit, enter a Boolean expression in the Exclude if or Include if field. All solutions for which the expression evaluates to true are excluded or included. For example, if the source solution is a time-dependent solution, the Exclude if or Include if field can have an expression like t>0.25, meaning that only solutions whose parameter t is larger than 0.25 will be included or excluded.
If you only want to use the combined solution (a version of the input solution with some solutions removed), select the Clear source solution checkbox.
See Axisymmetric Transient Heat Transfer: Application Library path COMSOL_Multiphysics/Heat_Transfer/heat_transient_axi.