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

Question on Gravity

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2012, 17:44
Default Question on Gravity
  #1
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 13
archdevil is on a distinguished road
Hello everyone. I come up against a problem on gravity. I have setup a simple simulation of channel flow by using Fortran code, the water flows from inlet to outlet with a uniform velocity. If I don't take gravity into account, the result looks fine, only u component exists and the other two component, v and w should be zero. However, when I added the gravity into source term and the initial pressure was changed from constant to hydrostatic pressure, the downward velocity appeared, that is to say, w was not zero but a big number.
Why CFD code works fine without considering gravity and fails with considering gravity? In reality, the gravity exists.
Did anyone meet the same problem? Thanks in advance.
archdevil is offline   Reply With Quote

Old   May 15, 2012, 22:38
Default
  #2
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
Is this your own code? Sounds like there is an issue with either your boundary conditions or your continuity equation. It doesn't make sense to have a downward component to your velocity when there are solid walls. You would be violating conservation of mass or penetrating your walls if there was a downward component everywhere. Can you clarify if there is a downward component everywhere or just in certain areas.
cdegroot is offline   Reply With Quote

Old   May 16, 2012, 09:52
Default
  #3
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 13
archdevil is on a distinguished road
Dear cdegroot, Thank you for your consideration. Yes, it is my own code, and the boundary conditions are imposed as follows: in x-direction, inlet and outlet; in y-direction, wall; in z-direction, bottom as wall and top as pressure outlet. If I take gravity into account, downward component should appear everywhere. Do you mean that gravity term should violate conservation of mass? It is so strange. In fact in 3d simulation, gravity term should be included in the govern equations, however, when it comes to numerical simulation, gravity will be neglected in many situations. What is the reason? If you don't consider the gravity, you will get the reasonable results, but if you consider the gravity as the real physics shows, you will get the wrong results.
archdevil is offline   Reply With Quote

Old   May 16, 2012, 11:16
Default
  #4
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,166
Rep Power: 23
evcelica is on a distinguished road
If you have a wall at the bottom of the fluid, this wall will exert a force up on the fluid adjacent to it at the hydrostatic pressure of the fluid. This force will be the same as the force due to gravity and essentially it will net to zero everywhere. You have something wrong with your code, perhaps not including buoyancy forces between the fluid elements to cancel out the gravity?
evcelica is offline   Reply With Quote

Old   May 16, 2012, 12:01
Default
  #5
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 13
archdevil is on a distinguished road
Dear Erik, In my opinion, buoyancy forces is just caused by the difference of pressure. Because the initial distribution of pressure is given as hydrostatic pressure, buoyancy forces is taken into account. In fact, I setup another case, just give the initial pressure distribution as hydrostatic pressure but no gravity term was added to the code, then water will go upward!!!
archdevil is offline   Reply With Quote

Old   May 16, 2012, 12:06
Default
  #6
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
evcelica is correct. If there is a bottom wall you can't be getting downward flow because the buoyancy forces will be balanced by gravity and also as I mentioned before you would be violating conservation of mass. However, by your description above it sounds like you actually have the bottom and top of the channel open to the atmosphere. So it is more like flow between two parallel plates open to the environment on 4 surfaces.

Now, you are right that the case run without gravity and with gravity should be the same, but only in the case where gravity does not affect the physics of the flow. I am not sure yet if in your case it should or not. Do you solve an energy equation? Are there any buoyancy forces in your simulation? So you have three outlets in your simulation. Are they all considered as pressure outlets? What is the specified pressure at the outlets?
cdegroot is offline   Reply With Quote

Old   May 16, 2012, 12:09
Default
  #7
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
Quote:
Originally Posted by archdevil View Post
Dear Erik, In my opinion, buoyancy forces is just caused by the difference of pressure. Because the initial distribution of pressure is given as hydrostatic pressure, buoyancy forces is taken into account. In fact, I setup another case, just give the initial pressure distribution as hydrostatic pressure but no gravity term was added to the code, then water will go upward!!!
If you have a hydrostatic pressure distribution and no gravity to counteract the upward force on the fluid, of course it will move upward. That is the correct result.
cdegroot is offline   Reply With Quote

Old   May 16, 2012, 12:34
Default
  #8
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 13
archdevil is on a distinguished road
Dear cdegroot, I haven't solved the energy equation and there is no buoyancy force. You are right there are three outlet in the simulation and one of them is regarded as velocity inlet. As to pressure outlet boundary condition, we should not give the specified pressure, in fact, pressure outlet boundary condition means the gradient of physics variable in normal vector direction equals to zero. If we give the specified pressure at the boundary, that is not pressure outlet boundary condition, but pressure inlet boundary condition, right?

Although the bottom is wall, but for example, how to deal with the dam break problem? we should consider the effect of gravity, right? then what is the difference between dam break problem and open channel flow problem? why the former should take gravity into account and the later should neglect the gravity? in fact the govern equation of them is the same.
archdevil is offline   Reply With Quote

Old   May 16, 2012, 12:52
Default
  #9
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
Sorry, I read that the bottom was open as well, but no, just the inlet outlet and top. Yes you are correct that for your pressure outlets the gradient of the physics variable normal to the boundary is zero, but you need to do something with pressure as well. In Fluent for example, a pressure outlet has a uniform static pressure specified and enforces zero derivative normal to the boundary for velocity. I feel like the top boundary may be more appropriately treated as a pressure inlet. Read how Fluent imposes a pressure inlet, specifically how it treats hydrostatic head: https://www.sharcnet.ca/Software/Flu...ug/node239.htm.

You are right, there is no logical reason why including gravity in your simulation would cause it not to work properly. There is more likely an error in how you are treating the gravity term that is inconsistent with the actual physics of the flow or an issue with boundary conditions, most likely the top boundary.
cdegroot is offline   Reply With Quote

Old   May 16, 2012, 14:31
Default
  #10
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 13
archdevil is on a distinguished road
Thank you very much. I will read the manual of Fluent and look into my code carefully.
archdevil is offline   Reply With Quote

Reply

Tags
cfd code, gravity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Strange temperature distribution by adding 'Gravity' fshak92 STAR-CCM+ 5 May 21, 2012 08:13
Ok to increase gravity gradually from 0 to 9.82? Admo FLUENT 3 February 23, 2012 11:43
UDF fails to model 9.81m/s^2 gravity jpo Fluent UDF and Scheme Programming 2 January 24, 2012 19:15
modeling freestream in an big Volume with gravity Raambi STAR-CCM+ 1 May 10, 2011 08:04
question about gravity vivien OpenFOAM 3 July 13, 2009 11:00


All times are GMT -4. The time now is 07:59.