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

Initial Condition in 3D flows.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2005, 03:02
Default Initial Condition in 3D flows.
  #1
shekharc
Guest
 
Posts: n/a
Hi everybody, I am writing my own code in 3d cylindrical co-ordinate for unsteady flow using MAC. I solve the pressure poisson equation. Everything goes fine and the solution converges, but the solution is comming out to be wrong. I guess I applied correct B.C. However I am not sure with the initial condition as a solenoidal velocity field, which satisfies the B.C., is to be used as initial condition. Could any of you please tell me how to obtain such a velocity field for 3D. As far as I know, the stream function approach fails in 3D.

Thanks in anticipation,

chandra
  Reply With Quote

Old   May 31, 2005, 11:28
Default Re: Initial Condition in 3D flows.
  #2
agg
Guest
 
Posts: n/a
Even if your initial field is non-solenoidal, the poisson equation should take care of it. Could you be more specific about the initial condition that you provide and also what you mean by "wrong solution"? Have you tested your code to solve standard problems with known solutions?

  Reply With Quote

Old   June 1, 2005, 14:04
Default Re: Initial Condition in 3D flows.
  #3
Mani
Guest
 
Posts: n/a
What exactly do you mean by "wrong"? I see three possibilities for getting a "wrong" solution.

(a) your solution does satisfy your governing equations but differs from experimental results. This could be due to various reasons -- the initial condition not being one of them.

(b) your solution does not satisfy the governing equations. In this case your implementation is faulty. This, again, has nothing to do with initial conditions.

(c) your boundary conditions are wrong (which you ruled out, already). Has nothing to do with initial conditions.

It is possible, though very unlikely, that your solution depends on the initial conditions. As far as I know, there is so far no mathematical proof that there is a unique solution to the Navier-Stokes equations for any kind of BCs. In numerical practice, some cases with multiple solutions have been found for strongly nonlinear flows. However, I would guess that you are most likely dealing with a modeling problem (faulty implementation, or model does not adequately represent physics), if you really find that your solution depends on the initial condition. This should not be the case in the vast majority of flow problems.

If you are confident that your code is working, and your governing equations are correct, I would spend more time on checking the boundary conditions.

  Reply With Quote

Old   June 2, 2005, 00:40
Default Re: Initial Condition in 3D flows.
  #4
shekharc
Guest
 
Posts: n/a
Heyy, thanks for your suggestions. However, in MAC algorithm, it is specified that your initial velocity field should be divergence free. I think it is because if you advance in time, you are building the time dependent solution upon the initial velocity field and if your initial velocity field is not divengence-free, it is equivalent to the fact that some compressibility has been introduced in the fluid. I am in process to check my code and the solution obtained. Lets c if it is faulty implementation or some other kind of bug

By the way, could you please suggest me an unsteady problem whose analytical solution is available so that I can use it for checking the correctness of my code.

Thank you very much,

Chandra
  Reply With Quote

Old   June 2, 2005, 11:13
Default Re: Initial Condition in 3D flows.
  #5
agg
Guest
 
Posts: n/a
Try a flow in a circular pipe (Hagen-Poiseuille fow), the exact solution is given in White, "Viscous fluid flow" (second ed.) equation (3-34). It is for steady flow, but you should get a steady solution even for unsteady case after flow is fully developed.
  Reply With Quote

Old   June 2, 2005, 21:13
Default Re: Initial Condition in 3D flows.
  #6
Mani
Guest
 
Posts: n/a
Interesting... If there is no mechanism provided to diminish random numerical divergence errors, then how do you maintain the initial zero divergence throughout the computation?

On the other hand: If there is such mechanism to reduce divergence, then why do you need to start with a perfect initial condition? Am I missing something?
  Reply With Quote

Old   June 7, 2005, 02:10
Default Re: Initial Condition in 3D flows.
  #7
shekharc
Guest
 
Posts: n/a
If you look into the MAC paper by Harlow and Welch, they recommended to use any but divergence-free velocity field as initial condition...solve the poisson equation to get the pressure field corresponding to this velocity field....and use this velocity and pressure field to get a velocity field at next time-level using the N.S. Equation...and so on. i.e. use pressure and velocity fields at n-th level to estimate velocity field at n+1-th level (starting from n = 0), then obtain the pressure poisson equation at n+1-th level using this newly obtained velocity field and solve this to get the pressure field at n+1-th level. So, if your velocity field is not divergence-free at n=0 (initial condition), you can't get a divergence-free velocity field at the next time level(n = 1). It is because you have used velocity field at the n=0(which is not divergence free) and corresponding pressure field to get the solution of n = 1. I don't think if your velocity field at n = 0 is not divergence free, the pressure poisson equation can produce a pressure field just in one step so that you can advance to a divergence-free velocity field in next step. This means, if you are investigation how the flow will b developing during the course of time, the results may not be correct. However, if you are looking for a steady-state flow after a long span of time, you may get correct steady-state flow because the divergence in the velocity field decreases with the time advance and at last you get a field having sufficiently low divergence to be accepted as correct steady state solution.

Please correct me if there went something wrong in my understanding.

-chandra
  Reply With Quote

Old   June 7, 2005, 12:28
Default Re: Initial Condition in 3D flows.
  #8
agg
Guest
 
Posts: n/a
As long as your initial conditions are well posed, if it is not divergence-free at n=0, the pressure poisson equation will produce a pressure field such that your solution at n=1 is divergence free (machine accuracy). I use a similar technique in my code. The two conditions under which your solution is not divergence free are: 1) You are starting off with a field which is not divergence free. The poisson equation will immediately correct this in the next step. 2) When you are iterating for pressure and you do not converge the solution, the velocity field obtained will not be divergence free.
  Reply With Quote

Old   June 7, 2005, 18:28
Default Re: Initial Condition in 3D flows.
  #9
Mani
Guest
 
Posts: n/a
seems more clear now. thanks.
  Reply With Quote

Old   June 8, 2005, 05:17
Default Re: Initial Condition in 3D flows.
  #10
shekharc
Guest
 
Posts: n/a
Hmmm...i c...this means I can start with any velocity field, solve the P.E. obtained from this initial velocity field...and the next velocity field would b divergence free...great!! This is indeed quite helpful for me...I was meshing around to find some procedure for getting a divergence-free field...phew!!

Thanks!!

-Chandra
  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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 22:51
Compressible Nozzle Flow sebastian OpenFOAM Running, Solving & CFD 14 September 21, 2016 11:47
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
Low Mach number Compressible jet flow using LES ankgupta8um OpenFOAM Running, Solving & CFD 7 January 15, 2011 14:38
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


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