Loading docs/manual/simulation_configuration.md +5 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,7 @@ Supported parameters include: - Tgrad - Q - fluid_percent - r_out Supported sampling distributions and their corresponding arguments for the configuration JSON are: Loading Loading @@ -256,6 +257,10 @@ optimization simulation, see the example for [Optimization of a coaxial BHE](../ > and upwards in the inner pipe. Optimization of the pipe radius for > this design is only supported for the inner pipe. > When `r_out` is optimized, its resulting value can differ between samples. > In that case, `r_out` is stored per-sample (dimensions `samples`; `nPipes`) > in the results file instead of the usual single locked-parameter value. --- ## Simulation results Loading pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "geoloop" version = "1.0.7" version = "1.1.0" description = "This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems" authors = [ { name = "Zanne Korevaar", email = "zanne.korevaar@tno.nl" }, Loading src/geoloop/bin/SingleRunSim.py +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ def optimize_forkeys( x0[i] = 0.5 * sum(boundsval[i]) method = "Nelder-Mead" method = "Powell" # method = "Powell" # ftol is tolerance for output power error of optimized point result = minimize( Loading @@ -70,7 +70,7 @@ def optimize_forkeys( args=(optimize_keys, config, copcrit, isample), bounds=boundsval, method=method, options={"maxiter": 50, "ftol": 100}, options={"maxiter": 50, "fatol": 5}, ) return result, config Loading src/geoloop/constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ units_dict = { "insu_k": "W/mK", "insu_dr": "%", "k_g_res": "W/mK", "r_out": "m", } # Dictionary of formatted names for various parameters in the model. Loading Loading @@ -74,6 +75,7 @@ format_dict = { "insu_k": "$insu_{k}$", "insu_dr": "$insu_{dr}$", "k_g_res": "$k_{g-res}$", "r_out": "$r_{out}$", } # Dictionary with colors for lithology plotting Loading src/geoloop/geoloopcore/CoaxialPipe.py +10 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,11 @@ class CoaxialPipe(CustomPipe): R_f_out_out = 1.0 / (h_f_a_out * 2 * np.pi * r_out_in) R_fp = R_p_out + R_f_out_out r_inner = np.roll(self.r_in, 1) r_outer = np.roll(self.r_out, 1) # r_inner = np.roll(self.r_in, 1) # r_outer = np.roll(self.r_out, 1) r_inner = self.r_in r_outer = self.r_out self.coaxial = gt.pipes.Coaxial( (0, 0), r_inner, r_outer, self.b, k_s, k_g[0], R_ff, R_fp, J=self.J Loading Loading @@ -498,6 +501,11 @@ class CoaxialPipe(CustomPipe): if abs(np.sum(qbz) - power) > 1: print("power is not sumq (sumq, power):", np.sum(qbz), ",", power) # Reff = -np.average(Tf - Tb) * bh.H / (power + 1e-6) if abs(power) > 1e-3: Reff = -np.average(Tf - Tb) * bh.H / power else: Reff = -1 return T_f_out, power, Reff, ptemp, Tb, qbz Loading
docs/manual/simulation_configuration.md +5 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,7 @@ Supported parameters include: - Tgrad - Q - fluid_percent - r_out Supported sampling distributions and their corresponding arguments for the configuration JSON are: Loading Loading @@ -256,6 +257,10 @@ optimization simulation, see the example for [Optimization of a coaxial BHE](../ > and upwards in the inner pipe. Optimization of the pipe radius for > this design is only supported for the inner pipe. > When `r_out` is optimized, its resulting value can differ between samples. > In that case, `r_out` is stored per-sample (dimensions `samples`; `nPipes`) > in the results file instead of the usual single locked-parameter value. --- ## Simulation results Loading
pyproject.toml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "geoloop" version = "1.0.7" version = "1.1.0" description = "This is a Python package for simulation of (deep) vertical Borehole Heat Exchanger (BHE) systems" authors = [ { name = "Zanne Korevaar", email = "zanne.korevaar@tno.nl" }, Loading
src/geoloop/bin/SingleRunSim.py +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ def optimize_forkeys( x0[i] = 0.5 * sum(boundsval[i]) method = "Nelder-Mead" method = "Powell" # method = "Powell" # ftol is tolerance for output power error of optimized point result = minimize( Loading @@ -70,7 +70,7 @@ def optimize_forkeys( args=(optimize_keys, config, copcrit, isample), bounds=boundsval, method=method, options={"maxiter": 50, "ftol": 100}, options={"maxiter": 50, "fatol": 5}, ) return result, config Loading
src/geoloop/constants.py +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ units_dict = { "insu_k": "W/mK", "insu_dr": "%", "k_g_res": "W/mK", "r_out": "m", } # Dictionary of formatted names for various parameters in the model. Loading Loading @@ -74,6 +75,7 @@ format_dict = { "insu_k": "$insu_{k}$", "insu_dr": "$insu_{dr}$", "k_g_res": "$k_{g-res}$", "r_out": "$r_{out}$", } # Dictionary with colors for lithology plotting Loading
src/geoloop/geoloopcore/CoaxialPipe.py +10 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,11 @@ class CoaxialPipe(CustomPipe): R_f_out_out = 1.0 / (h_f_a_out * 2 * np.pi * r_out_in) R_fp = R_p_out + R_f_out_out r_inner = np.roll(self.r_in, 1) r_outer = np.roll(self.r_out, 1) # r_inner = np.roll(self.r_in, 1) # r_outer = np.roll(self.r_out, 1) r_inner = self.r_in r_outer = self.r_out self.coaxial = gt.pipes.Coaxial( (0, 0), r_inner, r_outer, self.b, k_s, k_g[0], R_ff, R_fp, J=self.J Loading Loading @@ -498,6 +501,11 @@ class CoaxialPipe(CustomPipe): if abs(np.sum(qbz) - power) > 1: print("power is not sumq (sumq, power):", np.sum(qbz), ",", power) # Reff = -np.average(Tf - Tb) * bh.H / (power + 1e-6) if abs(power) > 1e-3: Reff = -np.average(Tf - Tb) * bh.H / power else: Reff = -1 return T_f_out, power, Reff, ptemp, Tb, qbz