Fluids

Fluids

Get solver residuals in Fluent UDF

    • MHMD90
      Subscriber

      Hi,


      I am using ANSYS FLUENT 20 to model my heat transfer. In my model, I have introduced the heat transfer equation as a User Defined Scalars (UDS).


      I am trying to write a udf for adaptive time-stepping. I can't use fluent in-built adaptive method as it doesn't work with UDS enabled. To do that, I need to get the residual value after each time step into the DEFINE_DELTAT udf. Does anyone have any idea how to do that?


       


      Regards,


      MHMD

    • DrAmine
      Ansys Employee

      Adaptive Time Stepping is available even if UDS is used. Can you show your panel?

    • MHMD90
      Subscriber

      Yes, it is available and I can define every options, but not working. It keeps using the initial time step defined and the time step does not get updated. I read Fluent documentation. In earlier versions, it is stated that adaptive time step cannot be used when using UDS. However, this statement is omitted from documentation of recent versions. But still it seems not working.


      That's why I was looking for a way to define the adaptive time stepping myself via UDF. Any ideas how to do that? or templates?


       


      Kind Regards,


      MHMD

    • DrAmine
      Ansys Employee

      Show your panel settings, and plot of time step size vs. time step. Also provide the version you are using.

    • MHMD90
      Subscriber

      I think images below has all the information you need. My version is ANSYS 2020 R1.


       


      Thanks,


      MHMD


       


    • DrAmine
      Ansys Employee
      Double check what happens if you disable UDS. Might the time step change is not large and that is why not changing. Check what I asked for and report.
    • MHMD90
      Subscriber

      I even checked with 9 decimals and there was no change in time step. I think I resolved the problem. Turns out when you're solving a UDS equation alone, adaptive time step won't get updated! but, as I activated another model (like energy with constant temperature having no variations), it started working well.


       


      Thanks,


      MHMD

    • DrAmine
      Ansys Employee

      So you have been solving the UDS alone all the time? Okay that is another thing but it should be mentioned in the documentation. I will nee to check that and probably update later

    • MHMD90
      Subscriber

      Yes, Initially I was just trying to solve heat transfer by defining a UDS. But, later I had to add a dummy model alongside UDS to get adaptive time-stepping to update. For now, I marked this post as solved to help if others have the same issue. Your further follow-up on this matter is highly appreciated.


       


      Kind Regards,


      MHMD

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