Phase transitions with tough3-eos7r

Hey everyone,

I wanted to share an issue I've been having lately.  I'm attempting to run a simulation with a vaporization front using tough3-eos7r.  I've successfully run the problem with eos7, but now I want to include a source term with a radionuclide mass component.  As soon as this simulation encountered a phase transition, it stalled with a message "TOUGH STATUS: Failed in EOS."  So I attempted running a simpler problem to see if it was an issue with the simulator.  I made a small edit to the sample problem rdif7, where I increased the temperature of the boundary element from 9 to 125 degrees C.  The rest of the elements I believe were initiated at 90 degrees C.  And when doing that change I run into the same issue.  Around time step 26, I get the following message:

" ...ITERATING... AT [   26, 2] --- DELTEX = 0.100000E+06  MAX. RES. = 0.120726E+00 AT ELEMENT A   1  EQUATION   1
 +++++++++   CANNOT FIND PARAMETERS AT ELEMENT *A   1*          XX(M) = -.109847E+11 0.251547E+31 0.000000E+00 0.000000E+00
 -.251499E+31 0.122575E+03
 TOUGH STATUS: Failed in EOS. IGOOD=           5"

I've attached a zip file with all the inputs files I used and outputs files that were generated.  Could someone try to run this problem as-is and let me know if you get a different result?  That way, I can determine if it has something to do with my compilation.

I'll also be sure to post the solution if I find it.

Thanks!

5replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Actually, let me edit and paste the error message using the version of tough3-eos7r I compiled directly from the LBL source code.  The message above was from a version where I'm attempting to figure this out.  When I run with the un-tampered LBL version, I get this:

     "A   2(   25, 5) ST = 0.137200E+07 DT = 0.100000E+06
     ...ITERATING... AT [   26, 1] --- DELTEX = 0.100000E+06  MAX. RES. = 0.664664E-01 AT ELEMENT A  20  EQUATION   6
     $$$$$$$$$$ LIQUID PHASE DISAPPEARS AT ELEMENT *A   1*  $$$$$      SG = 0.100000E+01
     NO CONVERGENCE IN SUBROUTINE PP7R
     +++++++++   CANNOT FIND PARAMETERS AT ELEMENT *A   1*          XX(M) = 0.000000E+00 0.310242E+00 0.528731E-10 0.999572E-08
     0.999662E-06 0.122575E+03
     TOUGH STATUS: Failed in EOS. IGOOD=           2"

    Like
  • Hi Mikey,

    Using your input file and tough3-eos7r running in an Ubuntu Window on a Windows 10 laptop, I get the attached output.  The error messages at step 25 look like yours, and the code limps along for a while after that, finally quitting at step 49.  I think this is just what you got.  I've never used eos7r before, so I am not going to try to find out what is happening.

    Chris

    Like
    • Thanks Chris!  For this particular problem, I was able to get it to make better progress by setting WNR=0.98 and also incorporating the MOP2(29) feature for finite window phase transitions, which is in iTOUGH2, but not TOUGH3.  I don't think it's entirely solved the problem yet, but it made things a little better.  I'll hopefully have a better solution posted on here someday soon. : )

      Like
  • Hey everyone, I still have to do a few more checks on this, but I think I may have found the cause of this issue.  It has to do with how the primary variables are re-initialized after the evaporation takes place.  In the source file eos7r.f90, around line 1230, you see the following line:

              xx(1)=(1.D0-zero)*pg

    However, the variable 'pg' hasn't been updated by that point and is set to 0.0, so the pressure stored in the primary variable array also gets set to 0.  This, as you can imagine, causes all sorts of havoc later on, resulting in the 'NO CONVERGENCE IN SUBROUTINE PP7R' message I showed earlier.  I have updated the code now to re-calculate what the updated pressures should be by adding the following three lines ahead of it.

              call supst(tx,psat,ds,us)
              pa = ds*rgas*(tx+273.15d0)*xx(5)/(ama*(1.0d0-xx(5)))
              pg = pa + psat + prn1 + prn2

    This is based on a similar block of calculations in iTOUGH2.  So far, I've run a simple 1D simulation to check that the simulator can handle a transition to single-phase gas.  I'll be posting more updates soon.

    Like
  • Mikey,

    Thank you for debugging and fixing it.  I assume you also compared the 1D simulation results to itough2 results after you changed the code. We will check if other eos modules have the same problem.

    Yingqi

    Like
Like Follow
  • 11 mths agoLast active
  • 5Replies
  • 40Views
  • 3 Following