Sound Damping variable distance in Elmer Helmholtz

General discussion about Elmer
Post Reply
IsotoCedex
Posts: 12
Joined: 18 Mar 2024, 09:51
Antispam: Yes

Sound Damping variable distance in Elmer Helmholtz

Post by IsotoCedex »

Hello, everyone,

I am trying to apply the attenuation by divergence model to the Helmholtz equation in Elmer (damping).

The divergence attenuation model that I apply is: Adiv = 20 × lg(d) + 11 (in dB)

In Pa is:

Code: Select all

Adiv=20e-6 * 10^((20 *LOG(d)/LOG(10) + 11) / 20)
where d= distance
The way to include it is like a "body force":

Code: Select all

Body Force 1
  Name = "Divergence Damping"
  Pressure Source 1 = Variable Coordinate 1, Coordinate 2
    Real MATC "20e-6 * 10^((20 * log(sqrt(tx(0)^2 + tx(1)^2))/log(10) + 11) / 20)"
  Pressure Source 2 = 0.0
End

PROBLEM: The result is identical, with and without the attenuation due to the divergence.

Can you give me a hand?

Thank you so much!

The complete SIF is as follows:

Code: Select all

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

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals(1) = 1
  Solver Input File = case500_d0_BodyForceCNOSSOSdivEq.sif
  Post File = case500_d0_BodyForceCNOSSOSdivEq.vtu
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
  Body force = 1
End

Solver 1
  Equation = Helmholtz Equation
  Variable = -dofs 2 Pressure Wave
  Procedure = "HelmholtzSolve" "HelmholtzSolver"
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-8
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = BILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
  Linear System Preconditioning Damp Coefficient = 0.0
  Linear System Preconditioning Damp Coefficient Im = 0.0
End

Equation 1
  Name = "Helmholtz"
  Convection Velocity 1 = 0
  Convection Velocity 3 = 0
  Convection Velocity 2 = 0
  Angular Frequency = Real MATC "2 * pi * 500"
  Active Solvers(1) = 1
End

Material 1
  Name = "Air (room temperature)"
  Heat expansion Coefficient = 3.43e-3
  Sound speed = 343.0
  Relative Permittivity = 1.00059
  Density = 1.205
  Heat Conductivity = 0.0257
  Viscosity = 1.983e-5
  Sound damping = 0.0
  Heat Capacity = 1005.0
End

Body Force 1
  Name = "Divergence Damping"
  Pressure Source 1 = Variable Coordinate 1, Coordinate 2
    Real MATC "20e-6 * 10^((20 * log(sqrt(tx(0)^2 + tx(1)^2))/log(10) + 11) / 20)"
  Pressure Source 2 = 0.0
End

Initial Condition 1
  Name = "InitialCondition 1"
End

Boundary Condition 1
  Target Boundaries(37) = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 51 52 
  Name = "Fuente"
  Pressure Wave 2 = 0
  Pressure Wave 1 = 2
End

Boundary Condition 2
  Target Boundaries(5) = 36 46 47 48 50 
  Name = "Salidas"
  Wave impedance 1 = -343
  Wave impedance 2 = 0
End

Boundary Condition 3
  Target Boundaries(10) = 37 38 39 40 41 42 43 44 45 49 
  Name = "Reflejante"
  Wave Flux 2 = 0
  Wave Flux 1 = 0
End

kevinarden
Posts: 2428
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Sound Damping variable distance in Elmer Helmholtz

Post by kevinarden »

The only way I could get it to make a difference was

Body Force 1
Name = "Divergence Damping"
Pressure = Variable Coordinate 1, Coordinate 2
Real MATC "20e-6 * 10^((20 * log(sqrt(tx(0)^2 + tx(1)^2))/log(10) + 11) / 20)"
End
mika
Posts: 253
Joined: 15 Sep 2009, 07:44

Re: Sound Damping variable distance in Elmer Helmholtz

Post by mika »

IsotoCedex wrote: 17 May 2024, 10:34 The result is identical,
It seems that Elmer really generates a source term from the given Pressure Source definition. I believe it may make only a very small modification of the model. You might notice a change if the source is scaled to make it larger.
nehakakar
Posts: 3
Joined: 17 May 2024, 16:55
Antispam: Yes
Location: India
Contact:

Re: Sound Damping variable distance in Elmer Helmholtz

Post by nehakakar »

Hey hi, the problem is in the definition of the pressure source in the body force. The expression for damping might not be correctly applied.
Post Reply