CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   GETVAR SUBROUTINE for additional variable in CFX (https://www.cfd-online.com/Forums/main/10229-getvar-subroutine-additional-variable-cfx.html)

Tuks November 8, 2005 06:13

GETVAR SUBROUTINE for additional variable in CFX
 
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


All times are GMT -4. The time now is 03:25.