0

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.

13replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • 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
    
    Like
      • Flybear
      • Flybear
      • 1 yr ago
      • Reported - view

      Keurfon Luu 

      Hi, Keurfon,

       

      Thanks for your reply. It will be acceptable if I could catch the perm output from the SAVE file. 

      I read the tough3 manual, I set the mop(13) = 1, I do not understand one setting USRX(I) I=1,5 .  I could only guess part of USRX information will be: permeability modifier, perm(x), y , z ? But this setting has 5 entries. Can you please let me know what are the require information for USRX?  

      I think it might be more easier to assign heterogeneous perm distribution, rather than using mop2 and USERX ?

      Thanks

      Q

      Like
    • Flybear USERX(1), USERX(2) and USERX(3) hold the elementwise permeability modifiers (absolute permeability if positive, multiplier if negative). I can see in TOUGH3 user guide that USERX(4) is used in the modified van Genuchten capillarity model (ICP=11). No mention to USERX(5) which probably means that it can be used for custom models.

      Elementwise heterogeneous permeability distributions can be assigned through USERX(1:3) which can be defined either in columns 80-110 of block ELEME (MOP2(20)) or in columns 30-60 of block INCON. I don't know a better way to do that. These values seem to be only written to SAVE (MOP(13) = 1) if they are initially defined by the user.

      Like
      • Flybear
      • Flybear
      • 1 yr ago
      • Reported - view

      Keurfon Luu  

      Hi, Keurfon, Thanks for clarifying this setting.  I looked at this manual,  the USERX (1-3) you mentioned is defined in the ELEME, which has three colomns.  

      However, the parameter USRX is defined in the INCON section, with 5 colomns of entries.  In my SAVE file attached, the USRX(1) = -1. Is it a default perm modifier? Do you know what are the setting for USRX(2-5)? 

      Thank you very much for your help.

      Like
    • Flybear USRX and USERX refer to the same input. It's probably a typo in the documentation. In the source code, USERX defined in ELEME will be read in USERX(1:3) array if MOP2(20) is set, otherwise, USERX(1:3) are read from INCON.

      - USERX(1:3): anisotropic permeability modifiers, absolute permeability if positive, multipliers if negative (-1 means that the absolute permeability of a given element is the absolute permeability of its material in block ROCKS),

      - USERX(4): CP(2) parameter of capillary pressure function ICP=11,

      - USERX(5): void (which means that it is free to use for user defined models, for instance).

      Like
  • 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

    Like
      • Flybear
      • Flybear
      • 1 yr ago
      • Reported - view

      Yingqi Zhang Keurfon Luu

      Hi, Dear Yingqi, Keurfon, Thanks for your keen help in my trouble. I have spent a few days in the code. Finally, it works.  

      If the intepretation on USRX(1)=-1 is multiplier is 1, it will take absoulte perm values in the element wise.  We can set the perm x, y, z, into USRX (2-4), and leave the USRX(5) = 0, and set the MOP(13) =1.  The model could work and display the magnitude of perm in the INCON and SAVE file. I hope this is the correct way to define the initial heterogeneous perm in TOUGH3. 

      Like
    • Flybear It shouldn't work. As I said previously, USRX(4) is only used in the capillary pressure function ICP=11 and has nothing to do with the permeability.

      Element-by-element permeability should be set in USRX(1:3). How the values modify the permeability of a given element depends on its sign (positive: absolute permeability, negative: multiplier).

      Like
  •  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. 

    Like
  • 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

    Like
  • 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.

    Like
      • Flybear
      • Flybear
      • 1 yr ago
      • Reported - view

      Christine Doughty  Hi, Christine, I am a bit confused on setting anisotropy perm. I set the ISOT = 3, ( realized this does not means the three dimensional perm setting?), and then can we leave PMX blank, while defining three sets of values at USERX(1, 2, 3) to represent three directional absolute permeability? In my model results, this pressure results returns very homogenous radial distribution. So maybe this is not correct.

      I am reluctant to use PMX setting, as it is a single scalar. If I am wrong, can you introduce how you define heterogenity in perm in TOUGH3? Thank you.

      Like
  • 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

    Like
Like Follow
  • 1 yr agoLast active
  • 13Replies
  • 143Views
  • 5 Following