FVM; incompressible fluid, staggered grid, gravity problem
1 Attachment(s)
My problem is to simulate an incompressible fluid with certain cinematic viscosity in a staggered grid with ghost cells, and the computational domain looks like this; Attachment 98049
:confused::eek: but there are ghost cells too. My problem is the following; if I have the gravity source term in the navier stokes equation, and I suppose that the fluid is in the first row of the computational domain, do I have to solve only on the i,j cells where I suppose where the fluid is(at the top, the first row) and then maybe after I updated velocity update position and allow to solve only where the fluid goes? or maybe I have to diffuse and advect even outside the fluid? Do I need something external to solve the problem(intermolecular interactions)? Info;chorin projection method (split local NS with additional timestep and then discretize) and SOR for pressure. |
Quote:
The gravity term acts in the vertical component of the momentum equation, that is only in the fluid cells. It is computed in the prediction velocity of the projection method. |
Quote:
Last time I coded it it was kinda glitchy, maybe I need even to change the timestep since the velocity would change Reynolds would change and so the timestep should be re-newed? |
Quote:
Solve at each time step the same continuitą and momentum equations in all cells, nothing else. |
problem is my cell is 2d. If I solve everywhere it's like just a fluid being costantly "pushed" by a constant force. but my fluid is initially at the top and then falls and bounces
|
Quote:
|
Here's a similar problem to understand my doubt(how do you simulate a fluid if the fluid is not intiially everywhere on the grid and so you can't solve everywhere on the grid, but maybe..)
I have a doubt; if you had an inlet in the left wall, would you need to solve everywhere? I mean if you knew that there's no fluid in the computational grid, but there's a costant inlet Uin = 3 m/s, in the left wall, if you solved everywhere you're basically assuming that the fluid is everywhere in the grid because you solve only where the fluid is (but in this problem the grid initially has no fluid (void, no atmosphere and for now no source terms). I think that in this case you should initially consider that the fluid is near the left wall, then wait a timestep dt (based on stability) and make the fluid move to the next column and diffuse only where the fluid is. If you considered the fluid to be everywhere, the problem would change since I'm considering that there's no fluid in all the cells initially. This is a similar problem to the gravity source term since you have to update the position and then solve again only where the fluid is. Method for this problem (no source terms, Uinlet on the entire left wall, fluid is not everywhere on the grid, it's just entering the grid); -Uinlet in the left wall. -No fluid initially in the grid. -Solve for the first column (near the left wall) (Having Uinlet you can find the U velocity of the first column ---based on BD conditions) -Find a timestep dt stable -Update the position of the fluid s = v*dt -The fluid is going to go in the next column, but since the fluid has costant inlet you're going to solve in both first column and second column. -Continue the process until the fluid is entirely in the computational grid. Similar problem to the gravity source term problem since the fluid is initially considered to be at the top only and not everywhere in the grid. |
Quote:
First of all, if you have a fluid entering in some space (filled by air for example), you have to treat that adequately as fluid-air problem, that with two fluids. There is a plenty of literature about that. If you instead have a single phase and you want to simulate fluid entering and interacting with the same fluid at the rest, you cannot use the incompressible flow model but the compressible one. |
No I was talking about an initially computational grid that is empty ( no air, void), but then there's the fluid inlet that "fills" the grid within time
|
Quote:
In the incompressible flow model, the pressure acts istantaneously, in a single time step the flow must cover the whole domain! You see easily that (single phase) Div v = 0 implies Int[S] n.v dS =0. Thus what enters into the domain must leave the domain. |
thanks for your answer.
So the gravity problem must be compressible(single phase in vacuum)? I noticed that the eulerian coordinate density rho(position, time) would not be constant since the fluid would move and therefore the density would change in position and time, being compressible. |
All times are GMT -4. The time now is 04:46. |