CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

error 2223

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By pakk
  • 1 Post By pakk
  • 1 Post By `e`
  • 1 Post By `e`

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2016, 19:04
Default error 2223
  #1
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
..\..\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
ehsan105 is offline   Reply With Quote

Old   January 5, 2016, 06:32
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
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.)
ehsan105 likes this.
pakk is offline   Reply With Quote

Old   January 5, 2016, 09:10
Default
  #3
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
Quote:
Originally Posted by pakk View Post
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.)

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
ehsan105 is offline   Reply With Quote

Old   January 5, 2016, 09:38
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
And if you literally copy example 2 from the manual, do you get the same error?
ehsan105 likes this.
pakk is offline   Reply With Quote

Old   January 5, 2016, 12:04
Default
  #5
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
Quote:
Originally Posted by pakk View Post
And if you literally copy example 2 from the manual, do you get the same error?
Surprisingly, I tested it.

And again the error..!!
In your opinion Where do you think I am wrong??
ehsan105 is offline   Reply With Quote

Old   January 6, 2016, 04:04
Default
  #6
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Are you interpreting this UDF? The manual explicitly states that the "function must be executed as a compiled UDF" within the example.
ehsan105 likes this.
`e` is offline   Reply With Quote

Old   January 6, 2016, 05:09
Default
  #7
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
Quote:
Originally Posted by `e` View Post
Are you interpreting this UDF? The manual explicitly states that the "function must be executed as a compiled UDF" within the example.
tank for reply

Well, I've compiled!!!!!
and My question was this,
ehsan105 is offline   Reply With Quote

Old   January 6, 2016, 05:16
Default
  #8
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
mr pkk ,I removed that part and and this udf is compiled. but my qustion still exists. How the code of fludf wasnt compiled ??
ehsan105 is offline   Reply With Quote

Old   January 6, 2016, 15:33
Default
  #9
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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).
ehsan105 likes this.
`e` is offline   Reply With Quote

Old   January 6, 2016, 17:03
Default
  #10
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
Quote:
Originally Posted by `e` View Post
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).
tank for reply
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!
ehsan105 is offline   Reply With Quote

Old   January 6, 2016, 21:48
Default
  #11
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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.
`e` is offline   Reply With Quote

Old   January 7, 2016, 04:28
Default
  #12
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Or maybe Fluent 6.3 is too old, and you need a newer version to use the macro's in this UDF?
pakk is offline   Reply With Quote

Old   January 19, 2016, 06:46
Default
  #13
New Member
 
ehsan
Join Date: Oct 2015
Location: tehran
Posts: 26
Rep Power: 10
ehsan105 is on a distinguished road
Thanks, anyway I got to solve the problem by removing this part of the Code
ehsan105 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 13:51.