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

Vof Property in fluent udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2021, 09:49
Post Vof Property in fluent udf
  #1
New Member
 
Mohammad pirani
Join Date: Jun 2021
Posts: 2
Rep Power: 0
m.pirani95 is on a distinguished road
Hello and have a good time
I want to model a two-phase compressible flow using the VOF method in fluent.
I have a problem on defining the properties of phases.

1)
Is there any problem when I specify the properties of each phase using the DEFINE_PROPERTY macro? I need to specify the phase THREAD or use the mixture THREAD?
2)
When i use the mixture THREAD for C_P(c,t) & C_T(c,t),the fluent determines the properties of the mixture for the calculations by it self?

To understand more:
Which one is correct?
#include "udf.h"

#define C_P_air_0 1006.43 /*j/kg-k*/
#define T_air_0 298.15 /*k*/
#define dens_air_0 1.184 /*kg/m3*/
#define gam_air_0 1.401 /*-*/
#define P_air_0 101325.0 /*pa*/
#define R_air_0 288.0 /*j/kg-k*/

DEFINE_PROPERTY(density_of_air,c,t)
{
cell_t c;
real pi_air_0,P_air,T_air,dens_air;

pi_air_0=(((gam_air_0-1)*dens_air_0*C_P_air_0*T_air_0)/gam_air_0)-P_air_0; /*pa*/

P_air=C_P(c,t); /*pa*/
T_air=C_T(c,t); /*k*/


dens_air=((P_air+gam_air_0*pi_air_0)/(R_air_0*T_air)); /*kg/m3*/


return dens_air;
}



or


#include "udf.h"

#define C_P_air_0 1006.43 /*j/kg-k*/
#define T_air_0 298.15 /*k*/
#define dens_air_0 1.184 /*kg/m3*/
#define gam_air_0 1.401 /*-*/
#define P_air_0 101325.0 /*pa*/
#define R_air_0 288.0 /*j/kg-k*/

DEFINE_PROPERTY(density_of_air,c,t)
{
cell_t c;

t_air=THREAD_SUB_THREAD(t,0);
real pi_air_0,P_air,T_air,dens_air;

pi_air_0=(((gam_air_0-1)*dens_air_0*C_P_air_0*T_air_0)/gam_air_0)-P_air_0; /*pa*/

P_air=C_P(c,t_air); /*pa*/
T_air=C_T(c,t_air); /*k*/


dens_air=((P_air+gam_air_0*pi_air_0)/(R_air_0*T_air)); /*kg/m3*/


return dens_air;
}
m.pirani95 is offline   Reply With Quote

Reply

Tags
peroperty, vof


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
how to run fluent from matlab without using aas toolbox? artemis96 ANSYS 7 May 23, 2022 13:16
can anyone help me about the udf of dynamic contact angle in FLUENT? Albert Lee FLUENT 0 July 1, 2018 09:21
HELP! adding a mass source to VOF eqn. by UDF??? ROOZBEH FLUENT 5 December 3, 2016 18:53
Mass Transfer UDF using Fluent VOF Anirudh_Deodhar Fluent UDF and Scheme Programming 3 November 18, 2015 10:29
Mass Transfer UDF using Fluent VOF Anirudh_Deodhar FLUENT 0 February 7, 2011 16:10


All times are GMT -4. The time now is 14:46.