Fluids

Fluids

Advective Flux UDF

    • cpkeesee
      Subscriber

      Hello, I am writing a UDF (in C language) to calculate the advective flux through a spherical outlet within a computational domain.  I assume that I can use the F_ (face macros) for this function, as I am only interested in the mass flow passing through the surface of the outlet geometry.  I continue to get a "parse" error, but cannot find a definition of that error in order to debug my code. 

    • Swathi V. V.
      Ansys Employee

      Hi,

      Are you getting the error without UDF? When exactly are you getting the error? Can you share a screenshot of the complete error message?

      Please make sure the syntax and UDF commands are correct.

    • cpkeesee
      Subscriber

      Hi Swathi, I apologize for the delay.  I changed my approach and I am using the UDF that is published at page 301 of the 2021/R2 UDF guide.  The UDF calculates the mass flow through a boundary surface.  In my case, I am trying to calcuate through the sphere that is suspened in the fluid domain.  The meshed sphere is outlet that acts as sink for the sourced mass that is transported from the front face of the cubic fluid domain.  When I compile the UDF, and then define a report that uses the UDF, in the report definition screen I do not get the option to select a surface (i.e., the sphere-outlet) as the applicable surface for the UDF.  Again, the goal is to calculate the mass flow through the sphere-outlet. 

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