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

Volume fraction UDF in mixture model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2013, 10:23
Default Volume fraction UDF in mixture model
  #1
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
Hi everybody,

Can I use C_VOF(c,pt[i]) in a UDF for the Multiphase Mixture model ?
FLUENT is giving me 'ACCESS_VIOLATION' error...

Can anybody suggest an alternative to get the volume fraction of a phase in my UDF ?, or even better, the pressure of a particular phase in the mixture ?

Thanks
wawa
wawa is offline   Reply With Quote

Old   April 3, 2013, 02:47
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
Can you show your UDF please.
vasava is offline   Reply With Quote

Old   April 3, 2013, 05:58
Default
  #3
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
I'm basically trying to calculate the partial pressure of water-vapour in a mixture of air, liquid water and water-vapour. I'm using the mixture model, with evaporation-condensation, and the 'DEFINE_PROPERTY' is used to obtain the saturation temperature to use in the model. I need the partial pressure of water-vapour in order to calculate the saturation temperature (via an experimental equation).

DEFINE_PROPERTY(sat_temp,c,t)
{
Thread *tm, **pt;
real par_pres;
real sat_temp;
tm = THREAD_SUPER_THREAD(t);
pt = THREAD_SUB_THREADS(tm);
par_pres = C_VOF(c,pt[2])*C_P(c,t);
/*pt[2] because 2nd secondary phase is water vapour*/
sat_temp = pow(par_pres,0.11);
return sat_temp;
}

My issue is that I cannot access the volume fraction C_VOF(c,pt[2]) in FLUENT. THe code compiles well, but at initialisation, it gives me 'ACCESS VIOLATION' error.

Can you help ?
wawa is offline   Reply With Quote

Old   April 3, 2013, 10:08
Default
  #4
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
I have doubt if you can use the macro C_VOF(c,pt[2]) with mixture model (Anyone?). That could be the issue. Can you test your code without 'C_VOF(c,pt[2])' and see if it works.
vasava is offline   Reply With Quote

Old   April 3, 2013, 13:14
Default
  #5
New Member
 
wawa
Join Date: Nov 2010
Posts: 24
Rep Power: 16
wawa is on a distinguished road
Yes, it does work without C_VOF...
Is there another way to get the volume or mass fraction with the mixture model ?
wawa 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
udf: volume fraction gradient in eulerian model jwwang FLUENT 22 April 15, 2015 07:27
volume fraction in mixture model and VOF???? multiphase-flow FLUENT 4 August 7, 2014 11:35
VOF model - volume fraction residual question Wim Heirwegh FLUENT 9 July 8, 2013 14:44
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 18:27.