Fluids

Fluids

Macros for unsteady statistics

    • aitor.amatriain
      Subscriber

      In LES, I want to add a source term in a equation that depends on the mean subgrid turbulent viscosity and te RMSE of the fluctuating velocities.

      I have read the customization manual, and it seems that there are macros for the velocities

      RMS(C_STORAGE_R(c,t, SV_U_MEAN), C_STORAGE_R(c,t, SV_U_RMS), delta_time_sampled, SQR(delta_time_sampled));

      but I do not see anything similar for the subgrid turbulent viscosity. Is there any alternative?

      I can create a Custom Field Function with the variable that I want. Is it possible to use a Custom Field Function in a UDF?

      Thank you,

      Aitor

    • aitor.amatriain
      Subscriber

      I was thinking of creating a UDS, go to Cell Zones - Fixed Values and set the value of the UDS to be equal to the source term that I want by using expressions, but I hope there is a more direct approach

    • DrAmine
      Ansys Employee

      Alternative to doing that on your own (the time sampling for C_MU_T) or via Custom Field Function -> Patch in UDM every time step. (a way among other ways).

    • aitor.amatriain
      Subscriber

      How can I patch a Custom Field Function to a UDM?

    • DrAmine
      Ansys Employee

      Calculation Actitvity

    • aitor.amatriain
      Subscriber

      I create a user-defined memory location, then I define the Custom Field Function, and what command should I execute to set the UDM to be equal to the Custom Field Function?

    • DrAmine
      Ansys Employee

      You patch the content of CFF into UDM. To have the right command better to record a small journal in which you patch from TUI by using the Search Keyword Feature. It should start with /solve/patch .....

    • aitor.amatriain
      Subscriber

      In /solve/patch I can only patch flow variables, not CFF.

    • DrAmine
      Ansys Employee

      You patch an UDM using the value of CFF.

    • aitor.amatriain
      Subscriber

      But how can I do that? There is no info in the manuals nor on the Internet in general

    • aitor.amatriain
      Subscriber

      Update: In case it is helpful for others, after creating the Custom Field Function called cff, I did it in Initilization-Patch-udm0-cff

      Thank you for your help Amine!

    • DrAmine
      Ansys Employee

      Welcome Aitor. The help does cover that but I always recommend to make use of that TUI Keyword searcher and record a journal file to have the right commans! Thanks for sharing your update.

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