|
[Sponsors] |
March 27, 2019, 09:38 |
Mass transfer UDF fluent
|
#1 |
New Member
Join Date: Jul 2018
Posts: 29
Rep Power: 8 |
Hi,
I am trying to model mass transfer between air and air. My equation is as follow: m_lg = ((density of gas*Ds) / (1- mass fraction water vap t the interface))*(dc/dy) I want to use define_mass transfer as follow: #include "udf.h" DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index, from_species_index, to_index, to_species_index) { Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *gas = THREAD_SUB_THREAD(thread, to_index); real m_lg; m_lg = (-2.88e-5*C_R(cell,gas)/(1-C_YI(cell,gas,0)))*C_YI_G(cell,gas,0)[1]; return (m_lg); } but every time I use gradient I get a fatal error after one iteration. In addition, I set solve/set/expert/linearized mss transfer to no and (rpsetvar 'species/save-gradients? #t) for gradient for pressure-bsed. I hope that anyone can help me with it. |
|
March 27, 2019, 09:52 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
You tell your UDF to calculate the mass flux based on the gradient calculated in the previous iteration. That fails in the first iteration, because there is no previous iteration. The practical solution is to run your simulation without this UDF for a few time steps, and then add it. |
||
March 27, 2019, 12:26 |
|
#3 | |
New Member
Join Date: Jul 2018
Posts: 29
Rep Power: 8 |
Quote:
|
||
March 27, 2019, 14:56 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Then you might have cells were C_YI(cell,gas,0)=1, so your equation becomes infinite.
|
|
January 9, 2020, 04:34 |
|
#5 |
New Member
Kate Hall
Join Date: Jan 2020
Posts: 1
Rep Power: 0 |
hi,I see that many people think the unit of the return value of DEFINE_MASS_TRANSFER is Kg/cubic meter*s).But,I think in your UDF,the unit of the return value is Kg/(Square meter*s).Maybe you can have a try.
|
|
November 5, 2021, 08:01 |
|
#6 |
New Member
Jun
Join Date: Aug 2021
Posts: 3
Rep Power: 5 |
Hello, I am also working on the topic of droplet evaporation based on Fick's law recently. I would like to ask if your problem is solved.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing phase interaction mass transfer rate in UDF | ahmadimo | Fluent UDF and Scheme Programming | 1 | October 7, 2021 00:08 |
UDF for mass and heat source with heat transfer | rajendra1 | Fluent UDF and Scheme Programming | 35 | October 13, 2017 05:04 |
Mass Transfer UDF using Fluent VOF | Anirudh_Deodhar | Fluent UDF and Scheme Programming | 3 | November 18, 2015 10:29 |
The fluent stopped and errors with "Emergency: received SIGHUP signal" | yuyuxuan | FLUENT | 0 | December 3, 2013 23:56 |
Help,I have some questions about UDF of mass diffusivity in fluent | apolloking | Fluent UDF and Scheme Programming | 0 | March 20, 2011 12:40 |