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

Solution to Quasi 1D converging-diverging nozzle problem (euler equations) blowing up

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 16, 2017, 09:54
Default Solution to Quasi 1D converging-diverging nozzle problem (euler equations) blowing up
  #1
Member
 
Sangeet
Join Date: Jun 2017
Location: India
Posts: 43
Rep Power: 8
sangeet is on a distinguished road
Hello,
I am currently trying to generate a numerical solution to a converging-diverging, subsonic-supersonic 1D nozzle flow problem. I am using Maccormack's technique to solve the Euler equations. I have already done it using the non-conservation form of the governing equations. I am now trying to solve it using the strong conservation form of the equations, but the solution keeps blowing up after a few time steps. I have checked for syntactical errors or logical errors in my C++ code but i am unable to pin down exactly what i am doing wrong.
I have attached my C++ code and a few photos of the output.
I will try to describe my code here as best as i can.
I have 5 functions in my C++ code:
1-initial_values()=assigns initial values to the primitive variables and the area value at all grid points
2-conservation_form_initialization()=calculates the solution vector and flux vector terms at all the grid points from the initial values of the primitive variables.
3-time_step()=Calculates the time step satisfying the CFL criterion for linear PDEs at each grid point and chooses the lowest.
4-time_march()=Using Mccormack's technique marches one step forward in time
5-display_values()=just displays values with some formatting
All variables are non-dimensionalized.
I believe i have included enough comments in the code to help you understand whats going on in the code.

If it helps, i am currently following the anderson book on CFD (CFD-The Basics with Applications) chapter 7.
Attached Images
File Type: jpg Values at 0 time steps.jpg (131.0 KB, 84 views)
File Type: jpg Values at 50 time steps.jpg (153.1 KB, 34 views)
File Type: jpg Values at 500 time steps.jpg (117.5 KB, 29 views)
Attached Files
File Type: txt Quasi-1d nozzle conservation form .txt (5.7 KB, 70 views)
sangeet is offline   Reply With Quote

 

Tags
anderson, nozzle flow, quasi-1d


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
Nozzle Flow - Divergence Problem Ijaz FLUENT 9 January 11, 2014 04:36
Future CFD Research Jas Main CFD Forum 10 March 30, 2013 12:26
unsteady 1-D euler equations in a nozzle Luca Main CFD Forum 1 November 30, 2008 14:13
problem with nozzle flow belinda FLUENT 5 July 12, 2006 17:42
multigrid solution of 2d euler equations jim Main CFD Forum 2 May 21, 2002 04:05


All times are GMT -4. The time now is 03:12.