Porosity, Permeability and Capillary Pressure Modification Block by Block
Hi All,
I've read in TOUGH2 manual about how to change permeability and capillary pressure of each element using PMX column in element block. But I find some problem when I need to change permeability and capillary pressure use different parameter (not PMX). In TOUGH - FLAC3D coupling (Rutqvist, 2002) showed that permeability and capillary pressure isn't calculated by same scale parameter, called PMX (correct me if I'm wrong). How to manage it in TOUGH2 input file??
Next question is, if I need to change porosity of each block (element), should I put the porosity value in INCON block (column PORX) of TOUGH2 input file? is it right?
Thank you very much in advance,,
I'm sorry my english isn't good :)
7 replies
-
Suhendi,
In TOUGH2, PMX is a permeability modifier, i.e., the permeability of a given gridblock is the reference permeability as specified in Block ROCKS multiplied by PMX as specified in Block ELEME.
However, the capillarity is not multiplied by "the same scale parameter"; instead, Leverett scaling is applied (see description of PMX in Appendix E).
If you want to use a different correlation between permeability and capillary pressure (i.e., not Leverett scaling), you can easily implement this near Line 4150 of file t2fm.f, which reads:
107 IF(PM(N).NE.0.) PAR(NLM2P+6)=PAR(NLM2P+6)/SQRT(PM(N))
If you do not want to have permeability and capillary related in any functional (i.e., deterministic) way, you would have to read in a new variable (the "Pcap modifier") and then simply assign it to PAR(NLM2P+6), again on Line 4150.
Yes, element-specific porosities have to be provided in block INCON.
Hope this helps.
Stefan
-
Hi Stefan,
Thank you very much for the answers, it helps me so much. I'll try to make new column, called Pcapmodifier (as you suggested) in ELEME block of TOUGH2 input file, so the ELEME block will be:
ELEME----1----*----2----*----3----*----4----*----5----*----6----*----7----*----8----*----9
in column 8----*----9 I'll put the Pcapmodifier value and assign it to PAR(NLM2P+6) on line 4150. But I'm afraid it will effect to other code. Please inform me whether that idea would take effect (error or bug) to other code or subroutine.
Thank you very much in advance,
Suhendi
-
Suhendi,
You will find out immediately once you start implementing it (or reading the manual!). You will see that in the standard version of TOUGH2, no input is read in Columns 81-90, so your choice is fine.
Good luck!
Stefan
-
Hi Stefan,
I have already added new column (column 81-90) in ELEME Block of TOUGH2 input file to put pcapmodifier. And then, i added new variable in t2fm.f line 1945, named CASPC, being
READ(IM,1499) DENT,MA1,MA2,EVOLX,AHTX,PMX,XX,YY,ZZ,CASPC
and I assigned the value of CASPC to CSPC(N) in line 1964.
I also define the above variable in the same location as PM(N) and PM(1) defined.
After following the instruction of TOUGH2 and ECO2M read me file for compilation, I got the new xt2_eco2m.exe file. I tried to run a tough2 input file and then compare it with the result using previously xt2_eco2m.exe (before changing the t2f.f and t2fm.f). But, the result of a new one is the following error :
"At line 1945 of file t2fm.f (unit = 4, file = 'MESH')
Fortran runtime error: End of file"And in the tough2 output file there are lines :
"WWWWW WARNING WWWWW: ELEMENT *CONNE* HAS NO DOMAIN ASSIGNMENT; ASSIGN TO DOMAIN # 1, *Upper*"
its refer to the following script of t2fm.f file
" IF(MATX(N).NE.0) GOTO 1498
C COME HERE FOR ELEMENTS WITHOUT DOMAIN ASSIGNMENT, AND ASSIGN
C THEM TO DOMAIN # 1.
MATX(N)=1
PRINT 1497,ELEM(N),MAT(1)
1497 FORMAT(' WWWWW WARNING WWWWW:',
X' ELEMENT *',A5,'* HAS NO DOMAIN ASSIGNMENT; ASSIGN TO',
X' DOMAIN # 1, *',A5,'*') "I am new in fortran language programming. I am afraid I have miss something. May be you have some clue according to this problem. I really appreciates any kind of help. Thank you very much in advance,
Cahli
-
Hi Cahli,
Make sure you have an empty line before the CONNE block. A missing empty line is all I can suggest from the information you gave me.
Stefan
-
Dear Stefan,
I used the same TOUGH2 input file that run successfully use the previously xt2_eco2m.exe file and it have an empty line befor CONNE block. I want to add the updated t2fm.f file but I am afraid it's prohibited by license.
Firstly, I change t2f.f file related to instruction for linking to ECO2M mentioned in TOUGH2 readme file.
Secondly, I change t2fm.f file, I added column 81-90 in ELEME Block of TOUGH2 input file to put pcapmodifier, and here are the following script I added/changed to t2fm.f file:
Line 126 I added the following script: COMMON/CAS/CSPC(MNEL)
Line 1789 I added the following script : COMMON/CAS/CSPC(1)
Line 1945 I changed the script become :
READ(IM,1499) DENT,MA1,MA2,EVOLX,AHTX,PMX,XX,YY,ZZ,CASPC
*CASPC is a variable I add to this line.
Line 1964 I added the follwoing script : CSPC(N)=CASPC
Line 3686 I added the following script : COMMON/CAS/CSPC(1)
Line 4154 - 4155 I added the following script :
C 107 IF(PM(N).NE.0.) PAR(NLM2P+6)=PAR(NLM2P+6)/SQRT(PM(N))
107 IF(CSPC(N).NE.0.) PAR(NLM2P+6)=CSPC(N)And then I compiled to get a new xt2_eco2m.exe file and compilation process run successfully with some warning, like this:
"COMMON/CYC/KCYC,ITER,ITERC,TIMIN,SUMTIM,GF,TIMOUT
1
Warning: Padding of 4 bytes required before ‘timin’ in COMMON ‘cyc’ at (1); reorder elements or use -fno-align-commons
t2fm.f:2974:17:"But the xt2_eco2m.exe is created. And then, I used these new xt2_eco2m.exe to run my model (using the previous xt2_eco2m.exe, this model run successfully). And using the new one, I got the following error :
"At line 1945 of file t2fm.f (unit = 4, file = 'MESH')
Fortran runtime error: End of file"And here is the line 1945:
READ(IM,1499) DENT,MA1,MA2,EVOLX,AHTX,PMX,XX,YY,ZZ,CASPC
Maybe you have an idea related to this error. Please find the attached input and output file of model I used to test the xt2_eco2m.exe. Thank you so much Stefan.
regards,
Cahli
-
Dear Stefan,
I want to inform you that the problem has solved. I forgot to change the FORMAT to be read and to be printed out.
before : FORMAT(A5,10X,A3,A2,2E10.4,4E10.4)
And then I changed to : FORMAT(A5,10X,A3,A2,2E10.4,5E10.4)
I'm sorry to trouble you. And thank you very much for the help.
regards,
Cahli