-
-
April 29, 2020 at 3:36 pm
Ales23
SubscriberHello,
I am trying to implement an execute command for 2D. Generally speaking, my aim is to stop a simulation while my criteria is reached.
I would like to stop simulation when C_UDMI(c,t,x)=1.0, I have defined a UDF macro where I add the value if my condition is fullfiled.
But now I deal with a problem that I do not know how to write a macro to stop the solving. I tried convergence conditions as well, but it did not work.
Thanks for help
-
April 29, 2020 at 9:45 pm
Karthik Remella
AdministratorHello,
You can use the ERROR macro to stop the UDF from executing. Please see 'Section 3.7.2' to understand the details.
Here is the link: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v201/en/flu_udf/x1-5560004.9.html?q=ERROR
Thanks.
Best Regards,
Karthik
-
September 21, 2020 at 1:59 pm
schwaral
SubscriberYou can use Error when you want to stop execution of a UDF and print an error message to the console.nExample:n if (table_file == NULL)n Error(error reading file); nImportant: Error is not supported by the interpreter and can be used only in compiled UDFs.nnnIs this the content of the link (I cant open the link)? If yes I dont understand how the scheme code could interrupt my calculation of the solver based on a rp-variable n -
September 22, 2020 at 5:40 pm
Karthik Remella
AdministratorHello,nYes, you are right about the contents of the link. If you are not able to access these instructions, I'd recommend that you have a look at these instructions.nHello,nYes, you are right about the contents of the link. If you are not able to access these instructions, I'd recommend that you have a look at these instructions.nAlso, you will need to use this 'Error' function inside the UDF to be able to stop your UDF from execution. nThanks.nKarthikn
-
- The topic ‘Stop calculation’ is closed to new replies.
-
3236
-
1031
-
969
-
859
-
798
© 2025 Copyright ANSYS, Inc. All rights reserved.