Skip to content

Commit

Permalink
added module uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
cneyens committed Jan 18, 2025
1 parent f3e5fc8 commit 79ee64b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gha-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:
test:
# Specify the environment to run on Windows
runs-on: windows-latest
# Specify the environment to run on
runs-on: ubuntu-latest

strategy:
matrix:
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,31 @@ Coming soon.

## Available solutions

| Python function | Dimensionality | Source geometry | Boundary type | Aquifer geometry | Reference |
| -----------------|----------------|-------------------------|---------------|-------------------------|---------------|
| `finite1()` | 1D | Inlet | Dirichlet | Finite | Wexler (1992) |
| `finite3()` | 1D | Inlet | Cauchy | Finite | Wexler (1992) |
| `seminf1()` | 1D | Inlet | Dirichlet | Semi-infinite | Wexler (1992) |
| `seminf3()` | 1D | Inlet | Cauchy | Semi-infinite | Wexler (1992) |
| | | | | | |
| `point2()` | 2D | Point | Cauchy | Infinite | Wexler (1992) |
| `stripf()` | 2D | Finite Y at X=0 | Dirichlet | Finite Y | Wexler (1992) |
| `stripi()` | 2D | Finite Y at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |
| `gauss()` | 2D | Gaussian along Y at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |
| | | | | | |
| `point3()` | 3D | Point | Cauchy | Infinite | Wexler (1992) |
| `patchf()` | 3D | Finite Y and Z at X=0 | Dirichlet | Finite Y and Z | Wexler (1992) |
| `patchi()` | 3D | Finite Y and Z at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |
| Module | Function | Dimensionality | Source geometry | Boundary type | Aquifer geometry | Reference |
| -----------|------------------|----------------|-------------------------|---------------|-------------------------|---------------|
| `uniform` | `finite1()` | 1D | Inlet | Dirichlet | Finite | Wexler (1992) |
| | `finite3()` | 1D | Inlet | Cauchy | Finite | Wexler (1992) |
| | `seminf1()` | 1D | Inlet | Dirichlet | Semi-infinite | Wexler (1992) |
| | `seminf3()` | 1D | Inlet | Cauchy | Semi-infinite | Wexler (1992) |
| | | | | | | |
| | `point2()` | 2D | Point | Cauchy | Infinite | Wexler (1992) |
| | `stripf()` | 2D | Finite Y at X=0 | Dirichlet | Finite Y | Wexler (1992) |
| | `stripi()` | 2D | Finite Y at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |
| | `gauss()` | 2D | Gaussian along Y at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |
| | | | | | | |
| | `point3()` | 3D | Point | Cauchy | Infinite | Wexler (1992) |
| | `patchf()` | 3D | Finite Y and Z at X=0 | Dirichlet | Finite Y and Z | Wexler (1992) |
| | `patchi()` | 3D | Finite Y and Z at X=0 | Dirichlet | Semi-infinite | Wexler (1992) |

## Example
The fate of a contaminant plume generated by continuous injection of a point source in an aquifer with uniform background flow is simulated. The source generates a plume which extends in three dimensions and migrates due to advection and mechanical dispersion. Molecular diffusion, linear sorption and first-order decay are neglected in this example.

```python
import numpy as np
import matplotlib.pyplot as plt
from adepy import point3 # 3D ADE solution of a continuous point source

# 3D ADE solution of a continuous point source in uniform background flow
from adepy.uniform import point3

# Source parameters ----
xc = 0 # x-coordinate of point source, m
Expand Down
5 changes: 1 addition & 4 deletions adepy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# ruff : noqa: F401
from ._version import __version__

from adepy.oneD import finite1, finite3, seminf1, seminf3
from adepy.twoD import point2, stripf, stripi, gauss
from adepy.threeD import point3, patchi, patchf
import adepy.uniform as uniform
5 changes: 5 additions & 0 deletions adepy/uniform/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ruff : noqa: F401

from .oneD import finite1, finite3, seminf1, seminf3
from .twoD import point2, stripf, stripi, gauss
from .threeD import point3, patchi, patchf
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions adepy/twoD.py → adepy/uniform/twoD.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def _integrand_point2(tau, x, y, v, Dx, Dy, xc, yc, lamb):


def point2(c0, x, y, t, v, n, al, ah, Qa, xc, yc, Dm=0, lamb=0, R=1.0, order=100):

x = np.atleast_1d(x)
y = np.atleast_1d(y)
t = np.atleast_1d(t)
Expand Down Expand Up @@ -89,6 +90,7 @@ def _series_stripf(x, y, t, v, Dx, Dy, y2, y1, w, lamb, nterm):


def stripf(c0, x, y, t, v, al, ah, y2, y1, w, Dm=0, lamb=0, R=1.0, nterm=100):

x = np.atleast_1d(x)
y = np.atleast_1d(y)
t = np.atleast_1d(t)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_1D.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from adepy.oneD import finite1, finite3, seminf1, seminf3
from adepy.uniform import finite1, finite3, seminf1, seminf3
import numpy as np

# TODO add tests with retardation and decay
Expand Down
2 changes: 1 addition & 1 deletion tests/test_2D.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from adepy.twoD import point2, stripf, stripi, gauss
from adepy.uniform import point2, stripf, stripi, gauss
import numpy as np


Expand Down
2 changes: 1 addition & 1 deletion tests/test_3D.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from adepy.threeD import point3, patchi, patchf
from adepy.uniform import point3, patchi, patchf
import numpy as np


Expand Down

0 comments on commit 79ee64b

Please sign in to comment.