-
-
May 30, 2023 at 9:09 amTONY ARHURSubscriber
Hello please I am compiling a UDF for rotating screws but I receive an error message which indicates the motion.h is missing. Please where can I get this header.
-
May 30, 2023 at 11:05 amRobForum Moderator
Did you #include it? Single screw or interlocking?Â
-
May 30, 2023 at 11:07 amTONY ARHURSubscriber
Please I am working on interlocking screwsÂ
-
May 30, 2023 at 11:08 amRobForum Moderator
And did you #include that header?Â
-
May 30, 2023 at 11:10 amTONY ARHURSubscriber
Yes. I did include the motion.h in the script but it seems it can not be located on my file path
-
May 30, 2023 at 1:17 pmRobForum Moderator
Did you compile the UDF?Â
-
May 30, 2023 at 1:30 pmTONY ARHURSubscriber
I am trying to compile the script using the fluent setup but I received this error code which indicates the motion.h cannot be locatedÂ
-
May 30, 2023 at 1:39 pmRobForum Moderator
I assume the solver is set to 3d and transient? Which moving mesh macro are you using?Â
-
May 30, 2023 at 1:44 pmTONY ARHURSubscriber
I am using the built in compiler for this so I have not specified the mesh macroÂ
-
May 30, 2023 at 1:47 pmRobForum Moderator
In the .c file, what's the motion macro? Ie DEFINE_GRID_MOTION etc.Â
-
May 30, 2023 at 1:55 pmTONY ARHURSubscriber
Can I send the script over for u to have a look please
-
May 30, 2023 at 2:19 pmRobForum Moderator
You can post it here, but I (and other Ansys staff) will only have a quick look as we don't debug code. Others aren't similarly constrained, but their participitation is voluntary.Â
-
May 30, 2023 at 2:22 pmTONY ARHURSubscriber
#include "udf.h"
#include "motion.h"DEFINE_CG_MOTION(rotating_screws, dt, vel, omega, time, dtime)
{
  Thread *t;
  cell_t c;
  real omega_z1 = 300 * 2 * M_PI / 60;  // Rotational speed for screw in rad/s
  real omega_z2 = 200 * 2 * M_PI / 60;  // Rotational speed for screw-2 in rad/s  /* Loop over all cell threads */
  c_thread_loop_c (t, dt)
  {
    /* Loop over all cells in the cell thread */
    begin_c_loop (c, t)
    {
      /* Update the rotation of the cell centroid based on the angular velocity for screw */
      C_CENTROID(c, t)[0] += omega_z1 * dt * (C_NORMAL(c, t)[1] * (C_CENTROID(c, t)[2] - 0.0)Â
                         - C_NORMAL(c, t)[2] * (C_CENTROID(c, t)[1] - 0.0));
      C_CENTROID(c, t)[1] += omega_z1 * dt * (C_NORMAL(c, t)[2] * (C_CENTROID(c, t)[0] - 0.0)Â
                         - C_NORMAL(c, t)[0] * (C_CENTROID(c, t)[2] - 0.0));
      C_CENTROID(c, t)[2] += omega_z1 * dt * (C_NORMAL(c, t)[0] * (C_CENTROID(c, t)[1] - 0.0)Â
                         - C_NORMAL(c, t)[1] * (C_CENTROID(c, t)[0] - 0.0));
      Â
      /* Update the rotation of the cell centroid based on the angular velocity for screw-2 */
      C_CENTROID(c, t)[0] += omega_z2 * dt * (C_NORMAL -
May 30, 2023 at 3:13 pmRobForum Moderator
I'm not sure you can calculate both motions in one macro, you may need two DEFINE_CG_MOTION sections. Compare with the example to see if there's anything else you need to do.Â
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_udf/flu_udf_DynamicMeshDEFINE.html%23flu_udf_sec_define_cg_motion
-
May 30, 2023 at 6:22 pmTONY ARHURSubscriber
My main problem has to do with the fatal error that says: motion.h file not found. I have check the installation directory and I could not find the header file "motion.h". Please where can I get this file.
-
May 31, 2023 at 10:26 amRobForum Moderator
I don't have that file in my install, so maybe the error is non-diagnostic.Â
And review the example - is this the macro you should be using?
Â
-
- The topic ‘Missing Motion.h for motion UDF compilation’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Script error Code: 800a000d
- Fluent fails with Intel MPI protocol on 2 nodes
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Encountering Error in Heterogeneous Surface Reaction
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.