Fluids

Fluids

How to sucessfully return the report value from within UDF?

    • acukrov
      Subscriber

      Hi,

      I would like to plot the value calculated from within UDF macro "DEFINE_REPORT_DEFINITION_FN".

      Since the mesh data is needed, the code is restricted to compute-node as shown in Figure 1.



      Fig. 1. The code for computing the value that is to be reported in Fluent. The green mark denotes the successfully printed value, while the underlined is the value that is not recognized as a reported value.



      However, the value is not returned for being reported in Fluent, although is correctly printed out using "Message" command. This is displayed in Fig. 2.


      The reported value is not returned.


      Fig. 2. The value is not reported.

      The question is: "What is missing that does not allow for the return of the computed value?"

      Thanks in advance!

      Best regards,

      Alen

    • Rob
      Ansys Employee

      What's different to the example in the manual?

    • DrAmine
      Ansys Employee

      Give first different name for UDF and the variable of interest. Second: why an UDF? Third: You will have issues if running on more than one CPU (Not parallelized). 

    • acukrov
      Subscriber

      Dear Mr. Amine,

      thank you!

      Answers:
      1. tried, not working (Figs. 1 and 2);
      2. because I need to estimate the interface position by carrying out the computation using vapor volume fraction and volume of the domain;
      3. thanks for note.

      Best regards,

      Alen



      Fig. 1. The code with applied changes and some of the equations computed therein.


       



      Fig. 2. The value that has to be returned is not reported, although is printed correctly.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.