|
[Sponsors] |
January 6, 2016, 16:14 |
Error in Execute on demand
|
#1 |
Member
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12 |
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. |
|
January 6, 2016, 16:46 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
What UDF are you using for this postprocessing? You could extract the velocities for only the fluid domain (comment from your other thread).
|
|
January 8, 2016, 16:36 |
|
#3 | |
Member
Nima
Join Date: May 2014
Location: Ireland
Posts: 51
Rep Power: 12 |
Quote:
Thanks for your help |
||
January 8, 2016, 18:34 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
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); |
|
August 20, 2016, 21:05 |
|
#5 |
Member
Join Date: Oct 2015
Posts: 63
Rep Power: 11 |
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!! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot Execute on Demand | Denis | Fluent UDF and Scheme Programming | 6 | June 26, 2018 05:40 |
Segmentation fault when execute on demand udf | lion1990 | Fluent UDF and Scheme Programming | 5 | June 30, 2017 04:03 |
fatal error while execute on demand... | fatemeh chitgarha | Fluent UDF and Scheme Programming | 1 | July 29, 2013 03:44 |
error while execute on demand | Anderson | Main CFD Forum | 4 | October 17, 2008 12:48 |
execute on demand | pourak | FLUENT | 0 | April 20, 2007 07:24 |