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

Error in Execute on demand

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2016, 15:14
Default Error in Execute on demand
  #1
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 11
nima_nz is on a distinguished road
Hi
I have a UDF, that's for postprocessing; I have fluid cells and solid cells. In my UDF, I need velocity parameter that when I Execute the UDF on demand, FLUENT shows error. It's because of velocity parameter in the solid zone that doesn't exist. How can I fix this problem?
Thanks.
nima_nz is offline   Reply With Quote

Old   January 6, 2016, 15:46
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
What UDF are you using for this postprocessing? You could extract the velocities for only the fluid domain (comment from your other thread).
`e` is offline   Reply With Quote

Old   January 8, 2016, 15:36
Default
  #3
Member
 
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 11
nima_nz is on a distinguished road
Quote:
Originally Posted by `e` View Post
What UDF are you using for this postprocessing? You could extract the velocities for only the fluid domain (comment from your other thread).
Would you please tell me how I can extract velocities only for fluid domain?
Thanks for your help
nima_nz is offline   Reply With Quote

Old   January 8, 2016, 17:34
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Follow the instructions in your other thread and then read the velocities as normal. For example the x-velocity component:

Code:
C_U(c,t);
Which stage are you having trouble with and can you provide us with the UDF you are working with?
`e` is offline   Reply With Quote

Old   August 20, 2016, 20:05
Default
  #5
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 10
Scram_1 is on a distinguished road
Hey,
I have written an execute_on_demand UDF for a simple geometry. It is a cube with dimensions 1cm X 1cm X 1cm.
When I run the UDF, it DOES NOT stop and keeps on running. Basically, what I eventually want to do is identify the wall mesh cells and calculate the minimum distance between a specific cell to the wall So, to debug the issue, I changed the code to print out the iteration number and it keeps on increasing without stopping. The zone numbers were taken from the boundary conditions window in fluent.
Here's the UDF:

#include "udf.h"
#include "sg.h"


DEFINE_ON_DEMAND(Test_UDF)
{
Domain *d; /*declare domain pointer since it is not passed in */
int zone_ID, iz;
Thread *t, *t0, *t_wall;
cell_t c, c0;
face_t f_wall;

d = Get_Domain(1); /*Get the domain using Fluent utility */

/*Loop over all cell threads in the domain*/
thread_loop_c(t, d)
{
int count = 1;
/*Loop over all cells*/
begin_c_loop(c, t)
{

for (iz = 19; iz <= 22; iz++)
{
if ((iz = 19) || (iz = 20) || (iz = 21) || (iz = 22)) /*if iz's value is belong to wall*/
{
zone_ID = iz;
t_wall = Lookup_Thread(d, zone_ID);

begin_f_loop(f_wall, t_wall)
{

printf("It works %d \n", count);
count = count+1;
}
end_f_loop(f_wall, t_wall)
/* end iz loop of multiple wall zones */
}
else /*for those not belongs to wall*/
{
;
}
}


} /*end c loop*/
end_c_loop(c, t)
} /*end thread loop*/

}

These are the mesh statistics:
Mesh Size

Level Cells Faces Nodes Partitions
0 64 240 125 1

1 cell zone, 7 face zones.

Thanks!!
Scram_1 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
Cannot Execute on Demand Denis Fluent UDF and Scheme Programming 6 June 26, 2018 04:40
Segmentation fault when execute on demand udf lion1990 Fluent UDF and Scheme Programming 5 June 30, 2017 03:03
fatal error while execute on demand... fatemeh chitgarha Fluent UDF and Scheme Programming 1 July 29, 2013 02:44
error while execute on demand Anderson Main CFD Forum 4 October 17, 2008 11:48
execute on demand pourak FLUENT 0 April 20, 2007 06:24


All times are GMT -4. The time now is 01:09.