|November 8, 2005, 03:09||
user SUBROUTINE for additional variables
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.
|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|