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

Define macro for vof

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2016, 00:54
Default Define macro for vof
  #1
Member
 
Join Date: Oct 2015
Posts: 34
Rep Power: 11
SAM S is on a distinguished road
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
SAM S is offline   Reply With Quote

Old   February 1, 2016, 05:27
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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?
`e` is offline   Reply With Quote

Old   February 1, 2016, 06:39
Default
  #3
Member
 
Join Date: Oct 2015
Posts: 34
Rep Power: 11
SAM S is on a distinguished road
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
SAM S is offline   Reply With Quote

Old   February 1, 2016, 19:46
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Try compiling the UDF instead of interpreting.
`e` is offline   Reply With Quote

Old   February 15, 2018, 03:03
Default
  #5
New Member
 
Meisam
Join Date: Oct 2017
Posts: 4
Rep Power: 9
Meisam1300 is on a distinguished road
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
Meisam1300 is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 20:03.