CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to let OpenFOAM abort a simulation when values exceed a given range?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2012, 08:01
Question How to let OpenFOAM abort a simulation when values exceed a given range?
  #1
New Member
 
notyet
Join Date: Jun 2012
Posts: 9
Rep Power: 14
karkar is on a distinguished road
When the absolute pressure becomes negative or U exceeds the speed of light, things have pretty obviously gone wrong (be that bad boundary conditions, a too coarse mesh, a too large timestep etc.).


So, is there any way to have a simulation abort with an error message when values exceed definable non-physical ranges?


--
I also asked this question at the Computational Science StackExchange (http://scicomp.stackexchange.com/q/2654/1669), please have a look at their Q&A system which offers a more ordered system for answers (none of these <<oh, I haz similar prob, plz send codez>> "answers")
karkar is offline   Reply With Quote

Old   June 29, 2012, 22:45
Default
  #2
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Quote:
Originally Posted by karkar View Post
When the absolute pressure becomes negative or U exceeds the speed of light, things have pretty obviously gone wrong (be that bad boundary conditions, a too coarse mesh, a too large timestep etc.).


So, is there any way to have a simulation abort with an error message when values exceed definable non-physical ranges?


--
I also asked this question at the Computational Science StackExchange (http://scicomp.stackexchange.com/q/2654/1669), please have a look at their Q&A system which offers a more ordered system for answers (none of these <<oh, I haz similar prob, plz send codez>> "answers")

if(max(mag(U)).value()>3e8)
{
FatalErrorIn("Function name")<<"error message"<<abort(FatalError);
}

If the velocity exceed 3e8, there should be a problem, and program should abort after a short time itself.

Regards, Junwei
su_junwei is offline   Reply With Quote

Old   July 2, 2012, 03:10
Default
  #3
New Member
 
notyet
Join Date: Jun 2012
Posts: 9
Rep Power: 14
karkar is on a distinguished road
Quote:
Originally Posted by su_junwei View Post
if(max(mag(U)).value()>3e8)
{
FatalErrorIn("Function name")<<"error message"<<abort(FatalError);
}

If the velocity exceed 3e8, there should be a problem, and program should abort after a short time itself.

Regards, Junwei
Thanks Junwei,

I assume you mean putting that in the used solver?

But is there any other solution that does not require recompilation? Maybe something like a #codeStream statement in controlDict?

Cheers
karkar is offline   Reply With Quote

Reply

Tags
limits


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
particle parallel run crashes - values out of range heavy_user OpenFOAM Running, Solving & CFD 0 November 2, 2011 13:31
max node values exceed max element values in contour plot jason_t FLUENT 0 August 19, 2009 12:32
Monitor point values in a steady state simulation Kushagra CFX 2 July 13, 2008 21:03
transonic simulation with OpenFoam Shyam Main CFD Forum 0 June 12, 2008 03:39
Numerical values from simulation Ravi FLUENT 0 February 11, 2003 10:02


All times are GMT -4. The time now is 05:07.