Instalibity with pisoFoam in laminar shear flow
1 Attachment(s)
Hello,
I would like to simulate the laminar flow between two planes with pisoFoam in OpenFOAM 4.x with a structured blockMesh. I am using pisoFoam instead of simpleFoam since I want to couple my CFD simulation with a DEM simulation later. I would like to simulate a cubic domain with a length of l=1 µm (80x80x80 cells) and shear rates in the range of 1 1/s up to 10.000 1/s with cyclic boundary conditions at four side walls of the cubic. I choosed the micro unit system to increase the absolute values in the simulation, which should avoid numerical errors due to small numbers. Nevertheless, my simulations are able to generate a linear velocity profile between the planes during the first timesteps with a constant courant number near to 0.05. If the simulation is at or near the steady state (zero iterations of the velocity in x-direction), the courant number starts to increase continuously and strange vortexes are developing. The effect occurs especially for low shear rates which means that the gradient of the velocity is low. I a already changed the unit system to nano, varied the schemes or the channel length without any positive effect. I noticed for higher shear rates (e.g. 1e6 1/s) that the simulation is stable over the time. Could small velocity changes between two cells be the reason for numerical errors which lead to instabilies? Here are my files for a shear rate of 1 1/s and a timestep of 1e-3 s. I also attached a log-file. Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
The case seems to be diverging, because the CFL number keeps increasing. I would think this has something to do with the boundary conditions. Why cyclic for the front and back, what about empty? In other words, because the flow is laminar, why 3D instead of 2D? I think a 2D simulation can quickly tell you if your boundary conditions are properly set up or not.
|
Quote:
Thank you for your reply. I have already tested 2D simulations of the flow, but similiar instabilities were observed. In long term I can not use 2D simulations since I would like to couple the CFD simulation with three dimensional particle structures in DEM. |
A simple suggestion I have is to try initializing the entire velocity field to the same or 1/2 the value of the sliding wall velocity, rather than zero.
|
I suppose here that the fluid is entering the domain from top
If sliding, then the following is not correct. -------------------------------------- The pressure is no where defined!!! How the solver will know, which pressure to be used? The top pressure (at least) need to be defined in my opinion. zeroGraduent in top and bottom is not correct! -------------------------------- The velocity is defined at the top is given. Well, at the bottom is zero. The continuty equation is not satisfied! You need to change the velocity at the bottom to inletOutlet instead of fixed, to calculate the outlet velocity... If the velocity at the top refers to sliding velocity, then it is right defined. |
Quote:
The incompressible solver will pick up reference value to set the pressure from pRefCell and pRefValue in the fvSolution file. It does not have to be defined on one of the boundaries. U and P at the top and bottom (solid walls) appear correct to me. |
Yes! you are right.
Thanks for correcting me. |
Ok, 2D simulations still have the instability problems, and I think your boundary conditions looks fine. What about the schemes, what if you change the div(phi, U) entry to simply Gauss linear? Also, you can check the conservation of mass flow rate between the inlet and the outlet, see if they are indeed conserved.
By the way, since you mentioned that the instability occours when you are near steady-state, what if you initialize the simulation from a steady-state solution(solved by simpleFoam for example), that could help you decide what the problem is. |
All times are GMT -4. The time now is 06:43. |