We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Stop calculation

    • Ales23
      Subscriber

      Hello,


      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

    • Karthik Remella
      Administrator

      Hello,


      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 

    • schwaral
      Subscriber
      You 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
    • Karthik Remella
      Administrator
      Hello,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
Viewing 3 reply threads
  • The topic ‘Stop calculation’ is closed to new replies.