Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Regarding error while interpreting udf file

TAGGED: 

    • swapnil13
      Subscriber

      Respected sir,

      I am try to do same simulation which is as given ,I am unable to interpret udf , it is given error as" Parse error in line 2'" . I am attaching photo of udf also . I am using fluent in series only but while compiling it gives error as '"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64),The system cannot find the file specified."

    • Karthik Remella
      Administrator
      Hello,nUDFs with DEFINE_CF_MOTION macro can only be executed as Complied UDFs. You cannot interpret these.nIf you are indeed compiling this UDF, could you please share a screenshot of the error message?nThank you.nKarthikn
    • Konstantin
      Ansys Employee
      to add to Karthik's comment, you should not modify a static variable in a C code. Define velx as real inside the macro.n
    • swapnil13
      Subscriber
      Respected sir,n I am using fluent in series only but while compiling it gives error as 'The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64),The system cannot find the file specified.nFor that I had installed visual basic studio 2017, started ANSYS fluent from its command line but it is giving same error as above.nUdf as I had mentioned in video uploaded in your YouTube channel.I had not changed anything. Everything is as per given in video.nPlease help me nThank you,nSwapnilnn
    • Rob
      Forum Moderator
      The error means you've not got the compiler hooked up so that Fluent can see it. It's also that Fluent is now parallel most of the time, but you only need to parallelise UDFs if running on multiple cores and the macros require it. nPlease use 2020R2 or 2021R1 as there's an inbuilt CLANG compiler which removes the need to figure out which bit of MS Studio has been hidden/moved/changed on the Microsoft download page. n
    • swapnil13
      Subscriber
      Respected sir,nThank you for your help.I had solved my problem now it is working fine.I have problem in motion of object .I want vertical motion of object .So I changed UDF but it is not working .Still its motion is in horizontal direction. I nhad done changes which mentioned above.nnPlease help me outn
    • Rob
      Forum Moderator
      You've set the code to return vel[0], which means the x-direction in C language. [1] is y and [2] is z. Remember C starts at 0 when counting. Don't worry, nearly everyone either makes the mistake or asks why up is x[1]. n
Viewing 6 reply threads
  • The topic ‘Regarding error while interpreting udf file’ is closed to new replies.