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

How to deal with Gravity using SIMPLE approach

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2018, 15:24
Default How to deal with Gravity using SIMPLE approach
  #1
New Member
 
Join Date: Oct 2018
Posts: 2
Rep Power: 0
Nico42 is on a distinguished road
Hi all,


I'm trying to have a steady-state stoke code using FVM staggered grid in 2D, with incompressibility and without inertia. So a quite reduced problem.



The only "fancy" thing that is mandatory in my problem is having a gravity source term.


From what I can understand of the SIMPLE approach, you first guess P, then solve u,v, then calculate p' using mass conservation and update u,v using p' and u',v'.

In my code, I create two loops: one outer loop for momentum eqs. and one inner loop dealing with p' and u,v corrections.



When I only iterate the inner loop, I have, what I think is a good result, though once I use that solution to iterate the outer loop my solutions becomes totally wrong, and my overall pressure increases by a factor of 100-1000...


I cannot understand how to fix it, but I am pretty sure it is coming from the gravity term which makes the things complicated...


The matlab test code is attached, hope you can help me! I am getting very frustrated about it.


Thank you!
Attached Files
File Type: zip Stoke_solver_s1_test.zip (1.8 KB, 3 views)

Last edited by Nico42; October 11, 2018 at 15:26. Reason: Typo
Nico42 is offline   Reply With Quote

Old   October 12, 2018, 16:27
Default
  #2
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 14
Eifoehn4 is on a distinguished road
Dear Nico42,

add your gravity source explicitly after or before your simple approach. There should'nt be any special treatment.

Regards
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Old   October 12, 2018, 19:13
Default
  #3
New Member
 
Join Date: Oct 2018
Posts: 2
Rep Power: 0
Nico42 is on a distinguished road
Dear Eifoehn4,


Thank you for your answer!



However, I don't quite get it. How can I treat the gravity forces after using the SIMPLE algorithm?

It should be part of the formulation to have correction pressure no?

In the model I am trying to make, I want buoyancy to drive the flow. This in order to model, for instance, a heavy viscous ball sinking inside a less dense viscous field, or a light ball ascending through that same viscous field.
Therefore we get a pressure within the model that depends on the weight of the material (rho*g*h) and we get a stoke pressure which depends on the flow triggered by the density contrast between the ball and the viscous medium.

The problem I am having right now is to get a correct pressure solution, as it seems that when I treat the body forces outside the pressure term it does not work between outer iterations.


Thank you again for your answer, I hope my problem is now clearer

Nico
Nico42 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
simpleFoam with gravity, based on interFoam JonW OpenFOAM 1 May 9, 2019 11:08
Time-varying gravity in interFoam gradylemoine OpenFOAM Programming & Development 2 October 8, 2013 12:53
UDF fails to model 9.81m/s^2 gravity jpo Fluent UDF and Scheme Programming 2 January 24, 2012 19:15
how to consider gravity in CFX shrimp CFX 4 September 8, 2008 21:41
Help: gravity in CFX Dejun Jing CFX 2 July 22, 2002 09:58


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