Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

Ansys Learning Forum Forums Discuss Simulation Fluids Error with Mesh Deformation Reply To: Error with Mesh Deformation

Federico
Ansys Employee

Hello, 

can you try something like this, where you loop over the cells of your deforming zonne?

Node *node_p  
begin_c_loop (f, tf)
    {
      c_node_loop (f, tf, n)
        {
          node_p = C_NODE (f, tf, n);
          if (NODE_POS_NEED_UPDATE (node_p))
            {
              NODE_POS_UPDATED (node_p);
              xold = NODE_X (node_p);                        
              xnew = xold+delta_x;
              NODE_X (node_p) = xnew;
            }
        }
    }
  end_c_loop (f, tf);
 
where NODE_POS_NEED_UPDATE(node_p) is ensures that the position gets updated only than once for any given time step (if running in parallel). 
Also, use CURRENT_TIME instead of time to access flow_time variable.
Note that we can only provide limited support for customization. Hence, the above is only a general suggestion and we cannot guarantee that it will work as intended for your application.
[bingo_chatbox]