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

energy source term for phase change

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2013, 15:18
Default energy source term for phase change
  #1
New Member
 
mehrdad
Join Date: Feb 2011
Posts: 20
Rep Power: 15
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 :
Error:
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"

DEFINE_PROPERTY(T_sat,c,t)
{
real T,p;

p=(C_P(c,t)*7.501*0.001)+0.057;

T=5132./(20.386-log(p));

return T;
}

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

Thread *tm=THREAD_SUPER_THREAD(t);

Thread **pt = THREAD_SUB_THREADS(tm);

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

p1=(C_P(c,t)*7.501*0.001)+0.057;

Tsat=5132./(20.386-log(p1));

T=C_T(c,t);

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.;

a=0.1;

b=C_VOF(c,ts)*C_R(c,ts)-C_VOF(c,tp)*C_R(c,tp);

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

Q=m_net*h;

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, 12:24
Default
  #2
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
Hi can I have your email address? I am working on evaporation condensation problem I have some question.

Thanks
Mahboobe365 is offline   Reply With Quote

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

Old   November 26, 2013, 13:50
Default
  #4
New Member
 
meisam
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

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13: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 05:53
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43
linearization of radiative energy source term Nuray Kayakol Main CFD Forum 0 May 7, 1999 09:11


All times are GMT -4. The time now is 11:51.