Solution Number: 1118
Title: Resolving time-dependent waves
Platform: All Platforms
Applies to: COMSOL Multiphysics, RF Module, Structural Mechanics Module, Acoustics Module, Wave Optics Module
Versions: All versions
Categories: Solver, Mesh, General
Keywords:

Problem Description

I am solving a time-dependent wave problem, but the solution does not look quite right. I was expecting a smooth propagating waveform but see mostly noise.

Solution

Electric field norm

The accuracy in a model solving an equation for electromagnetic, structural, or any other kind of waves is often limited by how well the mesh resolves the waves. Time-dependent wave equations also put constraints on the time steps used by the solver. This article describes how you can control the mesh and the solver settings to get an accurate solution.

Start by deciding what mesh size you want to use. Just like in the frequency domain, you will need at least approximately 5 second-order mesh elements per wavelength. Keep in mind that in a time domain model, your wave does not consist of just one frequency, but can rather be described as a frequency spectrum. The example model at the bottom of this article uses Gaussian pulses with a standard deviation of √2/(2πf0). With this expression, most of the energy content in the pulse (95.5%) will be distributed over frequencies lower than f0. If you want to resolve these frequencies, the maximum allowed mesh element size becomes h0 = c/(N f0), where c is the local speed of light or sound, and N = 5 the number of mesh elements per wavelength.

You should aim for a time step that resolves the wave equally well in time as the mesh does in space. Any longer time steps will not make optimal use of the mesh, and any shorter time steps will lead to longer solution times with no considerable improvements to the results. The relationship between mesh size and time step length is known as the CFL number: CFL = cΔt/h, where Δt is the time step and h is the mesh size. In practice, with the default second order mesh elements, a CFL number of 0.2 proves to be near optimal.

By default, the time dependent solver will continuously adjust the time step in order to fulfill your specified tolerances. If you already know the time step that you want the solver to take, it is easier and more efficient to set it manually. This is done in the Settings window of the Time-Dependent Solver node. In order to make this node appear, you may need to right-click the Study node and select Show Default Solver.

Time Stepping

Note that changing the number of output times in the Step 1: Time Dependent node controls the output times, but has little effect on the time steps actually taken by the solver.

The file RF_Gaussians_53.mph found below demonstrates appropriate mesh and solver settings in a model of two electromagnetic Gaussian plane wave pulses propagating in air. For an example in acoustics, see the Gaussian Explosion in the Application Library of the Acoustics Module.

Related Files

RF_Gaussians_53.mph 1.3 MB

Disclaimer

COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.