# Acoustic Equation and its program

**URL:** https://community.freefem.org/t/acoustic-equation-and-its-program/492
**Category:** General Discussion
**Created:** [July 6, 2020, 11:33am UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492 "2020-07-06T11:33:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![AKS](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@AKS](https://community.freefem.org/u/AKS)
#### Post date: [July 6, 2020, 11:33am UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/1 "2020-07-06T11:33:46Z")

</div>

Hello, I am somewhat new to FreeFEM. Using it for acoustic analysis. Can someone please help me in knowing how the example code is working. I’m unable to get:

1. How the direction of flow is defined (it is given in documentation that sound is coming from left vertical border) in Acoustic example (under learning by examples)?
2. What is ‘g’ there. It is given that it is source equation but from where do we get that and are there any other equations which could be used?
3. What is ‘kc2’ defined in the program?
4. Results are showing some values which are also in negative, so what are these values representing. Are these dB values or something else!  
Thanks in advance.  
Please, any fast help would be great!

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [July 6, 2020, 11:48am UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/2 "2020-07-06T11:48:29Z")

</div>

1. the flow is defined by the boundary conditions
2. `g` is the Dirichlet boundary condition
3. `kc2` is equal to (k/c)^2
4. the problem is solved in the frequency-domain

---

<div class="post-metadata">

### Author: ![AKS](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@AKS](https://community.freefem.org/u/AKS)
#### Post date: [July 6, 2020, 11:54am UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/3 "2020-07-06T11:54:55Z")

</div>

Thank you!  
Could you please tell how it (g) is defined g=y\*(1-y). Is it any standard equation or just as an example it is used and is there any other equation for this?

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [July 6, 2020, 12:08pm UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/4 "2020-07-06T12:08:16Z")

</div>

It is just a random BC. You can also use Neumann, Robin, PML…

---

<div class="post-metadata">

### Author: ![AKS](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@AKS](https://community.freefem.org/u/AKS)
#### Post date: [July 7, 2020, 8:39am UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/5 "2020-07-07T08:39:19Z")

</div>

Thanks a lot!  
About 4. I just wanted to know that in results (graphical) shown after running program, we see isovalues. So in this acoustic example, is it correct that these are values of sound pressure level (in decibel)? I can’t find if there is any option to show the units of values in graphical results.

---

<div class="post-metadata">

### Author: ![AKS](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@AKS](https://community.freefem.org/u/AKS)
#### Post date: [July 7, 2020, 4:20pm UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/6 "2020-07-07T16:20:36Z")

</div>

Someone please help me with this! (Previous reply).

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [July 7, 2020, 4:28pm UTC](https://community.freefem.org/t/acoustic-equation-and-its-program/492/7 "2020-07-07T16:28:20Z")

</div>

There is no need to spam. _u_ is the amplitude of time-harmonic solutions to  
the wave equation at frequency _k_. You can have a look [there](https://en.wikipedia.org/wiki/Helmholtz_equation).
