Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

DPM Drag Law UDF Error

    • Barbol
      Subscriber

      Hi all

      I am attempting to write a DPM Drag UDF with the Macro DEFINE_DPM_DRAG. To test the compiling procedure I copy pasted the example from the UDF manual, but upon running it I get the following error:

      Received signal SIGSEGV

      and

      999999: mpt_accept: error: accept failed: No error

      I get the same result for both interpreted and compiled UDFs.

      I'd appreciate any help

    • Rob
      Forum Moderator
      If you copy and pasted direct from the manual can you check for white space characters. There's a good chance there's something in there that's mimicking a return/tab/space and messing with the code. However, that usually causes the compiler to fail.
    • Barbol
      Subscriber
      I tried copy pasting as a debug tactic. My initial UDF was not working, I reduced that down to just outputting a constant real value, which gave the same error, and so I tried the UDF example. Searching these forums I can ascertain that the error is often linked to UDMI (not relevant in this case) or accessing a memory location that has yet to be defined (which isn't the case with both the UDF example and my simple return UDF).
      Could it be a case setup thing?
    • Rob
      Forum Moderator
      Possible, SIGSEV can mean there's a value missing somewhere. If you initialise the model and then hook up the UDF what happens?
    • Barbol
      Subscriber
      The same as hooking up the UDF before initialisation, just checked.
    • Rob
      Forum Moderator
    • Barbol
      Subscriber
      I double checked the instructions and I am following them. To perplex things further I can hook up some UDF's for solid viscosity and pressure successfully, so it looks to just be DPM related.
      When I compile any UDF with in-built compiler, I do get the following warning:
      C:\PROGRA~1\ANSYSI~1\v212\fluent\ntbin\clang\10\Include\10.0.18362.0\shared\basetsd.h(322,12): warning: cast to 'void * __ptr32' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast]
      return((void * POINTER_32) (unsigned long) (ULONG_PTR) p);
      ^
      1 warning generated.

      The solid viscosity and pressure UDF's still work with this warning, but not the DPM_DRAG macro.
    • Rob
      Forum Moderator
      Turn off the DDPM/DEM/Euler model and try it. The call is taking Reynolds Number from somewhere so multiphase turbulence might be effecting something. If that works turn the other model back on and see what options you have in the viscous panel relating to the multiphase turbulence.
    • Barbol
      Subscriber
      I tried as you suggested, it will run although with reversed flow on the outlet. I have selected no turbulence (Laminar option), so have no turbulence options.
    • Rob
      Forum Moderator
      Reverse flow means that flow is dragged back in through the outlet. It's a warning rather than an error. Look at what's causing the back flow.
Viewing 9 reply threads
  • The topic ‘DPM Drag Law UDF Error’ is closed to new replies.