CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

pisoFOAM (LES) - internal pipe flow - convergence

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By clapointe

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2018, 09:03
Default pisoFOAM (LES) - internal pipe flow - convergence
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Hello,

First, I'm using OpenFOAM 5.0 (LES - Smagorinsky - Re=5300 with R = 0,1 and L=10D)...

I start the field in RANS (steadyState - simpleFoam) and later I mapped (mapFields) it to a new folder with intention to start the simulations in LES (pisoFoam).

The problem lies in my results and in the way I am evaluating the statistically stationary state of turbulent flow.

A piece of my log.pisoFoam:

Quote:
Time = 60

Courant Number mean: 0.120862 max: 0.344575
DILUPBiCCCG: Solving for Ux, Initial residual = 0.0549594, Final residual = 2.52306e-08, No Iterations (4 4 4)
DILUPBiCCCG: Solving for Uy, Initial residual = 0.0554047, Final residual = 2.49724e-08, No Iterations (4 4 4)
DILUPBiCCCG: Solving for Uz, Initial residual = 0.00921562, Final residual = 4.00749e-09, No Iterations (4 4 4)
Pressure gradient source: uncorrected Ubar = 1.472, pressure gradient = 0.309871
DICPCG: Solving for p, Initial residual = 0.123458, Final residual = 0.000241023, No Iterations 16
time step continuity errors : sum local = 2.05054e-07, global = -3.37199e-20, cumulative = -2.96846e-16
Pressure gradient source: uncorrected Ubar = 1.472, pressure gradient = 0.30982
DICPCG: Solving for p, Initial residual = 0.00439032, Final residual = 0.000244751, No Iterations 16
time step continuity errors : sum local = 2.07641e-07, global = -1.0475e-19, cumulative = -2.96951e-16
Pressure gradient source: uncorrected Ubar = 1.472, pressure gradient = 0.30987
ExecutionTime = 23798.4 s ClockTime = 24157 s

fieldAverage fieldAverage1 write:
Calculating averages

Writing average fields


End

Finalising parallel run
fvSchemes:

Quote:
ddtSchemes
{
default backward;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss cubic;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes

{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

wallDist
{
method meshWave;
}
What has worried me are the results obtained by UMean and UPrime2Mean, important for verification with the results obtained in DNS (Eggles). I've attached the 4 results below. Can you help me explain what might be happening?

Unfortunately this is my first case in turbulence, I do not know how to evaluate if the flow is in a statistically stationary state (... kindly ask those who have experience, share with me). I tried to monitor the 'wallShearStress' on the wall, but without success (similar to how it is done in Fluent), could anyone tell me if this is possible? probes?!

The maximum that I did was to consider the region of entrance of the flow, through the relation: L = 0.06 * Re * D. With possession of this value (L), and because it is a periodic domain with flow velocity equal to 1,472 m/s (flow in the Z direction)... it was determined that the time to reach the region of 'developed flow' was 43.20 seconds ... for that reason the simulation was set in 60 seconds.

The fluid was perturbed by the code (perturbUCylinder) and evaluating the velocities at points in the domain, there was no laminarization (attached image - pt4: point near the wall).

Thanks to all who can help.
Attached Images
File Type: jpg UMean.jpg (77.3 KB, 39 views)
File Type: jpg UPrime2Mean_ZZ.jpg (92.0 KB, 34 views)
File Type: jpg UPrime2Mean_YY.jpg (94.4 KB, 32 views)
File Type: jpg UPrime2Mean_XX.jpg (95.4 KB, 31 views)
File Type: png convergencia_U.png (138.8 KB, 40 views)
gu1 is offline   Reply With Quote

Old   July 31, 2018, 13:00
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
For the convergence, statistical stationarity refers to how they're (the statistics) changing. Simply put, your statistics will not change if you have obtained convergence (provided that you are averaging over enough data). Given that you're modeling turbulent flow, the least you'll want to do is make sure your average of interest is not changing. The period/time you average over depends on the problem, but generally longer is better. This will of course increase as you become interested in higher order statistics. It is hard to tell how your results could be off without seeing the DNS results on the plots in addition to your own.

Caelan
gu1 likes this.
clapointe is offline   Reply With Quote

Old   July 31, 2018, 14:14
Default
  #3
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
For the convergence, statistical stationarity refers to how they're (the statistics) changing. Simply put, your statistics will not change if you have obtained convergence (provided that you are averaging over enough data). Given that you're modeling turbulent flow, the least you'll want to do is make sure your average of interest is not changing. The period/time you average over depends on the problem, but generally longer is better. This will of course increase as you become interested in higher order statistics. It is hard to tell how your results could be off without seeing the DNS results on the plots in addition to your own.

Caelan
Hi Caelan,

Thanks for your answer.

The results that I am looking for to compare can be found in: "A direct numerical simulation study on the mean velocity characteristics in turbulent pipe flow - Wu (2008)", I will attach image of the RMS profiles that I am seeking to obtain, these are the ones that are most I'm intrigued by my simulation because they are totally different and are not varying over time (with longer simulation time). I wanted to understand what could be causing this ... could you help me?

On the statistically stationary question, I understand the concept ... I want to understand what parameters I should evaluate in my simulation using the OF. As I mentioned, using Fluent just monitor the 'wallShearStress' on the wall ... however, I have not found out if this is possible in OF.
Attached Images
File Type: jpeg perfil.jpeg (29.8 KB, 27 views)
gu1 is offline   Reply With Quote

Old   July 31, 2018, 15:03
Default
  #4
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
Can you plot your results on top of the DNS values?

For the statistics, here's a nice web page with a description : https://people.duke.edu/~rnau/411diff.htm. So you'd at least look at the time-average of your quantity of interest, but higher order statistics such as variance are also important. I am not sure exactly what fluent does, but wall shear stress is a function of velocity gradients near the wall as well as the effective viscosity -- ie it will depend on turbulence quantities and treatment of the boundary layer. If you want to match that in openfoam, there's a function object called wallShearStress. So you could include it in your controlDict to use at runTime or as a post processing step.

In terms of matching DNS with LES, there are many possible ways that the two could differ -- for example, your choice of LES model, resolution of the boundary layer, resolution of the domain.

So, how are you treating the boundary layer?

Caelan
clapointe is offline   Reply With Quote

Old   July 31, 2018, 15:36
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
Can you plot your results on top of the DNS values?

For the statistics, here's a nice web page with a description : https://people.duke.edu/~rnau/411diff.htm. So you'd at least look at the time-average of your quantity of interest, but higher order statistics such as variance are also important. I am not sure exactly what fluent does, but wall shear stress is a function of velocity gradients near the wall as well as the effective viscosity -- ie it will depend on turbulence quantities and treatment of the boundary layer. If you want to match that in openfoam, there's a function object called wallShearStress. So you could include it in your controlDict to use at runTime or as a post processing step.

In terms of matching DNS with LES, there are many possible ways that the two could differ -- for example, your choice of LES model, resolution of the boundary layer, resolution of the domain.

So, how are you treating the boundary layer?

Caelan
...At the moment I cant plot (I'm still getting to know the Linux world, sorry about that), but I think they are totally different for the profiles that are being presented by OF. The own shows RMS maximum in the center of the pipe, already the proposed values by Wu, this does not happen, they are close to the wall.

The wallShearStress function is being used in my controlDict, what I can not do is monitor this function throughout the simulation to evaluate 'convergence'.

The resolution on the wall is y + <1.
gu1 is offline   Reply With Quote

Old   July 31, 2018, 15:50
Default
  #6
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
They are plotting against (1-r+) on the x axis -- where are they defining r from? Make sure you're using the same independent variable. If your first cell is below y+ of 1 you should have adequate resolution in the boundary layer -- make sure you aren't applying any wall modeling.

Depending on what you have available, you don't need to use native linux tools to plot. I always read data into matlab for post processing. Try running postProcess -func wallShearStress. This will create a series of text files for you to read into your software of choice (in a folder called postProcessing -- this might actually be created already when you include the function object in the controlDict). Otherwise, there are various posts on the forum about pulling residual data from a log file to plot with gnuplot.

Caelan
clapointe is offline   Reply With Quote

Old   August 1, 2018, 13:39
Default
  #7
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
They are plotting against (1-r+) on the x axis -- where are they defining r from? Make sure you're using the same independent variable. If your first cell is below y+ of 1 you should have adequate resolution in the boundary layer -- make sure you aren't applying any wall modeling.

Depending on what you have available, you don't need to use native linux tools to plot. I always read data into matlab for post processing. Try running postProcess -func wallShearStress. This will create a series of text files for you to read into your software of choice (in a folder called postProcessing -- this might actually be created already when you include the function object in the controlDict). Otherwise, there are various posts on the forum about pulling residual data from a log file to plot with gnuplot.

Caelan
Hi Caelan,

Some things I'm taking, I do not know if they will work. On the question of the wall, as I said, the resolution is of y + <1.

As soon as I get the new results, I'll let you know.
gu1 is offline   Reply With Quote

Old   August 9, 2018, 13:16
Default
  #8
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
I was thinking that the problem I am facing may be related to the disturbance being imposed on the velocity field .... OR being related to my fvSchenes, because the field only keeps fluctuations when I use the 'Gauss cubic' model for velocity.... what to me is very strange, 'Gauss limitedLinear 1.0' and 'Gauss LinearUpwind grad (U)' are laminarizing my fluid.
gu1 is offline   Reply With Quote

Old   August 9, 2018, 13:36
Default
  #9
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
That is a good observation -- limitedLinear and linearUpwind are nominally first/second order and second order upwind, respectively. From a high-level perspective, this means that (possibly undue) numerical dissipation will be introduced by the schemes when compared to central differencing (linear) for the same grid. Generally for LES you'll want to use Gauss linear for your divergence terms as long as stability is not a concern.

Caelan
clapointe is offline   Reply With Quote

Old   August 9, 2018, 13:48
Default
  #10
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
That is a good observation -- limitedLinear and linearUpwind are nominally first/second order and second order upwind, respectively. From a high-level perspective, this means that (possibly undue) numerical dissipation will be introduced by the schemes when compared to central differencing (linear) for the same grid. Generally for LES you'll want to use Gauss linear for your divergence terms as long as stability is not a concern.

Caelan
Even using 'Gauss linear' for velocity field, there has been dissipation...
gu1 is offline   Reply With Quote

Old   August 9, 2018, 13:57
Default
  #11
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
What temporal integration scheme are you using? For LES 2nd order in time is also desirable.

Caelan
clapointe is offline   Reply With Quote

Old   August 9, 2018, 15:06
Default
  #12
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
What temporal integration scheme are you using? For LES 2nd order in time is also desirable.

Caelan
Hi,

I'm alternating to see if I find '' differences '' between one setup and another. I have used 'backward', but I also did tests using 'CrankNicolson 0.9'.

Is my problem, because it is a pipe, directly related to the results with the cartesian coodenates? Is it necessary to convert them to cylinder coodenates in order to "get" the actual values of my problem (if they exist)?

Guilherme
gu1 is offline   Reply With Quote

Old   August 9, 2018, 15:11
Default
  #13
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
Good, it sounds like your time integration should be fine. When you say there's dissipation, are you seeing this when you visualize, or when you plot? Related to your latest question, I'd recommend solving/plotting like the DNS data that you are comparing to. I am unfamiliar with using cylindrical coordinates in OF, though.

Caelan
clapointe is offline   Reply With Quote

Old   August 9, 2018, 15:27
Default
  #14
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
Good, it sounds like your time integration should be fine. When you say there's dissipation, are you seeing this when you visualize, or when you plot? Related to your latest question, I'd recommend solving/plotting like the DNS data that you are comparing to. I am unfamiliar with using cylindrical coordinates in OF, though.

Caelan
Yes, when I plot the velocity points (probes) I have in my domain, I see that the magnitude of both is not changing with time, so I come to the conclusion that the fluid laminized.
gu1 is offline   Reply With Quote

Old   August 9, 2018, 15:28
Default
  #15
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
Have you visualized the flow to confirm this?

Caelan
clapointe is offline   Reply With Quote

Old   August 9, 2018, 16:22
Default
  #16
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 310
Rep Power: 12
Santiago is on a distinguished road
If you have non zero velocity variance (autoccorelations, R. Stress) you have turbulence. Your plots are not appropriately scaled, you need to normalize by the shear velocity if you want to compare. Besides, you have to average not only in time but in directions of homogeneity, that is, in polar coordinates along radial lines.
Santiago is offline   Reply With Quote

Old   August 9, 2018, 17:33
Default
  #17
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
Have you visualized the flow to confirm this?

Caelan
Yes, especially after plotting the velocity profile (it acquires similarity to the laminar profile)...
gu1 is offline   Reply With Quote

Old   August 9, 2018, 17:35
Default
  #18
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by Santiago View Post
''Besides, you have to average not only in time but in directions of homogeneity, that is, in polar coordinates along radial lines.''
Could you teach me about this stretch? It's my first study in turbulence..

Thanks for the answer,

Guilherme

*EDIT1: Do you find it necessary to convert from cartesian coordinates to cylindrical coordinates?
gu1 is offline   Reply With Quote

Old   August 9, 2018, 18:09
Default
  #19
Senior Member
 
Join Date: Aug 2015
Posts: 433
Rep Power: 11
clapointe is on a distinguished road
I think we've established that your case looks to be fine numerically. That leaves the setup and analysis/post processing. As mentioned earlier, you should be analyzing your data so you can plot the same way the DNS data is plotted.

As for setup, here is a similar thread that will hopefully provide useful insight :

question regarding LES of pipe flow - pimpleFoam

Caelan
clapointe is offline   Reply With Quote

Old   August 10, 2018, 08:00
Default
  #20
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 180
Rep Power: 5
gu1 is on a distinguished road
Quote:
Originally Posted by clapointe View Post
As mentioned earlier, you should be analyzing your data so you can plot the same way the DNS data is plotted.

Caelan
I will study the shared link and try to plot the graphs to compare them. As soon as I get answers, I give feedback.

Guilherme
gu1 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question regarding LES of pipe flow - pimpleFoam Dan1788 OpenFOAM Running, Solving & CFD 37 December 26, 2017 15:42
Velocity curve in channel flow by pisoFoam and LES mxylondon OpenFOAM Verification & Validation 9 June 21, 2015 08:28
LES transitional pipe entrance flow hasanduz Main CFD Forum 2 October 11, 2013 18:59
setup problems - LES pipe flow with cyclic BC (1) and direct mapped inlet (2) florian_krause OpenFOAM 22 June 13, 2013 22:25
convergence problem when use pisoFoam, LES for wind tunnel case Forrest_Lei OpenFOAM 3 July 19, 2011 07:00


All times are GMT -4. The time now is 07:18.