error 2223
..\..\src\DPM.c(124) : error C2223: left of '->stochastic_p' must point to struct/union
----------------------------- if ( DPM_STOCHASTIC_P(P_INJECTION(p)) ) { /* Reflect turbulent fluctuations also */ /* Compute normal velocity. */ dum = 0; for(i=0; i<idim; i++) dum += p->V_prime[i]*normal[i]; /* Subtract off normal velocity. */ for(i=0; i<idim; i++) p->V_prime[i] -= 2.*dum*normal[i]; } return PATH_ACTIVE; } ----------------------------- How do I solve this error? Plz guid me |
Is "if ( DPM_STOCHASTIC_P(P_INJECTION(p)) )" line 124?
Why did you use DPM_STOCHASTIC_P? (Copy from the help, from internet, invented yourself...) What should this line do, according to you? (You should mention what you want your code to do. Otherwise a pedantic answer could be 'remove your code': if you do that the error will disappear. I understand that such an answer does not help you, because the code will not do what you want it to do, but as long as you don't say what you want the code to do, I can not suggest what you have to type to get it.) |
Quote:
tank you for reply. it is macro DEFINE_DPM_BC(BC_wall_jet... Similar to Example 2 DPM_bc of fludf. i think DPM_STOCHASTIC_P Is related to turbulent models and STOCHASTIC model... and I want Modeling water jet collision with the wall... plz guid me |
And if you literally copy example 2 from the manual, do you get the same error?
|
Quote:
And again the error..!! In your opinion Where do you think I am wrong?? |
Are you interpreting this UDF? The manual explicitly states that the "function must be executed as a compiled UDF" within the example.
|
Quote:
Well, I've compiled!!!!! and My question was this, |
mr pkk ,I removed that part and and this udf is compiled. but my qustion still exists. How the code of fludf wasnt compiled ??
|
If you're still getting the same error after compiling this UDF then check the version numbers of both your ANSYS Fluent installation and the UDF manual (new features are added at each version of Fluent and may not be backward compatible).
|
Quote:
i used fluent 6.3. and download fludf6.3 and copmpiled the udf. But this error appeared: DPM_BC.obj : error LNK2019: unresolved external symbol _DPM_SQR referenced in function _bc_wall_jet libudf.dll : fatal error LNK1120: 1 unresolved externals done. -- Finally, the udf was not loaded! |
Sounds like there is an issue with the compiler, what compiler are you using? Could you use Microsoft Visual Studio instead? This FAQ for Fluent might also help you.
|
Or maybe Fluent 6.3 is too old, and you need a newer version to use the macro's in this UDF?
|
Thanks, anyway I got to solve the problem by removing this part of the Code
|
All times are GMT -4. The time now is 04:33. |