Format of INCON and SAVE file
Hi, I am trying to capture the block status (perm, poro, pressure etc). In the previous TOUGH2 or TOUGHREACT, the INCON or SAVE file could contain the perm, porosity, and pressure, temp in the standart output. In the TOUGH3, I found I have to define the mop(13) = 1, " writes user-specified initial conditions to file SAVE".
I have a question, how can I change the setting to allow TOUGH3 to export perm, porosity in the INCON and SAVE file?
When we put mop(3)=1, how does the model copy heterogeneous element wise information to SAVE file? I have attached a sample SAVE file here, but the first row contains 4 numbers, porosity (0.2), I do not know what is the -1. I presume the rest three numbers should be perm(3).
Thank you very much for your kind help. I really appreciate it.
18 replies
-
Not sure whether it's possible to export individual permeabilities to SAVE/INCON. If I remember correctly, MOP(13)=1 only exports to SAVE file user defined permeabilities i.e. only if your INCON file has custom permeability modifiers.
Otherwise, you can ask TOUGH3 to output specific variables using the new block OUTPU. The sample block below should output in file OUTPUT_ELEME.csv the porosity and absolute permeabilities for every elements in your mesh at desired time steps:
OUTPU----1----*----2----*----3----*----4----*----5----*----6----*----7----*----8 5 COORDINATE POROSITY ABSOLUTE 1 ABSOLUTE 2 ABSOLUTE 3
-
It seems from the description of the Users Guide, USRX(1) = -1 means permeability multiplier is 1, which means it uses the permeability defined in rock block. If USRX(2) and USRX(3) are not defined, I guess there are two possiblitiies: 1. they are taking the values defined in rock block, 2 they are taking both the values and multiplier of USRX(1) for this element. I am not sure which one it is. But you can do a simple two element test problem and print out permeabilities as Keurfon instructed. Please let us know what you find out. Thank you
Yingqi
-
After seting the MOP(13)=1, I paste the poro, perm, and primary variables in the element order in the INFILE. The output INCON and SAVE file will display the same perm and poro info.
The only thing I am not positive is the USRX(1) = -1, I could not understand why make it equal to -1.
-
Hi,
USERX(1), USERX(2), and USERX(3) hold either element-by-element permeabilities or permeability modifiers related to ISOT=1, 2, and 3, respectively. If the value is negative e.g., USERX(1)=-2.5, then it is interpreted as a modifier, i.e., the permeability in the corresponding element is given by
Perm(1)=|-2.5|*PER(NMAT,1)
where PER(NMAT,1) is the material-specific permeability in block ROCKS. If the value is positive, e.g., USERX(1)=3e-12, it is interpreted as the permeability itself:
Perm(1)=3E-12
Note that in TOUGH2, PMX is always positive, and always interpreted as a modifier.
In iTOUGH2, the scheme above is used, but iTOUGH2 automatically interprets large values (e.g., 2.5) as a modifier (i.e., internally stores it as -2.5). Not sure whether this last feature has been implemented in TOUGH3.
I would not change this scheme! If you have modifiers, just provide them as negative numbers. If you have permeabilities themselves, provide them as positive numbers. Note that USERX(4) is interpreted as a modifier for the air-entry pressure, so changing the scheme would probably lead to unwanted results.
I know this is all confusing - hope somebody can look into what TOUGH3 actually does.
Stefan
-
TOUGH3 implements both the TOUGH2 method and the iTOUGH2 method for element-by-element permeability. If the material SEED is present in the ROCKS block, then the TOUGH2 method is used. If not, the iTOUGH2 method is used. However, whether or not SEED is present, a value of USERX(1)>1E-4 will be treated as a modifier and a positive value of USERX(1)<=1E-4 will be treated as an absolute permeability.
So watch out! I was using SEED and I thought my modifier 1E-7 made permeability really small, but TOUGH3 thought it was an absolute permeability of 1E-7 m2, which is huge! I think the safest thing to do is to not use SEED, and input modifiers as negative values, as Stefan recommends.
See the TOUGH3 manual entry for parameter PMX in the ELEME block, a note on SEED in the ROCKS block, and a note in Appendix D, for more information on this topic. However, I think some of the writing is a little unclear on whether it applies to the SEED or NO SEED case. Hopefully, when we write the next version of the User's guide, it will be improved. If there is interest, I could write up a summary of my experience studying element-by-element permeability and post it.
-
Yep, I think this is one of the most confusing aspects of preparing TOUGH3 input.
Please read through the TOUGH3 User’s Guide carefully. There are several ways to get anisotropy and heterogeneity in your model. You need to understand what is described in the ROCKS block (PER1, PER2, PER3, SEED), the ELEME block (PMX, USERX(1,2,3), the CONNE block (ISOT), and the INCON block(USERX(1,2,3), and MOP2(20). I will describe a few common scenarios. If none of these apply to you, you can let me know specifically what you want.
If you just want anisotropic permeability (different permeability in different directions), but not element-by-element permeability (local heterogeneity), then use the PER1, PER2, PER3 entries in the ROCKS block to specify three different permeabilities, where PER1 is used for a connection with ISOT=1, PER2 is used for a connection with ISOT=2, and PER3 is used for a connection with ISOT=3, and the ISOT values are read in the CONNE block. Leave PMX in the ELEME block blank, leave USERX(1,2,3) blank in INCON and ELEME. Do not have a material SEED in the ROCKS block. The most common way anisotropy is used is when you want vertical permeability to be less than horizontal permeability, and you set up your mesh so that ISOT=3 represents vertical connections, then set PER3 less than PER1 and PER2.
You can have overall anisotropy with PER1, PER2, PER3 and local heterogeneity with PMX. PMX is a scalar multiplier, but it is applied to PER1, PER2, PER3, so you end up with an anisotropic, heterogeneous permeability field.
Alternatively, you can leave PMX blank and use MOP2(20) and USERX(1,2,3) to modify permeability in each direction differently, if you need that functionality. I never thought I would need it, but one example I can imagine is if most of your model has PER3=0.5*PER1 for moderate vertical/horizontal anisotropy, but for some elements USERX(3)=0.01*USERX(1) for extreme anisotropy.
You should set up a simple test problem to practice with these options. You can have two elements with one connection between them. Make both elements huge (VOL=1E30) so their properties won’t change. Assign different pressures with INCON, run one time step, and check the flow rate between the elements. First, vary PER1, PER2, PER3 and the ISOT value of the connection to make sure you understand how that works. Flow rate should be directly proportional to permeability. Add PMX in the ELEME block or USERX(1,2,3) in ELEME or INCON and make sure flow rate changes how you expect. When I vary permeability or modifiers, I use simple changes like a factor of 2 or 10, so I can see change in flow rate easily.
WARNING: There was a bug in the original TOUGH3 release, which made element-by-element permeability modification not work. So you need to make sure you are using the corrected TOUGH3 executable.
If you have the source code, check file MULTI.f90. Near line 598 make sure the line just before “CALL HETERO” is USRX = USERX(ISO, nexidx(i)). Note that anything after an exclamation point is a comment and is not actually used as code. Uppercase/lowercase does not matter, but everything else does. If you need to modify your code, see the TOUGH3 Forum article “Questions about TOUGH3 setup for 3D random permeability fields” posted about 6 months ago, for instructions on how to do so. Or request a corrected source code from Yingqi Zhang (YQZhang@lbl.gov).
If you just have the executable, use your simple test problem to verify that you have the corrected code. If you see the same flow rate for cases with and without USERX(1,2,3), or if flow rate does not change in direct proportion to a permeability change, then you have the bug, and you should request a new executable from Yingqi.
Good luck, and feel free to contact me directly at CADoughty@lbl.gov if you want more specific advice. Christine