|
[Sponsors] |
March 20, 2018, 09:12 |
Discrete Ordinate Model UDF variables.
|
#1 |
New Member
Adriano Silvares
Join Date: Feb 2018
Posts: 2
Rep Power: 0 |
Hi community,
I am trying to simulate a medium that only absorbs radiation, which is enclosed by an annular space. The boundary condition is set at the inner wall in w/m2 and the medium has a defined absorption coefficient. The medium absorbs radiation and undergo a chemical reaction, therefore I need to know how much radiation is absorbed within each finite volume. Working with UDF I can access C_DO_I(c,t,i), F_DO_I(f,t,i) and C_DO_IRRAD(c,t,nb) variables, which seem to represent the discretized transmitted radiation beam at cell centers and faces and the total radiation transmitted at cell center for a given wavelengths respectively. Is that right? If so, should the former to variables be related to the third one? How? Also, if these values represent transmitted radiation in w/m2 that are reaching points in the finite volume, how can I calculate the absorbed radiation w/m3 for the same finite volume? Below I pasted the UDF used to print above mentioned variables. The beam discretization is very coarse and counts only with 4 values. DEFINE_ON_DEMAND(printI) { FILE *intcell; FILE *intface; Domain *d; Thread *t; Thread *tf; cell_t c; cell_t c_out; face_t f; int i = 0; double xc[ND_ND]; double xf[ND_ND]; double I0, I1, I2, I3, If0, Inb0, If1, If2, If3; int zone_ID; d = Get_Domain(1); intcell = fopen("Exportedintcell.txt", "w"); intface = fopen("Exportedintface.txt", "w"); thread_loop_c(t, d) { begin_c_loop(c, t) // loop over all cells { zone_ID = THREAD_ID(t); // C_CENTROID(xc, c, t); I0 = C_DO_I(c, t, 0); // Intensity I1 = C_DO_I(c, t, 1); // Intensity I2 = C_DO_I(c, t, 2); // Intensity I3 = C_DO_I(c, t, 3); // Intensity Inb0 = C_DO_IRRAD(c, t, 0); fprintf(intcell, "%e\t%e\t%e\n", xc[0], xc[1], I0); fprintf(intcell, "%e\t%e\t%e\n", xc[0], xc[1], I1); fprintf(intcell, "%e\t%e\t%e\n", xc[0], xc[1], I2); fprintf(intcell, "%e\t%e\t%e\n", xc[0], xc[1], I3); fprintf(intcell, "%e\t%e\t%e\n", xc[0], xc[1], Inb0); } end_c_loop(c, t) } // FACE DATABASE thread_loop_f(tf, d) { begin_f_loop(f, tf) { zone_ID = THREAD_ID(tf); F_CENTROID(xf, f, tf); if (BOUNDARY_FACE_THREAD_P(tf)) // face on the boundary { If0 = F_DO_I(f, tf, 0); If1 = F_DO_I(f, tf, 1); If2 = F_DO_I(f, tf, 2); If3 = F_DO_I(f, tf, 3); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If0); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If1); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If2; fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If3); } else // internal face { fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If0); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If1); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If2); fprintf(intface, "%e\t%e\t%e\t%en", xf[0], xf[1], xf[2], If3); } } end_f_loop(f, tf) } fclose(intcell); fclose(intface); } Last edited by AdrianoSilvares; March 21, 2018 at 09:58. |
|
March 21, 2018, 10:20 |
|
#2 |
New Member
Adriano Silvares
Join Date: Feb 2018
Posts: 2
Rep Power: 0 |
It seems that even though you solve a DO non-gray model, Fluent still find a solution for DO gray model and C_DO_I(c,t,i) and F_DO_I(f,t,i) would be values calculated as solution.
In fluent theory user guide it is said that:"In the case of the non-gray model, 4NϴNφ or 8NϴNφ equations are solved for each band." I understand that C_DO_IRRAD(c,t,nb) would be the net incident radiation for a given band stored at cell centroid and nb argument points to a specific band (ex. nb = 0 and nb = 1 are the first and second band defined). If this is right, how could you access the discretized transmitted radiation beam for each band at cell centroids and faces? If someone has any idea, please share. Fluent user guide is very economic explaining the DO model calculations and variables. |
|
October 11, 2022, 06:08 |
Intensity of each band
|
#3 |
New Member
Kuljeet Singh
Join Date: Aug 2022
Posts: 20
Rep Power: 4 |
hi can you elaborate what the 'i' argument represent in C_DO_I(c,t,i).
i am trying to find intensity associated with each band for gray model. the ultimate goal is implement FSK in Fluent. if you have idea to implement these it will be great help. -K |
|
October 13, 2022, 03:04 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
C_DO_I(c,t,i) gives the intensity of radiation in the cell in the direction i. The direction i is the normal direction of discrete ordinate.
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 14, 2022, 03:00 |
|
#5 |
New Member
Kuljeet Singh
Join Date: Aug 2022
Posts: 20
Rep Power: 4 |
i am using this UDF to compute intensity associated with each face. but i am getting segmentation error.
#include "udf.h" //code to compute face radiation intensity DEFINE_ON_DEMAND(printI) { Domain *domain; FILE *intFace; Thread *t; face_t f; int i; intFace = fopen("intensity.txt", "w"); thread_loop_f(t, domain) { begin_f_loop(f, t) // loop over all face { printf("face=%d\n",f); for (i=0; i<16; i++) // here 16 = 2x2 angular discritisation. we need genral expression for this along with how to access band intensity fprintf(intFace, "%d\n", F_DO_I(f,t,i)); } end_f_loop(f, t) printf("\n next thread\n"); } fclose(intFace); } |
|
October 14, 2022, 04:30 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
The direction i is the normal direction of discrete ordinate.
i =0, 1, 2
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Discrete Phase Model, outlet mass flow rate does not fit | edu_aero | FLUENT | 29 | February 3, 2020 09:38 |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 11:29 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
can alternate combustion model by UDF? | Han Xingsi | FLUENT | 0 | September 1, 2008 03:08 |
Discrete Ordinate Model | Raffi Kazazian | Main CFD Forum | 1 | January 4, 2000 03:25 |