CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Curious results in icoFoam differ from fluent (http://www.cfd-online.com/Forums/openfoam-solving/60379-curious-results-icofoam-differ-fluent.html)

hemph November 17, 2005 10:30

I am running time-dependent ic
 
I am running time-dependent icoFoam on a simple 2D funnel-like geometry (80 cells). The simulation converges fast, but the results look very strange in ParaFoam, with velocity arrows going everywhere. The pressure is showing some striping, wh, at least when looking at the cell-values. Face pressure looks ok. I ran the same case in fluent, with a more expected result for velocity.

I have been looking at it for a while now, and can't figure out where I am going wrong. From what I have read, this seem like a pressure-velocity-interpolation error, but I took the fvSchemes from the elbow-tutorial case, and have been testing different schemes to no avail.

I have posted pictures of the velocity fields temporary at my homepage.
http://www.tfd.chalmers.se/~md8hemra/foamcase.html

In case anybody could have a look or/and a tip, it would be very appreciated!

For boundary conditions I have
(inlet at top): U=(0,-0.1,0), grad(p)=0
(outlet at bottom): grad(U)=0, p=0
(front and back walls): type empty
(side walls): noslip for u, grad(p)=0;

The cells are a bit skew, but this should be taken care of by Foam as far as I can tell!

With best regards.
Rasmus Hemph (fvSchemes and fvSolution shown below)


fvSchemes
ddtSchemes
{
default CrankNicholson;
}


gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(U) Gauss linear;
div(phi,U) Gauss Gamma2V 1;
}

laplacianSchemes
{
default none;
aplacian(1|A(U),p) Gauss linear corrected;
laplacian(nu,U) Gauss;
}

interpolationSchemes
{
default linear;
interpolate(HbyA) Gauss linear corrected;
}

snGradSchemes
{
default corrected;
}


fluxRequired
{
default no;
p;
}
solvers
{
p ICCG 1e-6 0.0;
U BICCG 1e-5 0.0;
}

PISO
{
nCorrectors 6;
nNonOrthogonalCorrectors 2;
}

alberto November 17, 2005 19:10

Hello, actually the case does
 
Hello,
actually the case doesn't work in OpenFOAM 1.2.

I solved it using your BCs and your grid but I don't have the problems you noticed.

I replaced Gamma2V with limitedLinearV 1 in div schemes for div(phi,U).

I emailed you the case.

Results are here:

http://www.cfd-online.com/OpenFOAM_D...ges/1/1362.jpg

http://www.cfd-online.com/OpenFOAM_D...ges/1/1361.jpg

http://www.cfd-online.com/OpenFOAM_D...ges/1/1363.jpg

hemph November 18, 2005 11:02

Thanks alot for your help Albe
 
Thanks alot for your help Alberto! With your assistance, I have traced the problems to the time step size. Going below 1e-3 seconds causes unstability and unphysical solutions. I have tried with all time schemes (Euler, CrankNicholson, backward) available in OpenFOAM, but see the same behaviour for all schemes. I post the results for three timesteps after three seconds of simulation time.
I am more accustomed to the opposite problem, that the timestep is to large! However, I wanted to lower the timestep, (to 1e-6s) which is the timescale of particle collisions which I want to couple to the fluid flow.

Is there a scheme or solver more suitable for smaller time steps?

http://www.cfd-online.com/OpenFOAM_D...your_image.gif 1e-2 seconds Euler
http://www.cfd-online.com/OpenFOAM_D...your_image.gif 1e-3 seconds Euler
http://www.cfd-online.com/OpenFOAM_D...your_image.gif 1e-4 seconds Euler

hemph November 18, 2005 11:20

Thanks alot for your help Albe
 
Thanks alot for your help Alberto! With your assistance, I have traced the problems to the time step size. Going below 1e-3 seconds causes unstability and unphysical solutions. I have tried with all time schemes (Euler, CrankNicholson, backward) available in OpenFOAM, but see the same behaviour for all schemes. I post the results for three timesteps after three seconds of simulation time.

I am more accustomed to the opposite problem, that the timestep is to large! However, I wanted to lower the timestep, (to 1e-6s) which is the timescale of particle collisions which I want to couple to the fluid flow. Lowering the tolerances of the linear solvers to below 1e-10 has not helped.

Is there a scheme or solver more suitable for smaller time steps?

http://www.cfd-online.com/OpenFOAM_D...ges/1/1367.png 1e-2 seconds Euler
http://www.cfd-online.com/OpenFOAM_D...ges/1/1368.png 1e-3 seconds Euler
http://www.cfd-online.com/OpenFOAM_D...ges/1/1369.png 1e-4 seconds Euler

alberto November 18, 2005 17:00

I have the same problem using
 
I have the same problem using a time step of 10^-6 s.

Why do you use such a coarse grid?
Your domain is 30x50cm, so your rectangular cells are about 6x2.7cm, so the order of magnitude of the cell Peclet number is:

Pé = u*DX_max/nu = 0.1 m/s * 0.06 / 1.589e-05 = 377

In these conditions, the linear (central difference) scheme is unstable, so you have to switch to something different for convection.
If you want to use the linear method you should have Pé < 2 at each cell.
What seems strange to me is that I have the same problem using upwind too.

Alberto

hemph November 22, 2005 11:17

You are right, I of course sho
 
You are right, I of course should have used an upwind biased scheme. The grid is so coarse due to the inclusion of particles. I have played some more with Fluent, and can not reproduce any of the strange flow I see in OpenFOAM: even with all 2nd order schemes and very small timesteps (1e-6s) I get the expected result. For now I will decouple the time step of the particles from that of the fluid and solve Navier-Stokes on a larger time scale. It is not ideal however, and I hope to eventually locate the reason for this behaviour. Anyhow, thanks again for your help!

liugx212 December 16, 2005 15:27

Dear all, I have the same q
 
Dear all,

I have the same question. Another, I want to change the value of X, Y and Z of U to simulate like particle. Could you please give some advice?

Thank you very much,
Guoxiang


All times are GMT -4. The time now is 05:57.