Dear All, I am wondering how exactly Reynolds stresses are calculated in Nektar++. I have two questions regarding the calculation of reynolds stresses: 1) Whether these stresses are being calculated at every time step or just at the end of the simulation when we ask it to output the average field. 2) Once it outputs the average field then does it start from zero to compute the next average output field or proceed from the last saved output averaged field. Any feedback would be of great help. cheer
Hi Wasim, You can specify when the Reynolds stresses are evaluated and how often they are dumped out by using the filter options: <PARAM NAME=“OutputFrequency">100</PARAM> <PARAM NAME="SampleFrequency"> 10 </PARAM> We should probably have some documentation on how they are evaluated as I recall it is based on the idea that if you generate a rolling average per step then calculate the instantaneous Reynolds stresses about this average it will converge to the correct value providing a long enough sample is taken. Perhaps Douglas can provide us with a bit more detail on how this is implemented. The code can be found under: Nektarpp/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp Cheers, Spencer. On 26 Oct 2017, at 12:12, wasim sarwar <waseemsarwar121@hotmail.com<mailto:waseemsarwar121@hotmail.com>> wrote: Dear All, I am wondering how exactly Reynolds stresses are calculated in Nektar++. I have two questions regarding the calculation of reynolds stresses: 1) Whether these stresses are being calculated at every time step or just at the end of the simulation when we ask it to output the average field. 2) Once it outputs the average field then does it start from zero to compute the next average output field or proceed from the last saved output averaged field. Any feedback would be of great help. cheer _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users Spencer Sherwin FREng, FRAeS Head, Aerodynamics, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus, London, SW7 2AZ, UK s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0)20 7594 5052 http://www.imperial.ac.uk/people/s.sherwin/
Hi Wasim, As Spencer mentioned, you can use the parameter SampleFrequency to control how often the filter updates the results. By default it is 1, meaning the solution after each time-step is considered. For each new sample, the following steps are used to update the results 1 - Update the sum of each velocity component U_{n} = U_{n-1} + u_{n} (and similarly for v and w) 2 - Calculate deviations from the average deltaU = \bar{u}_{n} - u_{n} = U_{n} / n - u_{n} 3 - Update C_{n} = sum_i (u_i- \bar{u}_{n})(v_i- \bar{v}_{n}) using the recurrence relation C_{n} = C_{n-1} + n/(n-1) * deltaU * deltaV The Reynolds stresses can then be obtained as \bar{u'v'} = C_{n}/n Regarding your second question, the results are not reset after intermediate outputs, meaning the stresses are always averages starting at the beginning of the simulation. Cheers, Douglas 2017-11-05 16:42 GMT-02:00 Sherwin, Spencer J <s.sherwin@imperial.ac.uk>:
Hi Wasim,
You can specify when the Reynolds stresses are evaluated and how often they are dumped out by using the filter options:
<PARAM NAME=“OutputFrequency">100</PARAM>
<PARAM NAME="SampleFrequency"> 10 </PARAM>
We should probably have some documentation on how they are evaluated as I recall it is based on the idea that if you generate a rolling average per step then calculate the instantaneous Reynolds stresses about this average it will converge to the correct value providing a long enough sample is taken.
Perhaps Douglas can provide us with a bit more detail on how this is implemented. The code can be found under:
Nektarpp/solvers/IncNavierStokesSolver/Filters/FilterReynoldsStresses.cpp
Cheers, Spencer.
On 26 Oct 2017, at 12:12, wasim sarwar <waseemsarwar121@hotmail.com> wrote:
Dear All, I am wondering how exactly Reynolds stresses are calculated in Nektar++. I have two questions regarding the calculation of reynolds stresses: 1) Whether these stresses are being calculated at every time step or just at the end of the simulation when we ask it to output the average field. 2) Once it outputs the average field then does it start from zero to compute the next average output field or proceed from the last saved output averaged field. Any feedback would be of great help.
cheer _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Spencer Sherwin FREng, FRAeS Head, Aerodynamics, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus, London, SW7 2AZ, UK s.sherwin@imperial.ac.uk +44 (0)20 7594 5052 <+44%2020%207594%205052> http://www.imperial.ac.uk/people/s.sherwin/
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
participants (3)
- 
                
                Douglas Serson
- 
                
                Sherwin, Spencer J
- 
                
                wasim sarwar