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

multiphase flow monitor the volume fraction by udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2017, 06:31
Default multiphase flow monitor the volume fraction by udf
  #1
New Member
 
ChenChong
Join Date: Jul 2017
Posts: 7
Rep Power: 9
chchong001 is on a distinguished road
I simulated boiling process ,and I want to stop calculation when the vapor appear,the multiphase model is Mixture,primary phase is water,vapor is secondary。I made an udf,but it just fit for 2D geometry,if used in3D geometry,it would be error,I need some help,thank you!the udf wrote as follow:

#include "udf.h"
# define domain_ID 3
real stop_coeff=1;
real sum_vof=0.;
real sum_volume=0.;
DEFINE_ADJUST(stop_vof, domain)
{
Thread *t;
cell_t c;
face_t f;
domain = Get_Domain(domain_ID);

thread_loop_c (t,domain)
{
begin_c_loop (c,t)
{
sum_vof += C_VOF(c,t);
}
end_c_loop(c,t)
}
if(sum_vof >0)
{
real stop_coeff=1;
}
else
{
stop_coeff+=1;
}
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{
C_UDMI(c,t,0) = stop_coeff;
C_UDMI(c,t,1) = C_P(c,t);
C_UDMI(c,t,2) = C_VOF(c,t);
}
end_c_loop(c,t)
}
}
chchong001 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
Multiphase flow in a pipe with a CHT wissal CFX 4 June 12, 2017 13:15
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 17:12
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 03:53
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47


All times are GMT -4. The time now is 16:48.