|
[Sponsors] |
September 27, 2010, 11:52 |
Uds udf issue
|
#1 |
Member
CJ
Join Date: Jun 2009
Posts: 34
Rep Power: 17 |
Currently I have some trouble in implementing UDF.
It is about adding a scalar equation :UDS:…. Which is almost like mass fraction equation re writing myself , I didn’t get right result. Could u help me take a look! I am so grateful ! . There are no grammar mistakes, and I can compile as well! But I feel some where there is mistake! And I don’t know how to save data from UDSI to UDMI. /*to define scalar source*/ #define SV_YN SV_UDS_I(YN) #define SV_OTHER SV_UDM_I #define C_YN(c,t) C_UDSI(c,t,YN) #define F_YM(f,t) F_UDMI(f,t,YM) /*User-Defined-Scalars-Pollutant-mass-fraction-Normalization by well-mixed concentration*/ enum {YN, N_REQUIRED_UDS }; /*Initialize parameters in the domain*/ DEFINE_INIT(init_parameter,domain) { Domain *d; Thread *t; cell_t c; face_t f; int i; if(n_uds<N_REQUIRED_UDS) { Error("Not enough user defined scalars!\n"); } d = Get_Domain(1); thread_loop_c(t,d) { if(NNULLP(THREAD_STORAGE(t,SV_YN))) { begin_c_loop(c,t) { for(i=0;i<N_REQUIRED_UDS;i++) C_UDSI(c,t,i)=0.0; } end_c_loop(c,t); } } thread_loop_f (t,domain) { if(BOUNDARY_FACE_THREAD_P(t)&NNULLP(THREAD_STORAGE (t,SV_YN))) { begin_f_loop(f,t) { for(i=0;i<N_REQUIRED_UDS;i++) F_UDSI(f,t,i)=0.0; } end_f_loop(f,t); } } } DEFINE_DIFFUSIVITY(diffusivity, c, t, i) { (information….correct) } DEFINE_SOURCE(scalar_source,c,t,dS,eqn) { (information….correct) } Last edited by solefire; September 27, 2010 at 16:48. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error about uds in udf | a.maroofi | Fluent UDF and Scheme Programming | 0 | September 22, 2010 03:23 |
connection between udf and uds | a.maroofi | Fluent UDF and Scheme Programming | 1 | September 19, 2010 09:46 |
UDS UDF for post-processing | KRK | FLUENT | 1 | January 19, 2007 05:31 |
Associating profile files for the UDS though a UDF | Bharath | FLUENT | 0 | December 1, 2006 16:58 |
UDF Adjust to redefine UDS Diffusivity | David harvey | FLUENT | 4 | February 27, 2004 08:47 |