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_borefield
— Functionplot_borefield(network, positions; distinguished_branches = [], colors = [])
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_branches
: Vector ofInt
. If specified, the branches corresponding to the given values will be highlighted with the colors ofcolors
.colors
: Vector ofTuples
ofColor
. If specified, uses each pair of colors to define a color gradient to color each of the branches ofdistinguished_branches
.
BNSPlots.monitor
— Functionmonitor(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 throughsimulate!
.branch
: A vector containing the IDs of the boreholes whose data will be displayed.t
: The times at which the data corresponds. It should normally beoptions.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.color_pair
: A pair of colors used as extrema to generate a range of colors for each borehole.