CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Two phase interface area

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2013, 15:47
Default Two phase interface area
  #1
New Member
 
Bradley J
Join Date: Jul 2012
Location: Cincinnati, OH
Posts: 12
Rep Power: 14
Blackhawks84 is on a distinguished road
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)
}
Blackhawks84 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 00:02.