CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   pisoFOAM (LES) - internal pipe flow - convergence (https://www.cfd-online.com/Forums/openfoam-solving/204751-pisofoam-les-internal-pipe-flow-convergence.html)

gu1 July 31, 2018 08:03

pisoFOAM (LES) - internal pipe flow - convergence
 
5 Attachment(s)
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.

clapointe July 31, 2018 12:00

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 July 31, 2018 13:14

1 Attachment(s)
Quote:

Originally Posted by clapointe (Post 701084)
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.

clapointe July 31, 2018 14:03

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

gu1 July 31, 2018 14:36

Quote:

Originally Posted by clapointe (Post 701096)
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.

clapointe July 31, 2018 14:50

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

gu1 August 1, 2018 12:39

Quote:

Originally Posted by clapointe (Post 701104)
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 August 9, 2018 12:16

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.

clapointe August 9, 2018 12:36

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

gu1 August 9, 2018 12:48

Quote:

Originally Posted by clapointe (Post 702136)
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...

clapointe August 9, 2018 12:57

What temporal integration scheme are you using? For LES 2nd order in time is also desirable.

Caelan

gu1 August 9, 2018 14:06

Quote:

Originally Posted by clapointe (Post 702138)
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

clapointe August 9, 2018 14:11

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

gu1 August 9, 2018 14:27

Quote:

Originally Posted by clapointe (Post 702143)
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.

clapointe August 9, 2018 14:28

Have you visualized the flow to confirm this?

Caelan

Santiago August 9, 2018 15:22

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.

gu1 August 9, 2018 16:33

Quote:

Originally Posted by clapointe (Post 702146)
Have you visualized the flow to confirm this?

Caelan

Yes, especially after plotting the velocity profile (it acquires similarity to the laminar profile)...

gu1 August 9, 2018 16:35

Quote:

Originally Posted by Santiago (Post 702151)
''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?

clapointe August 9, 2018 17:09

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 :

https://www.cfd-online.com/Forums/op...implefoam.html

Caelan

gu1 August 10, 2018 07:00

Quote:

Originally Posted by clapointe (Post 702163)
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


All times are GMT -4. The time now is 06:11.