CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   simpleFoam convergence on large domain (https://www.cfd-online.com/Forums/openfoam/74618-simplefoam-convergence-large-domain.html)

spej September 27, 2010 04:37

Hi Foamers,

I try to simulate the flow in a cyclone. Yet I have good results for the kepsilon, RNG kepsilon and very good results for the dynSmagorinsky. But I figured out that the RSM-solution has a better accuracy than the RNG. The RSM is faster than LES, too.

@Aberto: as I wrote I got a convergent solution with the div(phi,U)linearUpwindV-scheme, but the solution shows diffuse behaivour. I read in Peric Computional Methods Fluid Dynamics that I should use a second order CDS for a swirl flow!
With your new setup of the fvScheme- and the fvSolution-file i got better results for the tangential velocity(with linear-UpwindV), but no convergence solution. When I change your setup from cellLimited to faceMDLimited i get a convergence solution, but diffusive results.

alberto September 27, 2010 15:13

Quote:

Originally Posted by spej (Post 276737)
Hi Foamers,

I try to simulate the flow in a cyclone. Yet I have good results for the kepsilon, RNG kepsilon and very good results for the dynSmagorinsky. But I figured out that the RSM-solution has a better accuracy than the RNG. The RSM is faster than LES, too.

Cyclone simulations are a typical case where RSM models are required to have a proper flow description of the vortex, since the flow is anisotropic. Not a surprise RSM performs significantly better than k-eps, since it has been reported in the literature quite some time ago.

Quote:

@Aberto: as I wrote I got a convergent solution with the div(phi,U)linearUpwindV-scheme, but the solution shows diffuse behaivour. I read in Peric Computional Methods Fluid Dynamics that I should use a second order CDS for a swirl flow!
With those speeds and that grid resolution you have no chance to obtain a stable and convergent solution with a central scheme. Your local Pe is definetly too high.

You have to rely on limited schemes.

Quote:

With your new setup of the fvScheme- and the fvSolution-file i got better results for the tangential velocity(with linear-UpwindV), but no convergence solution. When I change your setup from cellLimited to faceMDLimited i get a convergence solution, but diffusive results.
Yes, I noticed that. My feeling is that the face-based limiter tends to smooth the solution significantly, and makes it look like a steady solution when it is not.

Did you consider the possibility of running a transient (or pseudo-transient) case to check this?

Best,

spej September 28, 2010 03:08

I know that my peclet-number is to high for an stable solution. but why have other authors with fluent or cfx convergent solutions with a second order CDS on a coarse mesh?! I read papers where they use a mesh with 70000 hexa controlvolumes.

I will check your hint with limited schemes.

maysmech April 9, 2011 05:30

Quote:

Originally Posted by alberto (Post 256123)
You can still use second order schemes, but using limiters, usually without any need to go back to first order schemes.

In your scheme settings, you might have a problem with

div(phi,U) Gauss linear corrected;

Try running your case with

div(phi, U) Gauss linearUpwindV cellLimited Gauss linear 1;

which preserves the second order accuracy almost everywhere, preventing instabilties.

In addition, you could post the actual error message, so we can see where the problem actually comes from.

Best,

Hi Foamers,
i have simulated a cyclone with LRR and i had convergence problem but by using above comment and changing div schemes convergence problem is solved but results are not near to experiment. it is too dissipative (but better than k-e results) result should have a sharp forced vortex at center and free vortex in other domains in tangential velocity.

Any suggestion will be appreciated.
Regards

alberto April 9, 2011 15:07

You are probably not using a good enough mesh in the core of the cyclone. Quick hints:

- use a hex-dominant mesh, if you are not doing it already
- refine the core area (you can define a cylinder containing the vortex and progressively adapt that region)
- if you really have to use a tet mesh, use leastSquares for gradients so to ensure second-order accuracy. This means you have to use it both in the grad schemes

Code:

gradSchemes
{
    default        cellLimited leastSquares 1;
}

and in the linearUpwind gradients. For example:

Code:

div(phi, U) Gauss linearUpwindV cellLimited leastSquares 1;
P.S. It is expected and well known from the literature that a Reynolds stress model predicts cyclone flows more accurately than k-eps, since it resolves for the stress tensor.

Best,

maysmech April 10, 2011 02:47

2 Attachment(s)
Quote:

Originally Posted by alberto (Post 302905)
You are probably not using a good enough mesh in the core of the cyclone. Quick hints:

- use a hex-dominant mesh, if you are not doing it already
- refine the core area (you can define a cylinder containing the vortex and progressively adapt that region)
- if you really have to use a tet mesh, use leastSquares for gradients so to ensure second-order accuracy.

Thanks Alberto,

I don't think the problem relates to mesh. it is about 0.5 million grids, hex dominant and less size near wall and center. you can see two pictures from meshed geometry by Gambit. although this is my coarse mesh i have same problem with fine meshes too. i think it should be related to orders on fvscheme.
.

maysmech April 10, 2011 02:52

i have simulated 2D wedge geometry of this cyclone and its results are good.
i don't know why i can't reach true answers on 3D. you can see my wedge (2D) results here as you see k-e is too dissipative. it has about 70,000 grids.

Regards

alberto April 11, 2011 12:04

If you use the same schemes in both 2D and 3D, I would say it does not depend on them :-)

Is the mesh resolution in 2D and 3D comparable, and the distribution of points along the radius of the cyclone too?

Alberto

maysmech April 11, 2011 13:11

Wedge setting was upwind.

By using this scheme, 3D has been blown up.

Changing it to limitedlinear as you suggested it has problem in accuracy instead of convergence.
Is it any higher order and stable scheme?

About mesh: Although i checked finer meshes before, i will try to run finer mesh with new setting and say result here.

Regards.

alberto April 11, 2011 14:50

Quote:

Originally Posted by maysmech (Post 303147)
Wedge setting was upwind.

By using this scheme, 3D has been blown up.

Changing it to limitedlinear as you suggested it has problem in accuracy instead of convergence.

Upwind is a first order scheme, while limitedLinear is a limited second-order central difference scheme. As a consequence you should have better accuracy with the limitedLinear scheme.

Quote:

Is it any higher order and stable scheme?
You might want to try

linearUpwindV cellLimitedGauss linear 1;

for the velocity, which is a second-order upwind scheme.

Best,
Alberto

maysmech April 22, 2011 09:32

Hi again,

I simulated hydrocyclone with finer grids (1,000,000 grids). although results are better but they are far from experiment.

As you know limitedLinear is TVD scheme and it is too diffusive (P.100 of Jasak thesis). i see this numerical diffusion in my results apparently.
What do you think about what i should do? (i have used Smagorinsky. maybe it is not relate to this thread, but i had same problem with simpleFoam-LRR)

alberto April 22, 2011 11:32

Quote:

Originally Posted by maysmech (Post 304706)
Hi again,

I simulated hydrocyclone with finer grids (1,000,000 grids). although results are better but they are far from experiment.

As you know limitedLinear is TVD scheme and it is too diffusive (P.100 of Jasak thesis). i see this numerical diffusion in my results apparently.
What do you think about what i should do? (i have used Smagorinsky. maybe it is not relate to this thread, but i had same problem with simpleFoam-LRR)

Well "far from experiment" is a bit vague, because it might simply depend on the setup, on the choice of the model or on the grid resolution.

If you use Smagorinsky, you do LES and you should do unsteady simulations. Are you resolving the scales properly?
For LES limitedLinear is too diffusive, while for a RANS case it should be fine.

Best,

maysmech April 24, 2011 11:13

Thanks,
I mean in an experimental paper a sharp tangential velocity at center and free vortex beyond is observed. i cant reach to that profile with same geometry (400,000 and 1 million grids). it will be a validation for me.
In my results velocity is not as sharp as that paper. Maximum tangential velocity magnitude is less than half of that paper.

About LES: i did it with pisoFoam, smagorinsky and linear scheme. its result are a bit better but it need much time to run. (Do you think smagorinsky can lead to answer for hydrocyclone? As you know hydrocyclone flow is anisotropic.

About LRR: i simulated with limitedlinearUpwind but it is too diffusive. Is it possible to use QUICK (i heard QUICK has led to answer with FLUENT)?(I have minus epsilon divergence problem with that).

Another question: What is name of Hybrid scheme in OpenFOAM? (spej suggested it for LES)

Regards,
Maysam

alberto April 25, 2011 00:24

Quote:

Originally Posted by maysmech (Post 304871)
Thanks,
I mean in an experimental paper a sharp tangential velocity at center and free vortex beyond is observed. i cant reach to that profile with same geometry (400,000 and 1 million grids). it will be a validation for me.
In my results velocity is not as sharp as that paper. Maximum tangential velocity magnitude is less than half of that paper.

What numerical schemes do they use? And what is the order of magnitude of the velocity?

Quote:

About LES: i did it with pisoFoam, smagorinsky and linear scheme. its result are a bit better but it need much time to run. (Do you think smagorinsky can lead to answer for hydrocyclone? As you know hydrocyclone flow is anisotropic.
The question is: do you really resolve the scales as you should do in a LES? If so, the anisotropic scales are resolved directly, and the dynamic Smagorinsky ( Warning! Promoting my stuff :-) https://github.com/AlbertoPa/dynamic.../master/README ) should work.
In my group they had results in very good agreement with experiments in vortex reactors both for flow and scalar transport.

Quote:

About LRR: i simulated with limitedlinearUpwind but it is too diffusive. Is it possible to use QUICK (i heard QUICK has led to answer with FLUENT)?(I have minus epsilon divergence problem with that).
linearUpwind is similar to the second-order upwind in FLUENT. limitedLinear is less diffusive than linearUpwind, but a bit less stable. QUICK is available in OpenFOAM but not bounded.

However it seems a bit strange that such a large error is due to numerical diffusion, especially if the velocity magnitude is not very tiny. Are you using exactly their boundary conditions, for example?

Quote:

Another question: What is name of Hybrid scheme in OpenFOAM? (spej suggested it for LES)
I guess you want a linear-central-difference/upwind (1st order) scheme, which should be "blended". However for LES it might be too diffusive. Another option could be SFCD.

P.S. Could you show a contour plot of the velocity, so that we can actually have an idea?

Best,

maysmech April 25, 2011 02:11

1 Attachment(s)
Thanks again,
Quote:

Originally Posted by alberto (Post 304914)
What numerical schemes do they use? And what is the order of magnitude of the velocity?

It was an experimental work and i want to do validation with those results.

Quote:

The question is: do you really resolve the scales as you should do in a LES? If so, the anisotropic scales are resolved directly, and the dynamic Smagorinsky ( Warning! Promoting my stuff :-) https://github.com/AlbertoPa/dynamic.../master/README ) should work.
In my group they had results in very good agreement with experiments in vortex reactors both for flow and scalar transport.
Is it any criteria for grids in LES? i don't know how many grids and how much fine should be necessary to capture anisotropic scales.
As i understand from your post you don't suggest smagorinsky. Do you think dynSmagorinsky will lead to answer? what is the difference between dynSmagorinsky and your dynamicSmagorinsky model.

Quote:

linearUpwind is similar to the second-order upwind in FLUENT. limitedLinear is less diffusive than linearUpwind, but a bit less stable. QUICK is available in OpenFOAM but not bounded.

However it seems a bit strange that such a large error is due to numerical diffusion, especially if the velocity magnitude is not very tiny. Are you using exactly their boundary conditions, for example?
It is a de-oiling hydrocyclone with 3.5cm diameter and 65cm length. inlets have 4.167 m/s uniform velocity magnitude (1.5 m^3/h) and its flow split is 5% (5% exits from overflow)
i set inlets uniform velocity. Overflow and underflow is set zero pressure. walls B.Cs are wall function. property which needed on constant is nu and it is E-6 for water.
I have checked settings and i don't think they have any problem !


Quote:

P.S. Could you show a contour plot of the velocity, so that we can actually have an idea?

Best,
I attached simpleFoam results after 20000 iterations with your uploaded setting in this thread.
Its sharp maximum tangential velocity should be near 8 m/s at center.
i changed U divergence to QUICK but the maximum decreased more!

Best regards,
Maysam

alberto April 25, 2011 04:44

Quote:

Originally Posted by maysmech (Post 304918)
Thanks again,


It was an experimental work and i want to do validation with those results.

OK. Just do a search on the source of these data. Unfortunately "published result" does not mean "bulletproof". A good indication of the quality of results is the presence of estimates of uncertainty (error bars and similar). If this is not present, I'd suggest to look elsewhere.

Quote:

Is it any criteria for grids in LES? i don't know how many grids and how much fine should be necessary to capture anisotropic scales.
As i understand from your post you don't suggest smagorinsky. Do you think dynSmagorinsky will lead to answer? what is the difference between dynSmagorinsky and your dynamicSmagorinsky model.
Doing an LES is generallu (much) more expensive than doing a RANS because you have to resolve the largest scales until you reach the isotropic ones (what in turbulence language is defined "inertial subrange"). In other words, estimate the Kolmogorov microscale, multiply it by a factor (order of 10 for practical applications where some uncertainty is accepted), and you have your cell size.

The dynamic Smagorinsky model offers a better option compared to the simple Smagorinsky, since it can predict backscattering and the SGS stresses become zero automatically near walls (no need of damping functions).

Quote:

It is a de-oiling hydrocyclone with 3.5cm diameter and 65cm length. inlets have 4.167 m/s uniform velocity magnitude (1.5 m^3/h) and its flow split is 5% (5% exits from overflow)
i set inlets uniform velocity. Overflow and underflow is set zero pressure. walls B.Cs are wall function. property which needed on constant is nu and it is E-6 for water.
I have checked settings and i don't think they have any problem !
OK. How do you set the BC's for the turbulent quantities? :-)

Quote:

I attached simpleFoam results after 20000 iterations with your uploaded setting in this thread.
Its sharp maximum tangential velocity should be near 8 m/s at center.
i changed U divergence to QUICK but the maximum decreased more!
It is quite complicated to give you a detailed answer without the case. However I doubt such a difference is due to the numerical diffusion, especially because your case is not really extreme.

A short checklist (some elements are obvious, but sometime it happens to make mistakes there ;))

1) Is the viscosity of the fluid set properly for example? Keep in mind that OpenFOAM incompressible solvers want the kinematic viscosity (nu = mu/rho)

2) How did you set the boundary conditions for turbulent quantities?

3) At what level of accuracy is the solution converging? Require residuals below 1.0e-6 (or as low as they go).

Best,

maysmech April 26, 2011 15:31

For LRR:
Inlets: k=1.5(UI)^2=0.065; //(I=0.05 and U=4.167)
epsilon= 0.09^0.75*k^1.5/(0.07*d_h)=0.58
R=(k 0 0 k/2 0 k/2)=(0.065 0 0 0.0325 0 0.0325)
Outlets are zero gradient.
nut is calculated type for inlets and outlets.
walls are wall function.

For LES:
nusgs is zerogradient for all walls and patches.

Also, U is turbulent inlet with (0.05 0.02 0.02) intensity for both LES and LRR

About properties:
i set nu=10^-6 (nu=mu/rho=0.001/1000)

About fvSolution:
For LRR: it is same as your uploaded file: 10^-8 for P and 10^-6 for others.
For LES: 10^-6 for P and 10^-5 for others

Thanks,
Maysam

alberto April 26, 2011 17:23

Nothing seems evidently wrong. Is the solution converging to a low value of the initial residuals in the iterations?

To see if it depends on the numerical diffusion, since you run steady cases, double the grid density, and see what happens.

Alberto

maysmech April 27, 2011 13:47

Thanks,
I tried to run with your dynamic smagorinsky but it blow up. i think it has problem with pressure. i tried with more pressure correctors but it had problem in my case. now i am running with smagorinsky.
what do you think about these residuals and why don't P final residuals reach to 10^-6?


Time = 0.217386

Courant Number mean: 0.0310726 max: 1.28646
DILUPBiCG: Solving for Ux, Initial residual = 0.000975272, Final residual = 6.4176e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.00103533, Final residual = 5.04125e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.0009475, Final residual = 2.39935e-06, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.023251, Final residual = 0.00111641, No Iterations 60
time step continuity errors : sum local = 2.25161e-07, global = 2.89517e-08, cumulative = 6.61012e-08
DICPCG: Solving for p, Initial residual = 0.00676882, Final residual = 0.00102127, No Iterations 1001
time step continuity errors : sum local = 2.0599e-07, global = 9.6517e-09, cumulative = 7.57529e-08
ExecutionTime = 6964.57 s ClockTime = 7012 s

maysmech May 15, 2011 01:10

3 Attachment(s)
Quote:

Originally Posted by alberto (Post 305173)
Nothing seems evidently wrong. Is the solution converging to a low value of the initial residuals in the iterations?

To see if it depends on the numerical diffusion, since you run steady cases, double the grid density, and see what happens.

Alberto

Dear Alberto,
I have problem with LRR for hydrocyclone simulation yet. i used your suggested settings, it doesn't diverge but nor converge.
As you see in attached picture LRR result is not converge and it has wild fluctuations across its mean. i have set dynamic smagorinsky results (its figure is attached) as initial for LRR but after ten days and 14000 iterates its result is not acceptable and it decays initial too. its mesh is fine (1000000) and i don't think grids be the problem because LES answered proper results with same mesh. i have attached settings too.
Any idea would be appreciated.
Regards,
Maysam


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