CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

Help: Phantom of divergance...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2004, 16:18
Default Help: Phantom of divergance...
  #1
Sheila
Guest
 
Posts: n/a
Hi,

I hope someone will answer my querry this time... they cant be that stupid and they cant be that dificult that I hardly ever get any responds...

Problem this time is that I have a subroutin calculating source terms for a scalar. It works great, converges nicely and looks the way it should. But then suddenly it gives NaN and diverges... Have no idea why.. Tried again and it worked... tried again with some write commands for out put and have the same problem...

Sounds like an variable initialisation problem but already checked and all are initialised properly.

Any idea, anyone?

Extremely stressed, Sheila
  Reply With Quote

Old   September 25, 2004, 11:46
Default Re: Help: Phantom of divergance...
  #2
Peter Attar
Guest
 
Posts: n/a
This answer has nothing to do with the code but when one codes and the output/errors seem to change with print/write statements this usually means that you are somehow trying to enter values into an array past the specified size ie write to A(11) when you only declared A as A(10). If possible when you compile your subroutine turn on array bounds checking on your compiler.
  Reply With Quote

Old   September 25, 2004, 23:54
Default Re: Help: Phantom of divergance...
  #3
Sheila
Guest
 
Posts: n/a
Hi Peter,

thanks for your reply. But perhaps I was'nt being clear enough. My code did'nt start diverging after using the write statements but even before... The same program works fine with coarser mesh. All my dimensions are using NCMAX, NBMAX etc...

I have since changed the differencing scheme to MARS for scalars with under relaxation factor of 0.5 and it seems to do the trick.

Anyhow, how do I turn on array bound checking?

Sheila
  Reply With Quote

Old   September 26, 2004, 12:08
Default Re: Help: Phantom of divergance...
  #4
Peter Attar
Guest
 
Posts: n/a
oh ok..I probably did not read it clear enough...array bounds checking can be turned on via compiler flags..check out the compiler help. It slows things down though so only use these for debugging.
  Reply With Quote

Old   September 26, 2004, 16:39
Default Re: Help: Phantom of divergance...
  #5
Sheila
Guest
 
Posts: n/a
Thank you Peter
  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



All times are GMT -4. The time now is 01:04.