- **Main CFD Forum**
(*http://www.cfd-online.com/Forums/main/*)

- - **gravity
**
(*http://www.cfd-online.com/Forums/main/3081-gravity.html*)

gravity
I have a multi-component fluid solver, and I am testing that one, but I got a trouble with it, and I suspect it may be caused by gravity.
Here is my computational domain, I have unit square, and two lateral sides are periodic boundary, and top and bottom are no-slip condition, the code runs well until about 40000 iteration, after that it blows up, actually, it didn't seem like blow up, it says fragmentation error. So, is there any good references about how to implement gravity? Thank you~~~~~~~~~~~~~` |

give more details.
Hi,
If you want someone to try to help you, it would be helpfull to give more details of what problem exactly you are solving and what happens to the code and the results before the error message. Are you solving for an atmosphere with constant gravity downwards? Or are you solving for self-gravity, solving a Poisson equation for the Gravitational Potential? etc... Or are you testing the instability of superposed fluids under the influence of Gravity (Rayleigh-Taylor type instability)? |

Re: give more details.
Yeah, you are right.
My problem is to solve Rayleigh-Taylor instability. After instability, we ended up stable state, i.e., heavy material is bottom, lighter one is top, but if we continue running the code, we apply gravity downward, and bottom and top boundary condition is no-slip condition, and two sides are periodic boundary conditions. Now it seems like the solution blow up because of continuing application of gravity. So, I wonder there is any remedy for applying gravity for long time running. Thanks |

Re: give more details.
There should not be any problem applying gravity. I do work in Astrophysics and there, gravity is applied continually in all kind of configurations without making any problem of that kind.
What makes you think that the problem is with the gravity term? The only thing that will balance the gravity is the pressure. Do you have heating at the bottom and cooling at the top too? Does turbulence develop in the flow? Another thing that might be is the following: gravity and pressure are the dominant forces in your problem, once the flow reaches equilibrium they completely cancel each other. However, if the accuracy you reach in the difference equations is not enough, these terms maybe do not cancel each other exactly. Also if you do have other small terms in the equation (the equation that includes the gravity and the pressure), they might be 'lost' in the accuracy of the two dominant terms (gravity and pressure). To make sure this does not happen, you might need to use double precision and collect pressure and gravity terms together withing the same term as follow (gravity+pressure) + small terms is much better than gravity + pressure + small terms Patrick |

Re: give more details.
Thanks a lot, I will do that.
That makes sense. Kim |

All times are GMT -4. The time now is 15:52. |