When solving transient models, first decide on the maximal frequency you want to resolve, say fmax. This frequency translates to a minimal wavelength
λmin =
c/
fmax and in turn to a maximum element size
hmax <
λmin/5 as discussed in
Meshing (Resolving the Waves).
The value of this maximum frequency should also be entered into the Maximum frequency to resolve field in the
Transient Solver Settings section at the top physics level. Here it is also possible to select the
Time stepping (method) as either
Fixed (preferred) or
Free. It is recommended to use the
Fixed (preferred) method as this method is best suited for wave propagation problems. Using these settings the generated solver will be adequate in most situations if the computational mesh also resolves the frequency content in the model, see
Meshing (Resolving the Waves). The auto generated suggestion is good for all linear and weakly nonlinear problems. If the model studied exhibits high nonlinearities the solver may need manual setup and tuning.
The logic for the automatic choice made is as follows. The mesh resolution imposes a restriction on the time-step size Δt taken by the solver. The relationship between mesh size and time-step size is closely related to the Courant number given by the Courant-Friedrichs-Lewy (CFL) condition (
Ref. 33), which is defined as
where c is the speed of sound and
h is the mesh size. This nondimensional number can be interpreted as the fraction of an element the wave travels in a single (solver) time step. The Courant number around 1 would correspond to the same resolution in space and time if the discretization errors were of the same size; however, that is normally not the case.
By default, COMSOL Multiphysics uses the implicit second-order accurate method generalized-α to solve transient acoustics problems. In space, the default is 2nd-order Lagrange elements. Generalized-
α introduces some numerical damping of high frequencies but much less than the BDF method.
The temporal discretization errors for generalized-α are larger than the spatial discretization errors when 2nd-order elements are used in space. The limiting step size, where the errors are of roughly the same size, can be found somewhere at
CFL < 0.2. You can get away with a longer time step if the forcing does not make full use of the mesh resolution; that is, if high frequencies are absent from the outset.
When the excitation contains all the frequencies the mesh can resolve, there is no point in using an automatic time-step control which can be provided by the time-dependent solver (the Free option). The tolerances in the automatic error control are difficult to tune when there is weak but important high-frequency content. Instead, you can use your knowledge of the typical mesh size, speed of sound, and Courant number to calculate and prescribe a fixed time step. This is exactly the default behavior when the
Fixed (preferred) method is chosen in the
Transient Solver Settings section. The
Free option corresponds to the automatic time-step control but with some tighter controls of the allowed time-steps. This latter option is still in general not recommended as the fixed time stepping option typically yields much better results (and is faster).
The internal time step generated by the Fixed (preferred) option and the entered
Maximal frequency to resolve is set by assuming that the user has generated a mesh that properly resolves the same maximal frequency (minimal wavelength). The following step is generated
Assuming that N is between 5 and 6 and the Courant number is roughly 0.1, these values give a good margin of safety. To check that the accuracy is acceptable, it is recommended that you run a short sequence of typical excitations with progressively smaller time steps (larger
fmax) and check the convergence.