From c0a8dc29468df3ad2f278c9d6f693f835d18ba08 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 12 Nov 2024 15:05:54 +0000 Subject: [PATCH] build based on 8030330 --- dev/.documenter-siteinfo.json | 2 +- dev/BNSPlots/index.html | 2 +- dev/Braedstrup/index.html | 2 +- dev/api/index.html | 24 ++++++++++++------------ dev/index.html | 2 +- dev/nonhistory/index.html | 6 +++--- dev/objects.inv | Bin 1087 -> 1087 bytes dev/python/index.html | 2 +- dev/tutorial/index.html | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 93cad02..438a473 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-04T09:46:27","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-12T15:05:49","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/BNSPlots/index.html b/dev/BNSPlots/index.html index 5e7eaf6..e73e4f3 100644 --- a/dev/BNSPlots/index.html +++ b/dev/BNSPlots/index.html @@ -1,2 +1,2 @@ -Visualizing the result with BNSPlots · BoreholeNetworksSimulator.jl

Visualizing the result with BNSPlots

The repository contains a subpackage called BNSPlots that contains useful convenience functions to easily display the results obtained from BoreholeNetworksSimulator.

Reference

BNSPlots.plot_borefieldFunction
plot_borefield(network, positions; distinguished_boreholes = [])

Makes a plot of the borefield, showing the boreholes numbered and their connections.

Arguments

  • network: Network specifying the connections between boreholes.
  • positions: The positions of each borehole.

Optional arguments

  • distinguished_boreholes: Vector of Tuple{Int, Color}. If specified, the boreholes corresponding to the given values will be highlighted with each of the colors provided.
source
BNSPlots.monitorFunction
monitor(containers, branch, t; steps = 1:length(t), display = [:Tfin, :Tfout, :Tb, :q], Δt = :year, color_pair = (colorant"navajowhite2", colorant"darkgreen")

Creates a plot of the result of the simulation.

Arguments

  • containers: The containers (SimulationContainers) containing the result of the simulation through simulate!.
  • boreholes: A vector containing the IDs of the boreholes whose data will be displayed.
  • t: The times at which the data corresponds. It should normally be options.t.

Optional arguments

  • steps: Index of the steps to display in the plot.
  • display: A vector describing which plots that will be generated. If :Tfin, :Tfout or :Tb are specified, a temperature plot will be created showing the inlet fluid temperature, the outlet fluid temperature, and the borehole wall temperature, respectively. If :q is specified, a separate power plot will be created shwoing the heat extracted per meter.
  • Δt: The scale of the x-axis in the plot. Possible options: :year, :month, :hour.
  • colors: A list of colors used for each borehole. If not specified, the colors used will be between colorant"navajowhite2" and colorant"darkgreen".
source
+Visualizing the result with BNSPlots · BoreholeNetworksSimulator.jl

Visualizing the result with BNSPlots

The repository contains a subpackage called BNSPlots that contains useful convenience functions to easily display the results obtained from BoreholeNetworksSimulator.

Reference

BNSPlots.plot_borefieldFunction
plot_borefield(network, positions; distinguished_boreholes = [])

Makes a plot of the borefield, showing the boreholes numbered and their connections.

Arguments

  • network: Network specifying the connections between boreholes.
  • positions: The positions of each borehole.

Optional arguments

  • distinguished_boreholes: Vector of Tuple{Int, Color}. If specified, the boreholes corresponding to the given values will be highlighted with each of the colors provided.
source
BNSPlots.monitorFunction
monitor(containers, branch, t; steps = 1:length(t), display = [:Tfin, :Tfout, :Tb, :q], Δt = :year, color_pair = (colorant"navajowhite2", colorant"darkgreen")

Creates a plot of the result of the simulation.

Arguments

  • containers: The containers (SimulationContainers) containing the result of the simulation through simulate!.
  • boreholes: A vector containing the IDs of the boreholes whose data will be displayed.
  • t: The times at which the data corresponds. It should normally be options.t.

Optional arguments

  • steps: Index of the steps to display in the plot.
  • display: A vector describing which plots that will be generated. If :Tfin, :Tfout or :Tb are specified, a temperature plot will be created showing the inlet fluid temperature, the outlet fluid temperature, and the borehole wall temperature, respectively. If :q is specified, a separate power plot will be created shwoing the heat extracted per meter.
  • Δt: The scale of the x-axis in the plot. Possible options: :year, :month, :hour.
  • colors: A list of colors used for each borehole. If not specified, the colors used will be between colorant"navajowhite2" and colorant"darkgreen".
source
diff --git a/dev/Braedstrup/index.html b/dev/Braedstrup/index.html index 056bb45..965cf7f 100644 --- a/dev/Braedstrup/index.html +++ b/dev/Braedstrup/index.html @@ -11,4 +11,4 @@ 153.897 118.897 93.5639 74.8265 60.7942 -27.2873 -20.0578 -14.7582 -10.8234 144.883 112.083 87.7717 69.5736 55.8771 -29.8091 -21.8784 -16.1027 -11.856 136.767 108.025 86.4461 69.9911 57.3688 … -28.6089 -20.7213 -15.0661 -10.9335 - 149.022 124.549 105.729 90.6145 78.3994 -22.1191 -15.7456 -11.0385 -7.4812

Plots

In order to visualize the results, we can use the subpackage BNSPlots. For more details, refer to [Visualizing the result with BNSPlots](@ref).

Inlet borehole temperatures and heat flows for boreholes along two branches in the borehole field. The time series are color coded according to the previous configuration plot above. In addition to the inlet temperature, the output temperature from the branch (grey dot), and the mean output temperature from the field (black dot) are displayed.

Finally we can display the heatmap of the temperature field in the borehole region during the 10th year of operation

Running the code in Python

The example is also avaiable from Python. For details of how this is done refer to Running BoreholeNetworksSimulator from Python. The Python version is in:

examples/Braedstrup/main.py
+ 149.022 124.549 105.729 90.6145 78.3994 -22.1191 -15.7456 -11.0385 -7.4812

Plots

In order to visualize the results, we can use the subpackage BNSPlots. For more details, refer to [Visualizing the result with BNSPlots](@ref).

Inlet borehole temperatures and heat flows for boreholes along two branches in the borehole field. The time series are color coded according to the previous configuration plot above. In addition to the inlet temperature, the output temperature from the branch (grey dot), and the mean output temperature from the field (black dot) are displayed.

Finally we can display the heatmap of the temperature field in the borehole region during the 10th year of operation

Running the code in Python

The example is also avaiable from Python. For details of how this is done refer to Running BoreholeNetworksSimulator from Python. The Python version is in:

examples/Braedstrup/main.py
diff --git a/dev/api/index.html b/dev/api/index.html index 145adc0..391d059 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,16 +1,16 @@ -API · BoreholeNetworksSimulator.jl

Public API

General

These are the functions used to run the simulation. Note that an object of type SimulationOptions is needed to call them.

BoreholeNetworksSimulator.initializeFunction
initialize(options::SimulationOptions)

Precompute the objects of each TimeSuperpositionMethod that can be computed ahead of time and return the SimulationContainers of the required size.

source
BoreholeNetworksSimulator.simulate!Function
simulate!(;options::SimulationOptions, operator, containers::SimulationContainers)

Run the simulation defined by options. At the end of simulation, containers.X will contain the results. containers should be the output of initialize.

operator should be a function that returns a BoreholeOperation and with signature operator(i, Tin, Tout, Tb, q, configurations):

  • i::Int is the time step
  • Tin is a vector containing the inlet temperature of each borehole
  • Tout is a vector containing the outlet temperature of each borehole
  • Tb is a vector containing the borehole wall temperature of each borehole
  • q is a vector containing the heat exchanged by each borehole
  • configurations: is the list of possible hydraulic configurations of the borefield.
source

Note that an array of BoreholeNetwork containing all the configurations allowed during the simulation must be specified in SimulationOptions. On the other hand, BoreholeOperation is an object that needs to be returned by an object subtype of [Operator](@ref) at each time step , representing the dynamical changes in the operation. See Basic tutorial for more details.

BoreholeNetworksSimulator.BoreholeNetworkType
BoreholeNetwork(
+API · BoreholeNetworksSimulator.jl

Public API

General

These are the functions used to run the simulation. Note that an object of type SimulationOptions is needed to call them.

BoreholeNetworksSimulator.initializeFunction
initialize(options::SimulationOptions)

Precompute the objects of each TimeSuperpositionMethod that can be computed ahead of time and return the SimulationContainers of the required size.

source
BoreholeNetworksSimulator.simulate!Function
simulate!(;options::SimulationOptions, operator, containers::SimulationContainers)

Run the simulation defined by options. At the end of simulation, containers.X will contain the results. containers should be the output of initialize.

operator should be a function that returns a BoreholeOperation and with signature operator(i, Tin, Tout, Tb, q, configurations):

  • i::Int is the time step
  • Tin is a vector containing the inlet temperature of each borehole
  • Tout is a vector containing the outlet temperature of each borehole
  • Tb is a vector containing the borehole wall temperature of each borehole
  • q is a vector containing the heat exchanged by each borehole
  • configurations: is the list of possible hydraulic configurations of the borefield.
source

Note that an array of BoreholeNetwork containing all the configurations allowed during the simulation must be specified in SimulationOptions. On the other hand, BoreholeOperation is an object that needs to be returned by an object subtype of [Operator](@ref) at each time step , representing the dynamical changes in the operation. See Basic tutorial for more details.

BoreholeNetworksSimulator.BoreholeNetworkType
BoreholeNetwork(
     graph::SimpleDiGraph = SimpleDiGraph()
-)

Represents the network of boreholes with a directed graph graph, whose edges represent the flow of fluid. The graph is expected to have number of vertices Nb+2, where Nb is the number of boreholes in the borefield. Vertexs number Nb+1 and Nb+2 represent the mass flow source and sink, respectively. All branches are expected to be connected to the source at the beggining and to the sink at the end.

Convenience constructors

  • BoreholeNetwork(n::Int)

Create a network of n boreholes (and the source and sink) without any connections.

  • all_parallel_network(n::Int)

Create a network of n boreholes connected in parallel.

  • all_series_network(n::Int)

Create a network of n boreholes connected in series.

source

Some relevant network related functions:

BoreholeNetworksSimulator.BoreholeOperationType
BoreholeOperation{T <: Number}(
+)

Represents the network of boreholes with a directed graph graph, whose edges represent the flow of fluid. The graph is expected to have number of vertices Nb+2, where Nb is the number of boreholes in the borefield. Vertexs number Nb+1 and Nb+2 represent the mass flow source and sink, respectively. All branches are expected to be connected to the source at the beggining and to the sink at the end.

Convenience constructors

  • BoreholeNetwork(n::Int)

Create a network of n boreholes (and the source and sink) without any connections.

  • all_parallel_network(n::Int)

Create a network of n boreholes connected in parallel.

  • all_series_network(n::Int)

Create a network of n boreholes connected in series.

source

Some relevant network related functions:

BoreholeNetworksSimulator.BoreholeOperationType
BoreholeOperation{T <: Number}(
     valves::Dict{Int, Valve{T}}
     source_mass_flow::T
     network::BoreholeNetwork
-)

Representation of the a state of operation of the borefield.

Arguments

  • valves: A dicitonary specifying the divergences of the network. Each key is the borehole where the divergence occurs, and its corresponding value is a Valve object, describing the behaviour of the divergence.
  • source_mass_flow: The total amount of mass flow injected into all branches.
  • network: The representation of the pipe layout of the borefield, including direction of flow.

Convenience constructors

BoreholeOperation(;network::BoreholeNetwork, mass_flows::Vector{T}) Builds the operation corresponding to network sending mass flow mass_flows[i] in each branch identical. This method takes care of the initial valve from the source to the start of each branch.

source
BoreholeNetworksSimulator.ValveType
Valve{T <: Number}(
+)

Representation of the a state of operation of the borefield.

Arguments

  • valves: A dicitonary specifying the divergences of the network. Each key is the borehole where the divergence occurs, and its corresponding value is a Valve object, describing the behaviour of the divergence.
  • source_mass_flow: The total amount of mass flow injected into all branches.
  • network: The representation of the pipe layout of the borefield, including direction of flow.

Convenience constructors

BoreholeOperation(;network::BoreholeNetwork, mass_flows::Vector{T}) Builds the operation corresponding to network sending mass flow mass_flows[i] in each branch identical. This method takes care of the initial valve from the source to the start of each branch.

source
BoreholeNetworksSimulator.ValveType
Valve{T <: Number}(
     split::Dict{Int, T}
-)

Models the behaviour of the fluid at pipe divergences. split is a dicitonary representing the divergence. Its keys represent the boreholes where the flow splits and its values are the proportion of flow going to each borehole.

source

Valve creation:

BoreholeNetworksSimulator.valveFunction
valve(nodes::Vector{Int}, weights::Vector{T})

Return a Valve that splits the flow to each borehole nodes[i] in the proportion weights[i].

source
BoreholeNetworksSimulator.absolute_valveFunction
absolute_valve(nodes::Vector{Int}, mass_flows::Vector{T})

Return a Valve that splits the flow such that each borehole nodes[i] receives an absolute amount of mass flow equal to mass_flows[i].

source
BoreholeNetworksSimulator.OperatorType
abstract type Operator

Interface for operation strategies.

Required functions:

  • operate(::Operator, step, options, X)

The implementation of operate must return an instance of BoreholeOperation, specifying the network topology and the mass flows per branch for the current time step. step is the current time step, options contains the provided simulation options and X contains the time series up to the time step step-1 of the inlet fluid temperature, the outlet fluid temperature, the wall temperature and the heat extraction rate, for each borehole in the borefield. To get Tfin, Tfout, Tb, and q from X, use the functions extract_Tfin, extract_Tfout, extract_Tb, extract_q, or get them manually at the indices [1:2:2Nb, :], [2:2:2Nb, :], [2Nb+1:3Nb, :], [3Nb+1:end, :], respectively.

source

Prewritten operator strategies

BoreholeNetworksSimulator.ConstantOperatorType
ConstantOperator{T <: Number} <: Operator (
+)

Models the behaviour of the fluid at pipe divergences. split is a dicitonary representing the divergence. Its keys represent the boreholes where the flow splits and its values are the proportion of flow going to each borehole.

source

Valve creation:

BoreholeNetworksSimulator.valveFunction
valve(nodes::Vector{Int}, weights::Vector{T})

Return a Valve that splits the flow to each borehole nodes[i] in the proportion weights[i].

source
BoreholeNetworksSimulator.absolute_valveFunction
absolute_valve(nodes::Vector{Int}, mass_flows::Vector{T})

Return a Valve that splits the flow such that each borehole nodes[i] receives an absolute amount of mass flow equal to mass_flows[i].

source
BoreholeNetworksSimulator.OperatorType
abstract type Operator

Interface for operation strategies.

Required functions:

  • operate(::Operator, step, options, X)

The implementation of operate must return an instance of BoreholeOperation, specifying the network topology and the mass flows per branch for the current time step. step is the current time step, options contains the provided simulation options and X contains the time series up to the time step step-1 of the inlet fluid temperature, the outlet fluid temperature, the wall temperature and the heat extraction rate, for each borehole in the borefield. To get Tfin, Tfout, Tb, and q from X, use the functions extract_Tfin, extract_Tfout, extract_Tb, extract_q, or get them manually at the indices [1:2:2Nb, :], [2:2:2Nb, :], [2Nb+1:3Nb, :], [3Nb+1:end, :], respectively.

source

Prewritten operator strategies

BoreholeNetworksSimulator.ConstantOperatorType
ConstantOperator{T <: Number} <: Operator (
     valves::Dict{Int, Valve{T}} = Dict{Int, Valve{Float64}}()
     mass_flow::T
-)

Constant operation strategy. Its implementation of operate is: operate(op::ConstantOperator, step, options, X) = BoreholeOperation(op.valves, op.mass_flow, options.configurations[1])

Convenience constructors

ConstantOperator(network::BoreholeNetwork; mass_flows)

Builds the initial valve and total source mass flow needed to have mass flow equal to mass_flows[i] in branch i, according to the network network.

source

Simulation Options

The available options for the simulation are specified through a SimulationOptions object. This needs to be passed to the initialize and simulate! functions. The options are modular: each particular option can be chosen independently of the others, allowing for a wide range of possible simulations. Note that in some particular cases there might be some incompatibilities between options or non-implemented interactions. In those cases, an error will appear explaining the reason.

BoreholeNetworksSimulator.SimulationOptionsType
struct SimulationOptions{
+)

Constant operation strategy. Its implementation of operate is: operate(op::ConstantOperator, step, options, X) = BoreholeOperation(op.valves, op.mass_flow, options.configurations[1])

Convenience constructors

ConstantOperator(network::BoreholeNetwork; mass_flows)

Builds the initial valve and total source mass flow needed to have mass flow equal to mass_flows[i] in branch i, according to the network network.

source

Simulation Options

The available options for the simulation are specified through a SimulationOptions object. This needs to be passed to the initialize and simulate! functions. The options are modular: each particular option can be chosen independently of the others, allowing for a wide range of possible simulations. Note that in some particular cases there might be some incompatibilities between options or non-implemented interactions. In those cases, an error will appear explaining the reason.

BoreholeNetworksSimulator.SimulationOptionsType
struct SimulationOptions{
                 N <: Number,
                 Tol <: Number,
                 TSM <: TimeSuperpositionMethod,
@@ -33,12 +33,12 @@
     Nt::Int
     atol::Tol = 0.
     rtol::Tol = sqrt(eps())
-)

Specifies all the options for the simulation.

  • method: time superposition method used to compute the response. Available options: ConvolutionMethod, NonHistoryMethod.
  • constraint: constraint that the system must satisfy. Can be variable with time. Available options: HeatLoadConstraint, InletTempConstraint, TotalHeatLoadConstraint.
  • borefield: describes the geometrical properties and the boreholes of the borefield on which the simulation will be performed. Available options: EqualBoreholesBorefield.
  • medium: properties of the ground where the borefield is places. Available options: GroundMedium, FlowInPorousMedium.
  • boundary_condition: boundary condition of the domain where the simulation is performed. Available options: NoBoundary, DirichletBoundaryCondition, NeumannBoundaryCondition.
  • approximation: determines how the approximate value for each segment is computed. Available options: MeanApproximation, MidPointApproximation.
  • fluid: properties of the fluid flowing through the hydraulic system.
  • configurations: possible hydraulic topologies possible in the system, including reverse flow.
  • Δt: time step used in the simulation.
  • Nt: total amount of time steps of the simulation.
  • atol: absolute tolerance used for the adaptive integration methods.
  • rtol: relative tolerance used for the adaptive integration methods.
source

The several options are listed below:

Fluid

Models the fluid used in the hydraulic system.

BoreholeNetworksSimulator.FluidType
abstract type Fluid end

Interface for fluids.

Required functions:

  • cpf(::Fluid): Return the scpecific heat capacity of the fluid.
  • thermophysical_properties(::Fluid, T): Return the μ, ρ, cp, and k of the fluid at temperature T.
source

Options

BoreholeNetworksSimulator.WaterType
Water <: Fluid (
+)

Specifies all the options for the simulation.

  • method: time superposition method used to compute the response. Available options: ConvolutionMethod, NonHistoryMethod.
  • constraint: constraint that the system must satisfy. Can be variable with time. Available options: HeatLoadConstraint, InletTempConstraint, TotalHeatLoadConstraint.
  • borefield: describes the geometrical properties and the boreholes of the borefield on which the simulation will be performed. Available options: EqualBoreholesBorefield.
  • medium: properties of the ground where the borefield is places. Available options: GroundMedium, FlowInPorousMedium.
  • boundary_condition: boundary condition of the domain where the simulation is performed. Available options: NoBoundary, DirichletBoundaryCondition, NeumannBoundaryCondition.
  • approximation: determines how the approximate value for each segment is computed. Available options: MeanApproximation, MidPointApproximation.
  • fluid: properties of the fluid flowing through the hydraulic system.
  • configurations: possible hydraulic topologies possible in the system, including reverse flow.
  • Δt: time step used in the simulation.
  • Nt: total amount of time steps of the simulation.
  • atol: absolute tolerance used for the adaptive integration methods.
  • rtol: relative tolerance used for the adaptive integration methods.
source

The several options are listed below:

Fluid

Models the fluid used in the hydraulic system.

BoreholeNetworksSimulator.FluidType
abstract type Fluid end

Interface for fluids.

Required functions:

  • cpf(::Fluid): Return the scpecific heat capacity of the fluid.
  • thermophysical_properties(::Fluid, T): Return the μ, ρ, cp, and k of the fluid at temperature T.
source

Options

BoreholeNetworksSimulator.WaterType
Water <: Fluid (
     stored_properties::ThermophysicalProperties{Float64}
-)

Models water.

To initialize, use the convenience method: function Water() that will automatically compute stored_properties.

source
BoreholeNetworksSimulator.EthanolMixType
EthanolMix <: Fluid (
     stored_properties::ThermophysicalProperties{Float64}
-)

Models a 20% ethanol and water mix.

To initialize, use the convenience method: function EthanolMix() that will automatically compute stored_properties.

source

Medium

Models the underground medium through which the heat will transfer between boreholes.

BoreholeNetworksSimulator.MediumType
abstract type Medium

Interface for mediums.

Required functions:

  • get_λ(::Medium): Return the thermal conductivity of the medium.
  • get_α(::Medium): Return the thermal diffusivity of the medium.
  • get_T0(::Medium): Return the initial temperature of the medium.
source

Options

BoreholeNetworksSimulator.GroundMediumType
GroundMedium{T <: Real} <: Medium @deftype T

Model pure conduction in the ground.

Arguments

  • λ = 3.: ground conductivity
  • α = 1e-6: ground thermal diffusivity
  • C = λ/α: ground medium capacity
  • T0 = 0.: initial ground temperature
source
BoreholeNetworksSimulator.FlowInPorousMediumType
FlowInPorousMedium{T <: Real} <: Medium @deftype T

Model a porous ground with a water flow.

Arguments

  • λw = 0.6: water thermal conductivity
  • λs = 2.: ground thermal conductivity
  • Cw = 4.18*1e6:water thermal capacity
  • Cs = 1.7*1e6: ground thermal capacity
  • θ = 0.: angle of Darcy velocity
  • Φ = 0.2: porosity
  • λ = λs * (1-Φ) + λw*Φ: porous medium conductivity
  • C = Cs * (1-Φ) + Cw*Φ: porous medium capacity
  • α = λ/C: porous medium thermal diffusivity
  • ux_in_meterperday = 1e-2: groundwater speed along the flow coordinate
  • ux = ux_in_meterperday/(3600*24): groundwater speed in m/s
  • vt = ux * Cw/C: porous medium darcy velocity
  • T0 = 0.: initial ground temperature
source

Borefield

Models the geometry of the borefield.

BoreholeNetworksSimulator.BorefieldType
abstract type Borefield

Interface for borefields.

Required functions

  • n_boreholes(::Borefield): Return the amount of boreholes present in the borefield.
  • get_H(::Borefield, i): Return the length of borehole i.
  • get_rb(::Borefield, i): Return the radius of borehole i.
  • segment_coordinates(::Borefield): Return a vector with the coordinates of each segment.
  • internal_model_coeffs!(M, ::Borefield, medium, operation, fluid): Compute inplace in M the coefficients corresponding to the internal model equations, given the medium, fluid and operation in use in the system. Note that M is only a slice of Nb (number of boreholes) rows, provided as a view.
  • internal_model_b!(b, ::Borefield): Compute inplace in b the independent terms corresponding to the internal model equations. Note that b is only a vector of length Nb (number of boreholes) rows, provided as a view.
source

Options

BoreholeNetworksSimulator.EqualBoreholesBorefieldType
EqualBoreholesBorefield{T <: Borehole, R <: Medium, S <: Real} <: Borefield
-EqualBoreholesBorefield(borehole_prototype::T, positions::Vector{Point2{S}}), medium::R)

Model a borefield with boreholes all identical to the prototype borehole_prototype, placed at positions. Note that the length of positions determines the amount of boreholes in the field. medium contains the properties of the ground.

source

Borehole

Models the internal heat transfer in the borehole.

BoreholeNetworksSimulator.BoreholeType
abstract type Borehole

Interface for boreholes.

Required functions:

  • get_H(::Borehole): Return the length of the borehole.
  • get_D(::Borehole): Return the burial depth of the borehole.
  • get_rb(::Borehole): Return the radius of the borehole.
  • uniform_Tb_coeffs(::Borehole, λ, mass_flow, Tref, fluid): Return the internal model coefficients for the resistance network between the pipes and the wall.
source

Options

BoreholeNetworksSimulator.SingleUPipeBoreholeType
SingleUPipeBorehole{T <: Real} <: Borehole @deftype T
-SingleUPipeBorehole(H, D)

Model a borehole with a single U-pipe with burial depth D and length H.

Arguments

  • λg = 2.5: grout conductivity
  • Cg = 2000. * 1550.: grout capacity
  • αg = λg/Cg: grout thermal diffusivity
  • rp = 0.02: pipe radius
  • λp = 0.42: pipe material conductivity
  • dpw = 0.0023: pipe thickness
  • rpo = rp + dpw: equivalent pipe radius
  • hp = 725.: heat transfer coefficient fluid to pipe
  • pipe_position::NTuple{2, Tuple{T, T}} = [(0.03, 0.0), (-0.03, 0.0)]: positions of the downward and upward branches of the pipe. (0, 0) represents the center of the borehole.
  • rb = 0.115/2: borehole radius
source

Constraint

Imposes the working conditions and demands of the whole system.

BoreholeNetworksSimulator.ConstraintType
abstract type Constraint

Interface for constraints.

Required functions:

  • constraints_coeffs!(M, ::Constraint, operation::BoreholeOperation): Compute inplace in M the coefficients corresponding to the constraints equations, given the current operation.network. Note that M is only a slice of Nbr (number of branches) rows, provided as a view.
  • constraints_b!(b, ::Constraint, ::BoreholeOperation, step): Compute inplace in b the independent term corresponding to the constraints equations, given the current operation.network, at the time step step. Note that b is only a vector of length Nbr (number of branches), provided as a view.
source

Options

BoreholeNetworksSimulator.HeatLoadConstraintType
HeatLoadConstraint(Q_tot::Matrix{T}){T <: Number} <: Constraint

Constrain the heat extracted per branch.

The heat constraint Q_tot must be a Matrix, whose column i are the loads per branch at the time step i. The amount of rows of Q_tot must equal to the amount of branches specified in BoreholeNetwork.

source
BoreholeNetworksSimulator.constant_HeatLoadConstraintFunction
constant_HeatLoadConstraint(Q_tot::Vector{T}, Nt) where {T <: Number}

Convenience initializer for HeatLoadConstraint. It creates a constant heat load constraint through all the Nt time steps, where Q_tot are the heat load for each branch.

source
BoreholeNetworksSimulator.uniform_HeatLoadConstraintFunction
uniform_HeatLoadConstraint(Q_tot::Vector{T}, Nbr) where {T <: Number}

Convenience initializer for HeatLoadConstraint. It creates a uniform heat load constraint along all branches, where T_in are the heat load for each time step.

source
BoreholeNetworksSimulator.InletTempConstraintType
InletTempConstraint(T_in::Matrix{T}){T <: Number} <: Constraint

Constrain the inlet temperature of the first borehole in each branch.

The inlet temperature T_in must be a Matrix, whose column i are the inlet temperatures per branch at the time step i. The amount of rows of T_in must equal to the amount of branches specified in BoreholeNetwork.

source
BoreholeNetworksSimulator.constant_InletTempConstraintFunction
constant_InletTempConstraint(T_in::Vector{N}, Nt) where {N <: Number}

Convenience initializer for InletTempConstraint. It creates a constant inlet temperature constraint through all the Nt time steps, where T_in are the inlet temperatures for each branch.

source
BoreholeNetworksSimulator.uniform_InletTempConstraintFunction
uniform_InletTempConstraint(T_in::Vector{N}, Nbr) where {N <: Number}

Convenience initializer for InletTempConstraint. It creates a uniform inlet temperature constraint along all branches, where T_in are the inlet temperatures for each time step.

source

Time Superposition Method

Applies methods for time superposition.

BoreholeNetworksSimulator.TimeSuperpositionMethodType
abstract type TimeSuperpositionMethod

Interface for time superposition methods.

Required functions:

  • method_coeffs!(M, ::TimeSuperpositionMethod, options): Compute inplace in M the coefficients corresponding to the heat transfer equations, given options. Note that M is only a slice of Nbr (number of branches) rows, provided as a view.
  • method_b!(b, ::TimeSuperpositionMethod, borefield, medium, step): Compute inplace in b the independent terms corresponding to the heat transfer equations, given the medium, at the given time step step. Note that b is only a vector of length Nbr (number of branches) rows, provided as a view.
  • precompute_auxiliaries!(method::TimeSuperpositionMethod; options): Compute inplace in method the auxiliary quantities used in the simulation that can be performed ahead of time.
  • update_auxiliaries!(::TimeSuperpositionMethod, X, borefield, step): Update inplace in method the auxiliaries after each time step step.
source

Options

BoreholeNetworksSimulator.ConvolutionMethodType
ConvolutionMethod{T} <: TimeSuperpositionMethod 
-ConvolutionMethod()

Use the naïve convolution to compute the thermal response between boreholes. It should be initialized without arguments, but it contains the variables:

  • g stores the unit response between each pair of boreholes evaluated at each time of the simulation.

It should be precomputed with initialize.

  • q stores the heat extraction in each borehole at each time step. It is filled as the simulation runs.
source
BoreholeNetworksSimulator.NonHistoryMethodType
NonHistoryMethod{T} <: TimeSuperpositionMethod 
-NonHistoryMethod()

Use the non-history method to compute the thermal response between boreholes. See A non-history dependent temporal superposition algorithm for the finite line source solution. It should be initialized without arguments, but it contains the variables:

  • F::Matrix{T}: each column contains the F function (encoding the load history) for each borehole. It is initially 0.
  • ζ::Vector{T}: discretization nodes of the integration interval. Shared for all boreholes. Precomputed in initialize.
  • w::Matrix{T}: weights of the ζ integration for each pair of boreholes. Precomputed in initialize.
  • expΔt::Vector{T}: exp(-ζ^2*Δt). Precomputed in initialize.

This feature is experimental and might not work as expected in some cases.

source

Boundary Condition

Models the ground surface.

Options

+)

Models a 20% ethanol and water mix.

To initialize, use the convenience method: function EthanolMix() that will automatically compute stored_properties.

source

Medium

Models the underground medium through which the heat will transfer between boreholes.

BoreholeNetworksSimulator.MediumType
abstract type Medium

Interface for mediums.

Required functions:

  • get_λ(::Medium): Return the thermal conductivity of the medium.
  • get_α(::Medium): Return the thermal diffusivity of the medium.
  • get_T0(::Medium): Return the initial temperature of the medium.
source

Options

BoreholeNetworksSimulator.GroundMediumType
GroundMedium{T <: Real} <: Medium @deftype T

Model pure conduction in the ground.

Arguments

  • λ = 3.: ground conductivity
  • α = 1e-6: ground thermal diffusivity
  • C = λ/α: ground medium capacity
  • T0 = 0.: initial ground temperature
source
BoreholeNetworksSimulator.FlowInPorousMediumType
FlowInPorousMedium{T <: Real} <: Medium @deftype T

Model a porous ground with a water flow.

Arguments

  • λw = 0.6: water thermal conductivity
  • λs = 2.: ground thermal conductivity
  • Cw = 4.18*1e6:water thermal capacity
  • Cs = 1.7*1e6: ground thermal capacity
  • θ = 0.: angle of Darcy velocity
  • Φ = 0.2: porosity
  • λ = λs * (1-Φ) + λw*Φ: porous medium conductivity
  • C = Cs * (1-Φ) + Cw*Φ: porous medium capacity
  • α = λ/C: porous medium thermal diffusivity
  • ux_in_meterperday = 1e-2: groundwater speed along the flow coordinate
  • ux = ux_in_meterperday/(3600*24): groundwater speed in m/s
  • vt = ux * Cw/C: porous medium darcy velocity
  • T0 = 0.: initial ground temperature
source

Borefield

Models the geometry of the borefield.

BoreholeNetworksSimulator.BorefieldType
abstract type Borefield

Interface for borefields.

Required functions

  • n_boreholes(::Borefield): Return the amount of boreholes present in the borefield.
  • get_H(::Borefield, i): Return the length of borehole i.
  • get_rb(::Borefield, i): Return the radius of borehole i.
  • segment_coordinates(::Borefield): Return a vector with the coordinates of each segment.
  • internal_model_coeffs!(M, ::Borefield, medium, operation, fluid): Compute inplace in M the coefficients corresponding to the internal model equations, given the medium, fluid and operation in use in the system. Note that M is only a slice of Nb (number of boreholes) rows, provided as a view.
  • internal_model_b!(b, ::Borefield): Compute inplace in b the independent terms corresponding to the internal model equations. Note that b is only a vector of length Nb (number of boreholes) rows, provided as a view.
source

Options

BoreholeNetworksSimulator.EqualBoreholesBorefieldType
EqualBoreholesBorefield{T <: Borehole, R <: Medium, S <: Real} <: Borefield
+EqualBoreholesBorefield(borehole_prototype::T, positions::Vector{Point2{S}}), medium::R)

Model a borefield with boreholes all identical to the prototype borehole_prototype, placed at positions. Note that the length of positions determines the amount of boreholes in the field. medium contains the properties of the ground.

source

Borehole

Models the internal heat transfer in the borehole.

BoreholeNetworksSimulator.BoreholeType
abstract type Borehole

Interface for boreholes.

Required functions:

  • get_H(::Borehole): Return the length of the borehole.
  • get_D(::Borehole): Return the burial depth of the borehole.
  • get_rb(::Borehole): Return the radius of the borehole.
  • uniform_Tb_coeffs(::Borehole, λ, mass_flow, Tref, fluid): Return the internal model coefficients for the resistance network between the pipes and the wall.
source

Options

BoreholeNetworksSimulator.SingleUPipeBoreholeType
SingleUPipeBorehole{T <: Real} <: Borehole @deftype T
+SingleUPipeBorehole(H, D)

Model a borehole with a single U-pipe with burial depth D and length H.

Arguments

  • λg = 2.5: grout conductivity
  • Cg = 2000. * 1550.: grout capacity
  • αg = λg/Cg: grout thermal diffusivity
  • rp = 0.02: pipe radius
  • λp = 0.42: pipe material conductivity
  • dpw = 0.0023: pipe thickness
  • rpo = rp + dpw: equivalent pipe radius
  • hp = 725.: heat transfer coefficient fluid to pipe
  • pipe_position::NTuple{2, Tuple{T, T}} = [(0.03, 0.0), (-0.03, 0.0)]: positions of the downward and upward branches of the pipe. (0, 0) represents the center of the borehole.
  • rb = 0.115/2: borehole radius
source

Constraint

Imposes the working conditions and demands of the whole system.

BoreholeNetworksSimulator.ConstraintType
abstract type Constraint

Interface for constraints.

Required functions:

  • constraints_coeffs!(M, ::Constraint, operation::BoreholeOperation): Compute inplace in M the coefficients corresponding to the constraints equations, given the current operation.network. Note that M is only a slice of Nbr (number of branches) rows, provided as a view.
  • constraints_b!(b, ::Constraint, ::BoreholeOperation, step): Compute inplace in b the independent term corresponding to the constraints equations, given the current operation.network, at the time step step. Note that b is only a vector of length Nbr (number of branches), provided as a view.
source

Options

BoreholeNetworksSimulator.HeatLoadConstraintType
HeatLoadConstraint(Q_tot::Matrix{T}){T <: Number} <: Constraint

Constrain the heat extracted per branch.

The heat constraint Q_tot must be a Matrix, whose column i are the loads per branch at the time step i. The amount of rows of Q_tot must equal to the amount of branches specified in BoreholeNetwork.

source
BoreholeNetworksSimulator.constant_HeatLoadConstraintFunction
constant_HeatLoadConstraint(Q_tot::Vector{T}, Nt) where {T <: Number}

Convenience initializer for HeatLoadConstraint. It creates a constant heat load constraint through all the Nt time steps, where Q_tot are the heat load for each branch.

source
BoreholeNetworksSimulator.uniform_HeatLoadConstraintFunction
uniform_HeatLoadConstraint(Q_tot::Vector{T}, Nbr) where {T <: Number}

Convenience initializer for HeatLoadConstraint. It creates a uniform heat load constraint along all branches, where T_in are the heat load for each time step.

source
BoreholeNetworksSimulator.InletTempConstraintType
InletTempConstraint(T_in::Matrix{T}){T <: Number} <: Constraint

Constrain the inlet temperature of the first borehole in each branch.

The inlet temperature T_in must be a Matrix, whose column i are the inlet temperatures per branch at the time step i. The amount of rows of T_in must equal to the amount of branches specified in BoreholeNetwork.

source
BoreholeNetworksSimulator.constant_InletTempConstraintFunction
constant_InletTempConstraint(T_in::Vector{N}, Nt) where {N <: Number}

Convenience initializer for InletTempConstraint. It creates a constant inlet temperature constraint through all the Nt time steps, where T_in are the inlet temperatures for each branch.

source
BoreholeNetworksSimulator.uniform_InletTempConstraintFunction
uniform_InletTempConstraint(T_in::Vector{N}, Nbr) where {N <: Number}

Convenience initializer for InletTempConstraint. It creates a uniform inlet temperature constraint along all branches, where T_in are the inlet temperatures for each time step.

source

Time Superposition Method

Applies methods for time superposition.

BoreholeNetworksSimulator.TimeSuperpositionMethodType
abstract type TimeSuperpositionMethod

Interface for time superposition methods.

Required functions:

  • method_coeffs!(M, ::TimeSuperpositionMethod, options): Compute inplace in M the coefficients corresponding to the heat transfer equations, given options. Note that M is only a slice of Nbr (number of branches) rows, provided as a view.
  • method_b!(b, ::TimeSuperpositionMethod, borefield, medium, step): Compute inplace in b the independent terms corresponding to the heat transfer equations, given the medium, at the given time step step. Note that b is only a vector of length Nbr (number of branches) rows, provided as a view.
  • precompute_auxiliaries!(method::TimeSuperpositionMethod; options): Compute inplace in method the auxiliary quantities used in the simulation that can be performed ahead of time.
  • update_auxiliaries!(::TimeSuperpositionMethod, X, borefield, step): Update inplace in method the auxiliaries after each time step step.
source

Options

BoreholeNetworksSimulator.ConvolutionMethodType
ConvolutionMethod{T} <: TimeSuperpositionMethod 
+ConvolutionMethod()

Use the naïve convolution to compute the thermal response between boreholes. It should be initialized without arguments, but it contains the variables:

  • g stores the unit response between each pair of boreholes evaluated at each time of the simulation.

It should be precomputed with initialize.

  • q stores the heat extraction in each borehole at each time step. It is filled as the simulation runs.
source
BoreholeNetworksSimulator.NonHistoryMethodType
NonHistoryMethod{T} <: TimeSuperpositionMethod 
+NonHistoryMethod()

Use the non-history method to compute the thermal response between boreholes. See A non-history dependent temporal superposition algorithm for the finite line source solution. It should be initialized without arguments, but it contains the variables:

  • F::Matrix{T}: each column contains the F function (encoding the load history) for each borehole. It is initially 0.
  • ζ::Vector{T}: discretization nodes of the integration interval. Shared for all boreholes. Precomputed in initialize.
  • w::Matrix{T}: weights of the ζ integration for each pair of boreholes. Precomputed in initialize.
  • expΔt::Vector{T}: exp(-ζ^2*Δt). Precomputed in initialize.

This feature is experimental and might not work as expected in some cases.

source

Boundary Condition

Models the ground surface.

Options

diff --git a/dev/index.html b/dev/index.html index a9b8732..648be66 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Introduction · BoreholeNetworksSimulator.jl

BoreholeNetworksSimulator.jl

BoreholeNetworksSimulator.jl is a pure Julia, performant, and modular framework for simulations of fields of interconnected borehole heat exchangers. Features:

  • Computes fluid temperatures, borehole wall temperatures and heat extracted.
  • Supports many different configurations and settings by being highly modular: boreholes, hydraulic configurations, ground properties, load demand or temperature constraints, ground boundary conditions can be seamlessly used with minimal effort.
  • Allows for design of operation strategies via an operator callback at each time step.
  • Implements the "non-history" time superposition method, reducing the computational complexity in the number of time steps to linear. This allows for simulations with fine time steps.
  • Python interoperability.

Getting started

BoreholeNetworksSimulator.jl is currently not in Julia's General registry (as well as some of its dependencies), however, it is easily available through the local registry geothermal_registry. In order to install it, start Julia and run the command:

using Pkg; pkg"registry add https://github.com/marcbasquensmunoz/geothermal_registry"; Pkg.add("BoreholeNetworksSimulator")

In order to learn how to use this package, please visit Basic tutorial first.

For users interested in running BoreholeNetworksSimulator.jl from Python, see also Running BoreholeNetworksSimulator from Python.

Design philosophy

The driving motivation when developing BoreholeNetworksSimulator.jl was to create an easy to use tool that is also highly flexible and performant.

This goal has been accomplished by leveraging Julia's Multiple Dispatch. Through a simple, common interface, the user can run a plethora of different simulations by modularly specifying options. Some options have physical meaning or interpretation, while others are purely algorithmic, yet they can all be seamlessly changed by changing a parameter. Please, refer to Public API for the full list of options offered by this package.

+Introduction · BoreholeNetworksSimulator.jl

BoreholeNetworksSimulator.jl

BoreholeNetworksSimulator.jl is a pure Julia, performant, and modular framework for simulations of fields of interconnected borehole heat exchangers. Features:

  • Computes fluid temperatures, borehole wall temperatures and heat extracted.
  • Supports many different configurations and settings by being highly modular: boreholes, hydraulic configurations, ground properties, load demand or temperature constraints, ground boundary conditions can be seamlessly used with minimal effort.
  • Allows for design of operation strategies via an operator callback at each time step.
  • Implements the "non-history" time superposition method, reducing the computational complexity in the number of time steps to linear. This allows for simulations with fine time steps.
  • Python interoperability.

Getting started

BoreholeNetworksSimulator.jl is currently not in Julia's General registry (as well as some of its dependencies), however, it is easily available through the local registry geothermal_registry. In order to install it, start Julia and run the command:

using Pkg; pkg"registry add https://github.com/marcbasquensmunoz/geothermal_registry"; Pkg.add("BoreholeNetworksSimulator")

In order to learn how to use this package, please visit Basic tutorial first.

For users interested in running BoreholeNetworksSimulator.jl from Python, see also Running BoreholeNetworksSimulator from Python.

Design philosophy

The driving motivation when developing BoreholeNetworksSimulator.jl was to create an easy to use tool that is also highly flexible and performant.

This goal has been accomplished by leveraging Julia's Multiple Dispatch. Through a simple, common interface, the user can run a plethora of different simulations by modularly specifying options. Some options have physical meaning or interpretation, while others are purely algorithmic, yet they can all be seamlessly changed by changing a parameter. Please, refer to Public API for the full list of options offered by this package.

diff --git a/dev/nonhistory/index.html b/dev/nonhistory/index.html index fc26f87..2c927f5 100644 --- a/dev/nonhistory/index.html +++ b/dev/nonhistory/index.html @@ -53,8 +53,8 @@ atol: Float64 0.0 rtol: Float64 1.4901161193847656e-8

Let us run the convolution

containers_convolution = @time initialize(options_convolution)
-@time simulate!(operator=operator, options=options_convolution, containers=containers_convolution)
  1.514216 seconds (1.04 M allocations: 75.747 MiB, 2.76% gc time, 63.37% compilation time)
-  5.332482 seconds (8.45 M allocations: 635.830 MiB, 2.62% gc time, 80.54% compilation time)

And now let us run the non-history

containers_nonhistory = @time initialize(options_nonhistory)
+@time simulate!(operator=operator, options=options_convolution, containers=containers_convolution)
  1.507187 seconds (1.05 M allocations: 76.178 MiB, 1.50% gc time, 63.02% compilation time)
+  5.387660 seconds (8.36 M allocations: 633.342 MiB, 3.00% gc time, 79.25% compilation time)

And now let us run the non-history

containers_nonhistory = @time initialize(options_nonhistory)
 @time simulate!(operator=operator, options=options_nonhistory, containers=containers_nonhistory)
 
 abs.(containers_convolution.X - containers_nonhistory.X)
8×8760 Matrix{Float64}:
@@ -65,4 +65,4 @@
  4.49312e-11  4.13696e-11  3.96714e-11     1.39799e-11  1.39799e-11
  4.49312e-11  4.13696e-11  3.96714e-11  …  1.39799e-11  1.39799e-11
  0.0          0.0          0.0             0.0          0.0
- 0.0          0.0          0.0             0.0          0.0

References

[1] Lazzarotto, Alberto; Basquens, Marc; Cimmino, Massimo; Non-history dependent temporal superposition algorithm for the point source solution, Research Conference Proceedings of the IGSHPA (2024).


This page was generated using Literate.jl.

+ 0.0 0.0 0.0 0.0 0.0

References

[1] Lazzarotto, Alberto; Basquens, Marc; Cimmino, Massimo; Non-history dependent temporal superposition algorithm for the point source solution, Research Conference Proceedings of the IGSHPA (2024).


This page was generated using Literate.jl.

diff --git a/dev/objects.inv b/dev/objects.inv index 53751cc3caa611e279f81637635d82d338ce59e9..ee9b66c9181262e209b7891e19a4773b50766d04 100644 GIT binary patch delta 12 Tcmdnbv7ci?D5Lqtu$RmL9-RcA delta 12 Tcmdnbv7ci?D5KfNu$RmL9+(84 diff --git a/dev/python/index.html b/dev/python/index.html index 163bbfb..40e0876 100644 --- a/dev/python/index.html +++ b/dev/python/index.html @@ -41,4 +41,4 @@ operator = SimpleOperator(2., 2)

Note that this is equivalent to calling the same code from Julia:

operator = jl.SimpleOperator(mass_flow = 2., branches = 2)

Finally we can run the simulation

containers = jl.initialize(options)
-jl.simulate_b(operator=operator, options=options, containers=containers)

Note that the bang in simulate! is replaced by a _b in the juliacall version of the function.

containers.X

Now, one can compare this result with its Julia version. If everything went right, they should agree!

+jl.simulate_b(operator=operator, options=options, containers=containers)

Note that the bang in simulate! is replaced by a _b in the juliacall version of the function.

containers.X

Now, one can compare this result with its Julia version. If everything went right, they should agree!

diff --git a/dev/tutorial/index.html b/dev/tutorial/index.html index a703d9c..cb7dd11 100644 --- a/dev/tutorial/index.html +++ b/dev/tutorial/index.html @@ -94,7 +94,7 @@ X: Array{Float64}((8, 120)) [0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0; … ; 0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0] b: Array{Float64}((8,)) [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] mf: Array{Float64}((2, 120)) [0.0 0.0 … 0.0 0.0; 0.0 0.0 … 0.0 0.0] -

And finally, we can start the simulation.

@time simulate!(operator=operator, options=options, containers=containers)
  0.001432 seconds (10.57 k allocations: 2.338 MiB)

The simulation is over! Note that the bulk of the time is spent in the precoputation, while the simulation itself is quite fast. This is especially good if we want to test different operation strategies.

The result is saved in

containers.X
8×120 Matrix{Float64}:
+

And finally, we can start the simulation.

@time simulate!(operator=operator, options=options, containers=containers)
  0.001491 seconds (10.69 k allocations: 2.342 MiB)

The simulation is over! Note that the bulk of the time is spent in the precoputation, while the simulation itself is quite fast. This is especially good if we want to test different operation strategies.

The result is saved in

containers.X
8×120 Matrix{Float64}:
  10.2564  10.2778  10.2922  10.3032  …  10.4519  10.4523  10.4526  10.4529
  10.2444  10.2658  10.2802  10.2913     10.44    10.4403  10.4407  10.441
  10.2564  10.2778  10.2922  10.3032     10.4519  10.4523  10.4526  10.4529
@@ -102,4 +102,4 @@
  10.1984  10.2198  10.2342  10.2453     10.394   10.3943  10.3947  10.395
  10.1984  10.2198  10.2342  10.2453  …  10.394   10.3943  10.3947  10.395
   1.0      1.0      1.0      1.0         1.0      1.0      1.0      1.0
-  1.0      1.0      1.0      1.0         1.0      1.0      1.0      1.0

Each column in containers.X contains the results for a time step. In each column, the first $2 N_b$ correspond to the fluid temperatures. In particular, the odd entries containers.X[1:2:2Nb, :] are the inlet temperatures, while the even entries containers.X[2:2:2Nb, :] are the outlet temperatures of each borehole. The next $Nb$ values containers.X[2Nb+1:3Nb, :] are the borehole wall temperatures. The last $Nb$ values containers.X[3Nb+1:4Nb, :] are the heat extraction of each borehole.


This page was generated using Literate.jl.

+ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0

Each column in containers.X contains the results for a time step. In each column, the first $2 N_b$ correspond to the fluid temperatures. In particular, the odd entries containers.X[1:2:2Nb, :] are the inlet temperatures, while the even entries containers.X[2:2:2Nb, :] are the outlet temperatures of each borehole. The next $Nb$ values containers.X[2Nb+1:3Nb, :] are the borehole wall temperatures. The last $Nb$ values containers.X[3Nb+1:4Nb, :] are the heat extraction of each borehole.


This page was generated using Literate.jl.