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

Need help please: Threads and domain multiphase looping

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2012, 04:57
Question Need help please: Threads and domain multiphase looping
  #1
New Member
 
CFD-student's Avatar
 
Join Date: Dec 2011
Location: Sweden
Posts: 13
Rep Power: 5
CFD-student is on a distinguished road
Hi!
I am trying to calculate a given function for every face at a given boundary and then store it in the user defined memory. I have a eulerian-eulerian simulation with water and sand. The sand phase is the one which I want to extract variables from such as granular temperature and the calculate a function on a boundary.

The phase ID for the sand phase is 3 and the boundary of intrest has ID 13. Here is a simplified code of what I want to achieve with the exception that I here only try to assign 1 to each boundary face. However this code doesnt work and returns the ACCESS_VIOLATION error message when I try to run it.

Here is the code I have written. Could anyone help me out on this?

#include "udf.h"
#include "mem.h"
#include "surf.h"
#include "metric.h"
DEFINE_ON_DEMAND(erosionrate)
{
int zone_ID=13;
Thread *sandthreadweld;
Domain *sanddomain;
face_t faceidentifier;
sanddomain=Get_Domain(3);
sandthreadweld=Lookup_Thread(sanddomain,zone_ID);
begin_f_loop(faceidentifier,sandthreadweld)
{
F_UDMI(faceidentifier,sandthreadweld,0)=1;
}
end_f_loop(faceidentifier,sandthreadweld)
}

Best regards
CFD-student
CFD-student is offline   Reply With Quote

Old   February 23, 2012, 08:00
Default
  #2
New Member
 
CFD-student's Avatar
 
Join Date: Dec 2011
Location: Sweden
Posts: 13
Rep Power: 5
CFD-student is on a distinguished road
I dont completely understand the reason for this fix but by using the user defined scalar capability instead i can utilize the code above. When using the user defined memory as above when trying to plot the contour i only get the option of plotting for "mixture-phase" in the contour plot window, dont know the reason for this might have something to do with the problem for F_UDMI(f,t)
CFD-student is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
udf problem jane Fluent UDF and Scheme Programming 11 December 4, 2012 04:09
looping over face threads in domain mrojczyk FLUENT 0 July 1, 2010 08:01
How to access only one phase in multiphase model by UDF wersoe Fluent UDF and Scheme Programming 0 September 23, 2009 07:57
separate cell threads via UDF pedro garcia FLUENT 0 September 19, 2006 06:36
UDF, Looping through threads or faces Zhang FLUENT 1 June 21, 2005 01:24


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