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

Boundary Conditions on Divergence in Marker and Cell (MAC)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2016, 16:50
Default Boundary Conditions on Divergence in Marker and Cell (MAC)
  #1
New Member
 
Jack
Join Date: Jul 2016
Posts: 8
Rep Power: 10
FluidFox is on a distinguished road
Hi all,

I have been studying the Marker and Cell method by Harlow and Welsh, and had a question about the boundary condition on divergence.

They suggest setting it so that the gradient of the of the divergence on the boundary is zero (div ghost cell = div cell on edge) for free-slip, no-slip, inlet and outlets. However, I am struggling to find any physical argument for this.

Why not set it so that the divergence is zero on the boundary (div ghost cell = - div cell on edge)? This would also fit better with the other boundary conditions when setting the normal velocity on the edge of the ghost cell for satisfying the other boundary conditions. It also directly enforces the zero divergence condition on the boundary.

The divergence in the ghost cell only comes in to play when calculating the laplacian of the divergence, and the original MAC report suggests that the laplacian of the divergence term can be left out of calculating R_(ij), so does it really matter if it might not even be used?

Thanks again!
FluidFox is offline   Reply With Quote

Old   August 1, 2016, 17:16
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,877
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
are considering this paper?
http://www.cs.rpi.edu/~cutler/classe...rlow_welch.pdf


could you better clarify your question?
FMDenaro is offline   Reply With Quote

Old   August 1, 2016, 17:22
Default
  #3
New Member
 
Jack
Join Date: Jul 2016
Posts: 8
Rep Power: 10
FluidFox is on a distinguished road
Thats the paper, but the technical report is available here: http://permalink.lanl.gov/object/tr?...eport/LA-03425

Boundary conditions are discussed on page 49.

Why set D_(i-1,j) = D(i,j) so that there is no gradient? Why not set D_(i-1,j) = - D(i,j) so as to enforce zero divergence on the boundary?
FluidFox is offline   Reply With Quote

Old   August 1, 2016, 17:42
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,877
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by FluidFox View Post
Thats the paper, but the technical report is available here: http://permalink.lanl.gov/object/tr?...eport/LA-03425

Boundary conditions are discussed on page 49.

Why set D_(i-1,j) = D(i,j) so that there is no gradient? Why not set D_(i-1,j) = - D(i,j) so as to enforce zero divergence on the boundary?

ok, so you are focusing on condition 6) in the paper.

You can see it a a numerical condition enforcing homogeneous Neumann condition for the divergence on the wall. When D(i,j) tends to zero, D(i-1,j) does too.

If you enforce the reflection condition D(i-1,j) = - D(i,j) you fix a linear extrapolation from the interior. Even in this case when D(i,j) tends to zero, D(i-1,j) does too. But, generally, extrapolation on the boundary is not a good choice as it can amplify oscillations and leading to instability.

However, this method is very old and now much more studies are published that clarified many issues in the numerical solution for incompressible flows.
FMDenaro is offline   Reply With Quote

Old   August 1, 2016, 18:02
Default
  #5
New Member
 
Jack
Join Date: Jul 2016
Posts: 8
Rep Power: 10
FluidFox is on a distinguished road
OK, thank you.

How wise would it be to replace R_(i,j) by Q_(i,j) as described on page 22 of the report, thus removing the question of setting a boundary condition on divergence?

Can you briefly name some of the issues and studies so that I can read more at all?
What might be a better alternative method that is similarly straight forward to implement?

Thanks
FluidFox is offline   Reply With Quote

Old   August 1, 2016, 18:06
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,877
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
fractional step methods (projection methods), as this one :

https://www.google.it/url?sa=t&rct=j...E_ox2w&cad=rja
FMDenaro is offline   Reply With Quote

Old   August 1, 2016, 18:19
Default
  #7
New Member
 
Jack
Join Date: Jul 2016
Posts: 8
Rep Power: 10
FluidFox is on a distinguished road
I have had a look at fractional step methods before. They seem very similar to the MAC method, so what advantage do they give?

I was not sure about the boundary condition on the poisson equation of d(phi)/dn = 0, or in fact 'no boundary condition on phi' that Kim and Moin suggest. Surely there has to be a boundary condition (in the ghost cells) in order to evaluate the poisson equation for phi in the domain? What about if I wanted to set a zero pressure outlet?
FluidFox is offline   Reply With Quote

Old   August 1, 2016, 18:24
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,877
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by FluidFox View Post
I have had a look at fractional step methods before. They seem very similar to the MAC method, so what advantage do they give?

I was not sure about the boundary condition on the poisson equation of d(phi)/dn = 0, or in fact 'no boundary condition on phi' that Kim and Moin suggest. Surely there has to be a boundary condition (in the ghost cells) in order to evaluate the poisson equation for phi in the domain? What about if I wanted to set a zero pressure outlet?

if you read carefully the method, you see that the pressure equation is written in term of Div Grad phi, therefore on a boundary you will substitute directly n.Grad phi in terms of the difference between intermediate and real velocity.

I suggest to check in this forum for similar posts where many details are discussed.
FMDenaro is offline   Reply With Quote

Old   August 2, 2016, 03:07
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
I think this explains this step by step in detail

have a look

http://www.inf.ufes.br/~avalli/mestr...al/griebel.pdf

I read it year back so i might be wrong but i believe what he describes is marker and cell method.
arjun is offline   Reply With Quote

Old   August 2, 2016, 13:59
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Found the code also for it. Attaching it.
Attached Files
File Type: gz micGibNAST2d.tar.gz (55.7 KB, 14 views)
arjun is offline   Reply With Quote

Reply

Tags
boundary condition, divergence, mac, marker and cell


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
Marker and Cell Grid thatdiverguy Main CFD Forum 0 January 3, 2015 15:57
matlab code of marker and cell method for solving 2d incompressible navier stokes eqn sgangarapu Main CFD Forum 1 August 28, 2013 11:33
Marker and Cell Method - a code to look at it? kujret Main CFD Forum 0 March 3, 2013 05:14
MAC + SOLA for free surface T Main CFD Forum 1 April 11, 2001 14:43
Marker And Cell method (MAC) Albert Badal Main CFD Forum 0 February 27, 1999 20:53


All times are GMT -4. The time now is 20:19.