|
[Sponsors] |
Calculate wall normal gradient and store it in UDM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 15, 2020, 02:24 |
Calculate wall normal gradient and store it in UDM
|
#1 |
Member
Mochibaru
Join Date: Jan 2015
Location: Japan
Posts: 41
Rep Power: 11 |
Good Morning Everybody,
Thank you so much for reading my time consuming post about a very fundamental problem. I am currently writing a UDF to calculate the (Normal) specie mass fraction gradient at curved wall. I want to store the gradient in UDM for future use at present. I have tried to give a try and write the basic UDF from the previous examples and UDF manual. However, there are some problems that i cannot identify to interpret or compile it. Further i am not sure the present concept will work or not.Your Correction is highly appreciated in this regard. Thank you from the core of my heart. My UDF is as following: #include "udf.h" DEFINE_ON_DEMAND(gradient) { Domain *d; Thread *t,tc; face_t f; cell_t c; d=Get_Domain(1); tc=Lookup_Thread(d,8); //Wall ID real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND]; begin_f_loop(f,tc) { real rho; rho = 1.17; tc = THREAD_T0(t); c = F_C0(f,t); BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0); C_UDMI(c,tc,0)=((F_YI(f,t,0)*rho)-(C_YI(c,tc,0)*rho))/ds; } end_f_loop(f,t) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to store y-direction gradient using UDS | aronsyu | Fluent UDF and Scheme Programming | 5 | December 18, 2015 08:10 |
UDF to Access Wall Normal Concentration Gradient | Daniel Tanner | Fluent UDF and Scheme Programming | 4 | February 18, 2015 15:35 |
UDS gradient ?? | akm | Fluent UDF and Scheme Programming | 0 | April 23, 2012 15:49 |