Fluids

Fluids

Compiling a velocity inlet UDF for parallel solver

TAGGED: 

    • NimaNZ
      Subscriber
      Hi nI want to compile a simple UDF for the velocity inlet, but it says that the UDF is not for a parallel solver. Besides, I want to run the final Case on an HPC cluster that is Linux based. If I manage to compile the UDF on my personal computer can I I run it on the HPC?n/***********************************************************************/n/* Velocity.c                             */n/* UDF for specifying steady-state velocity profile boundary condition */n/***********************************************************************/n#include udf.hnnDEFINE_PROFILE(inlet_x_velocity, thread, position) n{n real x[ND_ND];        /* this will hold the position vector */n real y;n face_t f;nn begin_f_loop(f, thread)n  {n   F_CENTROID(x,f,thread);n   y = x[1];n   F_PROFILE(f, thread, position) = 2.605*(double)log((double)(y/.005));n  }n end_f_loop(f, thread)n}n n
    • Rob
      Ansys Employee
      There's a section in the UDF manual that covers what requires parallelisation and how to do it. If you compile on your PC you'll have a library for Win10, if the cluster is not Win10 you'll need to recompile on that. n
    • NimaNZ
      Subscriber
      Hi RobnThanks for your reply; regarding recompiling on that machine, should I write the case and data files without any UDF included and then over there compile and load using TUI commands and set the velocity-inlet boundary condition there?n
    • NimaNZ
      Subscriber

      There's a section in the UDF manual that covers what requires parallelisation and how to do it. If you compile on your PC you'll have a library for Win10, if the cluster is not Win10 you'll need to recompile on that.https://forum.ansys.com/discussion/comment/106576#Comment_106576

      Hi RobnThanks for your reply; regarding recompiling on that machine, should I write the case and data files without any UDF included and then over there compile and load using TUI commands and set the velocity-inlet boundary condition there?n
    • YasserSelima
      Subscriber
      Use an expression if you are using 2019 R1 or later, you can avoid using UDF for this case. n
    • NimaNZ
      Subscriber

      Use an expression if you are using 2019 R1 or later, you can avoid using UDF for this case.https://forum.ansys.com/discussion/comment/106580#Comment_106580

      Thanks, Yasser.nI usually use the expression option, but the problem is the HPC cluster doesn't recognize the expression.n
    • YasserSelima
      Subscriber
      I seen
    • Rob
      Ansys Employee
      I find it's easier to launch the solver on the cluster then compile the UDF then load the case and data. You don't need a case file for the compiler to work, and can actually compile outside of Fluent if you really want to. n
    • NimaNZ
      Subscriber
      Thanks so much Robn
Viewing 8 reply threads
  • You must be logged in to reply to this topic.