|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
varun
Join Date: Apr 2009
Posts: 35
Rep Power: 6 ![]() |
hi all
i'm trying to write C code for supersonic flow over flat plate. i'm reffereing CFD by JD anderson chp 10. i have a few doubts hope u can help. firstly when i'm calculating vector E at plate surface and vector F at inflow, what should be the values of txy, txx, tyy, qx and qy, should i consider. should i take all of them to be zero...??? and after prdictor step, when calculating txy, then in one of the terms we need to calculate central difference, so our expression is something like.... U(i+1,j)-U(i-1,j) but we dont have values for U(i+1,j) at time step t+dt, right...??? so am i suppose to use the values calculated at previous time step.... coz that is the only way... jz needed to confirm.. thanks once again varun
|
|
|
|
|
|
|
|
|
#2 |
|
New Member
Balaji Sankar
Join Date: Nov 2011
Posts: 14
Rep Power: 3 ![]() |
Hi,
Sorry for the late reply. I am posting the full code in the attachment, in C. All functions are named as in Anderson. Takes 70 seconds. No input files. All parameters are defined in preprocessor part.. Has been verified using the temperature profile at the trailing edge. Hope this helps. Enjoy. |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Balaji Sankar
Join Date: Nov 2011
Posts: 14
Rep Power: 3 ![]() |
Ooops. Didn't upload.
Here should be the code.
|
|
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2012
Posts: 11
Rep Power: 3 ![]() |
Thanks for the code
|
|
|
|
|
|
|
|
|
#5 |
|
Member
Cean
Join Date: Feb 2010
Posts: 94
Rep Power: 5 ![]() |
thanks for c code.
|
|
|
|
|
|
|
|
|
#6 |
|
Member
Cean
Join Date: Feb 2010
Posts: 94
Rep Power: 5 ![]() |
there is one little error in the code, see attached pic.
The second Redx should be Redy. |
|
|
|
|
|
|
|
|
#7 |
|
New Member
Balaji Sankar
Join Date: Nov 2011
Posts: 14
Rep Power: 3 ![]() |
Hi Cean,
Thanks for pointing out the error! I don know how the plots came out fine after the mess up . Thanks again
|
|
|
|
|
|
|
|
|
#8 |
|
New Member
Thanh
Join Date: May 2013
Posts: 1
Rep Power: 0 ![]() |
thank you so much
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Code for the book | Nishu | Main CFD Forum | 11 | July 7, 2009 01:51 |
| supersonic flow past flat plate | shuo | Main CFD Forum | 0 | July 28, 2007 19:47 |
| Supersonic flow over flat plate | Nikhil | Main CFD Forum | 3 | June 22, 2007 08:11 |
| entrance of a flat plate | mc | Main CFD Forum | 0 | April 24, 2007 22:38 |
| tricky flat plate laminar flow | sarat | FLUENT | 4 | September 9, 2005 18:35 |