|
[Sponsors] |
January 3, 2016, 20:04 |
error 2223
|
#1 |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
..\..\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 |
|
January 5, 2016, 07:32 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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.) |
|
January 5, 2016, 10:10 |
|
#3 | |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
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 |
||
January 5, 2016, 10:38 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
And if you literally copy example 2 from the manual, do you get the same error?
|
|
January 5, 2016, 13:04 |
|
#5 |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
||
January 6, 2016, 05:04 |
|
#6 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Are you interpreting this UDF? The manual explicitly states that the "function must be executed as a compiled UDF" within the example.
|
|
January 6, 2016, 06:09 |
|
#7 |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
||
January 6, 2016, 06:16 |
|
#8 |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
mr pkk ,I removed that part and and this udf is compiled. but my qustion still exists. How the code of fludf wasnt compiled ??
|
|
January 6, 2016, 16:33 |
|
#9 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
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).
|
|
January 6, 2016, 18:03 |
|
#10 | |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
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! |
||
January 6, 2016, 22:48 |
|
#11 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
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.
|
|
January 7, 2016, 05:28 |
|
#12 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Or maybe Fluent 6.3 is too old, and you need a newer version to use the macro's in this UDF?
|
|
January 19, 2016, 07:46 |
|
#13 |
New Member
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 11 |
Thanks, anyway I got to solve the problem by removing this part of the Code
|
|
|
|