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

CFD by anderson, chp 10.... supersonic flow over flat plate

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 5 Post By Bajji
  • 1 Post By Bajji

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2010, 07:22
Thumbs down CFD by anderson, chp 10.... supersonic flow over flat plate
  #1
Member
 
varun
Join Date: Apr 2009
Posts: 35
Rep Power: 17
varunjain89 is on a distinguished road
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
varunjain89 is offline   Reply With Quote

Old   December 20, 2011, 05:30
Smile Full code
  #2
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
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.
Bajji is offline   Reply With Quote

Old   December 20, 2011, 05:33
Default
  #3
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
Ooops. Didn't upload.
Here should be the code.
Attached Files
File Type: c main.c (41.1 KB, 328 views)
Far, Mariusz, aerosjc and 2 others like this.
Bajji is offline   Reply With Quote

Old   February 16, 2012, 11:39
Default
  #4
New Member
 
Join Date: Feb 2012
Posts: 14
Rep Power: 14
ivan_CFD is on a distinguished road
Thanks for the code
ivan_CFD is offline   Reply With Quote

Old   March 29, 2013, 08:26
Default
  #5
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
thanks for c code.
shirazbj is offline   Reply With Quote

Old   April 3, 2013, 09:39
Default
  #6
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by Bajji View Post
Ooops. Didn't upload.
Here should be the code.
there is one little error in the code, see attached pic.

The second Redx should be Redy.
Attached Images
File Type: png redy.PNG (6.4 KB, 120 views)
shirazbj is offline   Reply With Quote

Old   April 29, 2013, 01:20
Default Thank you
  #7
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
Hi Cean,
Thanks for pointing out the error! I don know how the plots came out fine after the mess up . Thanks again
Bajji is offline   Reply With Quote

Old   May 3, 2013, 04:49
Default
  #8
New Member
 
Thanh
Join Date: May 2013
Posts: 1
Rep Power: 0
tienthanh_bk2901 is on a distinguished road
thank you so much
tienthanh_bk2901 is offline   Reply With Quote

Old   August 14, 2013, 13:37
Default would you please send me a copy?
  #9
New Member
 
soroosh alahdin
Join Date: Aug 2013
Posts: 3
Rep Power: 13
soroosh.alahdin@gmail.com is on a distinguished road
my email address is my username, if you decided to help, ofcourse.
soroosh.alahdin@gmail.com is offline   Reply With Quote

Old   August 14, 2013, 17:34
Default
  #10
Member
 
sandy
Join Date: May 2013
Posts: 91
Rep Power: 13
archeoptyrx is on a distinguished road
Quote:
Originally Posted by Bajji View Post
Ooops. Didn't upload.
Here should be the code.
Mr.Balaji ,

I tried compiling the code u gave without making any change in it .

I just gave me errors . if possible take a look at this

Code:
main.c: In function ‘main’:
main.c:145:13: warning: passing argument 4 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 5 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 6 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 7 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 8 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 9 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 10 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 11 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 12 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c: At top level:
main.c:443:6: warning: conflicting types for ‘verbose_mac’ [enabled by default]
main.c:140:13: note: previous implicit declaration of ‘verbose_mac’ was here
main.c:1175:6: warning: conflicting types for ‘u2fp’ [enabled by default]
main.c:318:5: note: previous implicit declaration of ‘u2fp’ was here
/tmp/ccbyCj1V.o: In function `mac':
main.c:(.text+0xbe8): undefined reference to `pow'
main.c:(.text+0xe9c): undefined reference to `sqrt'
main.c:(.text+0xf68): undefined reference to `sqrt'
/tmp/ccbyCj1V.o: In function `verbose_mac':
main.c:(.text+0x19d2): undefined reference to `pow'
main.c:(.text+0x1aca): undefined reference to `sqrt'
main.c:(.text+0x1b96): undefined reference to `sqrt'
/tmp/ccbyCj1V.o: In function `fp2u':
main.c:(.text+0x2b45): undefined reference to `pow'
main.c:(.text+0x2b86): undefined reference to `pow'
/tmp/ccbyCj1V.o: In function `fp2e':
main.c:(.text+0x2cc9): undefined reference to `pow'
main.c:(.text+0x2e9a): undefined reference to `pow'
main.c:(.text+0x2ee1): undefined reference to `pow'
/tmp/ccbyCj1V.o:main.c:(.text+0x31eb): more undefined references to `pow' follow
collect2: error: ld returned 1 exit status
sudharsan@ubuntu:~/Desktop$ gcc -lm main.c
main.c: In function ‘main’:
main.c:145:13: warning: passing argument 4 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 5 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 6 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 7 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 8 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 9 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 10 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 11 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c:145:13: warning: passing argument 12 of ‘mac’ from incompatible pointer type [enabled by default]
main.c:69:6: note: expected ‘float *’ but argument is of type ‘float (*)[70][70]’
main.c: At top level:
main.c:443:6: warning: conflicting types for ‘verbose_mac’ [enabled by default]
main.c:140:13: note: previous implicit declaration of ‘verbose_mac’ was here
main.c:1175:6: warning: conflicting types for ‘u2fp’ [enabled by default]
main.c:318:5: note: previous implicit declaration of ‘u2fp’ was here
/tmp/ccnpPswn.o: In function `mac':
main.c:(.text+0xbe8): undefined reference to `pow'
main.c:(.text+0xe9c): undefined reference to `sqrt'
main.c:(.text+0xf68): undefined reference to `sqrt'
/tmp/ccnpPswn.o: In function `verbose_mac':
main.c:(.text+0x19d2): undefined reference to `pow'
main.c:(.text+0x1aca): undefined reference to `sqrt'
main.c:(.text+0x1b96): undefined reference to `sqrt'
/tmp/ccnpPswn.o: In function `fp2u':
main.c:(.text+0x2b45): undefined reference to `pow'
main.c:(.text+0x2b86): undefined reference to `pow'
/tmp/ccnpPswn.o: In function `fp2e':
main.c:(.text+0x2cc9): undefined reference to `pow'
main.c:(.text+0x2e9a): undefined reference to `pow'
main.c:(.text+0x2ee1): undefined reference to `pow'
/tmp/ccnpPswn.o:main.c:(.text+0x31eb): more undefined references to `pow' follow
collect2: error: ld returned 1 exit status
archeoptyrx is offline   Reply With Quote

Old   August 15, 2013, 10:49
Wink math library?
  #11
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
Hi,

Please google on "Linking math library while compiling c++ codes" .

You basically add -lm option to your compile line so that the GCC can find power and absolute functions that are used in the code.

PS: I had the same error few years ago

Hope it helps
Bajji is offline   Reply With Quote

Old   August 15, 2013, 10:51
Smile Code is there!
  #12
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
Hi,

The code is already posted here! Just run the main.c.

Quote:
Originally Posted by Bajji View Post
Ooops. Didn't upload.
Here should be the code.
Bajji is offline   Reply With Quote

Old   August 21, 2013, 00:02
Smile
  #13
Member
 
sandy
Join Date: May 2013
Posts: 91
Rep Power: 13
archeoptyrx is on a distinguished road
Quote:
Originally Posted by Bajji View Post
Hi,

Please google on "Linking math library while compiling c++ codes" .

You basically add -lm option to your compile line so that the GCC can find power and absolute functions that are used in the code.

PS: I had the same error few years ago

Hope it helps

IT worked Mr.Balaji . How do i obtain the plots ? . Do i need to use any other software to plot ? .

Thanks in advance
archeoptyrx is offline   Reply With Quote

Old   August 21, 2013, 00:37
Thumbs up Plotting the output
  #14
New Member
 
Balaji Sankar
Join Date: Nov 2011
Posts: 19
Rep Power: 15
Bajji is on a distinguished road
Hi ,

Glad it helped you. You can use gnuplot for plotting results. A very small script will let you automate the plotting wonderfully. Its highly recommended for 2D plots.

Quick way to get things done is to copy the pressure and temperature matrices into Matlab and do surface plots. This is how I did it long back.

enjoy!
archeoptyrx likes this.
Bajji is offline   Reply With Quote

Old   August 21, 2013, 00:44
Default
  #15
Member
 
sandy
Join Date: May 2013
Posts: 91
Rep Power: 13
archeoptyrx is on a distinguished road
Quote:
Originally Posted by Bajji View Post
Hi ,

Glad it helped you. You can use gnuplot for plotting results. A very small script will let you automate the plotting wonderfully. Its highly recommended for 2D plots.

Quick way to get things done is to copy the pressure and temperature matrices into Matlab and do surface plots. This is how I did it long back.

enjoy!

Thank you Mr.Balaji .

I got the u_profile via gnuplot . I myself tried writing the entire thing in matlab . it did gave me results after 15000 iterations . But the results are slightly over predicted . Can you help me with this ? I am not a good programmer .
archeoptyrx is offline   Reply With Quote

Old   August 21, 2013, 03:47
Default
  #16
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by archeoptyrx View Post
IT worked Mr.Balaji . How do i obtain the plots ? . Do i need to use any other software to plot ? .

Thanks in advance
Hi, I made one exe file under win7@32. It outputs some plots while simulating. You can press D,T,P,V,R key to switch between Desity,Temperature,Presssure, Vector and residual plot. At the end, it also outputs GMSH's pos files. You could view it with GMSH.

You could download it from here:
https://sites.google.com/site/gmsh2s...edirects=0&d=1

Enjoy.
shirazbj is offline   Reply With Quote

Old   January 24, 2015, 23:43
Default
  #17
New Member
 
Join Date: Nov 2014
Posts: 1
Rep Power: 0
cpchung is on a distinguished road
Quote:
Originally Posted by Bajji View Post
Ooops. Didn't upload.
Here should be the code.
I encountered the following error~~~

Could you point out what is the problem?
I use visual studio 2010 to compile it

1> Touching "Debug\navierStokes_anderson.unsuccessfulbuild ".
1>ClCompile:
1> main.cpp
1>d:\cfd\navierstokes_anderson\main.cpp(106): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(107): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(142): error C3861: 'verbose_mac': identifier not found
1>d:\cfd\navierstokes_anderson\main.cpp(147): error C2664: 'mac' : cannot convert parameter 4 from 'float [5][70][90]' to 'float *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>d:\cfd\navierstokes_anderson\main.cpp(211): warning C4305: '=' : truncation from 'double' to 'float'
1>d:\cfd\navierstokes_anderson\main.cpp(217): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(218): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(221): warning C4305: '=' : truncation from 'double' to 'float'
1>d:\cfd\navierstokes_anderson\main.cpp(227): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(228): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(231): warning C4305: '=' : truncation from 'double' to 'float'
1>d:\cfd\navierstokes_anderson\main.cpp(265): warning C4305: 'initializing' : truncation from 'double' to 'float'
1>d:\cfd\navierstokes_anderson\main.cpp(269): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(270): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(271): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(299): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(300): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(301): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(309): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(320): error C3861: 'u2fp': identifier not found
1>d:\cfd\navierstokes_anderson\main.cpp(328): error C3861: 'u2fp': identifier not found
1>d:\cfd\navierstokes_anderson\main.cpp(450): warning C4305: 'initializing' : truncation from 'double' to 'float'
1>d:\cfd\navierstokes_anderson\main.cpp(454): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(482): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(483): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(484): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(491): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(615): error C3861: 'u2fp': identifier not found
1>d:\cfd\navierstokes_anderson\main.cpp(681): error C3861: 'u2fp': identifier not found
1>d:\cfd\navierstokes_anderson\main.cpp(717): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(732): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(749): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(761): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(769): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(773): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(777): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(781): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(785): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(793): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(797): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(801): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(806): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(810): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(828): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(836): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(840): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(844): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(848): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(852): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(860): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(864): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(868): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(874): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(878): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(896): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(903): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(907): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(911): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(917): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(921): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(931): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(935): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(939): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(944): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(948): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(955): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(959): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(963): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(967): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(971): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(979): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(983): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(987): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(993): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(997): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1014): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1015): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1021): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1025): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1032): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1036): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1052): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1053): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1060): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1064): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1073): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1077): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1099): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1100): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1101): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1102): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1124): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1125): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1126): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1127): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1164): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1165): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1166): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1167): warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
1>d:\cfd\navierstokes_anderson\main.cpp(1188): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.16
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
cpchung is offline   Reply With Quote

Old   February 11, 2015, 10:47
Default Matlab code
  #18
New Member
 
Join Date: Feb 2012
Posts: 14
Rep Power: 14
ivan_CFD is on a distinguished road
Hi,

I have uploaded a Matlab code that solves the original problem in Anderson's book. It can be downloaded from MathWorks here: http://www.mathworks.com/matlabcentr...r-a-flat-plate

Hope this helps!!
ivan_CFD is offline   Reply With Quote

Old   May 11, 2018, 08:31
Default
  #19
New Member
 
ASHWANI MISHRA
Join Date: May 2018
Posts: 1
Rep Power: 0
ashitsme is on a distinguished road
Quote:
Originally Posted by archeoptyrx View Post
IT worked Mr.Balaji . How do i obtain the plots ? . Do i need to use any other software to plot ? .

Thanks in advance
i am new at the programming can u provide me the complete code with final correction.its very urgent.
ashitsme is offline   Reply With Quote

Reply


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
Code for the book Nishu Main CFD Forum 14 April 19, 2017 08:33
Supersonic flow over flat plate Nikhil Main CFD Forum 6 May 20, 2013 13:48
supersonic flow past flat plate shuo Main CFD Forum 0 July 28, 2007 20:47
entrance of a flat plate mc Main CFD Forum 0 April 24, 2007 23:38
tricky flat plate laminar flow sarat FLUENT 4 September 9, 2005 19:35


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