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

how to simulate mass trasfer

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2019, 05:08
Default how to simulate mass trasfer
  #1
New Member
 
AKHIL KUMAR
Join Date: Jan 2019
Posts: 13
Rep Power: 7
AKHIL123 is on a distinguished road
hi,
am simulating a problem on a simple mass transfer coefficient based on saturation temperature.i use water vapour and air.i used udf code as shown below.
#include "udf.h"

DEFINE_MASS_TRANSFER(liq_vapour_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lv;
real T_SAT = 373.15;
Thread *vapor, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lv = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,vapor)*C_R(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*
(T_SAT-C_T(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*
(T_SAT-C_T(cell,gas))/T_SAT;
}

return (m_lv);
}))/T_SAT;
}

return (m_lg);
})*
(T_SAT-C_T(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, gas) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*
(T_SAT-C_T(cell,#include "udf.h"

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,
from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *vapor, *liq;
gas = THREAD_SUB_THREAD(thread, from_index);
liq = THREAD_SUB_THREAD(thread, to_index);
m_lv = 0.0;

if (C_T(cell, liq) > T_SAT)
{ /* Evaporating */
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
(C_T(cell,liq)-T_SAT)/T_SAT;
}
else if (C_T(cell, vapor) < T_SAT)
{ /* Condensing */
m_lg = 0.1*C_VOF(cell,vapor)*C_R(cell,vapor)*
(T_SAT-C_T(cell,vapor))/T_SAT;
}

return (m_lg);
}))/T_SAT;
}

return (m_lg);
})*
(T_SAT-C_T(cell,gas))/T_SAT;
}

return (m_lg);
})*
(T_SAT-C_T(cell,gas))/T_SAT;
}

return (m_lv);
}))/T_SAT;
}

return (m_lv);
}


but while executing its showing error,i used a rectangular geometry with bottom walls hot and top open to atmosphere.
AKHIL123 is offline   Reply With Quote

Old   February 27, 2019, 05:52
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Tell us which error you see. Don't let us guess...
pakk is offline   Reply With Quote

Old   March 12, 2019, 23:25
Default
  #3
New Member
 
AKHIL KUMAR
Join Date: Jan 2019
Posts: 13
Rep Power: 7
AKHIL123 is on a distinguished road
sir,
i created a rectangular body,bottom wall i gave a temperature of 500k,mixture model is used.water and water vapor is used,but during standard initialization its showing that received a fatal signal.(segmentation fault)
AKHIL123 is offline   Reply With Quote

Reply

Tags
#fluent#meshinterface

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
mass flow inlet and pressure outlet with target mass flow rate Zigainer FLUENT 13 October 26, 2018 05:58
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
DPMFoam - Serious Error --particle-laden flow in simple geometric config benz25 OpenFOAM Running, Solving & CFD 27 December 19, 2017 20:47
mass does not conserve in Openfoam conceptone OpenFOAM 5 February 8, 2013 03:35
How to simulate heat and mass transfer for drying olivia FLUENT 1 June 20, 2001 13:04


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