|
[Sponsors] |
Help! Having problem in accessing volume fraction gradient |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 18, 2013, 11:44 |
Help! Having problem in accessing volume fraction gradient
|
#1 |
New Member
Geng Fu
Join Date: Mar 2012
Location: Beijing, China
Posts: 5
Rep Power: 14 |
Hi, I am using DEFINE_MASS_TRANSFER to add a new phase change model into VOF model.
There is a problem in accessing volume fraction gradient with C_VOF_G. The results of mass transfer rate are 0 on the interface. After I checked the thread storage(thread, SV_VOF_G), I found it always equals null. Any help would be appreciated. Thanks in advance. Code:
DEFINE_MASS_TRANSFER(liq_gas_source_Sun, cell, thread, from_index, from_species_index, to_index, to_species_index) { real m_lg; // mass transfer rate on the interface, kg/s/m3 ; real h_lg = 2257600; // evaporation enthalpy, J/kg real vof_cutoff = 0.05; real vpVofT; // dot product of temperature gradient and volume fraction gradient real v_sx; // volume fraction gradient dx real v_sy; // volume fraction gradient dy Thread *liq, *gas; liq = THREAD_SUB_THREAD(thread, from_index); gas = THREAD_SUB_THREAD(thread, to_index); // from_index and to_index are defined in the Mass panel of Phase interaction. m_lg = 0.0; // Initial value of m_lg. if ((C_VOF(cell, liq) > vof_cutoff) && (C_VOF(cell, liq) < (1-vof_cutoff))) { if (NULL != THREAD_STORAGE(thread,SV_VOF_G)) { v_sx = C_VOF_G(cell, gas)[0]; v_sy = C_VOF_G(cell, gas)[1]; printf("THREAD_STORAGE : %f \n", THREAD_STORAGE(gas,SV_VOF_G)); } vpVofT = v_sx*C_T_G(cell, thread)[0] + v_sy*C_T_G(cell, thread)[1]; printf("v_sy: %f \n", v_sy); printf("TempGradx: %f \n", C_T_G(cell, thread)[0]); printf("dot product of TempGrad and VOFGrad: %f \n", vpVofT); m_lg = 2/h_lg*C_K_L(cell, gas)*vpVofT; //mass transfer rate from liquid to gas; } return (m_lg); } |
|
Tags |
c_vof_g, vof phase change, volume fraction gradient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
udf: volume fraction gradient in eulerian model | jwwang | FLUENT | 22 | April 15, 2015 06:27 |
Zero Gradient for Volume fraction at inlet | Kushagra | CFX | 1 | January 1, 2014 05:58 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 14:11 |
Problem with Volume Fraction | Multihull | STAR-CCM+ | 4 | May 9, 2010 11:50 |