0

Defining multiple time dependent sources in GENER block

Dear all,

            I am attempting a methane migration problem in TOUGH3 EOS7CA, and I need to define multiple time dependent sources in the GENER block.

            From the descriptions given in the manual, it was understood that we can input the number of additional elements (as similar sources) and the increment in the code name of the element through NSEQ and NADD.

            For the meshing done, the default element names for the intended sources are AC1 1, AD1 1, AE1 1...... AL1 1. Since the difference (/ increment) here happens in the EL format and not in the NE, how can I define the NADD for the elements mentioned above?

Can someone help me in this regard?

23 replies

null
    • Finsterle GeoConsulting
    • Stefan_Finsterle
    • 4 yrs ago
    • Reported - view

    Very quick answer:

    You cannot automatically generate element/source-code names in the EL portion of the element name; it only works for the integer section (i.e., NE) of the element name. Just copy the sources, or regenerate the mesh (e.g., rotated by 90 degrees), or (depending on the problem), inject into a single dummy element that is connected to all the source element, or ...

      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Stefan Finsterle 

      Thank you Stefan..!! You helped me once again..!

      Just out of curiosity, why am I not being able to just list multiple time-dependent sources in the GENER block?

      Something like the one below...
       

      GENER----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
      AC1 1CH4                     5     COM3   6.41E-101.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AD1 1CH4                           COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AE1 1CH4                           COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AF1 1CH4                           COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      
      
      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Stefan Finsterle

      Sir,

      Kindly ignore the errors in the format of the above excerpt.

      Just wanted to know about listing the time dependent sources only.

      Like

      GENER----*----1----*----2----*----3----*----4----*----5----*----6----*----7----*----8
      AC1 1CH4
                                  Time
                                  Generation rates
      AD1 1CH4
                                  Time
                                  Generation rates
      AE1 1CH4
                                  Time
                                  Generation rates

      • Mikey_Hannon
      • 4 yrs ago
      • Reported - view

      Parameswaran T G 

      Currently, you're labeling all of your sources "CH4."  You should given each one its own label.  Something like this...

      GENER----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
      AC1 1CH4C                    5     COM3   6.41E-101.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AD1 1CH4D                          COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AE1 1CH4E                          COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      AF1 1CH4F                          COM3           1.2520E+04
                   0       4320000       8640000      12960000      17280000
            6.41E-10      2.56E-09      7.69E-09      8.98E-09      8.34E-09
      

      I'm not entirely sure this will address your issue, but give it a shot!

      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Mikey Hannon 

      Thank you Sir.. I'll definitely try this out. Thanks a lot..!! 

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • 4 yrs ago
      • Reported - view

      Parameswaran T G 

       

      Moreover, the format of source code names should be AAAII (see manual p. 174), so use something like:

      CH4 1

      CH4 2

      ...

      instead of:

      CH4A

      CH4B

      ...

      Stefan

      • Mikey_Hannon
      • 4 yrs ago
      • Reported - view

      Whoops!  Thanks Stefan Finsterle!

      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Stefan Finsterle 

      Thank you, Sir... Thanks a lott..!!!

    • Amol_Misal
    • 4 yrs ago
    • Reported - view

    Hi All and  Mikey Hannon

    What will happen if same source/sink name is given? Will it gets override with latest entry in GENER? Or will it consider all entries of same source/sink name?

    Thanks,

    Amol

    • Parameswaran_T_G
    • 4 yrs ago
    • Reported - view

    Stefan Finsterle

    Is it not possible in TOUGH3 EOS7CA to enter multiple elements of same constant methane generation rate with NSEQ and NADD?

    Something like

    GENER----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
    A31 1CH4     49    1               COM3  1.160E-041.2520E+04

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • 4 yrs ago
      • Reported - view

      Parameswaran T G 

       

      Please check the manual and set NADS. Then run again and inform your colleagues on the Forum if it works, and in case it does not work, please document your findings so everybody can look into it.

      Thanks,

      Stefan

    • Parameswaran_T_G
    • 4 yrs ago
    • Reported - view

    Already tried that.

    Gave values for NADS, tried without specifying, kept LTAB 0/1, Tried without entering any of them, etc.

    Every time, this is what is shown in the command prompt-

    “forrt1: severe (408): fort: (2) Subscript #1 of the array F1 has value 1 which is greater than the upper bound of -1.”

    The funny part is, this multiple source entering runs smoothly when I enter time-dependent methane generation rates.

    • Finsterle GeoConsulting
    • Stefan_Finsterle
    • 4 yrs ago
    • Reported - view

    Thanks for revealing the error message (this always helps narrowing down the issue)! I'm stumped by the "funny part". Something goes wrong with dynamic array allocation (which should not be related at all to which component is later used for injection). Please attach your input file, so somebody from the TOUGH3 support team can have a look at it.

    Stefan

    • Parameswaran_T_G
    • 4 yrs ago
    • Reported - view

    This is the input file that I used.

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • 4 yrs ago
      • Reported - view

      Parameswaran T G 

      Unfortunately, I do not have TOUGH3, but your problems runs just fine (i.e., using all 50 sources) using iTOUGH2, after I set MOP2(17)=0 (what does MOP2(17)=1 mean in TOUGH3?).

       

      Here's an excerpt from the output file:

      1         methane gas migration through landfill cover.

      KCYC =  100  -  ITER =    2  -  TIME =0.852470E+05
       ELEMENT SOURCE INDEX      GENERATION RATE     ENTHALPY    FF(GAS)      FF(LIQ.)      P(WB)
                                   (KG/S) OR (W)     (J/KG)                                 (PA)

        A3101   CH400    1          0.116000E-03   0.125200E+05
        A3102   CH401    2          0.116000E-03   0.125200E+05
        A3103   CH402    3          0.116000E-03   0.125200E+05
        A3104   CH403    4          0.116000E-03   0.125200E+05
        A3105   CH404    5          0.116000E-03   0.125200E+05
        A3106   CH405    6          0.116000E-03   0.125200E+05
        A3107   CH406    7          0.116000E-03   0.125200E+05
        A3108   CH407    8          0.116000E-03   0.125200E+05
        A3109   CH408    9          0.116000E-03   0.125200E+05
        A3110   CH409   10          0.116000E-03   0.125200E+05
        A3111   CH410   11          0.116000E-03   0.125200E+05
        A3112   CH411   12          0.116000E-03   0.125200E+05
        A3113   CH412   13          0.116000E-03   0.125200E+05
        A3114   CH413   14          0.116000E-03   0.125200E+05
        A3115   CH414   15          0.116000E-03   0.125200E+05
        A3116   CH415   16          0.116000E-03   0.125200E+05
        A3117   CH416   17          0.116000E-03   0.125200E+05
        A3118   CH417   18          0.116000E-03   0.125200E+05
        A3119   CH418   19          0.116000E-03   0.125200E+05
        A3120   CH419   20          0.116000E-03   0.125200E+05
        A3121   CH420   21          0.116000E-03   0.125200E+05
        A3122   CH421   22          0.116000E-03   0.125200E+05
        A3123   CH422   23          0.116000E-03   0.125200E+05
        A3124   CH423   24          0.116000E-03   0.125200E+05
        A3125   CH424   25          0.116000E-03   0.125200E+05
        A3126   CH425   26          0.116000E-03   0.125200E+05
        A3127   CH426   27          0.116000E-03   0.125200E+05
        A3128   CH427   28          0.116000E-03   0.125200E+05
        A3129   CH428   29          0.116000E-03   0.125200E+05
        A3130   CH429   30          0.116000E-03   0.125200E+05
        A3131   CH430   31          0.116000E-03   0.125200E+05
        A3132   CH431   32          0.116000E-03   0.125200E+05
        A3133   CH432   33          0.116000E-03   0.125200E+05
        A3134   CH433   34          0.116000E-03   0.125200E+05
        A3135   CH434   35          0.116000E-03   0.125200E+05
        A3136   CH435   36          0.116000E-03   0.125200E+05
        A3137   CH436   37          0.116000E-03   0.125200E+05
        A3138   CH437   38          0.116000E-03   0.125200E+05
        A3139   CH438   39          0.116000E-03   0.125200E+05
        A3140   CH439   40          0.116000E-03   0.125200E+05
        A3141   CH440   41          0.116000E-03   0.125200E+05
        A3142   CH441   42          0.116000E-03   0.125200E+05
        A3143   CH442   43          0.116000E-03   0.125200E+05
        A3144   CH443   44          0.116000E-03   0.125200E+05
        A3145   CH444   45          0.116000E-03   0.125200E+05
        A3146   CH445   46          0.116000E-03   0.125200E+05
        A3147   CH446   47          0.116000E-03   0.125200E+05
        A3148   CH447   48          0.116000E-03   0.125200E+05
        A3149   CH448   49          0.116000E-03   0.125200E+05
        A3150   CH449   50          0.116000E-03   0.125200E+05

      Just in case you want to move on: Did you ever try the obvious solution, i.e., simply copy your GENER line 50 times, then update the names by hand and see what happens? Should take you less than a minute. 

      I hope somebody tries it with TOUGH3.

      Good luck.

      Stefan

      • yqzhang
      • 4 yrs ago
      • Reported - view

      Parameswaran T G It is a bug in the code. As it requires some effort to fix it, please enter all rates needed for now. Once I fix the bug I will let you know.

      Thanks

      Yingqi

    • yqzhang
    • 4 yrs ago
    • Reported - view

    I will take a look and get back to you.

    Yingqi

    • Parameswaran_T_G
    • 4 yrs ago
    • Reported - view

    Stefan Finsterle

    I had already tried with copying 50 elements, that runs fine.

    In my actual problem, there are 1500 source elements which were why I wanted to use NSEQ and NADD. When I found out that the problem was with the GENER block, from the outputs, I just tried with a single element using NADD and NSEQ.

    If MOP2 (17)>0, FOFT prints the variables according to the input data in block OUTPU. I tried by keeping MOP2 (17) = 0. Then also I get the same error.

    It might be some bug as suggested. Let us see...

    Thank you for your help Sir..!!

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • 4 yrs ago
      • Reported - view

      Parameswaran T G 

      Boiling the problem down from 1500 to 50 and showing us the error message is the best way to resolve a problem and help improve the code - thanks for this!

      Yingqi seems to have found the problem, and I trust she will resolve it. I cannot help any further as I don't have TOUGH3. 

      Just one more suggestion. In case you also have TOUGH2 or iTOUGH2 or TOUGHREACT or TOUGH+, run your input file with 1500 sources and for a single time step (or with ENDFI) and you will get an expanded GENER file which you can then use with TOUGH3.

      Good luck!

      Stefan

      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Stefan Finsterle 
      Thank you.. Will do that...

    • yqzhang
    • 4 yrs ago
    • Reported - view

    Parameswaran T G ,

     

    Did you purchase the TOUGH3 source code? If you did, please go to the file "Input_output.f90", around line 917 (your line number may not be exactly the same as mine, as I made some minor edits. But look for "!-----END OF SINK/SOURCE DATA".  About 11 lines before, add an "if" statement outside the three write statements, as indicated by ! +++ below as the end of the line:

                        WRITE(3,CFGENOUT)  CELEM(:IELL),SL,N2,LTAB,TYPE4,ITAB,GX,EX,HX   
                        if (LTAB.gt.1) then                                             ! +++
                           WRITE(3,36) (F1(L)*GTFACT,L=1,LTABA)                                
                           WRITE(3,36) (F2(L)*GRFACT,L=1,LTABA)
                           IF (ITAB.NE.' ') WRITE(3,36) (F3(L),L=1,LTABA)
                        endif                                                                     ! +++
                    ENDDO
                ENDIF
            ENDIF
          ENDDO
          if (allocated(F1)) deallocate(F1,F2,F3)
          ! Return to reading keywords
          GOTO 5019
    !
    !-----END OF SINK/SOURCE DATA.-----------------------------------------

     

    If you had purchased the source code, send me an email (yqzhang@lbl.gov) and i will send you a pc executable. Thank you.

     

    Yingqi

      • Parameswaran_T_G
      • 4 yrs ago
      • Reported - view

      Yingqi Zhang 

      We had purchased the PC executables only... Is there anything I can do with that?

    • yqzhang
    • 4 yrs ago
    • Reported - view

    Please send me an email so I will send you the new executable.

    Thanks

    Yingqi

Content aside

  • 4 yrs agoLast active
  • 23Replies
  • 239Views
  • 6 Following