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

Concentration dependent surface tension

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2011, 06:28
Default Concentration dependent surface tension
  #1
New Member
 
Join Date: Oct 2010
Posts: 4
Rep Power: 15
stulle is on a distinguished road
hello,

i want so specify surface tension as a function of concentration in the liquid phase.
the liquid phase has two species and i´m using VOF multiphase model.

so which thread is the t - thread in the define_property macro ?

with DEFINE_PROPERTY(surface_tension,c,t) and C_YI(c,t,0) fluent shows an access violation error
with several multiphase macros like thread_sub_threads... fluent shows the same error

please help
thx
stulle is offline   Reply With Quote

Old   August 12, 2011, 14:01
Default
  #2
New Member
 
Join Date: Oct 2010
Posts: 4
Rep Power: 15
stulle is on a distinguished road
i still have this problem
can anyone help me or give a suggestion ?
thanks a lot
stulle is offline   Reply With Quote

Old   June 18, 2022, 15:41
Default
  #3
New Member
 
Brian Huffman
Join Date: Jun 2022
Posts: 4
Rep Power: 3
huffymane is on a distinguished road
Hey there anyone it may help. I know this reply is late, but this post helped me on my journey and I would like to answer.

I have the same objective as this post states, to write a UDF that controls the surface tension coefficient by analyzing the mixture species fraction.

The following code seems to be the answer:


DEFINE_PROPERTY(Custom_Surface_Tension, c, t)
{
Domain *mix;
mix = Get_Domain(1);

Thread *mix_thread = Lookup_Thread(mix, 2);
Thread *sec_phase = THREAD_SUB_THREAD(mix_thread,1);

real sigma, xm;

xm = C_YI(c,sec_phase,1);
sigma = 0.043*xm*xm - 0.1081*xm + 0.0702;


return sigma;
}


The key part being the first 4 lines of code:
Lines 1-2. grab the mixture domain pointer (domain ID=1 for mixture domain) & assign variable *mix.
Line 3. Find the relevant thread (domain ID=1 for mixture, Zone ID=2 for fluid), assign the lookup to a variable *mix_thread (this is a mixture level thread)

Line 4. Assign a phase level pointer (*sec_phase) to secondary phase thread



*sec_phase now has the required data to proceed with mass fraction function C_YI
huffymane 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
InterFoam+ Surface tension dependent on temperature yapalparvi OpenFOAM Running, Solving & CFD 7 February 19, 2016 11:51
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
Surface Tension Test Cases sega OpenFOAM Running, Solving & CFD 2 March 8, 2011 12:19
Concentration dependent surface tension ling FLUENT 0 July 25, 2006 13:47
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 10:17.