CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

FVM; incompressible fluid, staggered grid, gravity problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2024, 12:07
Default FVM; incompressible fluid, staggered grid, gravity problem
  #1
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
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; Staggered-Grid-MAC-Marker-And-Cell.png


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.
Mathematician is offline   Reply With Quote

Old   January 12, 2024, 12:59
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Mathematician View Post
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


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.





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.
FMDenaro is offline   Reply With Quote

Old   January 12, 2024, 13:17
Post
  #3
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
I did like that; I did like this; after a timestep (choosen so that the simulation is stable) I predict the velocity and then I make move the fluid in the new cells (by allowing the approximation of NS equations only on the permitted fluid cells), do I have to update the position (the fluid cells where I solve it?) I'm used to solve a problem where in the domain there's just everywhere fluid.
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?
Mathematician is offline   Reply With Quote

Old   January 12, 2024, 13:30
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Mathematician View Post
I did like that; I did like this; after a timestep (choosen so that the simulation is stable) I predict the velocity and then I make move the fluid in the new cells (by allowing the approximation of NS equations only on the permitted fluid cells), do I have to update the position (the fluid cells where I solve it?) I'm used to solve a problem where in the domain there's just everywhere fluid.
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?
You have to work in the Eulerian formulation, not the Lagrangian one.
Solve at each time step the same continuitą and momentum equations in all cells, nothing else.
FMDenaro is offline   Reply With Quote

Old   January 13, 2024, 08:28
Default
  #5
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
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
Mathematician is offline   Reply With Quote

Old   January 13, 2024, 11:43
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Mathematician View Post
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
I am not sure to understand, you have to explain more details about your flow problem.
FMDenaro is offline   Reply With Quote

Old   January 14, 2024, 07:10
Default
  #7
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
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.
Mathematician is offline   Reply With Quote

Old   January 14, 2024, 07:31
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Mathematician View Post
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.





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.
FMDenaro is offline   Reply With Quote

Old   January 14, 2024, 07:32
Default
  #9
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
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
Mathematician is offline   Reply With Quote

Old   January 14, 2024, 13:42
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Mathematician View Post
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

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.
FMDenaro is offline   Reply With Quote

Old   January 14, 2024, 15:31
Default
  #11
New Member
 
Hi
Join Date: Jan 2024
Posts: 8
Rep Power: 2
Mathematician is on a distinguished road
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.
Mathematician 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
Boundary conditions for Staggered grid - steady pipe Flow - SIMPLE Fluidentity13 Main CFD Forum 1 November 4, 2021 00:29
Problem, airflow in a duct with a steel grid inside? maverick1990 FLUENT 3 March 31, 2014 05:00
Problem with staggered grid on numerical simulation gtr84 Main CFD Forum 1 February 15, 2012 07:58
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


All times are GMT -4. The time now is 23:01.