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

Manipulating UDMs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2014, 11:29
Default Manipulating UDMs
  #1
New Member
 
jose casella
Join Date: Mar 2012
Posts: 1
Rep Power: 0
josecasella is on a distinguished road
Hi,

I'm writing up a UDF which runs with the dpm. Basically I need to count and store in UDMs the number of particles hitting the outlet of a cyclone. The approach is as follows:

1) The first UDM-0 counts the total number of particles regardless its injection-ID
2) UDMs from 1-9 counts the particles hitting the outlet per each individual injection-ID.
3) Using Define_at_end Macro I need to count the number of faces at the inlet in order to store (UDM-10) the total number of particles injected per each injection defined
4) Using Define_at_end macro need to divide each UDMs from 0-9 (particles hitting the outlet per injection ID) by the UDM-10 (total number of faces at the inlet).

The problem I have at the moment are:

1) I am using the default "injection-0" name in fluent and writing the following in the UDFs to count the particles from injection 0:

IF(P_INJ_ID(P_INJECTION(P))==0
C_UDMI(F_C0(F,T),THREAD_T-(T),0)+=1;

By comparing with the report given by the sampling in fluent I realized the UDF counts particles based on the end_number of the following:

injection-0:5 (instead of increasing the UDM for injection-0, increases the one for injection 5)


2) UDM-10 (faces at the inlet) after the begin_c_loop get a value of 1.

DEFINE_EXECUTE_AT_END(efficiency_per_particle)
{
Domain *d = Get_Domain(1);
cell_t c;
Thread *t;
int i,j;
int ID=2;

t = Lookup_Thread(d, ID);

begin_c_loop(c,t)
{
C_UDMI(c,t,10) +=1;
}
end_c_loop(c,t);

begin_c_loop(c,t)
{
for(i=1;i<10;i++)
{
j=i+10;
C_UDMI(c,t,j)=C_UDMI(c,t,i)/C_UDMI(c,t,10);
}
}
end_c_loop(c,t);
}

I wonder how can I do to identify the correct ID of the injection and also how can I divide properly the values of the UDMs that are stored at the outlet face by the value of UDM-10 which is obtained at the inlet.

Many thanks!
Jose
josecasella 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
user defined memory (UDMs) Musa FLUENT 1 October 16, 2012 22:12
[ICEM] Problem with graphics while manipulating model (frozen for some seconds) Freeman ANSYS Meshing & Geometry 4 October 17, 2009 15:35
Manipulating Tolerances in "eoslide" command sdwijeya STAR-CD 0 September 30, 2009 18:59
Solve->Initialize before using UDMs? Prashanth FLUENT 0 March 2, 2009 02:46
Manipulating the advection term of the UDS Ameya Durve FLUENT 0 February 24, 2009 14:52


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