Skip to content
Snippets Groups Projects
Verified Commit 4b4a5096 authored by Lars Bilke's avatar Lars Bilke
Browse files

[T] Adapt HeatTransportBHE_3D_3BHEs_array to new python environment.

parent 2fd77fd3
No related branches found
No related tags found
No related merge requests found
......@@ -89,9 +89,10 @@ AddTest(
RUNTIME 50
EXECUTABLE ogs
EXECUTABLE_ARGS 3bhes_1U.prj
WRAPPER time
WRAPPER poetry # required for PYTHON_PACKAGES
TESTER vtkdiff
REQUIREMENTS OGS_USE_PYTHON AND NOT OGS_USE_MPI
PYTHON_PACKAGES TESPy=0.3.2
DIFF_DATA
3bhes_1U_pcs_0_ts_10_t_600.000000.vtu 3bhes_1U_pcs_0_ts_10_t_600.000000.vtu temperature_soil temperature_soil 1e-12 1e-13
3bhes_1U_pcs_0_ts_10_t_600.000000.vtu 3bhes_1U_pcs_0_ts_10_t_600.000000.vtu temperature_BHE1 temperature_BHE1 1e-10 1e-13
......
# How to run
You need to build OGS with `OGS_USE_PYTHON=ON` and have the Python modules
listed in `requirements.txt` installed, e.g.:
You need to have [poetry][1] installed and build OGS with `OGS_USE_PYTHON=ON`.
- In this directory:
- `virtualenv .venv` Make sure you use the same Python interpreter which was
embedded into OGS (look for `Found PythonInterp: ..` in the CMake output)
- `source .venv/bin/activate`
- `pip install -r requirements.txt`
- `PYTHONPATH=.venv/lib/python3.7/site-packages ~/code/ogs6/build/bin/ogs -o ~/tmp 3bhes_1U.prj`
[1]: https://python-poetry.org
......@@ -155,8 +155,7 @@ class BC(OpenGeoSys.BHENetwork):
# initialize the tespy model of the bhe network
# load path of network model:
# loading the TESPy model
project_dir = os.getcwd()
print("Project dir is: ", project_dir)
project_dir = os.chdir(ogs_prj_directory)
nw = load_network('./pre/tespy_nw')
# set if print the network iteration info
nw.set_attr(iterinfo=False)
......
TESPy==0.3.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment