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

UDF for Multiphase euilerian model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2014, 06:40
Default UDF for Multiphase euilerian model
  #1
New Member
 
Join Date: Jan 2014
Posts: 5
Rep Power: 12
pibea is on a distinguished road
Hi
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;
m_dot=0.0;
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

Old   August 2, 2022, 02:41
Default
  #2
New Member
 
Join Date: Aug 2021
Posts: 1
Rep Power: 0
numaniqbal444@yahoo.com is on a distinguished road
Hi,
I want to simulate sublimation process in Fluent.Can you send me your udf code at my email numaniqbal444@yahoo.com
numaniqbal444@yahoo.com is offline   Reply With Quote

Old   June 13, 2023, 22:22
Default
  #3
New Member
 
Join Date: Jun 2021
Posts: 1
Rep Power: 0
limjw97 is on a distinguished road
Hello Pibea,

Do you solve this problem? I am now working on a similar simulation with yours and struggling with the problem. Could you send me the udf code to my email limjw97@hanyang.ac.kr
limjw97 is offline   Reply With Quote

Old   April 30, 2024, 02:25
Default
  #4
New Member
 
Aneesh
Join Date: Apr 2024
Posts: 3
Rep Power: 2
aneesham75 is on a distinguished road
I am also doing the same problem. It would be helpful for me if you send the code to my mail( aneesham7589@gmail.com)
aneesham75 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
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 07: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 03:21
UDF: how to know domain number in the model? mssound FLUENT 0 May 17, 2010 16:00


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