|
[Sponsors] |
Struggles (in Python) developing MacCormack Scheme for 1D shock tube |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 10, 2021, 20:40 |
Struggles (in Python) developing MacCormack Scheme for 1D shock tube
|
#1 |
New Member
Von
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
How is everyone doing? I am having issues (through Python) developing the MacCormack Scheme for a 1D shock tube problem. What was given is the vector Q = [\rho, \rho*u, \rho*e]^T where the rho is density, u is velocity and e is total energy. Also known as conservative variables. The flux vector is
F = [\rho*u, (\rho*u)**2 + p , \rho*u*H]^T (T means transpose). H is total enthalpy and p is pressure. The problem in question is the "sod problem", so the initial conditions are known. The code is as followed: (You can ignore the first if statement and the first function since we are just calling the sod initial conditions there). Thanks! Last edited by Sirvonny; October 10, 2021 at 20:43. Reason: python formatting bad |
|
October 10, 2021, 20:46 |
Had to reformat the code
|
#2 |
New Member
Von
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
Heres the code in .txt format
Please ignore the first if statement and the first function. It is just calling for the initial conditions of the sod problem. |
|
Tags |
shock tube |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
lax friedrich scheme for shock tube problem. | manukamin | Main CFD Forum | 3 | March 22, 2016 02:02 |
Lax-wendroff scheme for Shock tube problem. | manukamin | Main CFD Forum | 1 | November 26, 2011 15:10 |
ENO Scheme in a Shock tube problem | Shiv | Main CFD Forum | 4 | January 29, 2007 16:31 |
Shock tube source code | sencal | Main CFD Forum | 1 | December 10, 2000 04:27 |
Roe Scheme; Shock Boundary layer Interaction | Mohammad Kermani | Main CFD Forum | 5 | December 20, 1999 16:44 |