creating T2Well .exe from source code



I have access to a T2Well and TOUGH3 license and would like to have a go at generating the executable from the T2Well source code. 


I can see in the T2Well/ECO2N manual that there is an NMAKE file in Appendix B, which uses the source files quoted on page 26 (e.g. t2f.f). However, this was compiled using Compaq visual fortran 6.6.a on windows XP. 


I was wondering what pre-processor I should use in order to generate the Wellbore.exe from the NMAKE file and source term scripts on a windows 10 pc. Also how do I use the NMAKE file to combine all these fortran scripts together?


Kind regards,


Hannah Doran

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hello Hannah,

    Linking T2Well to TOUGH3 may be more than changing the NMAKE file. T2Well source code that is linked to TOUGH2/ECO2N will need to be changed as well. Separately, there are steps to compile TOUGH3 code depending on your computer (see the readme files), which is much more than TOUGH2 code. We are still working on TOUGH3-T2Well. Eventually the compilation may follow TOUGH3 compilation steps. Is there any specific features you need from TOUGH3?


  • Hi Yingqi, 


    Thanks for your reply. I have been using the research code T2Well/EOS1 developed by Lehua Pan for borehole heat exchanger designs, but my supervisor gained two licenses for T2Well and TOUGH3 which are not coupled at present. 

    I just wanted to see if I could generate the .exe T2Well source code that is coupled to TOUGH2/ECO2N to see how different this is compared to the T2Well/EOS1 research code. I am trying to model a closed-loop u-tube well and I am worried the research code is only suitable for borehole heat exchanger designs. If the only difference is that EOS1 is used vs ECO2N then I am ok. 

    As for TOUGH3 features, the only thing would be if there is a possibility to adjust the surface backpressure on the production side to have a varying pressure as a function of temperature and time. At the moment I am fixing this to a constant backpressure which creates issues with possible flashing and evaporation of the wellbore fluid. 


    Kind regards,


Like Follow
  • 11 mths agoLast active
  • 2Replies
  • 59Views
  • 2 Following