0

Error Message

Hello everyone,

I am getting an error message when I run my T2well-ECO2N file. The error message is: 

At line 210 of file t2f.f (unit = 5, file = 'stdin')
Fortran runtime error: Bad value during integer read

Error termination. Backtrace:

Could not print backtrace: libbacktrace could not find executable to open
#0  0xeefa20a
#1  0xee7ff51
#2  0xeda410b
#3  0xeef8d17
#4  0xef12f8c
#5  0xef12a83
#6  0xee6d4eb
#7  0x32c649ee
#8  0x32c9274e
#9  0x32c93634
#10  0x32c212ee
#11  0x32c21405
#12  0x9a737373
#13  0x9b97cc90
#14  0xffffffff

 

I read that it is related to formatting error. Can someone look into my input file (attached here). I can't see what I am missing. Thanks in advance.

 

Muhammad.

22 replies

null
    • Staff Scientist
    • Christine_Doughty
    • 8 mths ago
    • Reported - view

    On first glance at your input file, I think you need a blank line at the end of your COFT and FOFT blocks.

    A good general tip is to look at your output file and see how far the code got in processing your input file before it failed.  This will help you know where to look for errors in your input file.

      • Yogendra_Narayanan_Sures
      • 2 mths ago
      • Reported - view

       

      I encountered a similar error while running ECO2N. I looked into the output file, and I understand that the problem lies in ROCKS. However, I was unable to figure out where it is wrong. Your inputs will be much appreciated. I am attaching the input file and the error message for your reference. Thanks in advance.

      • Staff Scientist
      • Christine_Doughty
      • 2 mths ago
      • Reported - view

       

      There is a blank line in the ROCKS block that should not be there, between the line starting with 03 and the line starting with 12.  Try removing that line.  In general, when you are in a block, like the ROCKS block, TOUGH expects things in a certain order and format, and extra blank lines cause problems.  The ROCKS block should end with a blank line, and yours does that correctly.  In the input file, in between blocks, you can insert comment or blank lines as you like, but not within a block. 

      • Yogendra_Narayanan_Sures
      • 2 mths ago
      • Reported - view

       Thank You for your input. I have corrected the formatting errors to the best of my knowledge. However, I encountered an error which traces to ELEME. When I checked the working directory after the error message there was no MESHA and MESHB files generated. What could be the reason and how to rectify it. I am attaching the INFILE and Screenshot of error message for your reference. Your help would be much appreciated. Thanks in advance.

      • Staff Scientist
      • Christine_Doughty
      • 2 mths ago
      • Reported - view

      @Yogendra Narayanan Suresh Kumar

      When I try the infile you posted as INFILE (1) (I renamed it INFILE), TOUGH3 ran 343 steps to 118.9 seconds and quit with a convergence error because the pressure got too big and went out of range of the EOSS (0.6e8 Pa). There were no errors in INFILE, the pressure just got big because you are injecting CO2 into a finite model.

      If you have the executable in the same folder as your input file, be sure to run the command ./tough3-eco2n to get the local version of the executable and the local version of INFILE.

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

       Thank you for the reply. I am trying to simulate a laboratory-scale core flooding experiment and I came across this error. I also found that there was no change in saturation but as you mentioned there was an increase in pressure. How to rectify this such that there is a two phase flow and changes in saturation may be observed? Your inputs would be much appreciated. Thanks in advance

      • Staff Scientist
      • Christine_Doughty
      • 1 mth ago
      • Reported - view

       You are injecting CO2 at one end of your core, and I think you need to allow fluid to flow out of the other end of the core, to actually model a core-flooding experiment.  You could accomplish this by holding the pressure fixed at its initial value at element A11 1.  The simplest way to do that in TOUGH is to set the volume of element A11 1 to a huge value (say 1.E30 m3).  With this huge volume, any fluid that flows into element A11 1 "gets lost", and the pressure at element A11 1 does not change.  Then there will be a pressure gradient between the CO2 injection element A1112 and the constant-pressure element A11 1, and fluid (your initial water and injected CO2) will flow through the core.  You could also hold the pressure at element A11 1 fixed at some other value than the rest of the core starts at, by specifying it in the INCON block, if your core flooding experiment specified outlet pressure is held fixed at a certain value.  

      By varying the parameters of your relative permeability and capillary pressure curves, you should see different saturation conditions.  Note that the curves you are specifying in the ROCKS block (IRP=7, ICP=7) are not hysteretic, contradicting what your title line suggests.  I strongly recommend continuing with non-hysteretic curves until everything is working perfectly in your model.  Hysteresis adds a lot of complication, and in my opinion it should not be the first thing you try.

      • Yogendra_Narayanan_Sures
      • 1 mth ago
      • Reported - view

       Thank you for your quick response. I have tried to modify the Input file according to your suggestion. However, when I tried to run the simulation, the time step did not complete. I have attached the screenshot for your reference. I had a look at the FOFT excel file and the time to which the simulation has run is 366 seconds and there is a change in saturation at one of the gridblocks of my interest. I have attached the files for your reference. Is this an improvement from the previous attempt? How to overcome this convergence error. Your inputs will be much appreciated. Thanks in advance.

      • Staff Scientist
      • Christine_Doughty
      • 1 mth ago
      • Reported - view

       

      You asked the code to run 1000 time steps (PARAM block, first line, columns 5-8) and it did.  Then it ended normally. It reduced the time step twice (as you see in the message on the screen), but this is not an indication that the run failed.

      The main place to look for information on your run, besides the messages printed to the screen, is the file OUTPUT.  This shows that the simulation ended with no error message.  When you are a new TOUGH user, it is helpful to read through the entire OUTPUT file.  But I usually go to the bottom of the file and then search backwards for the string "OUTPUT DATA".  This gives you the state of things when the simulation ended.  Another tip is to start from the beginning of the OUTPUT file and search for the string " ST " repeatedly.  This will show you the time step progress.

      I tried increasing the number of time steps requested to 9999, but the simulation did not reach your requested end time of 86400 seconds.  Then I noticed that your maximum time step length is set to 3600, right-justified with no decimal point.  TOUGH interprets this as 0.36 seconds.  I changed this to 3600.0, and the simulation took 70 steps to reach 0.625 days, at which point it stopped because it recognized that nothing was changing in the model - that is, you had reached steady state. I think this makes sense physically.  I think your model is working properly. 

      Try adding the decimal point (make sure 3600.0 fits in the proper columns 31-40), and see if it works for you.

      • Yogendra_Narayanan_Sures
      • yesterday
      • Reported - view

       I verified with some cases in the literature for which I was able to get proper results. However, for preliminary understanding, when I was performing a parametric study by varying porosity and absolute permeability, I observed that with decrease in permeability for a particular porosity, the CO2 saturation tended to increase which is contrary to the expected trend. Is there any way to find if the Input file is correct/wrong in this regard? Your inputs will be much appreciated. Thanks in advance

      • Staff Scientist
      • Christine_Doughty
      • yesterday
      • Reported - view

        In general, I expect that when permeability is decreased for a constant mass injection rate problem, pressure will increase, CO2 density will increase, and you would therefore expect gas saturation to decrease, since denser CO2 takes up less room.  I checked your problem by cutting permeability by a factor of 10, and I was surprised to see gas saturation increase, just as you found.  I don't know why this is occurring, but there are other things that change when pressure increases, such as the interplay between imposed pressure gradient and capillary pressure, the amount of water that evaporates into the co2 phase, and the amount of co2 that dissolves into the aqueous phase.  You can turn off capillary pressure by changing ICP=7 to ICP=8.  Note that for your problem, density difference for a factor of 10 or 100 change in permeability is very small.  I tweaked your problem by increasing overall pressure and decreasing permeability so a big pressure gradient and a big density difference occurred (basically I converted from gas-phase CO2 to supercritical CO2, where I have more experience).  Even then, gas saturation was not smaller for lower permeability.  I do not know why this is.  It looks like more water is evaporating into the gas phase at lower permeability, which could increase gas saturation, but the effect seems too small.  If someone else reading this post has any ideas, I would like to hear them.

      When you get counter-intuitive results from TOUGH, it is good to vary different parameters to see if you understand the changes you get.  Remember that with multi-phase, multi-component flow there are coupled non-linear processes at play, and you might not have good intuition about how they interact.  Your problem is good for testing because it is a simple 1D column.  Sorry I cannot be more help.

      • Yogendra_Narayanan_Sures
      • yesterday
      • Reported - view

       Thank you for the prompt reply. One more observation I came across is that when I decreased porosity (30% to 15%) by keeping permeability constant, I was surprised to find that the gas saturation at the end of the time remained same. Any thoughts on this?

      • Yogendra_Narayanan_Sures
      • yesterday
      • Reported - view

      Greetings for the day! It would be helpful to get your insights on the above discussion. The input file and the explanation given by Ms. Doughty above are for your reference. Is there any way to find if the Input file is correct/wrong in this regard? Your inputs will be much appreciated. Thank you in advance

      • Staff Scientist
      • Christine_Doughty
      • yesterday
      • Reported - view

       That makes sense to me.  Changing porosity generally just changes the time scale on which flow processes occur.  So if you are just looking at steady state results, then I am not surprised that you get the same gas saturation for different porosities. 

      • Yogendra_Narayanan_Sures
      • yesterday
      • Reported - view

       One more thing was I tried to increase the injection rate and was able to observe the increase in saturation as expected. However, I am unable to comprehend the observations related to permeability. Is there any way I can eliminate the evaporation of brine into CO2 to make it less complicated? And can relative permeability curves give some insights regarding this?

      • Staff Scientist
      • Christine_Doughty
      • yesterday
      • Reported - view

       The only way I know how to do that is to co-inject water vapor with the CO2, so the gas phase that forms is already saturated with water vapor, so no evaporation of in-place water occurs.  Note that the amount to co-inject will depend on the pressure conditions.

      • Yogendra_Narayanan_Sures
      • yesterday
      • Reported - view

       Regarding the observations related to variations of gas saturation with permeabilities, Can the relative permeability curves give some insights?

      • Staff Scientist
      • Christine_Doughty
      • yesterday
      • Reported - view

        Definitely.  You can try changing the various parameters and see what effect it has.  See the TOUGH user's guide for a description of what the different parameters are.  For IRP=7, the two that seem most important to me are RP(1)=m and RP(2)=Slr. If you set RP(4)=0, you should get very different results, because there is a flag that says if RP(4)=0, use krg=1-krl.  Even though they are not very realistic physically, you might want to try linear relative permeability (IRP=1) just because it simplifies the problem.

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • yesterday
      • Reported - view

      I throw in my two (contradicting) cents:

      (1) If you inject CO2 at a constant rate (not constant pressure!), the saturation in the pore space will stabilize at a value for which the effective hydraulic conductivity (i.e., product of saturated conductivity and relative permeability) is equal to the flow rate (near the well or in a 1D system, it will be equal to the injection rate). This means that if you reduce permeability, gas saturation has to go up (not down). So what TOUGH2 gives you is exactly what you should expect. 

      (2)  For the same reason, changing porosity should not have and (and has no) impact on the saturation for a given injection rate; again, TOUGH2 gives the physically correct answer.

      (3) Again for the same reason, changing parameters of the relative permeability curves will indeed lead to a change in saturation (just evaluate the two gas relative permeability curves at the two saturations you have in either case, and you will see that krg1(Sg=Sg1) = krg2(Sg=Sg2). (Small deviations may be expected, e.g., because of density changes as pressures change, as Chris noted, but they are small and can be accounted for by looking at conductivity rather than permeability).

      (4) I have not looked at your input files, but I suspect the issue is not related to your input file, but your expectations. 

      (5) Make sure the cases you look at in the literature that "verified" your expectations are for the case you are actually simulating.

      Cheers,

      Stefan

      PS: This problem is equivalent to the that of water percolation in the unsaturated zone...

      • Staff Scientist
      • Christine_Doughty
      • 23 hrs ago
      • Reported - view

       Thanks for an elegant explanation.  I guess after all these years, I am still biased to  think in terms of liquid-saturated systems. I agree with you that gas saturation will increase or decrease as needed to produce the effective conductivity and capillary pressure that the overall system demands. 

      But I think your answer is incomplete.  What about the pressure gradient?  Flow rate in a 1D system with a constant-rate mass source at one end and a constant-pressure boundary at the other end should be equal to effective hydraulic conductivity times pressure gradient.  If intrinsic permeability is decreased, pressure at the injection element could increase, in addition to saturation increasing, to maintain gas flow equal to injection rate.  If imposed pressure gradients are small compared to capillary pressure gradients, I imagine that saturation changes will dominate, but I don't think that will always be the case.

      • Finsterle GeoConsulting
      • Stefan_Finsterle
      • 22 hrs ago
      • Reported - view

      Hi Chris,

      You are of course right! Sorry that I did not take the time to figure out what the system was, i.e., what the dimensions, geometry, boundary conditions, etc. are, whether it's steady-state or transient, where the saturation is observed, etc. So yes, my response is incomplete, and thanks for pointing this out.

      You may have noticed that - as an analog - I referred to water infiltration in the unsaturated zone, which is driven by a unit gradient - regardless of permeability (and regardless of the capillary capillary function, if the vadose zone is thick enough and infiltration is not affected by the capillary fringe zone - another subtlety).

      For the CO2 injection case, you are of course right that the gradient changes with permeability if there is a constant pressure boundary condition nearby. I guess if the system is essentially infinite and near steady state (at least in the near-well region where we look at saturations), these effects become less influential.

      As you well know, I fully agree with you that two-phase flow problems always come with many subtleties and surprises, which are often counterintuitive. I mainly decided to respond to this exchange to point out that it is important to formulate the expected (first-order) outcome before the simulation is performed (as Yogendra did). If the results disagree with our expectations, it is because of one of three reasons: (1) TOUGH2 has a bug, (2) I made an error in the input file, or (3) my expectation was wrong. In my experience, (1) is almost never the case (i.e., I have great confidence that TOUGH2 gives me the correct results for the problem as I formulated it); (2) is most often the culprit (i.e., I did not formulate the problem correctly or made a mistake in the input file); and (3) happens - unfortunately - still too often, because multi-phase flow is indeed complicated and I have the wrong expectation. If I don't think about the expected outcome, I essentially blindly trust the results (not just the simulator, but also my own modeling capabilities). Only if I formulate expectations do I have a chance to detect input errors (Point (2) above), or to learn something about the system behavior (Point (3) above), so what used to be counterintuitive becomes part of my intuition... 
      Cheers,

      Stefan

    • Keurfon_Luu
    • 8 mths ago
    • Reported - view

    Hi @Muhammad,

    You need a blank line at the end of the blocks ROCKS, COFT and FOFT.

Content aside

  • 22 hrs agoLast active
  • 22Replies
  • 126Views
  • 6 Following