|
[Sponsors] | |||||
|
|
|
#1 |
|
Guest
Posts: n/a
|
Hi folks,
I wrote a UDF to add a source term to my second phase (euler-euler model). Now I am not sure if the velocitys (and other variables) I use in the code are the right ones. The source must be calculated with the velocitys of the second phase, not the first one. I hook the UDF to the fluid-regions second phase via FLUENT-GUI. Is this enough or do I have to implement it in the UDF? ###################### Here is the UDF I wrote so far: #include "udf.h" DEFINE_SOURCE(neg_source,c,t,dS,eqn) { Domain *d; real source = 0.0; real uvf, vvf; real A[ND_ND]; face_t f; Thread *t0; int Zone_ID=6; d=Get_Domain(1); t0=Lookup_Thread(d,Zone_ID); F_AREA(A,f,t0); uvf = C_U(c,t); vvf = C_V(c,t); source = -(1/C_VOLUME(c,t))*C_VOF(c,t)*C_R(c,t)*sqrt(((NVD_DOT( A,uvf,vvf,0)))*((NVD_DOT(A,uvf,vvf,0)))); return source; } ########################## |
|
|
||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UDF - Source term | Andrew RONALD | FLUENT | 0 | September 29, 2006 17:26 |
| A question about source term | kirby | CFX | 0 | April 10, 2006 10:17 |
| VOF and Source Term | Mickaël PERRIN | FLUENT | 4 | July 12, 2003 07:01 |
| a question about UDF for source term | winnie | FLUENT | 1 | May 2, 2003 10:11 |
| UDS source term | Mark Richardson | FLUENT | 1 | August 21, 2001 05:41 |