|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Ivan
Join Date: May 2009
Posts: 85
Rep Power: 18 ![]() |
I am doing unsteady flow around a 3D airfoil, and use the following UDF to obtain time-averaged pressure coefficient on the airfoil surface. the coefficient is stored in user defined memory (UDM) 1.
the UDF is successful interpreted into fluent. after several time steps, I plot--xy plot the UDM 1, and they are all zero. it seems that no data is written into the UDM. Anyone point out where I do wrong? Thanks a lot! /************************************************** **************************/ /* UDF to compute time-averaged pressure coefficient */ /************************************************** **************************/ /* be sure to allocate at least two UDM*/ #include "udf.h" int n=0; /* number of time-step */ int zone_ID=5; /* zone ID of airfoil surface */ DEFINE_EXECUTE_AT_END(time_avr_PC) { Domain *domain = Get_Domain(1); Thread *t = Lookup_Thread(domain, zone_ID); real p_ref=0, den_ref=1.225, u_ref=21.911; /* reference pressue, reference density and reference velocity */ real q_ref=1/2*den_ref*u_ref*u_ref; /* reference dynamic pressure */ face_t f; n++; begin_f_loop(f, t) { F_UDMI(f,t,0) += F_P(f,t); F_UDMI(f,t,1) = (F_UDMI(f,t,0)/n - p_ref)/q_ref; } end_f_loop(f, t) } |
|
|
|
|
|
|
|
|
#2 |
|
Member
Ivan
Join Date: May 2009
Posts: 85
Rep Power: 18 ![]() |
I just found out that I forgot to hook the UDF. I did it and make sure I have allocated two UDM, and I resumed the computation and I got this error right after a time was completed.
Error: Chip: internal error: invalid builtin -1: pc=46 Error Object: #f What does it mean? This is my first UDF, oh.. I am so frustrated .... |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Segmentation violation | louiza | FLUENT | 16 | June 27, 2017 16:41 |
| 【Help】"Error: Update_Time_Level: invalid data" | Chen | FLUENT | 2 | August 24, 2014 08:51 |
| export data at nodes | Meenu | FLUENT | 1 | December 30, 2011 02:24 |
| ParaFoam : Written data doesnt have Full Regions | Velan | Main CFD Forum | 0 | January 12, 2009 04:55 |
| How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |