Flux question
I need to track the mass balance of water through a system and pull it out every step to transfer to a reaction modeling code. Can anyone tell me what array/indexing I can use to get the flux across a connection in the source code?
I'm using ECO2n and looking for the total fluid flux (aqueous water + dissolved salt + dissolved CO2).
Thanks
3 replies
-
Peter,
Try to use COFT (no need for a code modification). If you need to customize, check subroutine FGTAB under COFT in file eco2n.f for all relevant indices. In short, the total liquid flux is stored in array
flo(nnp+2)
where
nnp=(n-1)*nph
and
n is the connection index.
Hope this helps,
Stefan
PS: Alternative: use iTOUGH2, which makes extracting variables across connections or domain boundaries easy; or use TOUGHREACT, which does reactive transport modeling, so there is no need for data transfer between two codes.
-
Just briefly:
(1) Yes, what you see is the flow rate in kg/s (not flux in kg/s/m2), i.e., the same output as you see in the regular output file in the second output block (if you selected KDATA=2). The flow rate is always across the interface between two elements.; it's not the element volume that matters, but the interface area.
(2) If you want to print out flux instead of flow rate, go to subroutine FGTAB and divide the flow rate, variable FLO(), by the interface area, variable AREA(n).
Good luck!
Stefan