CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   What is the command to stop calculation in UDF? (https://www.cfd-online.com/Forums/fluent-udf/249127-what-command-stop-calculation-udf.html)

lbj007 April 20, 2023 23:09

What is the command to stop calculation in UDF?
 
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.

https://img.pterclub.com/images/2023...1_11-01-14.jpg

lbj007 April 21, 2023 00:19

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.

https://img.pterclub.com/images/2023/04/21/S.jpg

Siba11 April 22, 2023 08:24

Quote:

Originally Posted by lbj007 (Post 848561)
I wrote a test udf


but it seems that CX_Interpret_String does not work.

https://img.pterclub.com/images/2023/04/21/S.jpg

Hi. You can use the 'execute command' dialog box under calculation activities to stop the simulation.

lbj007 April 22, 2023 08:49

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.

Siba11 April 23, 2023 06:39

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.

lbj007 April 23, 2023 06:59

OK,I got it. So do you know whether scheme/tui can get variables during the previous iteration?

AlexanderZ April 30, 2023 08:30

you may have almost total functionality of fluent through scheme, but its not documented

you can't run TUI commands from UDF

kele October 14, 2023 08:13

Quote:

Originally Posted by Siba11 (Post 848610)
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!


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