Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change integral bounds #199

Closed
MassimoCimmino opened this issue Jan 24, 2022 · 3 comments · Fixed by #201
Closed

Change integral bounds #199

MassimoCimmino opened this issue Jan 24, 2022 · 3 comments · Fixed by #201
Assignees

Comments

@MassimoCimmino
Copy link
Owner

Integrals are evaluated one time step at a time, using the same numpy.inf upper bound for every time step. The evaluation of integral can be made more efficient by using the property:
integral(f(x), x=a..c) = integral(f(x), x=a..b) + integral(f(x), x=b..c)

As an example:

h = np.stack(
[0.5 / H2 * quad_vec(f, 1.0 / np.sqrt(4.0*alpha*t), np.inf)[0]
for t in time],
axis=-1)

Becomes:

a = [1.0 / np.sqrt(4.0*alpha*t) for t in time]
b = [np.inf] + a[:-1]
h = np.cumsum(np.stack(
    [0.5 / H2 * quad_vec(f, a[i], b[i])[0]
     for i, t in enumerate(time)],
     axis=-1), axis=-1)
@MassimoCimmino
Copy link
Owner Author

MassimoCimmino commented Jan 24, 2022

'equivalent' solver

Rectangular fields

Figure_1_eq

Figure_2_eq

Figure_3_eq

Field of 100 boreholes with two different lengths

Figure_4

Figure_5_eq

@MassimoCimmino
Copy link
Owner Author

MassimoCimmino commented Jan 25, 2022

'similarities' solver

Rectangular fields

Figure_1

Figure_2

Figure_3

Field of 100 boreholes with two different lengths

Figure_4

Figure_5

@MassimoCimmino
Copy link
Owner Author

MassimoCimmino commented Jan 25, 2022

'detailed' solver

Rectangular fields

Figure_1_det

Figure_2_det

Figure_3_det

Field of 100 boreholes with two different lengths

Figure_4

(nSegments=64 is from the 'similarities' solver)
Figure_5_det

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant