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

Stop calculation bym measn of UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2015, 03:32
Default Stop calculation bym measn of UDF
  #1
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
I take up an old problem that was previously once published on CFD.

How to stop Fluent calculation from inside UDF if some some criteria are fulfilled?
jacek is offline   Reply With Quote

Old   April 8, 2015, 03:56
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
"How to stop iteration process from UDF".
`e` is offline   Reply With Quote

Old   April 8, 2015, 04:16
Default @ `e`
  #3
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
I know this site but it is too laconic for me.

It seems that the core of the method is RP_Set_Boolean("stop",1). But this macro is non even described in the UDF manual or Fluent manual. To make things worse even RP_Get..... macors are hardly mentioned in the UDF manual.
jacek is offline   Reply With Quote

Old   April 8, 2015, 04:31
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
They've provided an introduction, code and comments. Bear in mind this website is an unofficial source of help from volunteers (similar to these forums); respectfully, what were you expecting? I believe their method of stopping the solver with an RP-variable acting as a flag (and an if statement with Scheme) is the quickest solution.

Fluent has no official documentation for Scheme, and in fact the developers were intending to replace Scheme with Python as the official scripting language back in 2004... have a read of this unofficial Fluent Scheme Programming Reference which I believe is the only Scheme-Fluent documentation available.

I'm wondering if this method could work (which doesn't use Scheme files): create a User-Defined Scalar and alternate the values between, say, 0 and 1 but set a small convergence criteria on this UDS. When your other convergence criteria is met then set the UDS at a constant value, say 0, and the convergence of this artificial scalar should stop your solver.
`e` is offline   Reply With Quote

Old   April 8, 2015, 06:09
Default `e`
  #5
New Member
 
Join Date: Oct 2009
Posts: 25
Rep Power: 16
jacek is on a distinguished road
"what were you expecting?"

I expected as much as I could understand this RP_Set... macro and use it according to my will. With such limitations I can only re-write it in my UDF and use it only the restricted way produced on http://www.eureka.im/996.html.

I hoped in a timid way that some leakages from Ansys are possible, for instance ex-empoyees or better informed users from the native market.

Initially I can say it works - it stops calculations and that's the goal. However, it yields some corrupting good mood announcements - something about Error, ect. Never mind.

If it comes to UDS I'm not familiar with this type of macros at the moment. Scheme is the same problem for me.

Taking this into account, thank you.
jacek is offline   Reply With Quote

Old   April 8, 2015, 07:20
Default
  #6
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
If you're unfamiliar with Scheme, RP-Variables etc I suggest you have a read of that unofficial document I linked to above. You'd be lucky finding an active expert in this field kicking around the forums because there's been no documentation on Scheme with Fluent since that file in 2004 (that I've come across). This approach with the RP-variable is a little messy, but there's no clean/straightforward method to my knowledge for accomplishing this task.

I've not used UDS myself, but it seems like a UDS could accomplish your goal in a more elegant fashion. I'm also not very familiar with Scheme (it's hardly used elsewhere) but have used it for running TUI commands mid-simulation (there's no other way of achieving this task).
`e` is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How can I stop the calculation in UDF Seyoung Oh Fluent UDF and Scheme Programming 1 September 24, 2013 08:44
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 07:12
command TUI / Scheme for stop and continue calculate rayolau FLUENT 1 May 13, 2013 11:20
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 14:16
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03


All times are GMT -4. The time now is 11:16.