TAGGED: coal-particle-combustion, dpm
-
-
November 16, 2023 at 3:45 am
ll00023
SubscriberI 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;}
-
November 16, 2023 at 1:47 pm
Rob
Forum ModeratorPlease confirm, 40 million parcels? I suspect you just ran out of storage array or RAM.Â
-
November 16, 2023 at 3:49 pm
-
November 16, 2023 at 4:03 pm
Rob
Forum ModeratorOK, 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.Â
-
November 16, 2023 at 4:59 pm
-
November 16, 2023 at 5:08 pm
Rob
Forum ModeratorOK, 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!Â
-
November 22, 2023 at 12:37 pm
Rob
Forum ModeratorContinues here /forum/forums/topic/udf-crash/
-
- The topic ‘Define_DPM_scalar_update’ is closed to new replies.
-
3407
-
1057
-
1051
-
896
-
882
© 2025 Copyright ANSYS, Inc. All rights reserved.