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

user SUBROUTINE for additional variables

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 8, 2005, 03:09
Default user SUBROUTINE for additional variables
  #1
Tuks
Guest
 
Posts: n/a
Hi all,

First i am sorry for long mail but can't help. I am solving the mass transfer of species from liquid to gas. But in simulation we are not considering the gas phase, only single phase(liquid domain) is considered. The liq-gas interface is replaced by freeslip wall with mass flux for species mass transfer.

To calculate the change in partial pressures in gas phase, we use partial pressures as ALGEBRAIC additional variables(AdVs). These additional variables change with time and also affect the liquid conc of species.

I want to write SUBROUTINE which follows as given,

- Extract the liq conc of each species, additional variables(AdVs) over each control volume(CV), at previous timestep.

- Calculate the species mass transfer, from each CV, using the liquid conc and AdV(partial pressure), both known at previous timestep.

- Calculate the total species mass transfer from liquid domain, by integrating over domain.

- Calculate the total gas transfer by adding total mass transfer of each species.

- Calculate the change in AdV(partial pressure) with respect to time (time derivative of AdV) using liq conc, AdV, total mass transfer of species, total gas transfer.

- The calculated AdV using this time derivative at present timestep and value of AdV at previous timestep.

- Return the values of total mass transfer of each species, total gas transfer and AdV's (partial pressures of species) to solver.

I had gone through USER GETVAR but not able to fix the problem. Can somebody help me out? It will be better If somebody have already written such type SUBROUTINE (for timederivative).

Is use of partial pressures as ALGEBRAIC additional variables correct?

Waiting for reply, specially from experts.

Thanks in advance.

Tuks
  Reply With Quote

Reply

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
Effect of temp variables in subroutine CF Main CFD Forum 2 April 20, 2008 10:13
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
User Subroutine Garryx CD-adapco 1 June 25, 2005 00:13
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00
Saving variables on a user patch with physical coordinates Zoltan Turzo CFX 2 April 20, 2000 15:05


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