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

the macro of c_face_loop and F_UDMI(F_UDSI)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2010, 04:51
Question the macro of c_face_loop and F_UDMI(F_UDSI)
  #1
New Member
 
Jimmy Zhang
Join Date: Dec 2010
Posts: 3
Rep Power: 15
zhang_pioneer is on a distinguished road
When the following udf is operating, there is error such as:
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: ()
DEFINE_SOURCE(velocity_u_source,c,t,dS,i)
{
face_t f;
Thread *tf;
int n;
real S=0;
c_face_loop(c,t,n)
{
f=C_FACE(c,t,n);
tf=C_FACE_THREAD(c,t,n);
if (THREAD_ID(tf)==10)
{
F_UDSI(f,tf,0)=0.0;
}
}
return S;
}
And check it. When F_UDSI(f,tf,0) is repalced by C_UDSI(c,t,0), the operation is ok. Does this mean that F_UDSI(F_UDMI) cound not retrieved as faces of cell is looped with the macro of c_face_loop?
If I want to access some faces of cell, which method can be used??
Thanks.
zhang_pioneer is offline   Reply With Quote

Old   May 23, 2018, 11:38
Default
  #2
Member
 
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17
zobekenobe is on a distinguished road
F_UDSI can on be used as an RHS of the =



you can't read values into it unfortunately
zobekenobe is offline   Reply With Quote

Old   May 23, 2018, 21:11
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
And check it. When F_UDSI(f,tf,0) is repalced by C_UDSI(c,t,0), the operation is ok. Does this mean that F_UDSI(F_UDMI) cound not retrieved as faces of cell is looped with the macro of c_face_loop?
If I want to access some faces of cell, which method can be used??


you should not you F_UDSI as well as C_UDSI to monitore your variables.
UDSI means user defined scalar not monitor.
On the other hand, you may use F_UDMI/C_UDMI for that task, user defined memories. F_UDMI should handle your problem

more information regarding UDMI and UDSI you may find in Ansys Fluent Customization manual

best regards
AlexanderZ is offline   Reply With Quote

Reply

Tags
c_face_loop, f_udmi, f_udsi


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 08:29.