|
[Sponsors] |
February 1, 2016, 00:54 |
Define macro for vof
|
#1 |
Member
Join Date: Oct 2015
Posts: 34
Rep Power: 11 |
Hello, I have wriiten a udf for mass source term and have also mentioned that the source applies only at the interface using vof (volume fraction cut off). I want to know the define macro for vof model,how to declare it in udf.
Thank you |
|
February 1, 2016, 05:27 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The macro for volume of fluid is C_VOF(c,t) where the thread, t, must be a phase thread. What exactly would you like to define?
|
|
February 1, 2016, 06:39 |
|
#3 |
Member
Join Date: Oct 2015
Posts: 34
Rep Power: 11 |
Thank you for your reply. I have written the udf for mass transfer source term in a thin film evaporation that should apply at the liquid interface. While interpreting my code am getting the error label "store vof norm" not found. Here am giving the code, please help me to rectify the errors
#include "udf.h" DEFINE_MASS_TRANSFER(liq_gas_source,cell,thread,fr om_index,from_species_index,to_index, to_species_index) { real m_lg; real T_SAT = 373.15; real vof_cutoff = 0.05; Thread *liq = THREAD_SUB_THREAD(thread, from_index); Thread *gas = THREAD_SUB_THREAD(thread, to_index); m_lg = 0.0; if ( (C_VOF(cell,thread) > vof_cutoff ) && (C_VOF(cell,thread) < (1 - vof_cutoff) )) { if ((m_lg == 0.0) && (C_T(cell, liq) >= T_SAT)) { m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*fabs(C_T(cell,li q)-T_SAT)/T_SAT; } if (C_T(cell, gas) <= T_SAT) { m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*fabs(T_SAT-C_T(cell,gas))/T_SAT; } } return (m_lg); } Last edited by SAM S; February 1, 2016 at 06:40. Reason: failed to attach code |
|
February 1, 2016, 19:46 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Try compiling the UDF instead of interpreting.
|
|
February 15, 2018, 03:03 |
|
#5 |
New Member
Meisam
Join Date: Oct 2017
Posts: 4
Rep Power: 9 |
Hello Sam
Did you solve the problem? I am encountering the same problem and I cannot solve it. I appreciate any help thank you in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Re: scalar transport equation problem | Benny | FLUENT | 5 | March 22, 2018 14:28 |
use one Define macro into another Define macro ? | ho3ein.agl | Fluent UDF and Scheme Programming | 8 | December 18, 2014 21:39 |
Installing OF 1.6 on Mac OS X | gschaider | OpenFOAM Installation | 129 | June 19, 2010 10:23 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 12:48 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |