Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

How to create a UDF for fluent from sinusoidal waveform

    • harry93
      Subscriber

      Hello CFD clan,

      I am working on patient specific geometry. I have the waveform (attached) , from which I want to create a UDF and use it as my inlet BC. In the waveform, I want to use mass inflow and time as parameters. I have tried using transient profile by creating .txt file but I want to explore more on UDF. Can anyone let me know, how can I use this waveform and create a UDF from this.

      Thank you

    • Rob
      Forum Moderator
      DEFINE_PROFILE and there's an example in the UDF manual. You may find you need 2-3 polynomial equations to get a good fit on the above data, so IF will be needed. I'd also look up the C function "floor".
    • harry93
      Subscriber
      Hello rob,
      How do I extract the polynomial equation for this sinusoidal waveform. Can you help me with some examples ?
      Thank you
    • aitor.amatriain
      Subscriber
      You can take n points from the plot, and then obtain a polynomial of order n-1 after solving a linear system, but this doubt is not related to the use of ANSYS Fluent.
    • DrAmine
      Ansys Employee
      You can make a regression using Python or even using Excel and from there you might the polynomials. if you have the data as table data you might just it directly as Transient Table :)
    • harry93
      Subscriber
      Hello DrAmine,
      In case of using UDF and transient table, which one gives the accurate results ? Does using transient table decrease the accuracy of my results ?
    • DrAmine
      Ansys Employee
      Both will depend on the number of data points and the time steps you are using. Transient Table is accurate enough if it does contain enough frames.
    • harry93
      Subscriber
      ok got it
      Thank you so much DrAnime.
    • DrAmine
      Ansys Employee
      Welcome! But DrAnime does not sound healthy ! :)
    • Rob
      Forum Moderator
      You have been looking quite drawn lately.....
    • harry93
      Subscriber
      Haha.. Noted !
Viewing 10 reply threads
  • The topic ‘How to create a UDF for fluent from sinusoidal waveform’ is closed to new replies.