CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF moment ( torque ) computation (

aja March 26, 2007 03:52

UDF moment ( torque ) computation
I have tried to use UDF function Compute_Force_And_Moment. I have adjusted "rotortorque" UDF from Fluent official database. The problem is an error message" Error: Chip: internal error: invalid builtin -1: pc=65 ". Do you anybody knows the solution or can you advice or found any mistake in this UDF? I tryied it in Fluent 6.1 and 6.3 at Windows XP operational system (not Linux).

The UDF is as foolows:

#include "udf.h" #include "f_wall.h"

DEFINE_ON_DEMAND(get_torque) { Domain *domain; Thread *face_rotor,*face_inlet,*face_outlet; face_t f; FILE *fp; real force_rotor[3],moment_rotor[3]; real point_rotor[3]={0.0, 0.0, 0.0}; /* Any point at shaft axis */ real axis_rotor[3] ={0.0, 0.0, 1.0}; /* shaft axis directional vector */

domain = Get_Domain(1);

face_rotor = Lookup_Thread(domain,31); /* NUM1 is the rotor face ID number, can be found in the Define/Boundary Condition panel */

Compute_Force_And_Moment (domain, face_rotor, point_rotor, force_rotor, moment_rotor,1);

printf(" Force on the rotor=%f\t%f\t%f\n",force_rotor[0],force_rotor[1],force_rotor[2]); printf(" Moment on the rotor=%f\t%f\t%f\n",moment_rotor[0],moment_rotor[1],moment_rotor[2]);


Seyed Farid Hosseinizadeh March 28, 2007 16:55

Re: UDF moment ( torque ) computation
Hey: Please send your UDF for me. I will check it for you in my system. My email is Thanks/Farid

All times are GMT -4. The time now is 14:53.