
[Sponsors] 
July 14, 2012, 12:05 

#21  
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 7 
Quote:
On one quick note about the initial guesses, which initialise the solution... at the moment, I have a guessed pressure field p* which is a linear distribution from west to east, i.e. 1086420, and I have also set the intial velocity field u* equal to the inlet vlaue, and v*=0. Anderson suggests putting in a velocity spike in a v control volume to create a 2D flow also. If i set the u velocity field to zero (i=3 onward to i=NI1), my outlet b.c returns NaN, and the solution fails due to this piece of code: u(nX,2:nYp1)=u(nX1,2:nYp1); % First extrapolate values from the domain u(nX,2:nYp1)=u(nX1,2:nYp1)*sum(u(2,2:nYp1))/sum(u(nX,2:nYp1)); % This multiplier is the mass in divided by the mass out, which ensures continuity So I guess the question is, do i assign velocity values that correspond with p*, or is it just sufficient that the uvelocities be nonzero? This is all much appreciated and I am making more progress than I have in a long time! Best Regards, Michael 

July 14, 2012, 23:04 

#22  
Member
HouKen
Join Date: Jul 2011
Posts: 66
Rep Power: 8 
Quote:
As for NaN problem, I guess, because you applied 0 to all u velocity as initial guess, so when you apply Quote:
As far as I know...pressure initial guess is not so crucial problem. good luck 

July 16, 2012, 12:23 

#23 
Member
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 7 
I assume then that this is what you mean:
%% Apply Boundary Conditions boundary_conditions(); %% Solve for u* [ustar, diJ]=u_momentum(); %% Check continuity again % u(nX,2:nYp1)=ustar(nX1,2:nYp1); % First extrapolate values from the domain % u(nX,2:nYp1)=ustar(nX1,2:nYp1)*sum(u(2,2:nYp1))/sum(u(nX,2:nYp1)); %% Solve for v* [vstar, dIj]=v_momentum(); %% Solve for p' [pdash] = pressure_correction(diJ, dIj); Where now I have used the values of u* along i=NI1, whereas in the boundary conditions, I had used the values of the initial guess. 

July 19, 2014, 18:47 

#24 
New Member
Mostafa Ghadamyari
Join Date: Aug 2013
Posts: 5
Rep Power: 6 
Thank you very much for your notes!
My cavity code wasn't working till I used your suggested relaxation factors! And now it is working like a charm!! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
LidDriven cavity flow with SIMPLE method  luckyxu  Main CFD Forum  6  November 9, 2011 08:17 
Some tips for Snappyhexmesh required  basilwatson  OpenFOAM  3  December 9, 2010 03:53 
The correction on pressure equation of SIMPLE algorithm in MRFSimpleFOAM solver  renyun0511  OpenFOAM Running, Solving & CFD  0  November 10, 2010 02:47 
Help me on SIMPLE  L. Aouanouk  Main CFD Forum  6  April 17, 2003 05:08 
flow over a 2D cyl using SIMPLE  T  Main CFD Forum  1  January 27, 2001 08:32 