Introductory Material is Absent

Hi all,
I was introduced to OGS through TESPy. I first began following the tutorial in Geoenergy II for a BHE. Carrying forward to section 3.10 in OGS 5, the simulations will not run as listed. Updating to OGS 6, there is an entirely different pattern of file extensions. I have been cruising around this site for hours, but there is little to help get a person started. Cryptic explanations in your introductory material are almost certainly written to exclude people from using the software, impressive as it seems. For example, OGS 6 will not run those benchmarks from github (with or without python bindings) as per instructions, there are no walkthroughs available, and there are no troubleshooting sections for what has got to be basic setup steps.

Do you have an error log/terminal output for the simulation using OGS v5?
It’s a start towards grappling with the problem in OGS 5.
It’s worth a look, as I’m no magician at guessing.

What was the link between TESPy and OGS?
TESPy looks interesting; but nothing on District Cooling.
That is, until I now read Chen et al 2019 and BHE.

Reading the Tutorial for the first time, it does say that the creation of the BHE mesh is discussed in Chapter 4: “In Chap. 4, introduction will be given regarding how to use a meshing tool to generate the mesh file.”
Having first run the bhe_setup_tool.exe (where the location of gmsh.exe is in your PATH), I am assuming one renames the outputs accordingly (“bhe_test” or whatever is suggested in Ch3, page 34);
then return to Ch3 and create your other inputs (e.g. Listing 3.2 PCS File Definition including Interaction with Borehole Heat Exchangers; page 25)

In the OGS 5 attempt, I am using the MSH file inputs as defined in section 3.4 Listing 3.4. This seems well explained for each element, either soil or materials groups. I do not see why I would need to run the mesh tool and create my own if I simply follow the example.

I do notice a lot of the papers use scripts to write the different .prj requirements for OGS6, instead of doing anything in the documentation. I am very curious how people get themselves up to speed on this program. It seems likely that the core group of people have been using it for many years and it does not translate well into updated docs for current releases. Perhaps I am wrong. It would be wonderful to find a different approach for new users.

On OGS6, the benchmarks will not run from command line as stated. Although I give the .prj to the ogs.exe, the error: Error while parsing XML file ‘.path to .prj’ at line 0: cannot open file.
Then OGS6 terminates with error.

Because something is not working for you and we need to determine what that is.

Regarding OGS 5, can you upload to your post all the files that you are relying on to run simulation “bhe_test”, as described in the Tutorial.

According to the Tutorial, it seems they should follow the file name pattern bhe_test.*
As described on page 24: If the project is named as “bhe_test”, then the PCS file should be named as “bhe_test.pcs”. And in true biblical fashion, the ogs 5 tutorial points to bhe_test on on page 34, figure 3.4 So we need to check whether both your file contents and your file names for the tutorial simulation correspond to these instructions.

For example, if you open your *.pcs file, does it show the same contents as Listing 3.2?

Regarding OGS 6, what are you writing in the command line as your PATH to the .prj file?
What is the name of the file and is there a link to the benchmark folder online so that I can see which one you are trying to use?

Because the error is telling you that ogs.exe cannot find this “.prj” file and from your post it is only known with certainty how the computer is responding to you.

I would find it more informative in helping you if it was written as:
“I am following Tutorial step X at this url or book page; but when I type this exact command with the PATH to the project file in the terminal, I get this corresponding error. Attached is a zip file containing all the files I am using for the simulation, are they the right ones?”

And so forth.

I think you are right; the bhe_test files seem to be missing.
Maybe Haibing can answer us, regarding chapter 3 bhe_test.* files in the Tutorial

I started to run the taucha simulation OK:
Just put the ogs.exe in the folder holding the taucha file and run
ogs.exe taucha
in the windows commandline;
or in my case: wine ./ogs.exe taucha

In running taucha, I assume you are talking about moving on to chapter 6. I have not done that yet. The .gli in chapter 3 might be missing a surface parameter, based on what I see in Listing 6.2. What I did through 3.9 in the book was to cut and paste the individual code into my own text docs, then rename them as inputs. I see no parameters in the input files that are seeking a specific_project_name.input_type = bhe_test.input_type. So, I have named my first attempt bhe_trial1 in all cases.

What should be my strategy here, run OGS6 or stick with OGS5? I will go wherever the docs lead me the fastest. To date, the docs have lead me to the discourse.

Do you know how to handle the surface error for chapter 3’s example?
trial files

Thanks for the trial files, which I tried running last night without success.
How to handle the surface error requires checking the format of each file to see if it conforms to the requirements. That is a good learning exercise if OGS 5 is your framework.

To your other question - run OGS 6 or OGS 5? It depends on which information you need and the system or processes you are simulating to obtain that information.

There is an interesting article In the online ebook " Thermo-Hydro-Mechanical-Chemical Processes in Fractured Porous Media: Modelling and Benchmarking", found at this url (

The article is “Appendix B: OGS 6 Overview”, which describes the code maintenance and testing issues leading to the break between simulations with OGS 5 and OGS 6. It is well worth reading.

I like the xml-driven input approach of OGS 6, but dislike the disparity in the Windows and Linux usability. You have to take special care of the compiling with Linux. Understanding CMake is essential to understanding how the programmer has packaged the code for the version you want to compile. Otherwise you have Singularity to fall back on.

I like the simplicity of OGS 5 and the straightforwardness in compiling, getting up and running, looking at the diversity of porous media projects that have been achieved with it. As well as the excellent Tutorial series of books available on line. The OGS 6 environment doesn’t seem to provide the same legacy of Tutorials as OGS 5.

You need to choose carefully why you really need OGS 6, and then stay with Discourse and the online video tutorials. I use OGS 6 to understand how it has used the xml-format as input for the simulations. And the algorithmic approach underlying the OGS 6 model.

For now I use OGS 5 with the ebook range of Tutorials, along with Dune/DuMuX and OpenPNM to explore modelling porous media.

Hope this helps.

Unaccustomed as I am to Geoenergy modelling and because I am curious how OGS 5 works, I have now started to read the tutorial book “Geoenergy Modeling I Geothermal Processes in Fractured Porous Media”, which provides a clearer understanding of the system and the OGS 5 simulation.

“Section 4.3.3 Input Files
The first example is very simple concerning geometry, mesh and processes, and therefore, is constructed manually. We recommend starting with geometry (GLI) and mesh (MSH) files.”

Geoenergy Modelling I gave a link to here: public/doc-auto – OpenGeoSys

And from that the term “surface” in *.gli files:

File taucha.gli provides an example of using #SURFACE
and 3D model surface generation is described in Chapter 4 of Geoenergy Modelling II

Testing all the *.gli files in the tutororial Geoenergy II using Data-Explorer, only taucha.gli opens up without syntax errors.

So maybe you should only consider running the taucha model and treat the other models as reading material only. Or ask Haubing to replace the Benchmarks archive with working examples, including bhe_test, for the Geoenergy II Tutorial.

Otherwise you might become more frustrated than necessary.

GINA is an application that you can use to modify a range of mesh files, including *.gli and *.msh

for the multiple BHE coupled with TESPy system, please refer to the benchmark: A 3-BHE Array Coupled With Pipe Network, and the user guide: Heat_Transport_BHE PipeNetwork Feature.

Best regards,

Thanks Chaofan!

I downloaded both windows packages for Data Explorer and ogs (v6.4.0) with python enabled.
Using Windows 10.
Opened Data Explorer - OK
Opened 3bhe_1U.prj in Data Explorer and received this error message in the windows console:

[2021-09-29 19:38:37.221] [ogs] [info] XMLQtInterface::isValid(): XML file C:/Programs1/ogs640_py382_de_utils/bin/3bhes_1U.prj is invalid (in reference to schema OpenGeoSysProject.xsd).

Why is the project file invalid? Am I missing something here?


Hi Chaofan,

Following your suggestion with Heat_Transport_BHE PipeNetwork Feature

I compiled ogs on Ubuntu

./ogs 3be_1U.prj

Simulation run stops at:

$ ./ogs 3bhes_1U.prj
info: This is OpenGeoSys-6 version 6.4.0-1205-g51758d796.
info: OGS started on 2021-09-30 09:04:19+0200.
warning: Consider switching from mesh and geometry input to multiple meshes input. See Construct meshes from bulk mesh and geometries tool for conversion.
warning: PointVec::PointVec(): there are 2 double points.
3.9.6 (default, Jul 3 2021, 16:40:50)
[GCC 9.3.0]
error: AttributeError: ‘connection’ object has no attribute ‘target’


info: OGS terminated on 2021-09-30 09:04:20+0200.
error: OGS terminated with error.


Some tips for others new to this:
Python v3.9 - you need to compile CoolProps first (using before you install tespy.
Otherwise ‘pip install tespy’ fails, because CoolProps won’t install from pip.

Following the advice of test before you suggest, the following BHE-related tests worked OK:

OS: Ubuntu 20.04
OGS: 6.4.0, Python enabled

But not 3D_2U_BHE_powerBC.prj; it requires file 3D_2U_BHE_benchmark.vtu
But the simulation runs if you edit the .prj file and change it to 3D_2U_BHE.vtu


Not OK were 3D_3BHEs_array and 3D_3BHEs_array_SimX

This partially answers some of the questions I raised above.

…SimX provides a complete set of files; viz. bhe_network.csv
Seems to have a problem with tespy, i.e. running python script and for the other test,

The value of the SimX test was substituting files for the test 3D_3BHEs_array, whose incomplete bhe_network.csv threw the error above. It seems tespy modules did not work while running the test on Ubuntu. ‘Tamb var’ points to ambient temperature variable

$ ./ogs 3bhes_1U.prj (Note: bhe_network.csv, prj file substituted to try and get the simulation to start. Both tests give the same error regarding tespy modules)
info: This is OpenGeoSys-6 version 6.4.0-1205-g51758d796.
info: OGS started on 2021-09-30 14:32:14+0200.
warning: Consider switching from mesh and geometry input to multiple meshes input. See Construct meshes from bulk mesh and geometries tool for conversion.
warning: PointVec::PointVec(): there are 2 double points.
3.9.6 (default, Jul 3 2021, 16:40:50)
[GCC 9.3.0]
error: KeyError: ‘Tamb_var’

/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/indexes/ get_loc
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ _get_value
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ getitem
/home/l1nux/.local/lib/python3.9/site-packages/tespy/networks/ construct_comps
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ f
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ apply_series_generator
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ apply_standard
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ apply
/home/l1nux/.local/lib/python3.9/site-packages/pandas/core/ apply
/home/l1nux/.local/lib/python3.9/site-packages/tespy/networks/ load_network

info: OGS terminated on 2021-09-30 14:32:15+0200.
error: OGS terminated with error.

Additional reading here:
Modeling Neighborhood-Scale Shallow Geothermal Energy Utilization - A Case Study in Berlin
Dataset on Zenodo

You can study the python script and the bhe_ini.csv file as well

Until it is fixed, best to just read test for ‘3D_3BHEs_array’


it seems the problem was raised by TESPy. Please check whether the TESPy version you installed is the same as the benchmark required.


1 Like

Hi Chaofan, many thanks for reply to solve the problem!

Yes, you are right. My version: TESPy 0.2.2
Tried to upgrade to TESPy 0.3.2 and pip3 said highest version 0.2.2, which is wrong.
Pypi shows latest TESPy is 0.5.0

So I downloaded TESPy and built & installed from source.

Simulation for 3bhes_1U.prj ran OK
info: [time] Execution took 40.019 s

Solved by Chaofan!

TESPy v0.3.2: build and install from source if pip only provides v0.2.2
CoolProps: build and install from source if CoolProps doesn’t install under Python v3.9.
Without CoolProps, TESPy won’t install.

Hi Chaofan,

Looking at my results in both the 3bhes_1U.pvd file and saved data files (csv format),
and comparing them with your “Figure 2: Evolution of the soil temperature located at the 1 m distance away from each BHE” in Docs page “A 3-BHE Array Coupled With Pipe Network”.

In Fig.2 your soil temperature range is between 8.0 - 11 degC (3 degC)
Paraview indicates that my soil temperature ‘data range’ is miniscule in comparison:
1 degC (314.4 - 315 K, or 41 - 42 degC)

In the attached csv files my soil temperature does not change and remains at 315.5 K (42.35 degC)

Could you please comment whether these are the expected results, or whether something has been missed? Thanks (249.9 KB) (250.2 KB)


seems the results are not expected. What about the inflow and outflow temperature of each BHE?


Easier if I upload the output for bcs_tespy simulation here:
pvd and vtu files, as well as Terminal output and saved data (temp_BHE) (1.9 MB)

Reran this morning

@timc0up CoolProp is still stuck in Python 3.8 and has been for quite some time, I believe. Sorry. I am still catching up with the conversation as I was at a conference last week.

This is disappointing. OGS 5 is crashing after running taucha. I am really having no luck. I will try to find the error log.

I found the problem, not the errors, but the problem. The compiled version in Geoenergy with cmake is 5.8. The downloadable version with taucha is still OGS 5.5. OGS 5.8 will not run the benchmark as published.