CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Remeshing error using Define_grid_motion in Macro parallel (https://www.cfd-online.com/Forums/fluent/236339-remeshing-error-using-define_grid_motion-macro-parallel.html)

msw May 25, 2021 11:29

Remeshing error using Define_grid_motion in Macro parallel
 
1 Attachment(s)
Hello,

I am having trouble using the remeshing option when using the define_grid_motion Macro in parallel, smoothing is working fine.
It is also working fine in serial.

I have attached a screenshot after it crashes. Does anyone have any suggestions, thank you for taking the time. Happy to provide further infromation if needed.

Code:

DEFINE_GRID_MOTION(foil, domain, dt, time, dtime)
{
#if !RP_HOST
        Thread *tf = DT_THREAD(dt);
        face_t f;
        Node *v;
        int n;

        SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
        begin_f_loop(f, tf)
        {
                f_node_loop(f, tf, n)
                {
                        v = F_NODE(f, tf, n);                                               
                        if (NODE_POS_NEED_UPDATE(v))
                        {
                                NODE_POS_UPDATED(v);

                          //Update NODE_Y(v) = y(x,t)
                         
                        }
                  }
        }
        end_f_loop(f, tf);
       
 #endif
}


AlexanderZ May 25, 2021 22:49

looks like you don't need to do anything to run this code in parallel
try to remove:
#if !RP_HOST
#endif

If doesn't help you may try this:
Code:

DEFINE_GRID_MOTION(foil, domain, dt, time, dtime)
{
        Thread *tf = DT_THREAD(dt);
        face_t f;
        Node *v;
        int n;

        SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
        begin_f_loop(f, tf)
        {
if PRINCIPAL_FACE_P(f,tf)
{
                f_node_loop(f, tf, n)
                {
                        v = F_NODE(f, tf, n);                                               
                        if (NODE_POS_NEED_UPDATE(v))
                        {
                                NODE_POS_UPDATED(v);
                        }
                  }
}
        }
        end_f_loop(f, tf);
}

for more information look for Cells and Faces in a Partitioned Mesh
in Ansys Fluent Customization manual

msw May 26, 2021 12:00

1 Attachment(s)
Thank you for the fast reply, AlexanderZ!

I removed the parallel lines of code and it still runs but still crashes with the same error.

I also added the line of code as suggestion but no improvement.

Attached is another image showing the crashed mesh.

The simulated 'swimmer' is moving through the domain based on Newton second law. Could the issue be the global movement, hence, movement between different partitions and is there a way fluent can re partition during the simulation?

Many thanks again!

AlexanderZ May 27, 2021 05:51

unfortunately, I have no experience regarding your issue.

if you find solution, please drop a message here. Hope you will solve the issue soon

msw May 27, 2021 09:03

Thank you, will do.


All times are GMT -4. The time now is 11:21.