Two phase interface area
Hello all,
I am trying to get a UDF to find the surface area of the interface at the first row of cells adjacent to the wall. If my interface stretches across 3 cells, will I have to obtain the area of each of those cell? I am not sure on how to go about doing this. My case is 2D axisymmetric where I have vapor as my primary phase and liquid water as my secondary phase. I have posted my UDF below. If anyone can let me know if this is a good way to go about it or if I need to try a different approach, I would be greatly appreciative. Thank you very much. Bradley #include "udf.h" #include "sg.h" #include "sg_mphase.h" #include "flow.h" #include "mem.h" DEFINE_ADJUST(interface_area,d) { Thread *t; Thread **pt; cell c; face f; int Zone_ID = 6; /* Base Wall Boundary Condition ID = 6 */ d = Get_Domain(4); /* Interface Domain */ t = Lookup_Thread(d,Zone_ID); /* Thread Pointer to Base Wall */ real NV_VEC(A); /* Vector of Face Area */ real total_area = 0.0; /* Initializing the total area */ begin_f_loop(f,t) { F_AREA(A,f,t); total_area += 2*3.14*NV_MAG(A); /* 2D Axisymmetric needs 2*pi */ } end_f_loop(f,t) } |
All times are GMT -4. The time now is 10:29. |