Fluids

Fluids

Fluent UDF – Reading a variable that is generated during the simulation

Tagged: ,

    • abhaymh
      Subscriber

      I have the requirement of changing the input velocity based on the EWF thickness which is a result of the simulation, based on an equation. I wanted to know how I could read the value of the film-thickness into the UDF in order to manipulate it.

    • Rob
      Ansys Employee
      You may be better off using an expression as that can take the film thickness at a position as a Report. There will be an equivalent UDF macro, so check the manual. Expressions are a newer feature in Fluent (based on CFX technology) as a means to avoid needing UDFs for "simple" stuff.
    • abhaymh
      Subscriber
      I can use the expression, yes, but here's what I have to do: Use film thickness to calculate a value, then use that value to calculate the flow rate and subsequently the velocity at the flow inlet. For this, I think I will have to use a UDF since the value changes at every iteration. Is it possible to accomplish this using just expressions?
    • Rob
      Ansys Employee
      You can do that with expressions, that's one of the functions they're designed for. Just make sure the expression makes sense for a zero thickness film.
    • abhaymh
      Subscriber
      Thank you. While that works to define it, it says invalid expression. As you can see from the image, the expression does give a value in the plot. I'm not sure if I've made a mistake or something.
      EDIT: I've also attached a plot for changing values of film thickness (it makes sense, realistically speaking)

    • Rob
      Ansys Employee
      What is evap_area?
Viewing 5 reply threads
  • You must be logged in to reply to this topic.