CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

Experiencing trouble in iteration using Maccormack's Technique

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2021, 09:20
Unhappy Experiencing trouble in iteration using Maccormack's Technique
New Member
Richard Omega
Join Date: Jun 2021
Posts: 4
Rep Power: 4
rjomega is on a distinguished road
I have been searching and working on this for hours and still have not found a solution for my problem. I am still learning to code and do computational fluid dynamics using python. I am using Computational Fluid Dynamics: The Basics with Applications by John D. Anderson, JR.

I am currently doing the CFD Solution of Subsonic-Supersonic Isentropic Nozzle Flow: Maccormack's Technique.

I dont have any issue for the values for the initial time step but after around 150 to 200 iterations, everything goes downhill. Final values for the 1000th iteration are all zeroes. Residual is not going down just like what was shown in the book.

It might get messy if i pasted my code here so I placed it in google docs using code blocks to at least lessen the mess. The way I try to code this is the same as how Lorena Barba's 12 step to navier stokes do it (I am not blaming her for my incompetence, maybe I have skipped something important leading me to this kind of problem)

Here's an image of the result. Im sorry for not including what was being shown.

Orange: Values of density at the throat of the nozzle per iteration
Blue: The residual (Average partial derivatives) the final residual shown in the book is around 10 x-6 while mine got stuck at around zero.

I have followed and checked my code multiple times already for hours. I dont know how to solve this issue because I have already ran out questions I can search to fix it. I hope anyone can help me with this one. Thank you in advance.
rjomega is offline   Reply With Quote

Old   July 23, 2021, 00:46
New Member
Join Date: Mar 2021
Posts: 23
Rep Power: 5
cbooks77 is on a distinguished road
Are you still having trouble with your code? I just recently ran through the applications in JD Andersons wonderful book myself. I ran into some hiccups along the way so don't worry it happens. Most likely you have a silly error somewhere. Do you have Matlab by chance? I generally write solvers in Matlab since its so convenient for debugging.
cbooks77 is offline   Reply With Quote


cfd, iteration, maccormack's technique, python, residuals

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
how to increase "Newton Pressure Iteration Limit" kus CFX 9 April 21, 2013 01:54
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23
Parallel runs slower with MTU=9000 than MTU=1500 Javier Larrondo FLUENT 0 October 28, 2007 22:30
Creating, loop or iteration using expression edito Jan CFX 3 July 28, 2003 11:01
Heat exchanger problem chiseung FLUENT 16 October 20, 2001 04:36

All times are GMT -4. The time now is 13:48.