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

What is the command to stop calculation in UDF?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2023, 00:09
Default What is the command to stop calculation in UDF?
  #1
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
Hi everyone,
I want to implement in UDF that stops iteration when the net value of the heat transfer rate of import and export approaches the given energy source term in UDF. I have found that implementing this process using Scheme makes the calculation very slow. I am not sure if it will be faster to implement this process using UDF. However, I don't know what is the command to control the iteration stop in UDF.

lbj007 is offline   Reply With Quote

Old   April 21, 2023, 01:19
Default
  #2
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
I wrote a test udf
Quote:
DEFINE_ON_DEMAND(test)
{
CX_Interpret_String("(display "test")");
}
but it seems that CX_Interpret_String does not work.

lbj007 is offline   Reply With Quote

Old   April 22, 2023, 09:24
Default
  #3
Member
 
Odisha
Join Date: Jan 2020
Posts: 59
Rep Power: 6
Siba11 is on a distinguished road
Quote:
Originally Posted by lbj007 View Post
I wrote a test udf


but it seems that CX_Interpret_String does not work.

Hi. You can use the 'execute command' dialog box under calculation activities to stop the simulation.
Siba11 is offline   Reply With Quote

Old   April 22, 2023, 09:49
Default
  #4
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
I know 'execute command' can do this, but I'm just curious whether it can work in udf. What's more, I'm not sure if scheme can get some variables during the previous iteration, which are necessary for convergence judgment.
lbj007 is offline   Reply With Quote

Old   April 23, 2023, 07:39
Default
  #5
Member
 
Odisha
Join Date: Jan 2020
Posts: 59
Rep Power: 6
Siba11 is on a distinguished road
Hi. I'm not 100 percent sure, but I think UDF alone cannot stop a simulation.

It has to be through some combination of UDF and Scheme.
Siba11 is offline   Reply With Quote

Old   April 23, 2023, 07:59
Default
  #6
Senior Member
 
Join Date: Feb 2020
Posts: 114
Rep Power: 6
lbj007 is on a distinguished road
OK,I got it. So do you know whether scheme/tui can get variables during the previous iteration?
lbj007 is offline   Reply With Quote

Old   April 30, 2023, 09:30
Default
  #7
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may have almost total functionality of fluent through scheme, but its not documented

you can't run TUI commands from UDF
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   October 14, 2023, 09:13
Default
  #8
New Member
 
Join Date: Oct 2023
Posts: 3
Rep Power: 3
kele is on a distinguished road
Quote:
Originally Posted by Siba11 View Post
Hi. You can use the 'execute command' dialog box under calculation activities to stop the simulation.
Hi, my friend, have you solved this problem yet? I've also encountered this problem, I'm using udf in conjunction with scheme, but fluent still can't stop the calculation automatically!
kele is offline   Reply With Quote

Reply

Tags
scheme, stops iteration, udf


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
Set a monitoring point to stop calculation Springyuu FLUENT 1 June 2, 2020 09:57
UDF for mass-flow calculation does not print any value into console jakub_ Fluent UDF and Scheme Programming 6 May 11, 2020 07:24
Stop simulation after given conditions (UDF) franc1 FLUENT 12 April 24, 2020 14:33
Udf code with stop mechanism ?? force_95 FLUENT 0 October 2, 2019 06:46
How can I stop the calculation in UDF Seyoung Oh Fluent UDF and Scheme Programming 1 September 24, 2013 08:44


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