Ground data
The ground data classes you can use have either:
A constant ground temperature
A constant ground geothermal heat flux
A constant ground temperature gradient
All of these three classes are children of the abstract class _GroundData.
- class GHEtool.VariableClasses.GroundData._GroundData.GroundLayer(k_s: Optional[float] = None, volumetric_heat_capacity: float = 2400000.0, thickness: Optional[float] = None)
Bases:
BaseClass
Contains the information about a certain ground layer.
- Parameters
- k_sfloat
Layer thermal conductivity [W/mK]
- volumetric_heat_capacityfloat
Layer volumetric heat capacity [J/m³K]
- thicknessfloat
Layer thickness [m]. None is assumed infinite depth
- non_negative(value) float
This function returns the value if the value > 0. Otherwise, an error is raised.
- Parameters
- valuefloat
Value to be checked
- Returns
- float
Value
- Raises
- ValueError
When the value equals 0 or is smaller
- class GHEtool.VariableClasses.GroundData._GroundData._GroundData(k_s: Optional[float] = None, volumetric_heat_capacity: float = 2400000.0)
Bases:
BaseClass
,ABC
Contains information regarding the ground data of the borefield.
- Parameters
- k_sfloat
Ground thermal conductivity [W/mK]
- volumetric_heat_capacityfloat
The volumetric heat capacity of the ground [J/m3K]
- add_layer_on_bottom(layer: Union[GroundLayer, List[GroundLayer]]) None
This function adds a ground layer on the bottom of the array. This hence becomes the deepest ground layer.
- Parameters
- layerGroundLayer or list of ground layers
GroundLayer object with thermal properties of this layer
- Returns
- None
- Raises
- ValueError
When you add a ground layer on the bottom of a layer which has no predefined depth
- add_layer_on_top(layer: Union[GroundLayer, List[GroundLayer]]) None
This function adds a ground layer on the top of the array. This hence becomes the highest ground layer.
- Parameters
- layerGroundLayer or list of ground layers
GroundLayer object with thermal properties of this layer
- Returns
- None
- Raises
- ValueError
When you add a ground layer with no specified depth and there are already ground layers in the array
- alpha(H: float = 100) float
Returns the ground thermal diffusivity in m²/s for a given depth. If no volumetric heat capacity or conductivity is given, None is returned.
- Parameters
- Hfloat
Depth in meters.
- Returns
- float
Ground thermal diffusivity in m²/s for a given depth.
- abstract calculate_Tg(H: float) float
This function gives back the ground temperature
- Parameters
- Hfloat
Depth of the borefield [m]
- Returns
- Tgfloat
Ground temperature [deg C]
- abstract calculate_delta_H(temperature_diff: float) float
This function calculates the difference in depth for a given difference in temperature.
- Parameters
- temperature_difffloat
Difference in temperature [deg C]
- Returns
- Difference in depth [m]float
- calculate_value(thickness_list: list, cumulative_thickness_list: list, y_range: list, H: float) float
This function calculates the average value of a certain y_range of values for a certain depth, given the thickness of the ground layers.
- Parameters
- thickness_listlist
List of all the layer thicknesses
- cumulative_thickness_listlist
Cumulative sum of all the layer thicknesses
- y_rangelist
Range with the values for each layer
- Hfloat
Depth [m]
- Returns
- float
Calculated value for either k_s or volumetric heat capacity
- check_depth(H: float) bool
Checks if the depth is correct. A depth is False when it is lower than 0 or it exceeds the deepest ground layer and last_layer_infinite is set to False.
- Parameters
- Hfloat
Depth [m]
- Returns
- bool
True if the depth is valid
- Raises
- ValueError
When a depth is requested that is either smaller than zero or larger than the maximum depth.
- k_s(H: float = 100) float
Returns the ground thermal conductivity in W/mK for a given depth.
- Parameters
- Hfloat
Depth in meters.
- Returns
- float
Ground thermal conductivity in W/mK for a given depth.
- max_depth(max_temp: float) float
This function returns the maximum depth, based on the maximum temperature. The maximum is the depth where the ground temperature equals the maximum temperature limit.
- Parameters
- max_tempfloat
Maximum temperature [deg C]
- Returns
- Depthfloat
Maximum depth [m]
- volumetric_heat_capacity(H: float = 100) float
Returns the ground volumetric heat capacity in J/m³K for a given depth.
- Parameters
- Hfloat
Depth in meters.
- Returns
- float
Ground volumetric heat capacity in J/m³K for a given depth.
- class GHEtool.VariableClasses.GroundData.GroundConstantTemperature.GroundConstantTemperature(k_s: Optional[float] = None, T_g: Optional[float] = None, volumetric_heat_capacity: float = 2400000.0)
Bases:
_GroundData
- Parameters
- k_sfloat
Ground thermal conductivity [W/mK]
- T_gfloat
Ground temperature at infinity [deg C]
- volumetric_heat_capacityfloat
The volumetric heat capacity of the ground [J/m3K]
- calculate_Tg(H: Optional[float] = None) float
This function gives back the ground temperature.
- Parameters
- Hfloat
Depth of the borefield [m] (not used)
- Returns
- Tgfloat
Ground temperature [deg C]
- calculate_delta_H(temperature_diff: float) float
This function calculates the difference in depth for a given difference in temperature.
- Parameters
- temperature_difffloat
Difference in temperature [deg C]
- Returns
- float
Difference in depth [m]
- class GHEtool.VariableClasses.GroundData.GroundFluxTemperature.GroundFluxTemperature(k_s: Optional[float] = None, T_g: Optional[float] = None, volumetric_heat_capacity: float = 2400000.0, flux: float = 0.06)
Bases:
_GroundData
- Parameters
- k_sfloat
Ground thermal conductivity [W/mK]
- T_gfloat
Surface ground temperature [deg C]
- volumetric_heat_capacityfloat
The volumetric heat capacity of the ground [J/m3K]
- fluxfloat
The geothermal heat flux [W/m2]
- calculate_Tg(H: float) float
This function gives back the ground temperature at a depth H.
- Parameters
- Hfloat
Depth at which the temperature should be calculated [m]
- Returns
- Tgfloat
Ground temperature [deg C]
- calculate_delta_H(temperature_diff: float, H: float = 100) float
This function calculates the difference in depth for a given difference in temperature.
- Parameters
- temperature_difffloat
Difference in temperature [deg C]
- Hfloat
Depth at which the average ground thermal conductivity should be taken [m]
- Returns
- float
Difference in depth [m]
- class GHEtool.VariableClasses.GroundData.GroundTemperatureGradient.GroundTemperatureGradient(k_s: Optional[float] = None, T_g: Optional[float] = None, volumetric_heat_capacity: float = 2400000.0, gradient: float = 3.0)
Bases:
_GroundData
- Parameters
- k_sfloat
Ground thermal conductivity [W/mK]
- T_gfloat
Surface ground temperature [deg C]
- volumetric_heat_capacityfloat
The volumetric heat capacity of the ground [J/m3K]
- gradientfloat
The geothermal temperature gradient [K/100m]
- calculate_Tg(H: float) float
This function gives back the ground temperature at a depth H.
- Parameters
- Hfloat
Depth at which the temperature should be calculated [m]
- Returns
- Tgfloat
Ground temperature [deg C]
- calculate_delta_H(temperature_diff: float) float
This function calculates the difference in depth for a given difference in temperature.
- Parameters
- temperature_difffloat
Difference in temperature [deg C]
- Returns
- float
Difference in depth [m]