Please login with a confirmed email address before reporting spam
Posted:
1 year ago
09.08.2023, 06:57 GMT-4
Updated:
1 year ago
09.08.2023, 06:58 GMT-4
Hello,
step1(t) is a smoothed step function, you have others available (read the documentation!). You can plot them to visualize them as well. When multiplied by a constant, it makes the result going from 0 (by default) to the constant value. In some cases (but not all!) having a discontinuous function (step, heaviside or the like) is actually very difficult to solve numericaly. Smoothing out the step is then the preferred way to go and COMSOL has preimplemented those functions, which is very convenient.
To illustrate this, if you take the Fourier transform of a discontinuous function (of time) you'll end up with a very large frequency spectrum that in practice is impossible to resolve in time if you want to get the high frequencies (it means very small time steps). Making a smooth transition is a way to reduce the frequency content of your varying function so that your time integrator will have a chance to fully resolve the dynamics.
This situation is met often when you want to adjust one boundary condition with time. Just note that in the real world you cannot have a velocity field that goes from 0 to a finite value, so this smoothing is consistent with reality. It helps the convergence because the time steps do not need to be too small.
As for the notation t[1/s], or equivalently t/1[s], this is to specify the unit so that the variable t of the function is dimensionless, but I think COMSOL has recently removed this constraint, so that you won't have any warning if you don't specify it. Anyhow even with a warning regarding units this won't prevent the computation to run.
Eric Favre
Renaissance Fusion
-------------------
Eric Favre
Renaissance Fusion
Hello,
step1(t) is a smoothed step function, you have others available (read the documentation!). You can plot them to visualize them as well. When multiplied by a constant, it makes the result going from 0 (by default) to the constant value. In some cases (but not all!) having a discontinuous function (step, heaviside or the like) is actually very difficult to solve numericaly. Smoothing out the step is then the preferred way to go and COMSOL has preimplemented those functions, which is very convenient.
To illustrate this, if you take the Fourier transform of a discontinuous function (of time) you'll end up with a very large frequency spectrum that in practice is impossible to resolve in time if you want to get the high frequencies (it means very small time steps). Making a smooth transition is a way to reduce the frequency content of your varying function so that your time integrator will have a chance to fully resolve the dynamics.
This situation is met often when you want to adjust one boundary condition with time. Just note that in the real world you cannot have a velocity field that goes from 0 to a finite value, so this smoothing is consistent with reality. It helps the convergence because the time steps do not need to be too small.
As for the notation t[1/s], or equivalently t/1[s], this is to specify the unit so that the variable t of the function is dimensionless, but I think COMSOL has recently removed this constraint, so that you won't have any warning if you don't specify it. Anyhow even with a warning regarding units this won't prevent the computation to run.
Eric Favre
Renaissance Fusion