# Time-averaged pressure fluctuation

**URL:** <https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171>\
**Category:** General\
**Created:** [18 September 2024 06:47 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171 "2024-09-18T06:47:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [18 September 2024 06:47 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/1 "2024-09-18T06:47:34Z")

</div>

Hello, I want to compute \<p’\*p’\>, where p’ = p-

, (\<\> denotes time-averaged operator). I used the following expression in tav plugin, but the result of fun-avg-up is zero. Is it right? could someone give me some tips?

avg-p = p  
fun-avg-up = (p-%(avg-p)s)\* (p-%(avg-p)s)

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [18 September 2024 10:58 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/2 "2024-09-18T10:58:49Z")

</div>

Also compute the average of p^2 as `avg-p2 = p*p`. Then expand out your expression for \langle \tilde{p}^2 \rangle and simplify using the linearity of expectation.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [22 September 2024 12:37 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/3 "2024-09-22T12:37:33Z")

</div>

So expend the equation \<(p-avg\_p)^2\>, we can get \<(p-avg\_p)^2\>= (avg-p2) - (avg-p)^2. Am I right? But the result of  
 ![image](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/fd64d5d0062be35b3994cecef660a0b2ec035ab3.png) is wrong. I’m not sure if I miscalculated.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [22 September 2024 13:18 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/4 "2024-09-22T13:18:48Z")

</div>

Let \tilde{p} = p - \bar{p}. Then \langle \tilde{p}^2 \rangle = \langle p^2 \rangle - 2\langle p\bar{p}\rangle + \langle \bar{p}\rangle^2 = \langle p^2 \rangle - \bar{p}^2 = \langle p^2 \rangle - \langle p \rangle^2 since \bar{p} = \langle p \rangle and \langle \bar{p} \rangle = \bar{p}.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [10 October 2024 08:52 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/6 "2024-10-10T08:52:18Z")

</div>

Thanks.

I used the FWH euqtion to compute benchmark noise problem, but the results don’t match up with the literature. And the pressure perbutation and pressure contour is attached below. The pressure perbutation is the ‘mag’ value in the fwh.csv.

The case setup is also attached, could someone give me some advice?

 ![2930ff5d3e2aae8bce6cc545a8219e62](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/b41bc5749b65db3c24a5e33575823ea89bfd11fd.png)  
 ![60237a63d40b95cfdc224d7233d67537](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/ff5858d465385c52fccda3f0693c440e2a262a6c.jpeg)

[https://drive.google.com/drive/folders/1BHkLE9Az2keVofqyWME1jnpJeN14gVCg?usp=drive\_link](https://drive.google.com/drive/folders/1BHkLE9Az2keVofqyWME1jnpJeN14gVCg?usp=drive_link)

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [12 October 2024 14:28 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/7 "2024-10-12T14:28:26Z")

</div>

@fdw Does FWH plug work? Could someone give me some advice?

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [13 October 2024 12:21 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/8 "2024-10-13T12:21:24Z")

</div>

Some normalization issues with the plugin were fixed a few months ago, but beyond that it is working.

> <https://github.com/PyFR/PyFR/commit/9a3da810d277a8b23fe786b9b059443611763364>

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 October 2024 11:11 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/9 "2024-10-15T11:11:58Z")

</div>

Thanks a lot.  
I used the latest plugin, but the result didn’t still match up with the literature. As in the previous pressure diagram, P’ is the mag value in the fwh file, and the angle of cosine and sin is arctan (x/y), where x and y are the coordinates of the corresponding observation point.  
Can you help me check what’s wrong with this benkmark case?

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [15 October 2024 13:03 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/10 "2024-10-15T13:03:30Z")

</div>

Is your simulation grid/polynomial order converged?

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 October 2024 16:38 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/11 "2024-10-15T16:38:58Z")

</div>

The residual data is above 100 and oscillates back and forth, can this be considered convergence?  
 ![195f34806945c30152a29abb85c18185](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/9787af81490013e4122edf4a5d28075f69f31f6d.png)

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [15 October 2024 23:46 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/12 "2024-10-15T23:46:25Z")

</div>

Have you run the simulation on two different grids and confirmed that the results are the same?

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [15 October 2024 23:48 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/13 "2024-10-15T23:48:43Z")

</div>

Yes, I have tried this operater, the results are same.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [16 October 2024 12:52 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/14 "2024-10-16T12:52:26Z")

</div>

Do the forces on the cylinders agree with reference data?

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fei](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fei](https://pyfr.discourse.group/u/fei)\
**Post date:** [22 October 2024 15:37 UTC](https://pyfr.discourse.group/t/time-averaged-pressure-fluctuation/1171/15 "2024-10-22T15:37:22Z")

</div>

Sorry for replying so late. Yes, I simulated the airfoil case again, the pressure on the airfoil wall matches well with reference data. But the pressure perbutation didn’t match up with reference.
