|
[Sponsors] |
Can I define density in terms of liquid fraction in UDF? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 23, 2019, 10:58 |
|
#21 |
Senior Member
Join Date: Jan 2011
Posts: 339
Rep Power: 16 |
Sorry here is the correct expression.
mariam |
|
August 26, 2019, 00:56 |
|
#22 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Ts and TL should be defined by you
Code:
#include "udf.h" #define cps 1800.0 #define cpl 2400.0 #define lat 160000.0 DEFINE_SPECIFIC_HEAT(cell_cp, T, Tref, h, yi) { real cpm,dt,coef; real Tl, Ts; // to be defined Tref = 308; if T<Ts coef = 0; else if T< Tl coef = (T-Ts)/(Tl-Ts); else coef = 1; dt=exp(-T*(T-Tref)*(T-Tref)/4.0)/sqrt(4.0*3.14); cpm =cps+(cpl-cps)*coef+lat*dt; *h = cpm*(T-Tref); return cpm; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
liquid volume fraction decrease(Eulerian + Degassing BC) | Dereje | Fluent Multiphase | 0 | June 19, 2019 03:26 |
UDF error for Heat Generation | mame | Fluent UDF and Scheme Programming | 4 | March 3, 2016 05:22 |
UDF C_P(c,t) Define density initialization error | yuanmengyuan1989 | Fluent UDF and Scheme Programming | 0 | May 29, 2014 23:12 |
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 |