GHE Manager
- class ghedesigner.manager.GHEManager[source]
Bases:
object
- find_design(throw: bool = True) int [source]
Calls design methods to execute sizing.
- Parameters:
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- prepare_results(project_name: str, note: str, author: str, iteration_name: str)[source]
Prepares the output results.
- set_borehole(height: float, buried_depth: float, diameter: float) int [source]
Sets the borehole instance
- Parameters:
height – height, or active length, of the borehole, in m.
buried_depth – depth of top of borehole below the ground surface, in m.
diameter – diameter of the borehole, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_coaxial_pipe(inner_pipe_d_in: float, inner_pipe_d_out: float, outer_pipe_d_in: float, outer_pipe_d_out: float, roughness: float, conductivity_inner: float, conductivity_outer: float, rho_cp: float) int [source]
Sets the pipe instance for a coaxial pipe.
- Parameters:
inner_pipe_d_in – inner pipe inner diameter, in m.
inner_pipe_d_out – inner pipe outer diameter, in m.
outer_pipe_d_in – outer pipe inner diameter, in m.
outer_pipe_d_out – outer pipe outer diameter, in m.
roughness – pipe surface roughness, in m.
conductivity_inner – thermal conductivity of inner pipe, in W/m-K.
conductivity_outer – thermal conductivity of outer pipe, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_design(flow_rate: float, flow_type_str: str, throw: bool = True) int [source]
Set the design method.
- Parameters:
flow_rate – design flow rate, in lps.
flow_type_str – flow type string input.
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_design_geometry_type(design_geometry_str: str, throw: bool = True) int [source]
Sets the design type.
- Parameters:
design_geometry_str – design geometry input string.
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_double_u_tube_pipe_parallel(inner_diameter: float, outer_diameter: float, shank_spacing: float, roughness: float, conductivity: float, rho_cp: float) int [source]
Sets the pipe instance for a double u-tube pipe in a parallel configuration.
- Parameters:
inner_diameter – inner pipe diameter, in m.
outer_diameter – outer pipe diameter, in m.
shank_spacing – shank spacing between the u-tube legs, in m, as measured edge-to-edge.
roughness – pipe surface roughness, in m.
conductivity – thermal conductivity, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_double_u_tube_pipe_series(inner_diameter: float, outer_diameter: float, shank_spacing: float, roughness: float, conductivity: float, rho_cp: float) int [source]
Sets the pipe instance for a double u-tube pipe in a series configuration.
- Parameters:
inner_diameter – inner pipe diameter, in m.
outer_diameter – outer pipe diameter, in m.
shank_spacing – shank spacing between the u-tube legs, in m, as measured edge-to-edge.
roughness – pipe surface roughness, in m.
conductivity – thermal conductivity, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_fluid(fluid_name: str = 'Water', concentration_percent: float = 0.0, temperature: float = 20.0, throw: bool = True) int [source]
Sets the fluid instance.
- Parameters:
fluid_name – fluid name input string.
concentration_percent – concentration percent of antifreeze mixture.
temperature – design fluid temperature, in C.
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_bi_rectangle(length: float, width: float, b_min: float, b_max_x: float, b_max_y: float) int [source]
Sets the geometry constraints for the bi-rectangle design method.
- Parameters:
length – side length of the sizing domain, in m.
width – side width of the sizing domain, in m.
b_min – minimum borehole-to-borehole spacing, in m.
b_max_x – maximum borehole-to-borehole spacing in the x-direction, in m.
b_max_y – maximum borehole-to-borehole spacing in the y-direction, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_bi_rectangle_constrained(b_min: float, b_max_x: float, b_max_y: float, property_boundary: list, no_go_boundaries: list) int [source]
Sets the geometry constraints for the bi-rectangle constrained design method.
- Parameters:
b_min – minimum borehole-to-borehole spacing, in m.
b_max_x – maximum borehole-to-borehole spacing in the x-direction, in m.
b_max_y – maximum borehole-to-borehole spacing in the y-direction, in m.
property_boundary – property boundary points, in m.
no_go_boundaries – boundary points for no-go zones, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_bi_zoned_rectangle(length: float, width: float, b_min: float, b_max_x: float, b_max_y: float) int [source]
Sets the geometry constraints for the bi-zoned rectangle design method.
- Parameters:
length – side length of the sizing domain, in m.
width – side width of the sizing domain, in m.
b_min – minimum borehole-to-borehole spacing, in m.
b_max_x – maximum borehole-to-borehole spacing in the x-direction, in m.
b_max_y – maximum borehole-to-borehole spacing in the y-direction, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_near_square(b: float, length: float) int [source]
Sets the geometry constraints for the near-square design method.
- Parameters:
b – borehole-to-borehole spacing, in m.
length – side length of the sizing domain, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_rectangle(length: float, width: float, b_min: float, b_max: float) int [source]
Sets the geometry constraints for the rectangle design method.
- Parameters:
length – side length of the sizing domain, in m.
width – side width of the sizing domain, in m.
b_min – minimum borehole-to-borehole spacing, in m.
b_max – maximum borehole-to-borehole spacing, in m.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_geometry_constraints_rowwise(perimeter_spacing_ratio: float | None, max_spacing: float, min_spacing: float, spacing_step: float, max_rotation: float, min_rotation: float, rotate_step: float, property_boundary: list, no_go_boundaries: list) int [source]
Sets the geometry constraints for the row-wise design method.
- Parameters:
perimeter_spacing_ratio – the ratio between the minimum spacing between boreholes placed along the property and no-go zones and the standard borehole-to-borehole spacing used for internal boreholes.
max_spacing – the largest minimum spacing that will be used to generate a RowWise field.
min_spacing – the smallest minimum spacing that will be used to generate a RowWise field.
spacing_step – the distance in spacing from the design found in the first part of first search to exhaustively check in the second part.
max_rotation – the maximum rotation of the rows of each field relative to horizontal that will be used in the search.
min_rotation – the minimum rotation of the rows of each field relative to horizontal that will be used in the search.
rotate_step – step size for field rotation search.
property_boundary – property boundary points.
no_go_boundaries – boundary points for no-go zones.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_ground_loads_from_hourly_list(hourly_ground_loads: List[float]) int [source]
Sets the ground loads based on a list input.
- Parameters:
hourly_ground_loads – annual, hourly ground loads, in W. positive values indicate heat extraction, negative values indicate heat rejection.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_grout(conductivity: float, rho_cp: float) int [source]
Sets the grout instance.
- Parameters:
conductivity – thermal conductivity, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_pipe_type(bh_pipe_str: str, throw: bool = True) int [source]
Sets the borehole pipe type.
- Parameters:
bh_pipe_str – pipe type input string.
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_simulation_parameters(num_months: int, max_eft: float, min_eft: float, max_height: float, min_height: float, max_boreholes: int | None = None, continue_if_design_unmet: bool = False) int [source]
Sets the simulation parameters
- Parameters:
num_months – number of months in simulation.
max_eft – maximum heat pump entering fluid temperature, in C.
min_eft – minimum heat pump entering fluid temperature, in C.
max_height – maximum height of borehole, in m.
min_height – minimum height of borehole, in m.
max_boreholes – maximum boreholes in search algorithms.
continue_if_design_unmet – continues to process if design unmet.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_single_u_tube_pipe(inner_diameter: float, outer_diameter: float, shank_spacing: float, roughness: float, conductivity: float, rho_cp: float) int [source]
Sets the pipe instance for a single u-tube pipe.
- Parameters:
inner_diameter – inner pipe diameter, in m.
outer_diameter – outer pipe diameter, in m.
shank_spacing – shank spacing between the u-tube legs, in m, as measured edge-to-edge.
roughness – pipe surface roughness, in m.
conductivity – thermal conductivity, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- set_soil(conductivity: float, rho_cp: float, undisturbed_temp: float) int [source]
Sets the soil instance.
- Parameters:
conductivity – thermal conductivity, in W/m-K.
rho_cp – volumetric heat capacity, in J/m^3-K.
undisturbed_temp – undisturbed soil temperature, in C.
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- write_input_file(output_file_path: Path, throw: bool = True) int [source]
Writes an input file based on current simulation configuration.
- Parameters:
output_file_path – output directory to write input file.
throw – By default, function will raise an exception on error, override to false to not raise exception
- Returns:
Zero if successful, nonzero if failure
- Return type:
int
- write_output_files(output_directory: Path, output_file_suffix: str = '')[source]
Writes the output files.
- Parameters:
output_directory – output directory for output files.
output_file_suffix – adds a string suffix to the output files.
- ghedesigner.manager.run_manager_from_cli_worker(input_file_path: Path, output_directory: Path) int [source]
Worker function to run simulation.
- Parameters:
input_file_path – path to input file.
output_directory – path to write output files.