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

Water flow in closed volume - rasInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2009, 04:49
Default Water flow in closed volume - rasInterFoam
  #1
New Member
 
Chris
Join Date: Mar 2009
Location: Europe
Posts: 19
Rep Power: 17
chris_sev is on a distinguished road
Hallo everybody,

So far I got very good experience with OpenFOAM multiphase solvers, but now I met some problems and I hope that will find some help here.

I am using 1.5 version rasInterFoam solver.

My domain consists of volume as shown below with one inlet and two outlets. Rest are walls.

My boundary conditions are:
- inlet – water :
u = 2m/s, pd = zeroGradient, gamma =1
- inside of the domain I got air.
- outlet :
u = zeroGradient, pd = 0





Turbulence model – kEpsilon.

My problem is that from the very beginning Courant number is increasing for the fixed Dt . I have started with Dt = 0.00002 and Co was oscillating about value 0.15. After short time Co started to grow and simulation crashed at t = 0.23 s with Co = 5.63934e+16

I have also run simulations for the smaller values of Dt, even up to value Dt = 1.0e-9 but always with the same results. In each case simulation crashes at certain simulation time t = 0.23.

Here you can see example part of the log file, at the time t=0.18 s:

Courant Number mean: 0.00256311 max: 0.174324
Time = 0.18096

MULES: Solving for gamma
Liquid phase volume fraction = 0.0223764 Min(gamma) = -2.58973e-08 Max(gamma) = 1
DICPCG: Solving for pd, Initial residual = 0.00615942, Final residual = 0.000386212, No Iterations 2
DICPCG: Solving for pd, Initial residual = 0.000678794, Final residual = 9.36251e-05, No Iterations 119
DICPCG: Solving for pd, Initial residual = 0.000170606, Final residual = 7.79927e-05, No Iterations 1
time step continuity errors : sum local = 4.05377e-08, global = 4.82635e-11, cumulative = -1.09681e-06
DILUPBiCG: Solving for epsilon, Initial residual = 0.000297702, Final residual = 1.91179e-07, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000238782, Final residual = 4.38367e-07, No Iterations 1
ExecutionTime = 538.81 s ClockTime = 540 s

and shortly before it has crashed:

Courant Number mean: 0.0192395 max: 45.0056
Time = 0.23218

MULES: Solving for gamma
Liquid phase volume fraction = 0.049607 Min(gamma) = -326.245 Max(gamma) = 504.761
DICPCG: Solving for pd, Initial residual = 0.619894, Final residual = 0.0581804, No Iterations 112
DICPCG: Solving for pd, Initial residual = 0.928535, Final residual = 0.091204, No Iterations 149
DICPCG: Solving for pd, Initial residual = 0.96074, Final residual = 8.73864e-05, No Iterations 792
time step continuity errors : sum local = 0.000151443, global = 2.20443e-07, cumulative = 1.17686e-07
DILUPBiCG: Solving for epsilon, Initial residual = 0.999984, Final residual = 8.08445e-06, No Iterations 27
DILUPBiCG: Solving for k, Initial residual = 0.874895, Final residual = 4.33633e-08, No Iterations 2
ExecutionTime = 5605.74 s ClockTime = 5629 s

Courant Number mean: 7.52882 max: 280479
Time = 0.2322

MULES: Solving for gamma
Liquid phase volume fraction = 0.0489311 Min(gamma) = -1.13696e+07 Max(gamma) = 7.90837e+06
DICPCG: Solving for pd, Initial residual = 0.979423, Final residual = 658.541, No Iterations 1001
DICPCG: Solving for pd, Initial residual = 0.996411, Final residual = 3.04765, No Iterations 1001
DICPCG: Solving for pd, Initial residual = 0.998729, Final residual = 10.466, No Iterations 1001
time step continuity errors : sum local = 1.13257e+12, global = 5.43929e+06, cumulative = 5.43929e+06
DILUPBiCG: Solving for epsilon, Initial residual = 0.999699, Final residual = 4.06343e-06, No Iterations 33
DILUPBiCG: Solving for k, Initial residual = 0.0593825, Final residual = 1.15867e-06, No Iterations 16
bounding k, min: -0.00225506 max: 3.37869e+12 average: 3.88599e+08
ExecutionTime = 5627.47 s ClockTime = 5651 s

My mesh consists of 332700 hexahedra elements. checkMesh doesn't plot any errors.

I can't figure out what's the reason of this behave. My first thought was to check values of the velocities when simulation crashes. But for the last written results I don't see any unphysical values. I don't know what else might influence Co number.

So, dear forumers do you have any idea what might be wrong. I would appreciate any help, any hint.
chris_sev is offline   Reply With Quote

Old   March 16, 2009, 08:30
Default
  #2
Senior Member
 
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18
openfoam_user is on a distinguished road
Hi Chris,

I have the same problem using rasInterFoam for ship hydrodynamics.

I have tried both solutions :
1. To have a fixed small dt. But suddemtly Co increases a lot and the computation crashes.
2. To leave the dt free to change with a fixed maximum Co value. After a while Co increase ans so dt decreases to much (until 10^-8) ... and the computation crashes.

I have modified the parameters of the fvSolution and FvSchemes files but without success.

I think that the main problem is the initialization for transient runs !

Any help would be usefull !

Stephane.
openfoam_user is offline   Reply With Quote

Old   March 17, 2009, 04:31
Default
  #3
New Member
 
Chris
Join Date: Mar 2009
Location: Europe
Posts: 19
Rep Power: 17
chris_sev is on a distinguished road
So I am not the only one who struggle with rasInterFoam.

Problem is that so far I had very good impression with OF multiphase capabilities and would like it to stay like this
And I would realy appreciate if someone familiar with this could say something.

I hope it's just a matter of settings or some wrong assumptions.

Thanks in advance!
chris_sev is offline   Reply With Quote

Old   March 17, 2009, 08:42
Default
  #4
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Maybe you should try playing with laplacian and interpolation schemes - try moving from linear to upwind or limitedLinear
mkraposhin is offline   Reply With Quote

Old   March 17, 2009, 10:15
Default
  #5
New Member
 
Gareth
Join Date: Mar 2009
Posts: 24
Rep Power: 17
gareth__it_power is on a distinguished road
I've also got a problem with rasInterFoam, in an open channel situation. Again, delta t goes very small, and the courant number explodes, crashing the simulation.

I am a bit of a beginner so haven't been able to figure out a fix yet unfortunately.
gareth__it_power is offline   Reply With Quote

Old   March 17, 2009, 11:01
Default
  #6
New Member
 
Chris
Join Date: Mar 2009
Location: Europe
Posts: 19
Rep Power: 17
chris_sev is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
Maybe you should try playing with laplacian and interpolation schemes - try moving from linear to upwind or limitedLinear
Hi Matvej,
I have already played with these, no success.
I think that changing discretisation scheme during the simulation shouldn't influence convergence so much - considering case which was running well at the beginning.
But of course I am not an expert and might be wrong.
chris_sev is offline   Reply With Quote

Old   March 18, 2009, 11:46
Default
  #7
New Member
 
Chris
Join Date: Mar 2009
Location: Europe
Posts: 19
Rep Power: 17
chris_sev is on a distinguished road
Hi everybody,

in order to sort my problem I have performed some other test cases. I created new geometry (simple cuboid) with dimensions similar to my initial case and with perfectly orthogonal mesh. Inlet and outlet I have placed in the same areas.
Initial conditions (apart from velocity, now it's 1m/s) were the same.

Now simulation runs without any problems and converges within each timestep.

Below you can see some screenshots:
(free surface is coloured with velocity)








Now I am a bit confused. I am happy because solver works well but on the other hand I would never expect that rasInterFoam is such mesh sensitive.
chris_sev is offline   Reply With Quote

Old   March 20, 2009, 04:11
Default
  #8
New Member
 
Chris
Join Date: Mar 2009
Location: Europe
Posts: 19
Rep Power: 17
chris_sev is on a distinguished road
Good morning,

I have managed to solve my problem. It was necessary to upgrade a bit boundary conditions.

At the outlet I used new boundaries as follow:

pd

outlet
{
type totalPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1;
p0 uniform 0;
value uniform 0;
}


U

outlet
{
type pressureInletOutletVelocity;
phi phi;
value uniform (0 0 0);
}


Now simulation runs well. Converges within each time step and I don't observe any unexpected behave.

However I got the feeling that liquid doesn't leave my domain as quick as I would expect.

I am not pretty sure if my assumptions at the outlet are correct so I would really appreciate if someone could veryfy this.

Have a nice day!
chris
chris_sev is offline   Reply With Quote

Reply


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
RasInterFoam cavitation maritozzo OpenFOAM Running, Solving & CFD 2 December 6, 2005 15:09
Flow in a Closed Loop John Collins Main CFD Forum 2 February 27, 2003 11:26
Time dependant discharge from a closed volume Chris Rand FLUENT 2 November 8, 2002 08:44
closed casing with fan and water Tom Main CFD Forum 0 August 27, 1999 02:16
Pulsatile blood flow in closed loops Michael F. Wolf Main CFD Forum 3 July 1, 1999 17:37


All times are GMT -4. The time now is 17:36.