Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Error with Mesh Deformation › Reply To: Error with Mesh Deformation
November 20, 2023 at 1:20 pm
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.