geoloop 1.0.1__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {geoloop-1.0.1/src/geoloop.egg-info → geoloop-1.0.3}/PKG-INFO +1 -1
  2. {geoloop-1.0.1 → geoloop-1.0.3}/pyproject.toml +4 -1
  3. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/configuration.py +20 -0
  4. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/constants.py +0 -17
  5. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/lithology/process_lithology.py +15 -5
  6. geoloop-1.0.3/src/geoloop/lithology/resources/lithology_properties.xlsx +0 -0
  7. geoloop-1.0.3/src/geoloop/utils/__init__.py +0 -0
  8. {geoloop-1.0.1 → geoloop-1.0.3/src/geoloop.egg-info}/PKG-INFO +1 -1
  9. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop.egg-info/SOURCES.txt +2 -0
  10. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_b2g.py +2 -1
  11. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_b2g_ana.py +2 -1
  12. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_h5.py +2 -1
  13. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_lithology.py +2 -1
  14. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_loadflowdata.py +2 -1
  15. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_plotting.py +2 -1
  16. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_pyg_ana.py +2 -1
  17. {geoloop-1.0.1 → geoloop-1.0.3}/test/test_pygfield_ana.py +2 -1
  18. {geoloop-1.0.1 → geoloop-1.0.3}/LICENSE.md +0 -0
  19. {geoloop-1.0.1 → geoloop-1.0.3}/README.md +0 -0
  20. {geoloop-1.0.1 → geoloop-1.0.3}/setup.cfg +0 -0
  21. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/__init__.py +0 -0
  22. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/axisym/AxisymetricEL.py +0 -0
  23. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/axisym/__init__.py +0 -0
  24. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Flowdatamain.py +0 -0
  25. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Lithologymain.py +0 -0
  26. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Loadprofilemain.py +0 -0
  27. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Plotmain.py +0 -0
  28. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Runbatch.py +0 -0
  29. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/Runmain.py +0 -0
  30. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/SingleRunSim.py +0 -0
  31. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/bin/__init__.py +0 -0
  32. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/cli/__init__.py +0 -0
  33. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/cli/batch.py +0 -0
  34. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/cli/main.py +0 -0
  35. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/CoaxialPipe.py +0 -0
  36. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/CustomPipe.py +0 -0
  37. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/__init__.py +0 -0
  38. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/b2g.py +0 -0
  39. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/b2g_ana.py +0 -0
  40. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/boreholedesign.py +0 -0
  41. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/getloaddata.py +0 -0
  42. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/pyg_ana.py +0 -0
  43. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/pygfield_ana.py +0 -0
  44. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/simulationparameters.py +0 -0
  45. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/soilproperties.py +0 -0
  46. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/geoloopcore/strat_interpolator.py +0 -0
  47. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/lithology/__init__.py +0 -0
  48. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/lithology/plot_lithology.py +0 -0
  49. {geoloop-1.0.1/src/geoloop/utils → geoloop-1.0.3/src/geoloop/lithology/resources}/__init__.py +0 -0
  50. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/loadflowdata/__init__.py +0 -0
  51. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/loadflowdata/flow_data.py +0 -0
  52. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/loadflowdata/loadprofile.py +0 -0
  53. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/plotting/__init__.py +0 -0
  54. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/plotting/create_plots.py +0 -0
  55. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/plotting/load_data.py +0 -0
  56. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/utils/RunManager.py +0 -0
  57. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop/utils/helpers.py +0 -0
  58. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop.egg-info/dependency_links.txt +0 -0
  59. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop.egg-info/entry_points.txt +0 -0
  60. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop.egg-info/requires.txt +0 -0
  61. {geoloop-1.0.1 → geoloop-1.0.3}/src/geoloop.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoloop
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems
5
5
  Author-email: Zanne Korevaar <zanne.korevaar@tno.nl>, Jan-Diederik van Wees <jan_diederik.vanwees@tno.nl>
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "geoloop"
7
- version = "1.0.1"
7
+ version = "1.0.3"
8
8
  description = "This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems"
9
9
  authors = [
10
10
  { name = "Zanne Korevaar", email = "zanne.korevaar@tno.nl" },
@@ -60,6 +60,9 @@ where = ["src"]
60
60
  [project.scripts]
61
61
  geoloop = "geoloop.cli.main:simulation"
62
62
 
63
+ [tool.setuptools.package-data]
64
+ "geoloop.lithology.resources" = ["lithology_properties.xlsx"]
65
+
63
66
  [tool.uv.workspace]
64
67
  members = [
65
68
  "geoloop",
@@ -19,6 +19,8 @@ class LithologyConfig(BaseModel):
19
19
  Path to the JSON configuration file that created this object.
20
20
  out_dir_lithology : str or Path
21
21
  Directory where lithology outputs will be written.
22
+ lithology_properties_path: str or Path
23
+ Path to the Excel table with lithology properties.
22
24
  borehole_lithology_path : str or Path
23
25
  Path to the Excel or CSV file containing lithology data.
24
26
  borehole_lithology_sheetname : str
@@ -48,6 +50,7 @@ class LithologyConfig(BaseModel):
48
50
  config_file_path: str | Path
49
51
  out_dir_lithology: str | Path
50
52
  input_dir_lithology: str | Path
53
+ lithology_properties_path: str |Path | None = None
51
54
  borehole_lithology_path: str | Path
52
55
  borehole_lithology_sheetname: str
53
56
  out_table: str
@@ -89,6 +92,23 @@ class LithologyConfig(BaseModel):
89
92
  if not isinstance(self.out_dir_lithology, Path):
90
93
  self.out_dir_lithology = base_dir_lithology / Path(self.out_dir_lithology)
91
94
 
95
+ # Lithology properties table
96
+ # Resolve user-supplied path
97
+ if self.lithology_properties_path is not None:
98
+ if not isinstance(self.lithology_properties_path, Path):
99
+ self.lithology_properties_path = Path(self.lithology_properties_path)
100
+
101
+ if not self.lithology_properties_path.is_absolute():
102
+ self.lithology_properties_path = (
103
+ base_dir_lithology / self.lithology_properties_path
104
+ ).resolve()
105
+
106
+ if not self.lithology_properties_path.exists():
107
+ raise FileNotFoundError(
108
+ f"Lithology properties file not found: "
109
+ f"{self.lithology_properties_path}"
110
+ )
111
+
92
112
  return self
93
113
 
94
114
 
@@ -1,20 +1,3 @@
1
- from pathlib import Path
2
-
3
- repo_path = Path(__file__).parent.parent.parent
4
-
5
- # Test directories
6
- test_dir = repo_path / "test"
7
- tests_input_path = test_dir / "input"
8
- test_output_path = test_dir / "output"
9
-
10
- # Resources directory
11
- resources_path = repo_path / "resources"
12
-
13
- # Lithology resources directory
14
- lithology_properties_xlsx = (
15
- resources_path / "lithology_properties" / "lithology_properties.xlsx"
16
- )
17
-
18
1
  # Dictionary of units for various parameters in the model.
19
2
  units_dict = {
20
3
  "Q_b": "W",
@@ -1,12 +1,12 @@
1
1
  import math
2
2
  from pathlib import Path
3
+ from importlib.resources import files
3
4
 
4
5
  import numpy as np
5
6
  import pandas as pd
6
7
  import xarray as xr
7
8
 
8
9
  from geoloop.configuration import LithologyConfig
9
- from geoloop.constants import lithology_properties_xlsx
10
10
  from geoloop.geoloopcore.strat_interpolator import TgInterpolator
11
11
 
12
12
 
@@ -257,6 +257,7 @@ class ProcessLithologyToThermalConductivity:
257
257
 
258
258
  def __init__(
259
259
  self,
260
+ lithology_properties_df: pd.DataFrame,
260
261
  borehole_df: pd.DataFrame,
261
262
  Tg: float,
262
263
  Tgrad: float,
@@ -270,8 +271,7 @@ class ProcessLithologyToThermalConductivity:
270
271
  out_table: str,
271
272
  read_from_table: bool,
272
273
  ) -> None:
273
- # Read lithology properties reference table (Excel)
274
- self.lithology_props_df = pd.read_excel(lithology_properties_xlsx)
274
+ self.lithology_props_df = lithology_properties_df
275
275
 
276
276
  self.borehole_df = borehole_df
277
277
  self.lithology_props_dict = self.create_lithology_props_dict()
@@ -385,12 +385,22 @@ class ProcessLithologyToThermalConductivity:
385
385
  Initialized instance.
386
386
  """
387
387
 
388
- borehole_path = config.borehole_lithology_path
388
+ # Read borehole lithology table (Excel)
389
389
  borehole_df = pd.read_excel(
390
- borehole_path, sheet_name=config.borehole_lithology_sheetname
390
+ config.borehole_lithology_path, sheet_name=config.borehole_lithology_sheetname
391
391
  )
392
+ # Read lithology properties reference table (Excel)
393
+ if config.lithology_properties_path is not None:
394
+ lithology_properties_df = pd.read_excel(
395
+ config.lithology_properties_path
396
+ )
397
+ else:
398
+ lithology_properties_df = pd.read_excel(
399
+ files("geoloop.lithology.resources").joinpath("lithology_properties.xlsx")
400
+ )
392
401
 
393
402
  return cls(
403
+ lithology_properties_df=lithology_properties_df,
394
404
  borehole_df=borehole_df,
395
405
  Tg=config.Tg,
396
406
  Tgrad=config.Tgrad,
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: geoloop
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems
5
5
  Author-email: Zanne Korevaar <zanne.korevaar@tno.nl>, Jan-Diederik van Wees <jan_diederik.vanwees@tno.nl>
6
6
  License-Expression: Apache-2.0
@@ -38,6 +38,8 @@ src/geoloop/geoloopcore/strat_interpolator.py
38
38
  src/geoloop/lithology/__init__.py
39
39
  src/geoloop/lithology/plot_lithology.py
40
40
  src/geoloop/lithology/process_lithology.py
41
+ src/geoloop/lithology/resources/__init__.py
42
+ src/geoloop/lithology/resources/lithology_properties.xlsx
41
43
  src/geoloop/loadflowdata/__init__.py
42
44
  src/geoloop/loadflowdata/flow_data.py
43
45
  src/geoloop/loadflowdata/loadprofile.py
@@ -4,10 +4,11 @@ from pathlib import Path
4
4
  import numpy as np
5
5
  import xarray as xr
6
6
 
7
+ from paths import test_dir, tests_input_path
8
+
7
9
  from geoloop.configuration import SingleRunConfig, LithologyConfig, load_nested_config
8
10
  from geoloop.utils.helpers import save_singlerun_results
9
11
  from geoloop.bin.SingleRunSim import SingleRun
10
- from geoloop.constants import test_dir, tests_input_path
11
12
  from geoloop.geoloopcore.b2g import B2G
12
13
  from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity
13
14
 
@@ -4,6 +4,8 @@ from pathlib import Path
4
4
  import numpy as np
5
5
  import xarray as xr
6
6
 
7
+ from paths import test_dir, tests_input_path
8
+
7
9
  from geoloop.configuration import SingleRunConfig, load_nested_config, LithologyConfig, StochasticRunConfig
8
10
  from geoloop.utils.helpers import (
9
11
  save_MCrun_results,
@@ -11,7 +13,6 @@ from geoloop.utils.helpers import (
11
13
  )
12
14
  from geoloop.utils.RunManager import run_models
13
15
  from geoloop.bin.SingleRunSim import SingleRun
14
- from geoloop.constants import test_dir, tests_input_path
15
16
  from geoloop.geoloopcore.b2g_ana import B2G_ana
16
17
  from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity
17
18
 
@@ -4,10 +4,11 @@ from pathlib import Path
4
4
  import numpy as np
5
5
  import xarray as xr
6
6
 
7
+ from paths import test_dir, tests_input_path
8
+
7
9
  from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig
8
10
  from geoloop.utils.helpers import save_singlerun_results
9
11
  from geoloop.bin.SingleRunSim import SingleRun
10
- from geoloop.constants import test_dir, tests_input_path
11
12
  from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity
12
13
 
13
14
 
@@ -2,7 +2,8 @@ import unittest
2
2
 
3
3
  import xarray as xr
4
4
 
5
- from geoloop.constants import tests_input_path, test_output_path
5
+ from paths import tests_input_path, test_output_path
6
+
6
7
  from geoloop.configuration import LithologyConfig, load_single_config
7
8
  from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity
8
9
 
@@ -2,9 +2,10 @@ import unittest
2
2
 
3
3
  import numpy as np
4
4
 
5
+ from paths import tests_input_path, test_output_path
6
+
5
7
  from geoloop.configuration import LoadProfileConfig, FlowDataConfig, load_single_config
6
8
  from geoloop.utils.helpers import apply_smoothing
7
- from geoloop.constants import tests_input_path, test_output_path
8
9
  from geoloop.loadflowdata.flow_data import FlowData
9
10
  from geoloop.loadflowdata.loadprofile import LoadProfile
10
11
 
@@ -7,9 +7,10 @@ import matplotlib.pyplot as plt
7
7
  import numpy as np
8
8
  import xarray as xr
9
9
 
10
+ from paths import test_dir, tests_input_path
11
+
10
12
  from geoloop.configuration import PlotInputConfig, load_single_config
11
13
  from geoloop.bin.Plotmain import DataSelection, DataTotal, PlotInput
12
- from geoloop.constants import test_dir, tests_input_path
13
14
  from geoloop.plotting.create_plots import PlotResults
14
15
 
15
16
 
@@ -4,10 +4,11 @@ from pathlib import Path
4
4
  import numpy as np
5
5
  import xarray as xr
6
6
 
7
+ from paths import test_dir, tests_input_path
8
+
7
9
  from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig
8
10
  from geoloop.utils.helpers import save_singlerun_results
9
11
  from geoloop.bin.SingleRunSim import SingleRun
10
- from geoloop.constants import test_dir, tests_input_path
11
12
  from geoloop.geoloopcore.pyg_ana import PYG_ana
12
13
  from geoloop.lithology.process_lithology import ProcessLithologyToThermalConductivity
13
14
 
@@ -2,9 +2,10 @@ import unittest
2
2
 
3
3
  import numpy as np
4
4
 
5
+ from paths import tests_input_path
6
+
5
7
  from geoloop.configuration import load_nested_config, SingleRunConfig, LithologyConfig
6
8
  from geoloop.bin.SingleRunSim import SingleRun
7
- from geoloop.constants import tests_input_path
8
9
  from geoloop.geoloopcore.pygfield_ana import (
9
10
  PYGFIELD_ana,
10
11
  create_curved_borehole,
File without changes
File without changes
File without changes
File without changes
File without changes