TAGGED: discrete-phase-model, dpm-udfs, error, udf
-
-
April 28, 2022 at 8:39 pmsidkamatSubscriber
I have written a UDF to apply a body force in the Discrete Phase Model. I want the UDF to report the force at each iteration on the console. I am getting the error: passing 'double' to parameter of incompatible type 'const char *' for the following code:
DEFINE_DPM_BODY_FORCE(DEP,tp,i)
{
double beta=L/D;
double xi=beta/sqrt(beta*beta-1);
double c1=0.5*log((xi+1)/(xi-1));
double f=xi*((1-xi*xi)*c1*xi+xi);
double Fd=0;
if (TP_POS(tp)[0] >= 0.05)
{
if(i == 1)
{
Fd = -1 * (pi * km * epsilon * D * D * L / 6) / (alpha / (alpha - 1) - f) * pow(V / log(R2 / R1), 2) * pow(1 / TP_POS(tp)[1], 3);
printf(Fd)
}
else
Fd = 0;
}
return(Fd/TP_MASS(tp));
}
Can someone tell me what my mistake is?
May 11, 2022 at 4:39 pmRKAnsys EmployeeHello The error says it all.. You are defining / passing a value which is incompatible. It's expecting a character and it receives a numerical value. Please cross check.
Viewing 1 reply thread- The topic ‘Error in printing DPM Body Force’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- UDF, Fluent: Access count of iterations for “Steady Statistics”
Top Contributors-
1421
-
599
-
591
-
565
-
366
Top Rated Tags© 2025 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.
-