CFD Online Logo CFD Online URL
Home > Forums > FLUENT

energy source term for phase change

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   April 21, 2013, 14:18
Default energy source term for phase change
New Member
Join Date: Feb 2011
Posts: 20
Rep Power: 6
mhdmk is on a distinguished road
hi everyone
i'm simulating a converging-diverging nozzle saturated water enter and because of pressure drop flow changes to two phase and the temperature decrease.for evaporation & condensation i use evaporation-condensation model in ansys fluent 13 with T_sat varying by pressure and i use a source term to add latent heat to energy equation and i use mixture model but when i run the case the fluent says :
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

here is my udf's:

#include "udf.h"

real T,p;



return T;

DEFINE_SOURCE (phase_change,c,t,dQ,eqn)
real a,b,Tsat,T,h,Q,p1,m_net;


Thread **pt = THREAD_SUB_THREADS(tm);

Thread *tp = pt[0]; /*primary phase*/
Thread *ts = pt[1]; /*secondary phase*/




if(200.<T<272.7) h=2835000.; /* latent heat(j/kg)*/

if(272.7<T<500.) h=(-0.004*pow(T,2.)+0.492*T+2681.)*1000.;



m_net=(a*b*(T-Tsat)/Tsat) /*mass transfer(kg/m3s)*/


if(272.7<T<500.) dQ[eqn]=a*b*(h/Tsat+(-0.008*T+.429)*(T-Tsat)/Tsat);

else dQ[eqn]=a*b*h/Tsat;

return Q;
mhdmk is offline   Reply With Quote

Old   May 31, 2013, 11:24
New Member
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 4
Mahboobe365 is on a distinguished road
Hi can I have your email address? I am working on evaporation condensation problem I have some question.

Mahboobe365 is offline   Reply With Quote

Old   June 3, 2013, 14:54
New Member
Join Date: Feb 2011
Posts: 20
Rep Power: 6
mhdmk is on a distinguished road
what is your question ?
mhdmk is offline   Reply With Quote

Old   November 26, 2013, 13:50
New Member
Join Date: Nov 2013
Posts: 1
Rep Power: 0
meisam1 is on a distinguished road
Has your problem solved Mr koochaki?
meisam1 is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error bulding swak4Foam sfigato OpenFOAM Installation 18 August 22, 2013 12:41
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
UDF for energy source João Fernandes FLUENT 4 October 17, 2008 04:53
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43
linearization of radiative energy source term Nuray Kayakol Main CFD Forum 0 May 7, 1999 08:11

All times are GMT -4. The time now is 07:02.