|
[Sponsors] |
Fluent multiphase-VOF Volume fraction initialization |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 23, 2016, 10:46 |
Fluent multiphase-VOF Volume fraction initialization
|
#1 |
New Member
Kaushal Sumaria
Join Date: Mar 2016
Posts: 2
Rep Power: 0 |
Hi,
I have a rectangular domain of helium inside which I have a semicircle domain of Zirconium. I want to mesh the whole domain with a grid. I want to initialize volume fraction of Zirconium using DEFINE_INIT udf which gives volume fraction of 1 to Zirconium in the semicircle area. I am using the following code and interpreting the UDF. However, it initializes whole domain with Zirconium. Please help. Do i need to use DEFINE_INIT udf before initialization of after? Should I use interpreted or compiled UDF? Code: (phase id of Zirconium=3) #include "udf.h" /*domain pointer passed by INIT function is mixture domain*/ DEFINE_INIT(vof_init, mixture_domain) { int phase_domain_index; cell_t cell; Thread *cell_thread; Domain *subdomain; real xc[ND_ND]; /*loop over all subdomain(phases) in the superdomain(mixture)*/ sub_domain_loop(subdomain, mixture_domain, phase_domain_index) { /*loop if secondary phase=zicronium*/ if(DOMAIN_ID(subdomain)==3) /*loop over all cell threads in the secondary phase domain*/ thread_loop_c(cell_thread, subdomain) { /*loop over all cells in secondary phase cell threads*/ begin_c_loop_all(cell, cell_thread) { C_CENTROID(xc, cell, cell_thread) if (sqrt(ND_SUM(pow(xc[0],2), pow(xc[1],2), pow(xc[3],2)))<1.25) /*set volume fraction to 1*/ C_VOF(cell, cell_thread)=1; else /*set volume fraction to 0*/ C_VOF(cell, cell_thread)=0; } end_c_loop_all(cell, cell_thread) } } } |
|
Tags |
define_init, multiphase |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Volume fraction of dispersed phase to determine DPM, VOF, Mixture model | Mohsin | FLUENT | 5 | March 5, 2018 08:47 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
Overflow Error in Multiphase Modelling with Two Continuous Fluids | ashtonJ | CFX | 6 | August 11, 2014 15:32 |
VOF multiphase - Validity of Fluent ? | manxu | FLUENT | 2 | January 2, 2014 12:17 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |