Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

DEFINE_GRID_MOTION

    • teoman
      Subscriber
      Hi Rob
      I tried the code given in Item 2.6.4. DEFINE_GRID_MOTION .and while interpreting an error occurs at
      Thread *tf = DT_THREAD(dt); command line.
      What is the reason for that .And How I can fi it.

      Thanks a lot.
      Teoman

    • teoman
      Subscriber
      While interpreting the compiler gives "structure reference not implemented" message for the Thread *tf = DT_THREAD(dt);command line.
      Waiting for your advice.

      Teoman
    • System
      Subscriber
    • Rob
      Forum Moderator
    • teoman
      Subscriber
      Hi Rob
      Thanks for the info.
      It requires customer registry.But ,I am a student of ─░stanbul Tech.Univ.
      Please copy the io tet here.
      Regrads
    • teoman
      Subscriber
      Hi Rob
      Firstly, Sorry for the mistyping.
      As I mentioned beor ,I am unable to read the link you gave.
      I am waiting for your kind help.
      Regards.

    • teoman
      Subscriber
      Keyboard needs to be repaired ,some letters are malfunctioning .
      Sorry again.
    • Rob
      Forum Moderator
    • teoman
      Subscriber
      Thanks indeed.
      I have already read the related items in The Help Manulas.Manual is not describing how to solve or being free from "structure reference not implemented" error message.
      Despite the interpreting error , the UDF (eactly same with Manual) has been compiled and opened .but does not seem to be working .
      I do not know what to do more.
      Looking forward having your help.
      Best Regards.

    • Rob
      Forum Moderator
      If it compiled without error did you then hook the UDF up to the solver? Ie attach to the various models and boundary conditions? In the Help system there are tutorials and videos, I think at least one covers the moving mesh.
    • teoman
      Subscriber
      Many Thanks
      I will work on it.
      Best Regards.

    • teoman
      Subscriber
      Hi Rob
      I hooked the udf without any error message except the one.
      But it is not working.Because , when Thread*tf=DT_THREAD(dt); is not implemented.
      begin_f_loop(f,tf) command is not working. I guess ,the cause is that "tf" not defined.
      I have put a Message line in UDF and it shows that time stepping is ok .But when I put it into begin_f_loop no message apperars on the screen.
      I am desperately needing your help.
      Regards
      Teoman
      #include"udf.h"
      DEFINE_GRID_MOTION(beam,domain,dt,time,dtime)
      {
      Thread*tf=DT_THREAD(dt);
      face_tf;
      intn;
      Node*v;
      real dy;
      dy=5*sin(25*time);
      /*getthethreadpointerforwhichthismotionisdefined*/
      SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
      Message("time=%f,dy=%f\n",time,dy);
      begin_f_loop(f,tf)
      {
      f_node_loop(f,tf,n)
      {
      v=F_NODE(f,tf,n);
      if(NODE_X(v)>50.0&&NODE_POS_NEED_UPDATE(v))
      {
      NODE_POS_UPDATED(v);
      NODE_Y(v)=NODE_Y(v)+NODE_X(v)*dy;
      }
      }
      }
      end_f_loop(f,tf);
      }
    • Rob
      Forum Moderator
      Try adding a space between Thread and *tf otherwise you'll need to rely on the wider community as we (staff) won't be debugging code.
    • teoman
      Subscriber
      Certainly, I am not expecting anyone debugging .
      The syntax ,You saw was just one of syntax I tried. First ,I used exactly same Grid_Motion sample UDF given in the Manual.
      After having the interpreting error ; I thought , There could be a mistyping in the Manual Then I tried diferent syntaxs.
      Customization Manual Item 4.3 mentiones the same error ; I had; can happen. But not advicing any solution.
      So , this error is a systemic error without solution , I am afraid.
      The only helping source is you and your colleques that I can rely on.
      Many many thanks
      Teo
    • Rob
      Forum Moderator
      It compiles but then gives the Thread *tf error or it gives the Thread *tf error when compiling? Did you copy + paste from the manual or type in from scratch?
    • teoman
      Subscriber
      I tried both.
      Thread *f error message is just given during ─░nterpereting. After then , Build and Load stages have no error message .
      BUILD
      LOAD and DONE.
      But not any movement I had.

    • teoman
      Subscriber
      Hi Rob
      Finally I discovered the problem which was another syntax error in my code.
      Please accept my apologies for taking your time .
      And accept my sincere thanks for your kind help and effort.
      Best Regrads
      Teoman
    • Rob
      Forum Moderator
      You're welcome. Please post the working code so others can learn from it.
    • teoman
      Subscriber
      The problematic command line is
      if(NODE_X(v)>50.0&&NODE_POS_NEED_UPDATE(v))
      UDF uses dimension unit as "meter" even if You adusted the unit to "milimeter" in fluent. Then the dimension
      in the command line " 50.0" is meter for UDF and equals to 50000 milimeter and if you CAD model is smaller in dimension Than the code does not work.
      Fluent dimension set up should override UDF's unit system.

    • Rob
      Forum Moderator
      It does say somewhere that Fluent assumes all inputs and outputs of UDFs are in SI units. It's our way of forcing the US to catch up with the rest of the world and stop using BTU/in/ft2 as a unit.
    • miranda
      Subscriber
      Hello Teoman we are also trying to solve a similar problem. So we have a few questions to ask you. We are a group of senior design students form MEF university ─░stanbul. If you available can you please contact with us from this email adress: emremiranda134@gmail.com
Viewing 20 reply threads
  • The topic ‘DEFINE_GRID_MOTION’ is closed to new replies.