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

Quasi 1D Nozzle Shock Capturing MacCormack Method Problems

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By matt1234

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2016, 13:55
Default Quasi 1D Nozzle Shock Capturing MacCormack Method Problems
  #1
New Member
 
Matt
Join Date: May 2016
Posts: 2
Rep Power: 0
matt1234 is on a distinguished road
Hi I am new to CFD, and I have been using the introductory book by Anderson.

It has multiple cases for a Quasi 1D Nozzle, and I am completely stuck on the Shock Capturing Case (7.6).

It is done using a MacCormack method with added artificial viscosity in conservation form and a constant exit pressure ratio of 0.6784.

I have tried as exactly presented in the book (I think) as well as have tried many other approaches to see if I could fix it. No matter what, my code diverges after about 25 time steps.

Has anybody successfully solved this code?
If so, can you please show me the code?
I would prefer MATLAB, but any computing language is fine.

This is driving me crazy!

Or, if anybody as another code that solves this problem (not necessarily MacCormack method) please provide it to me.

Please post here or feel free to email it to me: mbyoung18@hotmail.com

Thank you so much!
matt1234 is offline   Reply With Quote

Old   May 20, 2016, 22:16
Default
  #2
Member
 
LUQILIN
Join Date: May 2016
Location: Harbin, China
Posts: 35
Rep Power: 10
LUQILIN is on a distinguished road
General finite volume scheme could catch the shock but with numerical oscillations at discontinuities. Try this first. Just ignore the shock and see what you can get. You can e-mail to me if you have further questions: luqilin@hrbeu.edu.cn.
LUQILIN is offline   Reply With Quote

Old   May 22, 2016, 09:30
Default I have encountered same problem
  #3
New Member
 
Ramkumar
Join Date: Nov 2014
Location: pondicherry, India
Posts: 16
Rep Power: 12
Ramkumar21194 is on a distinguished road
i have done same problem in matlab using same Mccormack technique as described in Ch7. my problem is, i encounter -ve temperature in about 100th iteration step. i dont know why, could you please help me with this?

i have solved the rest of the problems in CH7. this one is driving me crazy

i think the problem is in extrapolation in outlet.

please help me with this.

here is my code
Attached Files
File Type: docx shock_capturing.docx (13.9 KB, 86 views)
Ramkumar21194 is offline   Reply With Quote

Old   May 22, 2016, 09:40
Default
  #4
New Member
 
Ramkumar
Join Date: Nov 2014
Location: pondicherry, India
Posts: 16
Rep Power: 12
Ramkumar21194 is on a distinguished road
upload your matlab code matt, i wanna take a look at it
Ramkumar21194 is offline   Reply With Quote

Old   July 7, 2017, 05:04
Default
  #5
New Member
 
Yaser
Join Date: Jul 2017
Posts: 9
Rep Power: 9
Haider58 is on a distinguished road
Hay ramKumar..

Its been a year now. Have you been able to resollve bug in your code. Can you please share it.

Thanks
Haider58 is offline   Reply With Quote

Old   July 19, 2017, 02:38
Default
  #6
New Member
 
ardalan khalili
Join Date: Jul 2017
Posts: 1
Rep Power: 0
ardalankhalili is on a distinguished road
hey rumkummar
im facing the same problem so i was wondering if you resolved this problem yet? my solution diverges after about 100 iterations and the results are not anywhere near acceptable... i think my problem is at subsonic outflow boundaries that need to float (as the anderson says).

please let me know if you had any progress.

thanks.
ardalankhalili is offline   Reply With Quote

Old   October 23, 2019, 05:58
Default Non dimesionalised length
  #7
New Member
 
Pritam Gole
Join Date: Aug 2017
Posts: 8
Rep Power: 9
pritam.gole is on a distinguished road
If length in the code is considered as 3, then x' = x/L can't go from 0-3. It should vary from 0 to 1. But, in all the code it is considered as 0 to 3. Please help me out to understand it.
pritam.gole is offline   Reply With Quote

Old   March 6, 2020, 08:47
Default Shock Capturing(MacCormack) - John D Anderson
  #8
New Member
 
NotSteve
Join Date: Mar 2020
Posts: 3
Rep Power: 6
CrushedToucan96 is on a distinguished road
Quote:
Originally Posted by matt1234 View Post
Hi I am new to CFD, and I have been using the introductory book by Anderson.

It has multiple cases for a Quasi 1D Nozzle, and I am completely stuck on the Shock Capturing Case (7.6).

It is done using a MacCormack method with added artificial viscosity in conservation form and a constant exit pressure ratio of 0.6784.

I have tried as exactly presented in the book (I think) as well as have tried many other approaches to see if I could fix it. No matter what, my code diverges after about 25 time steps.

Has anybody successfully solved this code?
If so, can you please show me the code?
I would prefer MATLAB, but any computing language is fine.

This is driving me crazy!

Or, if anybody as another code that solves this problem (not necessarily MacCormack method) please provide it to me.

Please post here or feel free to email it to me: mbyoung18@hotmail.com

Thank you so much!

Im' facing just about the same issue as mentioned above. Temperature goes negative after 25 timesteps causing dt (Adaptive) and Mach number go complex. Isnt there a solution to this? Anderson hasnt done any sort of calculations for validation
CrushedToucan96 is offline   Reply With Quote

Old   March 8, 2020, 10:45
Default Shock caputring
  #9
New Member
 
NotSteve
Join Date: Mar 2020
Posts: 3
Rep Power: 6
CrushedToucan96 is on a distinguished road
Quote:
Originally Posted by Ramkumar21194 View Post
i have done same problem in matlab using same Mccormack technique as described in Ch7. my problem is, i encounter -ve temperature in about 100th iteration step. i dont know why, could you please help me with this?

i have solved the rest of the problems in CH7. this one is driving me crazy

i think the problem is in extrapolation in outlet.

please help me with this.

here is my code
Hey i went through your code and whilst all looked fine there were some portions that i quite wasnt able to wrap my head around. One of those things were your steady state static pressure plot [1600 timesteps] for no artificial viscosity. Although there wasnt any smoothening which is expected the oscillations seems to be too low it almost quite resembled the analytical results. I have attached the plot i got for the same conditions and it quite matches with the book [Ref Shock.jpg & Shock_Anderson.jpg] . Another thing that i found out was your J2 formulation where you seem to have opted to use the bigger formula [Ref J2Formulation.jpg] , which conforms to the 'pure' form of the flux terms, There seems to be a typo in the log(dA/dx) part which which should have been forward differenced for the predictor part and rearward for the corrector part. [Ref J2Formulation_typo.jpg] . Making this change forces us to update J2 only in the inner nodes [ where i = 2:n-1] . I still get the negative temperature error after correcting this but thought you should know about this. Let me know if you've found a solution to this.
Attached Images
File Type: jpg Shock.jpg (12.7 KB, 25 views)
File Type: jpg Shock_Anderson.JPG (45.0 KB, 21 views)
File Type: jpg J2Formulation.JPG (31.7 KB, 28 views)
File Type: jpg J2Formulation_typo.JPG (13.7 KB, 25 views)
CrushedToucan96 is offline   Reply With Quote

Reply

Tags
anderson, artificial viscosity, cfd, maccormack, shock capturing


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
Bow Shock Capturing Ronak Gupta Main CFD Forum 6 April 22, 2013 03:51
MUSCL shock capturing on high aspect ratio meshes vijay_paul Main CFD Forum 1 September 29, 2012 01:16
Problems with ansys 12 multizone method jflacerda ANSYS Meshing & Geometry 2 November 19, 2009 12:31
Shock in nozzle - dangerous? Christian Main CFD Forum 1 May 8, 2006 13:48
Has the pressure correction method problems? X. Ye Main CFD Forum 17 September 1, 1999 17:14


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