TNO Intern

Commit 7aefa4e7 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

creating a docs setup

parent 7d0f22d9
Loading
Loading
Loading
Loading
+42 −12
Original line number Diff line number Diff line
# Welcome to MkDocs
# pyThermoGIS

For full documentation visit [mkdocs.org](https://www.mkdocs.org).
**pyThermoGIS** is a Python package that provides API access to the [ThermoGIS](https://www.thermogis.nl/en) doublet simulations and economic calculations. 

## Commands
This package allows a user to simulate geothermal doublets providing the following parameters: 
    
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.
- Top depth
- Thickness (mean & standard deviation)
- Porosity
- Permeability (mean & standard deviation)
- Temperature (Optional: if not provided, a temperature gradient will be used)

## Project layout

    mkdocs.yml    # The configuration file.
    docs/
        index.md  # The documentation homepage.
        ...       # Other markdown pages, images and other files.
The code will simulate a Geothermal doublet, utilizing ThermoGIS with DoubletCalc1D as the engine to produce values of:

- power [Mega Watt Hour]
- heat pump power [Mega Watt Hour]
- capex (Capital expenditure) [Million €]
- opex (Operational expenditure) [€/kW]
- utc (Unit Technical Cost [€cent/kWH])
- npv (Net-present-value)
- hprod (Discounted Heat Produced)
- cop 
- cophp
- pressure 
- flow rate [m³/hr]
- well depth [m]

For details on how these parameters are calculated we refer users to the [Thermogis calculation webpage](https://www.thermogis.nl/en/calculation-model)

The simulations are conducted in Java, and this package uses [JPype](https://jpype.readthedocs.io/en/latest/userguide.html) to create a Python-Java binding.

It uses [xarray](https://docs.xarray.dev/en/stable/index.html) to handle input and output parameters, a User should inform themselves and learn the usage of the Xarray package.

This module can be combined with the [pygridsio](https://pypi.org/project/pygridsio/) package to read and process 2D raster data.

## What can this package *not* do?
This package provides a narrow access point to the doublet simulations and UTC economic calculations from ThermoGIS, it does not implement the following ThermoGIS processes/methodologies:

- Stacking of Aquifers
- Calculation of Potential maps
- Calculation of Resources
- Calculation of Overview maps
- HTO-ATES simulations
- Property Modelling
- Temperature Modelling
- Reading, and writing of grid files (Checkout [pygridsio](https://pypi.org/project/pygridsio/))
+60 −0
Original line number Diff line number Diff line
# Installation

PyThermoGIS has been designed to be used in one of two ways; either as a python package you import into your own python projects, or as a standalone package where you can access the calculations via a CLI.
Either way, you need to Install a Java 17 VM and store the ThermoGIS Jar:

## 1. Install Java 17 and Download the ThermoGIS JAR

This package requires a Java 17 VM (we recommend using [Amazon Corretto 17](https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html)) and a ThermoGIS Jar file (Version >=1.7).

*(You can find the JAR in this repository's resources folder or request it via the [ThermoGIS website](https://www.thermogis.nl/).)*

### 🧱 Required Environment Variables

- `JAVA_HOME`: Path to the Java 17 installation
  *(e.g., on Windows: `C:\Program Files\Amazon Corretto\jdk17.0.0_0`)*

- `THERMOGIS_JAR`: Path to the ThermoGIS `.jar` file; __including__ the name of the jar file
  *(e.g. `/path/to/the/thermogis-1.7.0-shaded.jar`)*

---

## 2a) import pyThermoGIS into your own python projects

This repository is currently hosted privately on [ci.tno.nl](https://ci.tno.nl) and will become publicly available in the future. 

Until then you will need to use Gitlab API keys to use this module:

### 🔐 Step-by-step Installation

##### a. Create a Personal Access Token (PAT)

1. Log in to GitLab.
2. Navigate to **Preferences > Access Tokens**.
3. Create a token with the following scopes:
   - `read_api`
   - `read_package_registry`
4. Copy and store the token securely (you won’t be able to see it again).

#### b. Install pyThermoGIS using pip

```
pip install pythermogis --index-url https://__token__:<your_personal_token>@ci.tno.nl/gitlab/api/v4/projects/18271/packages/pypi/simple
```

> 💡 If you already use another index, consider using `--extra-index-url` instead.

---

### 2b) Installation for further development or Standalone usage

Clone and install from source with Pixi:

```bash
git clone https://gitlab.com/your-repo/pythermogis.git
cd pythermogis
pixi install
```
(Make sure you have followed the step installing a Java17 VM and saving the ThermoGIS Jar)

---
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -27,10 +27,15 @@ repo_url: https://ci.tno.nl/gitlab/AGS/pythermogis

nav:
  - Home: index.md

  - Installation: install/install.md

  - Theory: theory/modelling_geothermal_doublets.md

  - Usage:
      - Basic Usage: usage/basic_usage.md
      - Examples: usage/advanced_examples.md

  - API Reference:
      - doublet: reference/doublet.md
      - utc_properties: reference/utc_properties.md