# Pressure correction in fractional step method

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 13, 2012, 18:08 Pressure correction in fractional step method #1 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 Can someone explain to me how the pressure correction step works in cylindrical coordinates? I have been working on a code for a while and my pressure correction step is not producing a divergence free field.

May 14, 2012, 03:44
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,587
Rep Power: 20
Quote:
 Originally Posted by new_at_this Can someone explain to me how the pressure correction step works in cylindrical coordinates? I have been working on a code for a while and my pressure correction step is not producing a divergence free field.
did you check if your method is divergence-free in Cartesian coordinates? fractional step is a method to split pressure and velocity in the time integration, the system of coordinate is not involved

 May 14, 2012, 10:18 #3 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 5 How does the divergence change before and after the correction step? Is the divergence localized in certain regions after the correction step? How accurately is your pressure equation being solved? Are you using an axisymmetric cylindrical grid, is weird stuff happening at the axis of symmetry?

May 14, 2012, 11:11
#4
Member

Peter
Join Date: Oct 2011
Posts: 52
Rep Power: 5
Quote:
 Originally Posted by FMDenaro did you check if your method is divergence-free in Cartesian coordinates? fractional step is a method to split pressure and velocity in the time integration, the system of coordinate is not involved
I do have a working code in cartesian coordinates that has been verified against ghia for the lid driven cavity. I'm a bit confused about what you are saying... Are you saying I should use the exact same pressure correction step for cylindrical coordinates even though the divergence is different?

Quote:
 Originally Posted by rmh26 How does the divergence change before and after the correction step? Is the divergence localized in certain regions after the correction step? How accurately is your pressure equation being solved? Are you using an axisymmetric cylindrical grid, is weird stuff happening at the axis of symmetry?
I am using an axisymmetric grid to solve for the internal flow in a cylinder. Before the pressure correction, the maximum divergence in the field is on the order of 10^-1. After the correction step, it is on the order of 10^-2. After the pressure correction step, the majority of the field has a divergence on the order of 10^-3 and the max divergence values are located in the upper left and right corners near the cylinder wall. In my 2D code I get divergence values orders of magnitude smaller.

I initially start with a velocity profile of 1 everywhere in the field. When integrated it produces a value of 1. I expect that at any time, if I integrate the velocity profile, I should also get a value of 1. However as my flow progresses to steady state, I get values up to 1.2

 May 14, 2012, 11:19 #5 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 1,587 Rep Power: 20 Are you using an exact or approximate projection method? You must be careful in the inner-outer product of discretized divergence-gradient operators

 May 14, 2012, 11:38 #6 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 I believe that i am using an exact projection method. In each step of my code I update the u_z and u_r field by the advection and diffusion terms. Then I solve the following equation Could you clarify more about the inner outer divergence-gradient operators?

 May 14, 2012, 11:43 #7 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 1,587 Rep Power: 20 The pressure equation must be discretized from the Div Grad (*) operators, you should not use the Laplace operator. This allows you to substitute the correct BC in terms of the normal component of the pressure gradient

May 14, 2012, 12:01
#8
Member

Peter
Join Date: Oct 2011
Posts: 52
Rep Power: 5
Quote:
 Originally Posted by FMDenaro The pressure equation must be discretized from the Div Grad (*) operators, you should not use the Laplace operator. This allows you to substitute the correct BC in terms of the normal component of the pressure gradient
So instead of solving for the pressure in one step, could I split it into two steps? the first step would be multiplying the divergence of the intermediate velocity (not divergent free) by the inverse of the discretized divergence matrix. Then multiply that result by the inverse of the discretized gradient matrix.

 May 14, 2012, 13:24 #9 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 Also are there any books or papers that I can look up that talk about how to do this?

 May 16, 2012, 12:18 #10 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 for those interested, I found this paper which essentially talks about my problem. Unfortunately I still have not found the bug in my code. I expect my code to produce a poiseuielle like profile that peaks at 1.5 however my code peaks at ~1.8 and is not divergence free. If anyone has seen similar problems, please let me know. thanks http://www.sciencedirect.com/science...45793004001148

May 16, 2012, 17:09
#11
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 368
Rep Power: 10
Quote:
 Originally Posted by new_at_this I believe that i am using an exact projection method. In each step of my code I update the u_z and u_r field by the advection and diffusion terms. Then I solve the following equation Could you clarify more about the inner outer divergence-gradient operators?

How do you arrive at this equation?? If it is a pressure correction equation then it should have a 'delta-t' term somewhere!!!

May 16, 2012, 17:16
#12
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,587
Rep Power: 20
Quote:
 Originally Posted by arjun How do you arrive at this equation?? If it is a pressure correction equation then it should have a 'delta-t' term somewhere!!!
maybe the time step is simply inserted in the P variable ...

May 16, 2012, 17:24
#13
Member

Peter
Join Date: Oct 2011
Posts: 52
Rep Power: 5
Quote:
 Originally Posted by arjun How do you arrive at this equation?? If it is a pressure correction equation then it should have a 'delta-t' term somewhere!!!
the equation is just the cylindrical expansion for:

I didn't put in the time because it cancels once applied in the navier stokes equations.

Quote:
 Originally Posted by FMDenaro maybe the time step is simply inserted in the P variable ...
I have checked and I don't think that is the problem.

 May 16, 2012, 17:29 #14 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 1,587 Rep Power: 20 is not a problem if you then compute Vn+1= V* - Grad P In any case, I am quite sure you have problems in setting pressure BCs ... you must write Div (Grad P) and substitute n.Grad P at boundaries

 May 16, 2012, 17:39 #15 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 I think I have accounted for that. Since my code is on a staggered grid, I'm only calculating pressure at the interior points. At the edges, I assume that the ghost point outside the boundary is the same as the first interior point. For example the second derivative in the R direction should be . Substituting for neumann bcs I get at the axis and at the wall.

May 16, 2012, 18:32
#16
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 368
Rep Power: 10
Quote:
 Originally Posted by new_at_this the equation is just the cylindrical expansion for: I didn't put in the time because it cancels once applied in the navier stokes equations. I have checked and I don't think that is the problem.

I do not have time right now to figure this out. But I will try to imbibe what you wrote.

I am assuming the P in your equation is pressure correction and not the pressure itself.

I asked that because I never remember deriving pressure correction in fractional step method that is independent of delta T.

May 16, 2012, 19:21
#17
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 368
Rep Power: 10
Quote:
 Originally Posted by new_at_this I think I have accounted for that. Since my code is on a staggered grid, I'm only calculating pressure at the interior points. At the edges, I assume that the ghost point outside the boundary is the same as the first interior point. For example the second derivative in the R direction should be . Substituting for neumann bcs I get at the axis and at the wall.

You can not apply zero gradient at the axis by ghost points. Axis has pressure gradients.

Quote:
 Originally Posted by FMDenaro maybe the time step is simply inserted in the P variable ...
Yes this is the case, he is calculating for ( deltT * Pressure-correction).

 May 17, 2012, 10:57 #18 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 5 There normal component of the gradient of the pressure should be zero at the axis, if we are assuming axisymmetric flow and the fact that Ur must be zero at the axis. What are you using for the inlet/oulet conditions?

May 18, 2012, 11:56
#19
Member

Peter
Join Date: Oct 2011
Posts: 52
Rep Power: 5
Quote:
 Originally Posted by rmh26 There normal component of the gradient of the pressure should be zero at the axis, if we are assuming axisymmetric flow and the fact that Ur must be zero at the axis. What are you using for the inlet/oulet conditions?
So i'm working on a sliding cylinder problem, which is axisymmetric. Basically its a cylindrical cavity where the end caps are stationary and the wall is moving with a given velocity in the z direction. So expect that the pressure gradient at the axis should be zero. I've defined U_r to be 0 at all the boundaries. U_z has a velocity of 1 at the outer wall and symmetry condition at the axis.

If anyone is interested or if anyone thinks seeing the code might help, then i can post my matlab code. I'm pretty sure that this poisson equation solver is the last bug in my code.

 May 22, 2012, 00:04 #20 Member   Peter Join Date: Oct 2011 Posts: 52 Rep Power: 5 I think I figured out where the error is. When I formulate the finite difference matrix for the laplacian, I essentially solve Ax = b. However A is nearly singular and so my solution ends up being innacurate. How can I increase the accuracy?

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ghlee Main CFD Forum 1 April 10, 2012 16:59 Paolo Lampitella FLUENT 1 March 19, 2008 06:45 msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58 Sal Main CFD Forum 0 March 10, 2007 16:50 Dan Moskal Main CFD Forum 0 October 24, 2002 22:02

All times are GMT -4. The time now is 18:05.

 Contact Us - CFD Online - Top