Acoustic, how to set BC

Numerical methods and mathematical models of Elmer
Post Reply
tilbury
Posts: 4
Joined: 26 Mar 2024, 04:58
Antispam: Yes

Acoustic, how to set BC

Post by tilbury »

FEA target
Image
I'm trying to calculate the reflection coefficient using pressure in an air box like the image above. A 1000Hz sound is generated at the x = 0 position, and an acoustic impedance is set on the other side to create a sound absorption boundary condition. The incident wave is transmitted in the x-direction, and a reflected wave is generated according to the impedance of the sound-absorbing boundary condition. Assuming that the same air box is repeated continuously in the y and z directions, symmetric boundary conditions are applied to the four surfaces. I am trying to calculate the reflection coefficient of the absorber surface by applying the pressure obtained from the analysis to the formula below.

Image
p is the complex pressure, A is the complex constant, k is the wavenumber, z is the distance from the absorber (z = 0.1 - x), and R is the complex reflection coefficient.

The analysis was performed using the Helmholtz solver and the desired results were obtained. As shown in the figure below, the reflection coefficient |R| was calculated by applying the pressure according to the x position to the above formula, and the FE analysis results and formula match well. Because a far-field condition is applied to the absorber surface, the reflection coefficient comes out as 0.
Image

The final goal of this work is to place a Helmholtz resonator at the absorber location and calculate the reflection coefficient. Currently, I am in the intermediate stage before going to the final stage, and in order to confirm the correct use of Elmer, I am performing analysis by randomly applying reflection coefficients to the absorber plane. To analyze the sound absorption effect of a Helmholtz resonator, heat loss and viscous loss must be considered, so the “Linearized Navier–Stokes Equations in the Frequency Domain” solver should be used instead of the Helmholtz solver.

I tried to analyze it using the acoustic solver (Navier-stokes), but the results seem a bit strange.
Image
I tried to give a far-field condition to the absorber, but the reflection coefficient came out to be 5.1, and above all, the FE analysis results do not match the formula. Perhaps I made a mistake in setting the boundary conditions. I am a beginner who is not familiar with acoustics and elmer. I tried various changes in the sif file several times to get results similar to those of the Helmholtz solver, but I could not find a solution. I really need help.

I would like to know the correct way to set the pulsating boundary condition, symmetric boundary conditions, and the absorber boundary condition.
I'm wondering if there's anything else I'm doing wrong besides this.

sif file

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian 3D
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Steady State Min Iterations = 1
  Output Intervals(1) = 1
  Solver Input File = case.sif
  Post File = case.vtu
  Frequency = Real MATC "f"
$ f = 1000.0
$ U = 4.530183E-2
$ c = 343.0
$ p = 1.205
$ r = 1
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.670374419e-08
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
  Boltzmann Constant = 1.380649e-23
  Unit Charge = 1.6021766e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
End

Solver 1
  Equation = Linearized NavierStokes
  Variable = "Flow"
  Variable DOFs = 10
  Procedure = "Acoustics" "AcousticsSolver"
  Element = "p:1 b:1" 
  Bubbles in Global System = False
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStabl
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILUT
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Max Iterations = 2000
  Linear System Convergence Tolerance = 1e-13
  Linear System Scaling = Logical False
  Linear System Row Equilibration = Logical True 
  Linear System Abort Not Converged = Logical True
  Linear System Residual Output = 10
End

Equation 1
  Name = "Equation 1"
  Active Solvers(1) = 1
End

Material 1
  Heat Conductivity = 0.0257
  Specific Heat = 1005.0
  Equilibrium Density = Real MATC "p"
  Specific Heat Ratio = 1.4
  Equilibrium Temperature = 293.15
  Viscosity = 1.983e-5
End

Boundary Condition 1
  Target Boundaries(1) = 1 
  Name = "Radiator"
  Re Specific Acoustic Impedance = Real MATC "-r * c"
  Im Surface Traction 1 = Real MATC "2 * pi * f * p * U / c"
  Calculate Acoustic Impedance = Logical True
End

Boundary Condition 2
  Target Boundaries(1) = 6 
  Name = "Absorber"
  Re Specific Acoustic Impedance = Real MATC "r * c"
  Calculate Acoustic Impedance = Logical True
End

Boundary Condition 3
  Target Boundaries(4) = 2 3 4 5 
  Name = "Symmetry"
  Re Velocity 2 = 0
  Im Velocity 2 = 0
  Re Velocity 3 = 0
  Im Velocity 3 = 0
  Calculate Acoustic Impedance = Logical True
End
terminal output

Code: Select all

ELMER SOLVER (v 9.0) STARTED AT: 2024/03/26 21:00:35
ParCommInit:  Initialize #PEs:            1
MAIN:
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 9.0 (Rev: Release, Compiled: 2024-02-21)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  Lua interpreter linked in.
MAIN: =============================================================
MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
 Caught LUA error:[string "loadfile("C:/Program Files (x86)/Elmer/shar..."]:1: attempt to call a nil value
 Caught LUA error:[string "loadstring(readsif("case.sif"))()"]:1: attempt to call global 'readsif' (a nil value)
LoadInputFile: Scanning input file: case.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file
LoadInputFile: Loading input file: case.sif
LoadInputFile: Reading base load of sif file
CheckKeyword:  Unlisted keyword: [calculate acoustic impedance] in section: [boundary condition 1]
CheckKeyword:  Unlisted keyword: [calculate acoustic impedance] in section: [boundary condition 2]
CheckKeyword:  Unlisted keyword: [calculate acoustic impedance] in section: [boundary condition 3]
LoadInputFile: Number of BCs: 3
LoadInputFile: Number of Body Forces: 0
LoadInputFile: Number of Initial Conditions: 0
LoadInputFile: Number of Materials: 1
LoadInputFile: Number of Equations: 1
LoadInputFile: Number of Solvers: 1
LoadInputFile: Number of Bodies: 1
ListTagKeywords: Setting weight for keywords!
ListTagKeywords: No parameters width suffix: normalize by area
ListTagKeywords: Setting weight for keywords!
ListTagKeywords: No parameters width suffix: normalize by volume
ElmerAsciiMesh: Base mesh name: ./.
LoadMesh: Elapsed REAL time:     0.9460 (s)
MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case
AcousticsSolver: Initialization the solver
WARNING:: AcousticsSolver: Redefining variable name from the given one!
OptimizeBandwidth: Initial bandwidth for linearized navierstokes: 16927
OptimizeBandwidth: Optimized bandwidth for linearized navierstokes: 322
MAIN: Number of timesteps to be saved: 1
MAIN:
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN:
AcousticsSolver: Helmholtz solution is not available
AcousticsSolver: Acoustic interface boundary conditions cannot be applied
AcousticsSolver:
AcousticsSolver: -------------------------------------
AcousticsSolver:  Frequency (Hz):    999.99999999999989
AcousticsSolver: -------------------------------------
AcousticsSolver:
AcousticsSolver: Starting Assembly
AcousticsSolver: Estimated assembly time (s):    32.38
AcousticsSolver:    Assembly:   8 % done
AcousticsSolver:    Assembly:  16 % done
AcousticsSolver:    Assembly:  24 % done
AcousticsSolver:    Assembly:  33 % done
AcousticsSolver:    Assembly:  41 % done
AcousticsSolver:    Assembly:  49 % done
AcousticsSolver:    Assembly:  58 % done
AcousticsSolver:    Assembly:  66 % done
AcousticsSolver:    Assembly:  74 % done
AcousticsSolver:    Assembly:  83 % done
AcousticsSolver:    Assembly:  91 % done
AcousticsSolver:    Assembly:  99 % done
WARNING:: Acoustics: Could not find variable U for FSI simulation
AcousticsSolver: Assembly done
CRS_ComplexILUT: ILU(T) (Complex), Starting factorization:
      10 0.8427E+01
      20 0.2603E+00
      30 0.6830E-10
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.11033083E-02  2.0000000     ) :: linearized navierstokes
AcousticsSolver:
AcousticsSolver:  Result Norm    :    1.1033083465563131E-003
AcousticsSolver:  Relative Change:    2.0000000000000000
AcousticsSolver:  Assembly: (s)   31.46
AcousticsSolver:  Solve:    (s)   13.46
Acoustics:  Self specific acoustic impedance on bc            1
Acoustics:    In-phase with velocity:       -698.03202888475835
Acoustics:    Out-of-phase with velocity:    12.118205541296385
AcousticsSolver: Exiting the solver...
ComputeChange: SS (ITER=1) (NRM,RELC): ( 0.53399582      2.0000000     ) :: linearized navierstokes
ResultOutputSolver: -------------------------------------
ResultOutputSolver: Saving with prefix: case
ResultOutputSolver: Creating list for saving - if not present
CreateListForSaving: Field Variables for Saving
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving results in VTK XML format with prefix: case
VtuOutputSolver: Saving number of partitions: 1
ResultOutputSolver: -------------------------------------
MAIN: *** Elmer Solver: ALL DONE ***
ReleaseMeshFaceTables: Releasing number of faces: 184754
MAIN: The end
SOLVER TOTAL TIME(CPU,REAL):        47.46       47.46
ELMER SOLVER FINISHED AT: 2024/03/26 21:01:22
The compressed file of the analysis folder is attached.
https://drive.google.com/file/d/1Qr-i_t ... drive_link
Post Reply