CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF for Multiphase euilerian model

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

LinkBack Thread Tools Display Modes
Old   September 28, 2014, 05:40
Default UDF for Multiphase euilerian model
New Member
Join Date: Jan 2014
Posts: 5
Rep Power: 5
pibea is on a distinguished road
I am conducting the two-phase eulerian model computaion.

In my model, the primary phase is CO2 gas and the secondary phase is dry-ice(CO2 solid).(I gave almost properties of dry-ice material manually)

I want to make the secondary phase(dry-ice) sublimate and change the primary phase(CO2 gas).
I heard that there is no sublimation model in fluent, so I coded udf for sublimation.

Inlet condition of the primary phase and the secondary phase is velocity inlet, 100m/s and temperature 220K. Outlet has 0Pa, gauge pressure, and 300K.
The model is calculated as a transient case and coupled solver is used.

The aim of my udf code is that if the cell temperature over some temperature criteria, then volume fraction of secondary phase would change 0 and reaction heat calculated by multiplying diappearing secondary phase mass and latent heat would be substracted from the entalphy of primary phase.

When I compiled and loaded my code, there is no problem.
However, when I ran the calculation, warning message('AMG solver divergence detected: pressure coupled' like this messages) is shown and calculation is interrupted.

My code is below,

#include "udf.h"

DEFINE_MASS_TRANSFER(sublimation, cell, thread, from_index, from_species_index, to_index, to_species_index)
Thread *dryice = THREAD_SUB_THREAD(thread, from_index);
Thread *gas = THREAD_SUB_THREAD(thread, to_index);

double Q_sub=575400;
double rho_d = C_R(cell,dryice);
double rho_g = C_R(cell,gas);
double vof_d = C_VOF(cell,dryice);
double vof_g = C_VOF(cell,gas);
double m_dot;
double T_gas=C_T(cell,gas);
double T_dryice=C_T(cell,dryice);
double T_sub=221;
if (T_dryice > T_sub)
C_VOF(cell,dryice) =0;
C_H(cell,gas) -= Q_sub*vof_d*rho_d/(vof_d*rho_d+vof_g*rho_g);

else if (T_dryice< T_sub)


pibea 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
udf for Srivastava and Sundaresan friction model Musa FLUENT 1 March 14, 2014 03:42
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
Why my UDF doesn't work when I activate the non-premixed combustion species model? TMorgado Fluent UDF and Scheme Programming 0 February 5, 2013 15:09
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 02:21
UDF: how to know domain number in the model? mssound FLUENT 0 May 17, 2010 15:00

All times are GMT -4. The time now is 04:00.