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

Can I define density in terms of liquid fraction in UDF?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2019, 10:58
Default
  #21
Senior Member
 
Join Date: Jan 2011
Posts: 339
Rep Power: 16
mariam.sara is on a distinguished road
Sorry here is the correct expression.

mariam
Attached Images
File Type: jpg dd.jpg (16.5 KB, 8 views)
mariam.sara is offline   Reply With Quote

Old   August 26, 2019, 00:56
Default
  #22
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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;
}
best regards
AlexanderZ 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
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


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