CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Couette Flow in Matlab using Pressure Correction Method (https://www.cfd-online.com/Forums/main/130077-couette-flow-matlab-using-pressure-correction-method.html)

mulchah February 19, 2014 06:22

Couette Flow in Matlab using Pressure Correction Method
 
1 Attachment(s)
Hi!

I am having some trouble completing my Matlab code for Couette flow (parallel flow between two plates, the top one moving at a specified velocity) using the pressure correction method, as described in section 9 of John Anderson's book "CFD - Basics with Applications".

The trouble is that while my code manages to complete the suggested 300 iterations to solve for the velocity and pressure fields, the mass source term I get at the end of the iterations is d = -0.350 x 10^-5 slug/ft^3.s, different from Anderson's value of d = -0.172 x 10^-5 slug/ft^3.s. Related to this, the horizontal component of velocity, u, looks slightly different after 4 iterations when compared with Anderson's values (there is a graph on page 444 of his book). The vertical component of velocity, v, looks similar after 4 iterations though. This makes me think the horizontal component is incorrect. However, I can't find anything wrong with it in my code!

Having said all that, none of this makes a huge difference to the flowfield as the horizontal component of velocity, u, still looks very linear when it has converged but nevertheless, I would like to know what (small) thing I am doing wrong.

Can you please let me know the error of my ways? My code is attached for your perusal. Thanks in advance!

FMDenaro February 19, 2014 06:27

I don't think you can get the exactly same numbers... precision, round-off, etc. are some elements that can affect the number. However, I see that your magnitude order is the same...

mulchah February 19, 2014 06:45

Quote:

Originally Posted by FMDenaro (Post 475677)
I don't think you can get the exactly same numbers... precision, round-off, etc. are some elements that can affect the number. However, I see that your magnitude order is the same...

Really? But my u velocity field doesn't match Anderson's after K = 4 iterations either. For example, at a vertical height of 0.09 ft, my u velocity prediction is approximately 0.4 ft/s while Anderson's is closer to 0.3 ft/s. This makes me think I am doing something wrong.

If what you are saying is true, then surely my velocity prediction should be a lot closer to his values.

FMDenaro February 19, 2014 06:55

check the difference in the velocity profile at the steady state

mulchah February 25, 2014 05:41

Quote:

Originally Posted by FMDenaro (Post 475685)
check the difference in the velocity profile at the steady state

Velocity profile in steady state is almost perfectly linear. As I have said already, the code converges in steady state to give the final velocity profile but results from the interim steps do not match Anderson's, as given in his textbook. Thus I know I am doing something wrong but the frustrating thing is, I don't know what it could be.


All times are GMT -4. The time now is 15:42.