Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Define_DPM_scalar_update

    • ll00023
      Subscriber

      I use this code to calculate stokes number.

      settings:

      reporting User Value 0. (I suppose this is the stokes number I get. but I don't know why its name is this one)

      it works in the case EBU example from FLUENT.

      but for my case with 2 million mesh and 40 million particle parcels, it crashed.

      I can't post all the code here. the code is correct. so what setting should I change?

      #include "udf.h"
      #include "dpm.h"

      DEFINE_DPM_SCALAR_UPDATE(StokesNumber,c,t,init,p)
      {
          cphase_state_t *cp;
          cp = p->cphase;
          /* cphase_state_t *c = &(p->cphase); */

         ......

       

          /* Stokes Number */
          P_USER_REAL(p,0) = tau_p / tau_f;

      }

    • Rob
      Forum Moderator

      Please confirm, 40 million parcels? I suspect you just ran out of storage array or RAM. 

    • ll00023
      Subscriber

      This is the memory for 88 cores. the memory is enough for simulation.

      If I use Define_dpm_scalar_update, does the tp stores all the particle parcel info?

      I have tested the code in URANS case of EBU example. but it didn't work in my URANS and LES case.

       

    • Rob
      Forum Moderator

      OK, so the code works on a small model. Assuming the set up in the large model is identical then the only difference is size/count. With 40M parcels I can easily see the memory allocation being exceeded. Retry with significantly fewer parcels and see what happens. 

    • ll00023
      Subscriber

      I tested in RANS case, which has 15120 particle parcel from dpm summary report.

      this could exclude particle parcel number's effect. but I got similar error. I might need to test a simpler code for this scalar later. 

      Thank you Rob, appreciate your reply.

    • Rob
      Forum Moderator

      OK, thanks. So, if the code is also failing on a smaller model the problem is with the UDF in some way. 

      One quick check, add a few more UDM and UDS memory locations. As I don't know what else you're calling there's always a risk you missed something: this is a test and when running working code I assign the correct number of locations! 

    • Rob
      Forum Moderator

      Continues here /forum/forums/topic/udf-crash/

Viewing 6 reply threads
  • The topic ‘Define_DPM_scalar_update’ is closed to new replies.