-
-
March 14, 2022 at 5:22 pm
sidkamat
SubscriberHi. 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?
March 15, 2022 at 8:56 amDrAmine
Ansys EmployeeWhich release version are you using?
March 29, 2022 at 8:25 pmsidkamat
SubscriberI'm using 21.1.0
March 29, 2022 at 8:58 pmDrAmine
Ansys EmployeeWeird. Csn you try a simpler UDF without the define section ( the pre-processor type). Also remove the empty line below the macro. Please report back
Viewing 3 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Contributors-
2656
-
2120
-
1347
-
1118
-
461
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-