MassimoCimmino / pygfunction

An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.
BSD 3-Clause "New" or "Revised" License
46 stars 20 forks source link

Ground temperature at locations (x, y, z) #265

Open MassimoCimmino opened 1 year ago

MassimoCimmino commented 1 year ago

This issue is to implement the evaluation of field-to-point thermal response factors to evaluate ground temperatures at precise locations in the ground.

NFdrybattery commented 7 months ago

@MassimoCimmino Hi, I am studying the long-term changes in the soil temperature field near the GCHP buried pipes. I want to know whether pygfunction is able to do so,right now, just like CFD methods such as FLUENT. Thanks.

MassimoCimmino commented 7 months ago

No, this feature is not ready yet.

Note that soil temperatures are not necessary for the simulation of GCHP systems using g-functions.

NFdrybattery commented 7 months ago

@MassimoCimmino Thanks for the reply!

j-c-cook commented 6 months ago

Will this request be fed through **options into the gfunction.gFunction class?

Will the required input be a n x 3 array, where n defines any number of coordinates requested?

Is it possible to consider a segment-to-point thermal response where the point has no thermal emission?

MassimoCimmino commented 6 months ago

Yes, this would be part of the options in the gFunction class.

I would support two options:

  1. Calculation of temperatures à points (x, y, z). It seems a tuple of three arrays or scalars would be in line with the other classes and functions in the package. This would also allow convenient inputs such as (array, array, scalar), e.g. to evaluate temperatures on a single horizontal plane.
  2. Depth-averaged temperatures along lines. The input could use a list of (non-emitting) borehole objects to specifiy the locations and min/max depths.

Thermal response factors will be calculated in some gFunction.gFunc_T array (size nPoints by nTimes), for example. The load aggregation module will need to be extended to allow the use of different sets of g-function to calculate either of the borehole wall temperature or the temperatures at the requested points using the same load history.

j-c-cook commented 6 months ago

@MassimoCimmino Hi, I am studying the long-term changes in the soil temperature field near the GCHP buried pipes. I want to know whether pygfunction is able to do so,right now, just like CFD methods such as FLUENT. Thanks.

@NFdrybattery

pygfunction employes a semi-analytical method to compute g-functions. "Semi" indicates that boreholes are segmented vertically, while "analytical" refers to the use of a single integral finite line source solution. In contrast, computational fluid dynamics (CFD) typically utilizes a grid or mesh system where each point possesses properties, including temperature.

These concepts are detailed in literature, but I emphasize the distinction from CFD due to the vastly different methodologies. While direct comparisons to high-quality CFD calculations will be valuable, until the feature described here is implemented, you may want to investigate utilizing the borehole wall temperature profiles.

The borehole wall temperature profiles can be calculated by setting profiles to True inside of **options. The borehole wall temperature profiles are referenced later in the unequal segment example. https://github.com/MassimoCimmino/pygfunction/blob/78fb638264b27ef84569bbdff638a7f7e80d4336/examples/unequal_segments.py#L91-L97

NFdrybattery commented 6 months ago

@j-c-cook Thanks for the explanation! I understand the difference between these two methods. I was trying to investigate the possibility of using GCHP for cross-season thermal storage, and the long-term soil temperature field variation is needed. The CFD method definitely solve my problem, but the cell number is enourmus, I just made it work on a cloud server, and it still takes a long time to get the results. However, if it is solvable by pygfunction, things will be different. I can run the simulation on PC. Also I read the documentation, knowing that unequal inlet mass flow for boreholes is supported. So is it possible to create a virtual borehole and set the massflow to zero or the pipe thermal resistance to a high value to take the borehole temperature as soil temperature?