|
[Sponsors] |
June 23, 2021, 09:49 |
Vof Property in fluent udf
|
#1 |
New Member
Mohammad pirani
Join Date: Jun 2021
Posts: 2
Rep Power: 0 |
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; } |
|
Tags |
peroperty, vof |
|
|
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 |