BaseClass
This document contains the information for the BaseClass. This class is used as a super class for different variable classes.
- class GHEtool.VariableClasses.BaseClass.BaseClass
Bases:
object
This class contains basic functionality of different classes within GHEtool. It contains the code to generate a dictionary from the class (in order to be able to export to JSON), to load a class based on a dictionary and to check whether or not all attributes differ from None.
This class should only be altered whenever a highly general method should be implemented.
- check_values() bool
This functions checks if the class attributes differ from None.
- Returns
- bool
True if all values are correct. False otherwise
- from_dict(dictionary: dict) None
This function converts the dictionary values to the class attributes. Currently, it can handle np.ndarray, list, set, str, int, float, tuple, pygfunction.Borehole and classes within GHEtool.
- Parameters
- dictionary
Dictionary with all the attributes of the class
- Returns
- None
- to_dict() dict
This function converts the class variables to a dictionary so it can be saved in a JSON format. Currently, it can handle np.ndarray, list, set, str, int, float, tuple, pygfunction.Borehole and classes within GHEtool.
- Returns
- dict
Dictionary with all the attributes of the class
- exception GHEtool.VariableClasses.BaseClass.MaximumNumberOfIterations(iter: int)
Bases:
RuntimeError
This Error occurs when the maximum number of interation is reacted.
- exception GHEtool.VariableClasses.BaseClass.UnsolvableDueToTemperatureGradient
Bases:
Exception
This Exception occurs when there is an unsizeble borefield due to incompatibility between 1) peak cooling, which requires a deeper borefield and 2) a temperature gradient, which causes a higher ground temperature when the field is drilled deeper. This leads to unsizeble solutions.