PDF

Transient Gaussian Explosion
Introduction
This example introduces some important concepts to have in mind when solving transient problems. In particular, it examines the relationship between the frequency content in the sources driving the model, the mesh resolution, and the time step.
Model Definition
An ellipse with sound-hard walls has the interesting property that an acoustic signal emanating from one of the foci refocuses at the other focal point b/c seconds later, where b (SI unit: m) is the major axis length and c (SI unit: m/s) is the speed of sound.
Inspired by Ref. 1 and Ref. 2, this model involves a Gaussian explosion at one focus of an ellipse to illustrate some properties of time-dependent acoustic problems. The major and minor axis lengths are 10 m and 8 m, respectively. The major axis coincides with the x-axis and the foci are located at x = −3 m and 3 m. Because of symmetry, the model can be limited to the upper half plane.
Denoting the fluid density by ρ and the speed of sound by c, the acoustic pressure field p(xt), inside the elliptical chamber is governed by the scalar wave equation
where the point-source term on the right-hand side is given by
where δ(2) is the two dimensional Dirac delta function. The time dependence of the explosion is determined by the cutoff Gaussian pulse
describing the rate of airflow (SI unit: m2/s) away from the source, located at x = x0. The parameter f0, which is proportional to the pulse bandwidth, is chosen as f0 = 380 Hz. As the following plots show, by taking τ = 1/f0 the pulse very closely approximates a full Gaussian, the effect of the cutoff tails being numerically insignificant.
Figure 1: Normalized Gaussian pulse (left) and its derivative (right).
A particularly interesting property of the Gaussian function is that its Fourier transform, depicted in Figure 3, is equally simple (neglect cutoff effects):
where ω0 = 2π f0. The magnitude of the Fourier transform falls off quickly for increasing angular frequencies ω. Practically all the energy in the signal is contained in the frequency band 2ω0 < ω 2ω0 with most of it concentrated between −ω0 and ω0.
Therefore, when using a forcing function of this type, it is enough to resolve wavelengths corresponding to the angular frequency ω0, which in turn corresponds to the frequency f0. In this model, the parameter that defined the maximal frequency to resolve is fmax, it is set equal to 600 Hz which is slightly higher than f0 (and will resolve the pulse fully).
In order to well resolve the propagating pulse in space the rule of thumb is to use a minimum of 5 to 6 elements per wavelength (at the maximal frequency), when using quadratic Lagrange elements. The typical mesh size is given by
Where hmax is a typical maximal mesh-element size, and N is the number of elements per wavelength required to resolve a harmonic wave with some accuracy. The following discussion uses N = 5. The important point is that there is little to gain in prescribing a forcing function that contains frequencies that the mesh cannot resolve.
In addition to controlling the pulse shape, the mesh resolution imposes a restriction on the internal time steps size taken by the solver. In the transient interfaces of the Acoustics Module, the solver is controlled from the Transient Solver Settings section found at the top physics level. The user should enter the Maximum frequency to resolve in the model. It is also possible to choose a Time stepping (method). Here it is recommended to use the default Fixed (preferred) option.
Time Stepping Explanation
The logic for the automatic choice made is as follows. The relationship between mesh size and time-step size is closely related to the CFL number (Ref. 3), which is defined as
This nondimensional number can be interpreted as the fraction of an element the wave travels in a single time step. A CFL 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 second-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 second-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 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 CFL 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 not recommended as the manual 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 CFL number is roughly 0.1. These values give a good margin of safety.
 
Results and Discussion
Using the properties of air for the medium and selecting a mesh density based on the parameters. The model runs for 0.035 s so that you can study the refocusing at the right-hand focus point at roughly 0.0315 s.
Figure 2: The refocusing occurs at roughly 0.0315 s. An animation gives a better feeling for the process.
For the selected combination of mesh size, pulse shape, and time step, the solution can be shown to be both smooth and accurate. Selecting a smaller value for N leads to oscillations if the CFL number is small enough (choosing a too low frequency to resolve), while selecting a higher CFL number (and consequentially a larger time step) leads to an inaccurate solution.
Figure 3 shows the Fourier transform of the source signal. Plotting the frequency content of the source signal is a good way for selecting the maximal frequency to resolve in the model.
Figure 3: Fourier transform of the source signal.
References
1. B. Yue and M.N. Guddati, “Dispersion-reducing Finite Elements for Transient Acoustics”, J. Acoust. Soc. Am., vol. 118, no. 4, pp. 2132–2141, 2005.
2. H.-O. Kreiss, N.A. Peterson, and J. Yström, “Difference Approximations for the for the second order wave equation”, SIAM J. of Num. Analys., vol. 40, 1940–1967, 2002.
3. R. Courant, K.O. Friedrichs, and H. Lewy, “On the Partial Difference Equations of Mathematical Physics”, IBM Journal, vol. 11, pp. 215–234, 1956.
Application Library path: Acoustics_Module/Tutorials,_Pressure_Acoustics/gaussian_explosion
Modeling Instructions
From the File menu, choose New.
New
In the New window, click Model Wizard.
Model Wizard
1
In the Model Wizard window, click 2D.
2
In the Select Physics tree, select Acoustics>Pressure Acoustics>Pressure Acoustics, Transient (actd).
3
Click Add.
4
Click Study.
5
In the Select Study tree, select General Studies>Time Dependent.
6
Click Done.
Geometry 1
Ellipse 1 (e1)
1
In the Geometry toolbar, click Ellipse.
2
In the Settings window for Ellipse, locate the Size and Shape section.
3
In the a-semiaxis text field, type 5.
4
In the b-semiaxis text field, type 4.
5
In the Sector angle text field, type 180.
Point 1 (pt1)
1
In the Geometry toolbar, click Point.
2
In the Settings window for Point, locate the Point section.
3
In the x text field, type -3.
4
Click Build All Objects.
5
Click the Zoom Extents button in the Graphics toolbar.
The completed geometry should look like that in the figure below.
Global Definitions
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Add Material
1
In the Home toolbar, click Add Material to open the Add Material window.
2
Go to the Add Material window.
3
4
Click Add to Component in the window toolbar.
5
In the Home toolbar, click Add Material to close the Add Material window.
Pressure Acoustics, Transient (actd)
Enter the maximal frequency to be resolved in the model. This value can be assessed from a Fourier analysis of the sources as depicted in Figure 3.
Under the Transient Solver Settings section enter the Maximum frequency to resolve and set it to f_max.
Point Source 1
1
In the Model Builder window, under Component 1 (comp1) right-click Pressure Acoustics, Transient (actd) and choose Points>Point Source.
2
3
In the Settings window for Point Source, locate the Point Source section.
4
From the Type list, choose Gaussian pulse.
5
In the A text field, type A.
6
In the f0 text field, type f0.
7
In the tp text field, type t0.
Mesh 1
With the choice of a typical mesh size set to h_max, the mesh must be made as isotropic as possible. You can accomplish this by setting the maximum mesh size explicitly while keeping the other mesh parameters relaxed.
Free Triangular 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose Free Triangular.
Size
1
In the Settings window for Size, locate the Element Size section.
2
Click the Custom button.
3
Locate the Element Size Parameters section. In the Maximum element size text field, type h_max.
4
Click Build All.
Study 1
Step 1: Time Dependent
1
In the Model Builder window, under Study 1 click Step 1: Time Dependent.
2
In the Settings window for Time Dependent, locate the Study Settings section.
3
In the Times text field, type range(0,0.5e-3,35e-3).
This setting gives you a solution output at every 0.5 ms from t = 0 to t = 35 ms. This should not be confused with the time steps actually taken by the solver. These are set automatically based on the settings entered above. To see where they end up, do the following:
Solution 1 (sol1)
1
In the Study toolbar, click Show Default Solver.
2
In the Model Builder window, expand the Solution 1 (sol1) node, then click Time-Dependent Solver 1.
3
In the Settings window for Time-Dependent Solver, click to expand the Time Stepping section.
The solver automatically picks up the settings entered at the physics level (in the Transient Solver Settings section) when the default solver is generated or when solve is clicked the first time. It is in general not necessary to edit these settings.
Experienced users maybe find it useful to edit these settings.
4
In the Study toolbar, click Compute.
Results
Acoustic Pressure (actd)
The default plot shows the pressure at the final time. To get a more attractive plot, you can add a height.
Height Expression 1
1
In the Model Builder window, expand the Acoustic Pressure (actd) node.
2
Right-click Surface 1 and choose Height Expression.
You can select different times to look at the wave using the parent Acoustic Pressure (actd) node. At t = 0.0315 s, you are close to the moment when the waves refocus.
Acoustic Pressure (actd)
1
In the Model Builder window, click Acoustic Pressure (actd).
2
In the Settings window for 2D Plot Group, locate the Data section.
3
From the Time (s) list, choose 0.0315.
4
In the Acoustic Pressure (actd) toolbar, click Plot.
5
Click the Zoom Extents button in the Graphics toolbar.
The resulting plot is found in Figure 2. It is illustrative to animate transient problems in general and wave propagation in particular; you can do this by right-clicking the Export node and adding an Animation feature.
It is also possible to plot the field on all sides of the point source by defining a mirror data set.
Mirror 2D 1
1
In the Results toolbar, click More Datasets and choose Mirror 2D.
The symmetry line is the x-axis.
2
In the Settings window for Mirror 2D, locate the Axis Data section.
3
From the Axis entry method list, choose Point and direction.
4
Find the Direction subsection. In the X text field, type 1.
5
In the Y text field, type 0.
Acoustic Pressure (actd)
1
In the Model Builder window, click Acoustic Pressure (actd).
2
In the Settings window for 2D Plot Group, locate the Data section.
3
From the Dataset list, choose Mirror 2D 1.
4
In the Acoustic Pressure (actd) toolbar, click Plot.
5
Click the Zoom Extents button in the Graphics toolbar.
6
Click the Transparency button in the Graphics toolbar.
7
Click the Transparency button in the Graphics toolbar to restore the default transparency setting.
The following instructions show how to create Figure 1. These instructions are optional.
Plot the normalized Gaussian and its derivative by plotting two analytic functions.
Global Definitions
Analytic 1 (an1)
1
In the Home toolbar, click Functions and choose Global>Analytic.
2
In the Settings window for Analytic, type g in the Function name text field.
3
Locate the Definition section. In the Expression text field, type exp(-pi^2*(x-1)^2).
4
Locate the Plot Parameters section. In the table, enter the following settings:
5
Click Create Plot.
Results
1D Plot Group 2
1
In the Settings window for 1D Plot Group, type Normalized Gaussian in the Label text field.
2
Locate the Plot Settings section. In the x-axis label text field, type t/r.
3
In the y-axis label text field, type exp(-pi^2*(t/r-1)^2).
4
In the Normalized Gaussian toolbar, click Plot.
Global Definitions
Analytic 2 (an2)
1
In the Home toolbar, click Functions and choose Global>Analytic.
2
In the Settings window for Analytic, type dg in the Function name text field.
3
Locate the Definition section. In the Expression text field, type -2*pi^2*(x-1)*exp(-pi^2*(x-1)^2).
4
Locate the Plot Parameters section. In the table, enter the following settings:
5
Click Create Plot.
Results
1D Plot Group 3
1
In the Settings window for 1D Plot Group, type Derivative of norm. Gaussian in the Label text field.
2
Locate the Plot Settings section. In the x-axis label text field, type t/r.
3
In the y-axis label text field, type -2*pi^2*(t/r-1)*exp(-pi^2*(t/r-1)^2).
4
In the Derivative of norm. Gaussian toolbar, click Plot.
Finally, create the plot shown in Figure 3 where the frequency content of the source is analyzed.
1D Plot Group 4
1
In the Home toolbar, click Add Plot Group and choose 1D Plot Group.
2
In the Settings window for 1D Plot Group, type Fourier Transform of Source in the Label text field.
Point Graph 1
1
Right-click Fourier Transform of Source and choose Point Graph.
2
3
In the Settings window for Point Graph, click Replace Expression in the upper-right corner of the y-axis data section. From the menu, choose Component 1>Pressure Acoustics, Transient>Sources>actd.mls1.S - Source amplitude - N/m².
4
Locate the x-Axis Data section. From the Parameter list, choose Frequency spectrum.
5
In the Fourier Transform of Source toolbar, click Plot.