PDF

Helmholtz Resonator with Flow:
Imported Fluid Flow from CGNS Data
Introduction
Helmholtz resonators are used in exhaust systems, as they can attenuate a specific narrow frequency band. The presence of a flow in the system alters the acoustic properties of the resonator and the transmission loss of the subsystem. In this tutorial model, a Helmholtz resonator is located as a side branch to a main duct. The transmission loss through the main duct is investigated when a flow is introduced.
This model is an extension of the Helmholtz Resonator with Flow: Interaction of Flow and Acoustics tutorial. In this version, the mean flow is imported and mapped using the Imported Fluid Flow interface and the CFD Data (CGNS) function. The model is set up for the case where the Mach number is equal 0.1. The acoustics problem is then solved using the Linearized Navier–Stokes, Frequency Domain interface.
Note: Evaluation of CGNS data in COMSOL is only supported on Windows.
The CGNS data imported in this model is courtesy of Resolvent Denmark PS (resolvent.com).
Model Definition
The model setup and flow conditions follow the definitions in the Helmholtz Resonator with Flow: Interaction of Flow and Acoustics tutorial. In the present model, only the case where the Mach number is equal to 0.1 is studied.
In this model, the flow is not solved for; instead, it is imported using the Imported Fluid Flow interface and the CFD Data (CGNS) function. The workflow is integrated with the Background Fluid Flow Coupling multiphysics coupling and the dedicated Mapping study.
Results and Discussion
The mapped background pressure and the magnitude of the background velocity is depicted in Figure 1. A comparison between the mapped z-velocity and the values of the CGNS function data, in a cross section through the main pipe, is depicted in Figure 2. Notice that the mapped data is not completely identical to the function values. There are different ways to control the mapping in the Imported Fluid Flow interface, both in terms of the amount of smoothing but also with regards to constraints that can be set on the mapping.
The acoustic pressure resulting from solving the linearized Navier–Stokes equations is depicted in Figure 3. Finally, the transmission loss of the system is depicted in Figure 4. The values can be compared to the results in the Helmholtz Resonator with Flow: Interaction of Flow and Acoustics tutorial.
Figure 1: The mapped flow pressure (top) and velocity (bottom).
Figure 2: Comparison of the mapped z-velocity and the values of the CGNS function evaluated at the same points.
Figure 3: Acoustic pressure distribution at 200 Hz.
Figure 4: Transmission loss TL of the resonator system.
Application Library path: Acoustics_Module/Aeroacoustics_and_Noise/helmholtz_resonator_with_flow_cgns
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  3D.
2
In the Select Physics tree, select Acoustics > Aeroacoustics > Imported Fluid Flow (iff).
3
Click Add.
4
In the Select Physics tree, select Acoustics > Aeroacoustics > Linearized Navier–Stokes, Frequency Domain (lnsf).
5
Click Add.
6
Click  Study.
7
In the Select Study tree, select Preset Studies for Some Physics Interfaces > Mapping.
8
The model setup initially follows the setup in the helmholtz_resonator_with_flow tutorial.
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
Click  Load from File.
4
Geometry 1
Cylinder 1 (cyl1)
1
In the Geometry toolbar, click  Cylinder.
2
In the Settings window for Cylinder, locate the Size and Shape section.
3
In the Radius text field, type Dmain/2.
4
In the Height text field, type Lin+Lout+2*Lpml.
5
Locate the Position section. In the z text field, type -Lin-Lpml.
6
Click to expand the Layers section. In the table, enter the following settings:
7
Clear the Layers on side checkbox.
8
Select the Layers on bottom checkbox.
9
Select the Layers on top checkbox.
Cylinder 2 (cyl2)
1
In the Geometry toolbar, click  Cylinder.
2
In the Settings window for Cylinder, locate the Size and Shape section.
3
In the Radius text field, type Dneck/2.
4
In the Height text field, type 1.2*Lneck.
5
Locate the Position section. In the x text field, type Dmain/2-0.2*Lneck.
6
Locate the Axis section. From the Axis type list, choose x-axis.
Cylinder 3 (cyl3)
1
In the Geometry toolbar, click  Cylinder.
2
In the Settings window for Cylinder, locate the Size and Shape section.
3
In the Radius text field, type Dreson/2.
4
In the Height text field, type Lreson.
5
Locate the Position section. In the x text field, type Dmain/2+Lneck.
6
Locate the Axis section. From the Axis type list, choose x-axis.
Cylinder 4 (cyl4)
1
In the Geometry toolbar, click  Cylinder.
2
In the Settings window for Cylinder, locate the Size and Shape section.
3
In the Radius text field, type Dmain/2.
4
In the Height text field, type Lsource.
5
Locate the Position section. In the z text field, type -Lin.
Cylinder 5 (cyl5)
1
In the Geometry toolbar, click  Cylinder.
2
In the Settings window for Cylinder, locate the Size and Shape section.
3
In the Radius text field, type Dmain/2.
4
In the Height text field, type 0.2.
5
Locate the Position section. In the z text field, type -0.1.
6
Click  Build Selected.
Partition Domains 1 (pard1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Partition Domains.
2
On the object cyl2, select Domain 1 only.
3
In the Settings window for Partition Domains, locate the Partition Domains section.
4
From the Partition with list, choose Extended faces.
5
On the object cyl1, select Boundaries 12 and 15 only.
6
From the Repair tolerance list, choose Relative.
7
Click  Build All Objects.
Delete Entities 1 (del1)
1
In the Model Builder window, right-click Geometry 1 and choose Delete Entities.
2
In the Settings window for Delete Entities, locate the Entities or Objects to Delete section.
3
From the Geometric entity level list, choose Domain.
4
On the object pard1, select Domain 1 only.
5
Click  Build Selected.
Union 1 (uni1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Union.
2
Click in the Graphics window and then press Ctrl+A to select all objects.
Work Plane 1 (wp1)
1
In the Geometry toolbar, click  Work Plane.
2
In the Settings window for Work Plane, locate the Plane Definition section.
3
From the Plane list, choose zx-plane.
Partition Objects 1 (par1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Partition Objects.
2
3
In the Settings window for Partition Objects, locate the Partition Objects section.
4
From the Partition with list, choose Work plane.
5
Click  Build Selected.
Delete Entities 2 (del2)
1
Right-click Geometry 1 and choose Delete Entities.
2
In the Settings window for Delete Entities, locate the Entities or Objects to Delete section.
3
From the Geometric entity level list, choose Domain.
4
On the object par1, select Domains 2, 4, 6, 8, 10, 12, 14, and 16 only.
5
Click  Build All Objects.
Rotate the geometry in the Graphics window. The geometry should look like the figure above.
Definitions
Symmetry
1
In the Definitions toolbar, click  Explicit.
2
In the Settings window for Explicit, locate the Input Entities section.
3
From the Geometric entity level list, choose Boundary.
4
5
In the Label text field, type Symmetry.
Walls
1
In the Definitions toolbar, click  Explicit.
2
In the Settings window for Explicit, locate the Input Entities section.
3
From the Geometric entity level list, choose Boundary.
4
5
In the Label text field, type Walls.
Integration 1 (intop1)
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Integration.
2
In the Settings window for Integration, locate the Source Selection section.
3
From the Geometric entity level list, choose Boundary.
4
5
In the Operator name text field, type intop_in.
Integration 2 (intop2)
1
In the Definitions toolbar, click  Nonlocal Couplings and choose Integration.
2
In the Settings window for Integration, locate the Source Selection section.
3
From the Geometric entity level list, choose Boundary.
4
5
In the Operator name text field, type intop_out.
Perfectly Matched Layer 1 (pml1)
1
In the Definitions toolbar, click  Perfectly Matched Layer.
2
Variables - Incident Plane Wave
1
In the Model Builder window, under Component 1 (comp1) right-click Definitions and choose Variables.
2
In the Settings window for Variables, type Variables - Incident Plane Wave in the Label text field.
3
Locate the Variables section. Click  Load from File.
4
Add Material
1
In the Materials toolbar, click  Add Material to open the Add Material window.
2
Go to the Add Material window.
3
In the tree, select Built-in > Air.
4
Click the Add to Component button in the window toolbar.
5
In the Materials toolbar, click  Add Material to close the Add Material window.
Now, proceed and set up the Imported Fluid Flow physics. The physics refer to a CFD Data (CGNS) function, found in Global Definitions, that links to the external .cgns data. The dedicated interface and Mapping study ensures that the external data is mapped consistently to the COMSOL mesh and variables. This is essential to get accurate solutions as well as an efficient solving procedure.
Global Definitions
CFD Data (CGNS) 1
1
In the Home toolbar, click  Functions and choose Global > CFD Data (CGNS).
2
In the Settings window for CFD Data (CGNS), locate the Functions section.
3
Click  Browse.
4
Add units for the imported flow quantities.
5
Imported Fluid Flow (iff)
Check that the discretization of the imported flow is the same as the aeroacoustics model. For linearized Navier-Stokes linear discretization is the default. You can also inspect the variable names given to the imported quantities.
1
In the Model Builder window, under Component 1 (comp1) click Imported Fluid Flow (iff).
2
In the Settings window for Imported Fluid Flow, click to expand the Discretization section.
3
Click to expand the Dependent Variables section.
Flow Import 1
1
In the Model Builder window, under Component 1 (comp1) > Imported Fluid Flow (iff) click Flow Import 1.
2
In the Settings window for Flow Import, locate the Variables to Map section.
3
From the Imported flow data list, choose CFD Data (CGNS) 1.
4
From the p list, choose Pressure.
5
From the ρ list, choose Density.
6
From the u list, choose Map components.
7
From the u list, choose x_velocity.
8
From the v list, choose y_velocity.
9
From the w list, choose z_velocity.
10
From the μ list, choose Turbulent_viscosity.
Symmetry 1
1
In the Physics toolbar, click  Boundaries and choose Symmetry.
The symmetry condition ensures that the mapped solution is symmetric, in particular that no numerical pollution create flow through the symmetry plane.
2
In the Settings window for Symmetry, locate the Boundary Selection section.
3
From the Selection list, choose Symmetry.
Proceed and add the Background Fluid Flow multiphysics coupling, it couples the imported flow to the acoustics.
Multiphysics
Background Fluid Flow Coupling 1 (bffc1)
1
In the Physics toolbar, click  Multiphysics Couplings and choose Domain > Background Fluid Flow Coupling.
2
In the Settings window for Background Fluid Flow Coupling, locate the Domain Selection section.
3
From the Selection list, choose All domains.
Linearized Navier–Stokes, Frequency Domain (lnsf)
Background Acoustic Fields 1
1
In the Physics toolbar, click  Domains and choose Background Acoustic Fields.
2
3
In the Settings window for Background Acoustic Fields, locate the Background Acoustic Fields section.
4
In the pb text field, type pb.
5
Specify the ub vector as
6
In the Tb text field, type Tb.
Symmetry 1
1
In the Physics toolbar, click  Boundaries and choose Symmetry.
2
In the Settings window for Symmetry, locate the Boundary Selection section.
3
From the Selection list, choose Symmetry.
Now, create the acoustic mesh, following the same procedure as in the helmholtz_resonator_with_flow tutorial. It is not necessary to have a CFD mesh in this case as the imported data is mapped directly to the acoustic mesh.
Mesh 1
Free Tetrahedral 1
1
In the Mesh toolbar, click  Free Tetrahedral.
2
In the Settings window for Free Tetrahedral, locate the Domain Selection section.
3
From the Geometric entity level list, choose Domain.
4
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, locate the Element Size section.
3
Click the Custom button.
4
Locate the Element Size Parameters section. In the Maximum element size text field, type Dmain/8.
5
In the Minimum element size text field, type Dmain/15.
Size 1
1
In the Model Builder window, right-click Free Tetrahedral 1 and choose Size.
2
In the Settings window for Size, locate the Geometric Entity Selection section.
3
From the Geometric entity level list, choose Boundary.
4
5
Locate the Element Size section. Click the Custom button.
6
Locate the Element Size Parameters section.
7
Select the Maximum element size checkbox. In the associated text field, type Dmain/15.
Swept 1
In the Mesh toolbar, click  Swept.
Distribution 1
1
Right-click Swept 1 and choose Distribution.
2
In the Settings window for Distribution, locate the Distribution section.
3
In the Number of elements text field, type 16.
Boundary Layers 1
In the Mesh toolbar, click  Boundary Layers.
Boundary Layer Properties
1
In the Model Builder window, click Boundary Layer Properties.
2
In the Settings window for Boundary Layer Properties, locate the Geometric Entity Selection section.
3
From the Selection list, choose Walls.
4
Locate the Layers section. In the Number of layers text field, type 3.
5
From the Thickness specification list, choose First layer.
6
In the Thickness text field, type Dmain/60.
7
Click  Build All.
Study 1
Step 1: Mapping
In the Study toolbar, click  Compute.
Results
Mapped Pressure (iff)
Mapped Velocity Magnitude (iff)
1
In the Results toolbar, click  3D Plot Group.
2
In the Settings window for 3D Plot Group, type Mapped Velocity Magnitude (iff) in the Label text field.
3
Locate the Color Legend section. Select the Show units checkbox.
Surface 1
1
Right-click Mapped Velocity Magnitude (iff) and choose Surface.
2
In the Settings window for Surface, click Replace Expression in the upper-right corner of the Expression section. From the menu, choose Component 1 (comp1) > Imported Fluid Flow > iff.U_map - Mapped velocity magnitude - m/s.
3
In the Mapped Velocity Magnitude (iff) toolbar, click  Plot.
Add Study
1
In the Home toolbar, click  Windows and choose Add Study.
2
Go to the Add Study window.
3
Find the Physics interfaces in study subsection. In the table, clear the Solve checkbox for Imported Fluid Flow (iff).
4
Find the Studies subsection. In the Select Study tree, select General Studies > Frequency Domain.
5
Click the Add Study button in the window toolbar.
6
In the Home toolbar, click  Add Study to close the Add Study window.
Study 2
Step 1: Frequency Domain
1
In the Settings window for Frequency Domain, locate the Study Settings section.
2
In the Frequencies text field, type range(50,10,200).
Make sure to point to the solution of the Mapping study.
3
Click to expand the Values of Dependent Variables section. Find the Values of variables not solved for subsection. From the Settings list, choose User controlled.
4
From the Method list, choose Solution.
5
From the Study list, choose Study 1, Mapping.
Generate the default solvers and enable the first iterative solver suggestion.
Solution 2 (sol2)
1
In the Study toolbar, click  Show Default Solver.
2
In the Model Builder window, expand the Solution 2 (sol2) node.
3
In the Model Builder window, expand the Study 2 > Solver Configurations > Solution 2 (sol2) > Stationary Solver 1 node.
4
Right-click Study 2 > Solver Configurations > Solution 2 (sol2) > Stationary Solver 1 > Suggested Iterative Solver (GMRES with Direct Precond.) (lnsf) and choose Enable.
5
In the Study toolbar, click  Compute.
Results
Multislice
1
In the Model Builder window, expand the Acoustic Pressure (lnsf) node, then click Multislice.
2
In the Settings window for Multislice, locate the Multiplane Data section.
3
Find the Y-planes subsection. From the Entry method list, choose Coordinates.
4
In the Coordinates text field, type 0.
5
In the Acoustic Pressure (lnsf) toolbar, click  Plot.
Multislice
1
In the Model Builder window, expand the Acoustic Velocity (lnsf) node, then click Multislice.
2
In the Settings window for Multislice, locate the Multiplane Data section.
3
Find the Y-planes subsection. From the Entry method list, choose Coordinates.
4
In the Coordinates text field, type 0.
5
In the Acoustic Velocity (lnsf) toolbar, click  Plot.
Multislice
1
In the Model Builder window, expand the Temperature Variation (lnsf) node, then click Multislice.
2
In the Settings window for Multislice, locate the Multiplane Data section.
3
Find the Y-planes subsection. From the Entry method list, choose Coordinates.
4
In the Coordinates text field, type 0.
5
In the Temperature Variation (lnsf) toolbar, click  Plot.
Transmission Loss
1
In the Results toolbar, click  1D Plot Group.
2
In the Settings window for 1D Plot Group, type Transmission Loss in the Label text field.
3
Locate the Data section. From the Dataset list, choose Study 2/Solution 2 (sol2).
4
Locate the Plot Settings section.
5
Select the x-axis label checkbox. In the associated text field, type f (Hz).
6
Select the y-axis label checkbox. In the associated text field, type TL (dB).
Global 1
1
Right-click Transmission Loss and choose Global.
2
In the Settings window for Global, locate the y-Axis Data section.
3
4
Click to expand the Coloring and Style section. Find the Line markers subsection. From the Marker list, choose Point.
5
In the Transmission Loss toolbar, click  Plot.
Comparison Mapped and Imported Data
1
In the Home toolbar, click  Add Plot Group and choose 1D Plot Group.
2
In the Settings window for 1D Plot Group, type Comparison Mapped and Imported Data in the Label text field.
3
Click to expand the Title section. From the Title type list, choose Label.
Line Graph 1
1
Right-click Comparison Mapped and Imported Data and choose Line Graph.
2
3
In the Settings window for Line Graph, locate the y-Axis Data section.
4
In the Expression text field, type w_map.
5
Click to expand the Legends section. Select the Show legends checkbox.
6
From the Legends list, choose Manual.
7
Line Graph 2
1
In the Model Builder window, right-click Comparison Mapped and Imported Data and choose Line Graph.
2
3
In the Settings window for Line Graph, click Replace Expression in the upper-right corner of the y-Axis Data section. From the menu, choose Global definitions > Functions > z_velocity(x, y, z, t) - CFD Data (CGNS) 1.
4
Locate the y-Axis Data section. In the Expression text field, type z_velocity(x, y, z, 0).
5
Click to expand the Legends section. Select the Show legends checkbox.
6
From the Legends list, choose Manual.
7
8
In the Comparison Mapped and Imported Data toolbar, click  Plot.