|
[Sponsors] |
June 14, 2006, 21:17 |
what's wrong with my UDF???
|
#1 |
Guest
Posts: n/a
|
Hi,everyone! I want to use VOF model and add a energy source in water.the sources should be added at position of the free surface using UDF.IN order to capture the free surface, i use the macro of C_VOF(The free surface cross all the cell where the volume fraction is different from 0 or 1).But things go contrary to my wishes, it can't run well .Can anybody help me to solove this problem? the udf and error messeges are as follows.
Thanks in advance #include "udf.h" DEFINE_SOURCE(cell_heat_source,cell,thread,dS,eqn) { real source; C_VOF(cell,thread); if(C_VOF(cell,thread)<1&&C_VOF(cell,thread)>0) { source=25000; dS[eqn]=0; } else source=dS[eqn]=0; return source; } Error: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () |
|
June 15, 2006, 03:20 |
Re: what's wrong with my UDF???
|
#2 |
Guest
Posts: n/a
|
If you hook this udf to the mixture fluent will bug out because it does not know which volume fraction do you want to access. There are at least 2 phases which are both part of the mixture, so you will have to supply aditional informations and tell fluent which phase you want to access.
This is done by using the corresponding sub thread for the phase. Assuming your primary phase is water, then correct udf will look like this: #include "udf.h" DEFINE_SOURCE(cell_heat_source,cell,mixture_thread ,dS,eqn) { real source; int phase_domain_index = 0; /* primary phase index is 0 */ Thread *water_thread = THREAD_SUB_THREAD(mixture_thread,phase_domain_inde x); if(C_VOF(cell,water_thread)<1&&C_VOF(cell,water_th read)>0) { source=25000; dS[eqn]=0; } else source=dS[eqn]=0; return source; } Good luck, RoM |
|
June 16, 2006, 03:52 |
Re: what's wrong with my UDF???
|
#3 |
Guest
Posts: n/a
|
Thanx RoM for your reply ! I have try it in 3D and it worked very well.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 07:43 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 12:29 |
what's wrong with the UDF | major | FLUENT | 6 | March 3, 2005 07:39 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |