|
[Sponsors] |
February 5, 2013, 15:47 |
Two phase interface area
|
#1 |
New Member
Bradley J
Join Date: Jul 2012
Location: Cincinnati, OH
Posts: 12
Rep Power: 14 |
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) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculating Interface Area with InterFoam | gopala | OpenFOAM Running, Solving & CFD | 28 | December 23, 2021 03:51 |
Confused about periodic interface | Jeff | STAR-CCM+ | 3 | August 15, 2012 23:30 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 18:15 |
CFX Solver Memory Error | mike | CFX | 1 | March 19, 2008 08:22 |
two phase flow, interface thickness | Jean-Philippe | FLUENT | 3 | July 23, 2004 17:54 |