|
[Sponsors] |
March 14, 2022, 11:45 |
TP_POS undeclared variable
|
#1 |
New Member
Siddharth
Join Date: Mar 2018
Posts: 4
Rep Power: 8 |
Hi. I am trying to add an additional force on the tracked particle in the DPM. I am getting the error "TP_POS: undeclared variable" for the following UDF:
/*UDF for calculating DEP force*/ #include "udf.h" #include "dpm.h" #include "dpm_types.h" #define pi 3.141592 /*Define parameters*/ #define km 1.0 #define epsilon 8.85e-12 #define D 1.0e-6 #define L 10.0e-6 #define alpha 1130 #define V 7000 #define R2 1.111/100 #define R1 0.794/100 DEFINE_DPM_BODY_FORCE(DEP,tp,i) { real beta=L/D; real xi=beta/sqrt((beta*beta-1)); real c1=atan(xi); real f=xi*((1-xi*xi)/c1+xi); real Fd=0; if(TP_POS(tp)[0]>=0.366) { Fd= (-1*pi*km*epsilon*D*D*L/6)/(alpha/(alpha-1)-f)*(V/log(R2/1))*(V/log(R2/1))*1/TP_POS(tp)[1]; } else Fd=0; return(Fd/P_MASS(tp)); } Can anyone identify what is wrong? |
|
April 1, 2022, 00:16 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
try P_POS instead of TP_POS, compile code
__________________
best regards ****************************** press LIKE if this message was helpful |
|
Tags |
error, fluent, udf code, undeclared variable |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
two different gas! Fluid pair model! | saha2122 | CFX | 7 | February 9, 2022 08:15 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 08:11 |
Errors in UDF | shashank312 | Fluent UDF and Scheme Programming | 6 | May 30, 2013 21:30 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |