ghx package¶
Module contents¶
-
class
ghx.aggregated_loads.
AggregatedLoadFixed
(loads, first_sim_hour, max_length, init=False)[source]¶ Bases:
object
Class that contains a block of aggregated loads
-
class
ghx.aggregated_loads.
AggregatedLoadShifting
(max_loads=0)[source]¶ Bases:
object
Class that contains a block of aggregated loads
-
class
ghx.array.
GHXArray
(ghx_input_json_path, loads_path, output_path, print_output=True)[source]¶ Bases:
object
-
class
ghx.array_fixed.
GHXArrayFixedAggBlocks
(json_data, loads_path, output_path, print_output=True)[source]¶ Bases:
ghx.base.BaseGHXClass
GHXArrayFixedAggBlocks is the class object that holds the information that defines a ground heat exchanger array. This could be a single borehole, or a field with an arbitrary number of boreholes at arbitrary locations.
-
merge_agg_load_objs
(obj_list)[source]¶ Merges AggregatedLoad objects into a single AggregatedLoad object
Returns: merged AggregatedLoad object
-
-
class
ghx.array.
GHXArray
(ghx_input_json_path, loads_path, output_path, print_output=True)[source] Bases:
object
-
get_sim_config
(sim_config_path)[source] Reads the simulation configuration. If not successful, program exits.
Parameters: sim_config_path – path of json file containing the simulation configuration
-
simulate
()[source] Main simulation routine. Simulates the GHXArray object.
More docs to come...
-
-
class
ghx.array_fixed.
GHXArrayFixedAggBlocks
(json_data, loads_path, output_path, print_output=True)[source] Bases:
ghx.base.BaseGHXClass
GHXArrayFixedAggBlocks is the class object that holds the information that defines a ground heat exchanger array. This could be a single borehole, or a field with an arbitrary number of boreholes at arbitrary locations.
-
aggregate_load
()[source] Creates aggregated load object
-
collapse_aggregate_loads
()[source] Collapses aggregated loads
-
merge_agg_load_objs
(obj_list)[source] Merges AggregatedLoad objects into a single AggregatedLoad object
Returns: merged AggregatedLoad object
-
set_load_aggregation
()[source] Sets the load aggregation intervals based on the type specified by the user.
Intervals must be integer multiples.
-
simulate
()[source] More docs to come...
-
-
class
ghx.array_shifting.
GHXArrayShiftingAggBlocks
(json_data, loads_path, output_path, print_output=True)[source]¶ Bases:
ghx.base.BaseGHXClass
-
class
ghx.base.
BaseGHXClass
(json_data, loads_path, output_path, print_output=True)[source]¶ Bases:
object
Base class for GHXArray
-
class
ghx.borehole.
BoreholeClass
(json_data, print_output)[source]¶ Bases:
object
-
calc_bh_average_resistance
()[source]¶ Calculates the average thermal resistance of the borehole using the first-order multipole method.
Javed, S. & Spitler, J.D. 2016. ‘Accuracy of Borehole Thermal Resistance Calculation Methods for Grouted Single U-tube Ground Heat Exchangers.’ J. Energy Engineering. Draft in progress.
Equation 13
-
calc_bh_resistance
()[source]¶ Calculates the effective thermal resistance of the borehole assuming a uniform heat flux.
Javed, S. & Spitler, J.D. Calculation of Borehole Thermal Resistance. In ‘Advances in Ground-Source Heat Pump Systems,’ pp. 84. Rees, S.J. ed. Cambridge, MA. Elsevier Ltd. 2016.
Eq: 3-67
Coefficients for equations 13 and 26 from Javed & Spitler 2016 calculated here.
Javed, S. & Spitler, J.D. 2016. ‘Accuracy of Borehole Thermal Resistance Calculation Methods for Grouted Single U-tube Ground Heat Exchangers.’ J. Energy Engineering. Draft in progress.
Equation 14
-
calc_bh_total_internal_resistance
()[source]¶ Calculates the total internal thermal resistance of the borehole using the first-order multipole method.
Javed, S. & Spitler, J.D. 2016. ‘Accuracy of Borehole Thermal Resistance Calculation Methods for Grouted Single U-tube Ground Heat Exchangers.’ J. Energy Engineering. Draft in progress.
Equation 26
-
-
class
ghx.constants.
ConstantClass
[source]¶ Bases:
object
-
celsius_to_kelvin
= 273.15¶
-
hours_in_month
= 730¶
-
hours_in_year
= 8760¶
-
months_in_year
= 12¶
-
sec_in_hour
= 3600¶
-
-
class
ghx.fluids.
FluidsClass
(json_data, initial_temp, print_output)[source]¶ Bases:
object
Contains all fluid properties, correlations, etc.
-
cond
()[source]¶ Determines the fluid conductivity as a function of temperature, in Celsius. Uses the CoolProp python library. Fluid type is determined from the type of fluid specified for the GHX array object.
:returns fluid conductivity in [W/m-K]
-
cp
()[source]¶ Determines the fluid specific heat as a function of temperature, in Celsius. Uses the CoolProp python library to find the fluid specific heat. Fluid type is determined from the type of fluid specified for the GHX array object.
:returns fluid specific heat in [J/kg-K]
-
dens
()[source]¶ Determines the fluid density as a function of temperature, in Celsius. Uses the CoolProp python library. Fluid type is determined from the type of fluid specified for the GHX array object.
:returns fluid density in [kg/m3]
-
-
class
ghx.my_print.
PrintClass
(print_output, output_path)[source]¶ Bases:
object
-
color_fail
= 'red'¶
-
color_success
= 'green'¶
-
color_warn
= 'yellow'¶
-
log_messages
= ''¶
-
static
my_print
(message, color='')[source]¶ prints the message if self.print_output default color is black, unless overridden
-
output_path
= None¶
-
print_output
= None¶
-
-
class
ghx.pipe.
PipeClass
(json_data_pipe, json_data_fluid, initial_temp, print_output)[source]¶ Bases:
ghx.base_properties.BasePropertiesClass
-
calc_pipe_conduction_resistance
()[source]¶ Calculates the thermal resistance of a pipe, in [K/(W/m)].
Javed, S. & Spitler, J.D. 2016. ‘Accuracy of Borehole Thermal Resistance Calculation Methods for Grouted Single U-tube Ground Heat Exchangers.’ J. Energy Engineering. Draft in progress.
-
calc_pipe_convection_resistance
()[source]¶ Calculates the convection resistance using Gnielinski and Petukov, in [k/(W/m)]
Gneilinski, V. 1976. ‘New equations for heat and mass transfer in turbulent pipe and channel flow.’ International Chemical Engineering 16(1976), pp. 359-368.
-