CustomGFunction
This file contains both the CustomGFunction class and all the relevant information w.r.t. custom gfunctions.
- class GHEtool.VariableClasses.CustomGFunction.CustomGFunction(time_array: Optional[ndarray] = None, depth_array: Optional[ndarray] = None, options: Optional[dict] = None)
Bases:
object
This class contains all the functionalities related to custom gfunctions.
- Parameters
- time_arraynp.ndarray
Time value(s) in seconds at which the gfunctions should be calculated
- depth_arraynp.ndarray
Depths [m] for which the gfunctions should be calculated
- optionsdict
Dictionary with options for the gFunction class of pygfunction
- calculate_gfunction(time_value: Union[list, float, ndarray], H: float, check: bool = False) ndarray
This function returns the gfunction value, based on interpolation between precalculated values.
- Parameters
- time_valuelist, float, np.ndarray
Time value(s) in seconds at which the gfunctions should be calculated
- Hfloat
Depth [m] at which the gfunctions should be calculated. If no depth is given, the current depth is taken.
- checkbool
True if it should be check whether or not the requested gvalues can be interpolated based on the precalculated values
- Returns
- gvaluesnp.ndarray
1D array with all the requested gvalues. False is returned if the check is True and the requested values are out of range for interpolation
- create_custom_dataset(borefield: List[Borehole], alpha: float) None
This function creates the custom dataset.
- Parameters
- borefieldlist[pygfunction.boreholes.Borehole]
Borefield object for which the custom dataset should be created
- alphafloat
Ground thermal diffusivity [m2/s]
- Returns
- None
- delete_custom_gfunction() None
This function deletes the custom gfunction.
- Returns
- None
- dump_custom_dataset(path: str, name: str) None
This function dumps the current custom dataset.
- Parameters
- pathstr
Location where the dataset should be saved
- namestr
Name under which the dataset should be saved
- Returns
- None
- set_options_gfunction_calculation(options: dict) None
This function sets the options for the gfunction calculation of pygfunction. This dictionary is directly passed through to the gFunction class of pygfunction. For more information, please visit the documentation of pygfunction.
- Parameters
- optionsdict
Dictionary with options for the gFunction class of pygfunction
- Returns
- None
- within_range(time_value: Union[list, float, ndarray], H: float) bool
This function checks whether or not the requested data can be calculated using the custom dataset.
- Parameters
- time_valuelist, float, np.ndarray
Time value(s) in seconds at which the gfunctions should be calculated
- Hfloat
Depth [m] at which the gfunctions should be calculated. If no depth is given, the current depth is taken.
- Returns
- bool
True if the requested values are within the range of the precalculated data, False otherwise
- GHEtool.VariableClasses.CustomGFunction.load_custom_gfunction(path: str) CustomGFunction
This function loads a custom gfunction dataset.
- Parameters
- pathstr
Location of the dataset
- Returns
- CustomGFunction
Dataset with the custom gfunction data