CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

direct access to species

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

LinkBack Thread Tools Display Modes
Old   July 11, 2006, 22:43
Default direct access to species
Posts: n/a
haw to get access to one species from mixure? I want to do an if-else statement over one species from mixture. It should be something like this: if thread = fluid thread and species = species 1 (there are two species in mixture) than..... etc. is it possible?? Can you tell me how to write this ? thank you for your time
  Reply With Quote

Old   July 12, 2006, 11:01
Default Re: direct access to species
Posts: n/a
so it is impossible??`s too bad. Even gurus don`t know???
  Reply With Quote

Old   July 12, 2006, 12:20
Default Re: direct access to species
Posts: n/a
Your question is so open-ended as to be impossible to answer. In order to formulate a response, information such as the construction of the data structures in your code and what type of mixture you are referring to (as well as the language you are using) should probably be provided.
  Reply With Quote

Old   July 15, 2006, 04:37
Default Re: direct access to species
Posts: n/a
You are right

We are using c+ language. Physical Model: container - filled 1/2 of volume with solution (bottom) and vapour (upper part). In Fluent data are: solver-unstady, multiphase-VOF (2phase - GEO Rec.), energy - enabled, species react.-enabled (w/o reactions, w/o diffusion), viscoscous - K-eps, Materials: solution (mixture) and vapour h2o. Phases: primary phase solution, secondary - vapour. I know it should be prim. vapour, sec. solution in VOF (my mistake). operating condiotions: enablet gravity and specifeed density. BC - heated wall 500K, its thicknes 0,001m, upper wall is outflow. Solution ; U-Relax. all between 0.3-0.7, discretiz. pressure body weighted , rest second order. Initialize: solution temperature 370 K, mass fraction of 1 in sol. = 0.55.

bellow is my udf code. is it ok. We want mass transfer only from h2o(l) to h2o(v) and from h2o(v) to h2o (l). h2o (l) is a part of solution

#include "udf.h"

DEFINE_MASS_TRANSFER(dm,cell,thread,od_faza,od_skl adnik, do_faza,do_skladnik) { int iciecz,igaz,iH2O,iLiBr; real masa,m_lg; real T_SAT = 373;

m_lg = 0.; iciecz=0; igaz=1; iH2O=1; iLiBr=0;

if(od_skladnik == iLiBr) goto koniec;

if(do_skladnik == iLiBr) goto koniec;

if(od_faza == iciecz)

{ Thread *gas=THREAD_SUB_THREAD(thread, do_faza); Thread *liq=THREAD_SUB_THREAD(thread, od_faza); if (C_T(cell, liq) >= T_SAT) { m_lg = 0.1*C_VOF(cell,liq)*C_R(cell,liq)* fabs(C_T(cell,liq)-T_SAT)/T_SAT; } if ((m_lg == 0. ) && (C_T(cell, gas) <= T_SAT)) { m_lg = -0.1*C_VOF(cell,gas)*C_R(cell,gas)* fabs(T_SAT-C_T(cell,gas))/T_SAT; } } else { Thread *gas=THREAD_SUB_THREAD(thread, od_faza); Thread *liq=THREAD_SUB_THREAD(thread, do_faza); if (C_T(cell, liq) >= T_SAT) { m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)* fabs(C_T(cell,liq)-T_SAT)/T_SAT; } if ((m_lg == 0. ) && (C_T(cell, gas) <= T_SAT)) { m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)* fabs(T_SAT-C_T(cell,gas))/T_SAT; } } koniec: { masa=m_lg; return (masa); } }

In this udf the problem is the water doesnt want to boil. If we had some other udf (I have it somewhere) water boils but with the rest of solution. that is my proble thank you
  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
Modelling Biomass Combustion via Species Transport Racheal FLUENT 34 November 8, 2017 03:21
Get direct access to a particle gruber OpenFOAM 3 November 3, 2009 06:26
How to access species molecular weight in UDFs Ellen FLUENT 2 March 13, 2009 12:17
Species order fluent Raddi FLUENT 1 March 13, 2009 01:21
mass fraction of species Ahmed FLUENT 0 April 18, 2007 11:57

All times are GMT -4. The time now is 17:42.