CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

direct access to species

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2006, 23:43
Default direct access to species
  #1
greg
Guest
 
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, 12:01
Default Re: direct access to species
  #2
greg
Guest
 
Posts: n/a
so it is impossible?? .....it`s too bad. Even gurus don`t know???
  Reply With Quote

Old   July 12, 2006, 13:20
Default Re: direct access to species
  #3
ag
Guest
 
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, 05:37
Default Re: direct access to species
  #4
greg
Guest
 
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

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
Modelling Biomass Combustion via Species Transport Racheal FLUENT 39 January 8, 2022 08:42
How to access species molecular weight in UDFs Ellen FLUENT 3 June 2, 2019 20:55
Get direct access to a particle gruber OpenFOAM 3 November 3, 2009 06:26
Species order fluent Raddi FLUENT 1 March 13, 2009 01:21
mass fraction of species Ahmed FLUENT 0 April 18, 2007 12:57


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