|
[Sponsors] |
Need help please: Threads and domain multiphase looping |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Dec 2011
Location: Sweden
Posts: 13
Rep Power: 15 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Dec 2011
Location: Sweden
Posts: 13
Rep Power: 15 ![]() |
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)
|
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf problem | jane | Fluent UDF and Scheme Programming | 37 | February 20, 2018 05:17 |
How to access only one phase in multiphase model by UDF | wersoe | Fluent UDF and Scheme Programming | 1 | January 4, 2017 08:11 |
looping over face threads in domain | mrojczyk | FLUENT | 0 | July 1, 2010 09:01 |
separate cell threads via UDF | pedro garcia | FLUENT | 0 | September 19, 2006 07:36 |
UDF, Looping through threads or faces | Zhang | FLUENT | 1 | June 21, 2005 02:24 |