"time" not changing DEFINE_GRID_MOTION for 3D flexible body

NidaNida Member

Hi Sir,

I am writing UDF for 3D heart shape and using DEFINE_GRID_MOTION macro.

I checked it through mesh preview up to 100 Numbers Of Time Steps by taking Time Step Size 0.001

"CURRENT_TIME" and "time" is not varying that I am displaying in console. CURRENT_Time is always "0" and time is "0.001". Also dtime still remains on 0.001.

You do not debug UDF that's why I am not sharing here.

Do you have any idea that what is the reason that "CURRENT_TIME" and "time" and "dtime" is not varying.

Thank you!

 

Comments

  • DrAmineDrAmine GermanyForum Coordinator
    edited April 8

    Are you using transient solver? 

  • NidaNida Member
    edited April 8

    Yes Sir, It is "transient". That's why "Mesh Preview Motion" is enable.

    What I am getting on console is just showing x, y, z coordinates again and again.

    It runs 100 times but "CURRENT_TIME" and "time" is repeating same value.

    That's why grid is not moving

  • DrAmineDrAmine GermanyForum Coordinator
    edited April 9

    How are you printing the current time? Please add the lines showing that.

  • NidaNida Member
    edited April 9

    }/*end f_node_loop*/

     

    Update_Face_Metrics(f, tf);

    printf("CURRENT_TIME=%g, time=%g, dtime=%g , vol=%g, aa=%g, a=%g, c=%g, x=%g, y=%g, z=%g, xnew=%g, ynew=%g, znew=%g, zz=%g, theta=%g, phai=%g\n", CURRENT_TIME, time, dtime, vol, aa, a, c, x, y, z, xnew, ynew, znew, zz, theta, phai);

    }

     

    end_f_loop(f, tf)

     

    Sir, This is the print command before ending face loop and after ending node loop

  • DrAmineDrAmine GermanyForum Coordinator
    edited April 9

    Does a simple DEFINE_ON_DEMAND print the correct Current time and time step?

  • NidaNida Member
    edited April 10

    Sir, I just tried to print this.

    #include "udf.h"

    DEFINE_ON_DEMAND(demand)

    {

    Message("%g\n", CURRENT_TIME);

    }

    It is just printing "0", two times, when I press Execute on Demand.

    I could not understand how to print time as it is not provided as input.

     

    Moreover, I checked Mesh preview motion without providing any UDF and it is printing this.

    Updating mesh to time 1.00000e-03 (step = 00001)...

    No mesh motion in domain!

     

    done.

    Updating mesh to time 2.00000e-03 (step = 00002)...

    No mesh motion in domain!

     

    done.

    Updating mesh to time 3.00000e-03 (step = 00003)...

    No mesh motion in domain!

     

    done.

    Updating mesh to time 4.00000e-03 (step = 00004)...

    No mesh motion in domain!

     

    done.

    Updating mesh to time 5.00000e-03 (step = 00005)...

    No mesh motion in domain!

     

     

    done.

  • aCVPaCVP Member

    Hi, I am having the exact same problem. My UDF used to work on my old computer with ANSYS. I have since moved to a new computer (But same version of ANSYS) and am having this EXACT problem. Any ideas? Thanks in advance.

  • RobRob UKForum Coordinator

    Does the UDF compile on the new computer?

Sign In or Register to comment.