Search code examples
rangeexpressionmathematical-expressionscomsol

How will Comsol use the expression "0 10^range(2, 0.1, 7.5)"?


I am facing an issue with the range function. How will the following expression be used?

settings of time-dependent study step


Solution

  • The syntax of the range function is explained in section "Entering Ranges and Vector-Valued Expressions" of the Comsol Reference Manual. It can only be used for input fields that expect multiple values, such as the output times of the time-dependent solver in the example from the question.

    In this case, it creates an array with values 0, 102, 102.1, … 107.4, 107.5, the default unit being seconds. You can see the effect of the expression by running the study and noting that the resulting data set contains solutions for times 0 s, 100 s, 125.89 s, … 2.5119e7 s, 3.162e7 s, where those numbers correspond to the given powers of 10.