CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   DEFINE_ZONE_MOTION in 3D parallel processing (http://www.cfd-online.com/Forums/fluent-udf/120132-define_zone_motion-3d-parallel-processing.html)

LoUcAsss July 1, 2013 08:59

DEFINE_ZONE_MOTION in 3D parallel processing
 
Hi

I am modeling a 3D air flow in a rotating geometry.
I use the following UDF to impose an increasing rotational velocity.
Code:

#include "udf.h"

DEFINE_ZONE_MOTION(fmotion,omega,axis,origin,velocity,time,dtime)
{
      if (time < 0.1)
      {
        *omega = 6492.6*time;
      }
        else
      {
        *omega = 1249.26;
      }
 
      N3V_D (velocity,=,0.0,0.0,0.0);
      N3V_S(origin,=,0.0);       
      N3V_D(axis,=,0.0,0.0,1.0);

    return;
}

I adapted it to the 2D case, and it worked very well in serial and parallel processing. But in 3D, it works only in serial processing.
Is there anybody who knows how to do it in parallel processing?

Thanks,

PS: I am using UNIX.

LoUcAsss July 2, 2013 08:52

re
 
Now it doesn't work for the 2D case. Can somebody help me? Please!!

malay July 2, 2013 15:10

try this ...

Code:

#include "udf.h"

DEFINE_ZONE_MOTION(fmotion,omega,axis,origin,velocity,time,dtime)
{
#if !RP_HOST   
 if (time < 0.1)
      {
        *omega = 6492.6*time;
      }
        else
      {
        *omega = 1249.26;
      }
 
      N3V_D (velocity,=,0.0,0.0,0.0);
      N3V_S(origin,=,0.0);       
      N3V_D(axis,=,0.0,0.0,1.0);

    return;
#endif
}


LoUcAsss July 3, 2013 02:50

Hi malay!

Thank you!
For the 2D case, it seems that it works.
For the 3D case we'll see.

Yesterday I tried to re-calculate the 3D case and there is something strange. Because, when I interpreted my udf ( for the both case: the calculation started. But when I compiled it, the calculation didn't start iterating.
Maybe it's a problem of compiler...

mohsenhiva June 24, 2014 16:00

Hi,

I have a problem in using your Udf. It cannot be interpreted and I receive below error! Can you help me with this issue. It is very urgent.:(

chip-exec: fmotion: wrong return type: float udf function expected
Error: received a fatal signal (Segmentation fault).

Error: received a fatal signal (Segmentation fault).
Error Object: #f


All times are GMT -4. The time now is 10:14.