TNO Intern

Commit 4cdc0d52 authored by Zanne Korevaar's avatar Zanne Korevaar
Browse files

Fix bug for qsign calculation in b2g_ana and the documentation about the sign...

Fix bug for qsign calculation in b2g_ana and the documentation about the sign convention in docstrings and the docs
parent 6fd1bf20
Loading
Loading
Loading
Loading
Loading
+24 −24
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ The main input JSON file includes the following parameters:
| optimize_keys_bounds | Bounds for optimized parameters                                        | —       | nested_list    | `[[lower, upper]]` matching optimize_keys                                                                                                                                                         |
| loadprofile          | Path to configuration file of the heat load profile                    | —       | string         | Optional                                                                                                                                                                                          |
| flow_data            | Path to configuration file of the flow rate profile                    | -       | string         | Optional                                                                                                                                                                                          |
| Q                    | Power demand                                                           | W       | scalar         | Used if `run_type` is POWER and no `loadprofile` defined                                                                                                                                          |
| Q                    | Power demand                                                           | W       | scalar         | Used if `run_type` is POWER and no `loadprofile` defined; positive for heat production, negative for cold production                                                                              |
| Tin                  | Inlet temperature                                                      | °C      | scalar         | Used if `run_type` is TIN                                                                                                                                                                         |
| variables_config     | Path to stochastic simulation configuration file                       | —       | string         | Used for stochastic runs (RunMain module)                                                                                                                                                         |
| save_Tfield_res      | Flag to save results of 3D temperature field in a numarical simulation | —       | boolean        | Only used if model_type is FINVOL                                                                                                                                                                 |
@@ -272,7 +272,7 @@ of the parameters in the *results* subset is always the number of
samples.

| Parameter | Description                                           | Unit  | Dimensions         | Remark                                                            |
|-----------|-------------------------------------------------------|-------|--------------------|---------------------------------------------|
|-----------|-------------------------------------------------------|-------|--------------------|-------------------------------------------------------------------|
| Q_b       | Heat load                                             | W     | time               | Only calculated for run_type TIN                                  |
| Re_in     | Reynolds nr. in the inlet pipe(s)                     |       | time               |                                                                   |
| Re_out    | Reynolds nr. in the outlet pipe(s)                    |       | time               |                                                                   |
@@ -288,7 +288,7 @@ samples.
| k_g       | Grout thermal conductivity                            | W/mK  | time or time; zseg |                                                                   |
| k_s       | Subsurface thermal conductivity                       | W/mK  | time or time; zseg |                                                                   |
| qloop     | Consumed power by the fluid circulation pump          | W     | time               |                                                                   |
| qsign     | Sign of heat flow                                     |       | time               | Sign indicates heat extraction or injection |
| qsign     | Sign of heat flow                                     |       | time               | Sign indicates heat extraction (positive) or injection (negative) |
| qzb       | Subsurface heat flow                                  | W     | time; zseg         |                                                                   |
| nPipes    | Number of pipes                                       |       |                    | Coördinates for the nPipes dimension                              |
| time      | Simulation timesteps                                  | hours |                    | Coördinates for the time dimension                                |
+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ class SingleRunResult:
        flowrate : np.ndarray
            Mass flow rate over time [kg/s].
        qsign : np.ndarray
            Sign of power production (-1 = extraction, +1 = injection).
            Sign of power production (1 = heat extraction, -1 = heat injection).
        T_fi : np.ndarray
            Inlet fluid temperature over time [°C].
        T_fo : np.ndarray
+2 −2
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ class B2G_ana:
                    T_ftimes[i] = T_f  # stored index time, depth, pipe
                    T_b[i] = Tb
                    qbzseg[i] = qbz
                    qsign[i] = np.sign(max(qbz) * min(qbz))
                    qsign[i] = np.sign(np.sum(qbz))
                    imax = i

        hours = time / 3600.0
@@ -494,7 +494,7 @@ class B2G_ana:
                    T_b[i] = Tb
                    # qbz is calculated at the depth division in segments (zseg)
                    qbzseg[i] = qbz
                    qsign[i] = np.sign(max(qbz) * min(qbz))
                    qsign[i] = np.sign(np.sum(qbz))
                    imax = i

        hours = time / 3600.0