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

Fortran issue (write statement modifying variables??)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By cfdnewbie

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 18, 2014, 21:11
Default Fortran issue (write statement modifying variables??)
  #1
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
Hi everyone!

I have been having an issue with my fortran code, which really does not make sense to me. If somebody could give me his opinion, I would greatly appreciate!

At one point, my code generates a mistake (a variable = NaN). I used write statements to spot the source of the error.

if I use

print *, Mbar -> answer: 2.802

if I use

print *, Mbar, Cavg -> answer: NaN, 0,354

I did not change anything in the code, but the value of the variable Mbar changed to NaN!!!
Why would such a thing happen??

Thank you very much for your help!

Joachim
Joachim is offline   Reply With Quote

 


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
Setting environment variables: bash issue travonz OpenFOAM Installation 2 July 31, 2012 03:17
Issue with write interval haze_1986 OpenFOAM 0 July 30, 2012 02:24
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
about USER FORTRAN compiling issue CXL CFX 1 October 9, 2003 21:00


All times are GMT -4. The time now is 06:10.