Skip to content

Commit

Permalink
multi-layer pumping well works
Browse files Browse the repository at this point in the history
headwell not yet
  • Loading branch information
mbakker7 committed Nov 2, 2024
1 parent 8da751e commit b582daa
Showing 1 changed file with 47 additions and 239 deletions.
286 changes: 47 additions & 239 deletions docs/03examples/test_t_intervals2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@
"print(\"ttim:\", ttim.__file__)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Headwell"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand All @@ -62,17 +55,14 @@
"source": [
"k = 25\n",
"H = 20\n",
"T = k * H\n",
"S = 1e-3\n",
"t = np.logspace(-5, 0, 11)\n",
"rw = 0.3\n",
"hwell = -2\n",
"tmin = 0.1\n",
"tmax = 10\n",
"Ss = 1e-4 / H\n",
"t = np.logspace(0, 1, 100)\n",
"Q = 500\n",
"rw = 0.2\n",
"#ml = ttim.ModelMaq(kaq=k, z=[H, 0], tmin=1e-3, tmax=10)\n",
"ml = ttim.Model3D(kaq=k, z=np.linspace(H, 0, 3), Saq=Ss, tmin=1, tmax=10, M=10)\n",
"w = ttim.Well(ml, tsandQ=[(0, Q)], rw=rw, layers=[0])\n",
"\n",
"ml = ttim.ModelMaq(kaq=25, z=[20, 0], Saq=S / 20, tmin=tmin, tmax=tmax)\n",
"w = ttim.HeadWell(ml, tsandh=[(0, hwell)], rw=rw)\n",
"#w = ttim.Well(ml, tsandQ=[(0, 800)], rw=rw)\n",
"ml.solve()"
]
},
Expand All @@ -84,7 +74,8 @@
{
"data": {
"text/plain": [
"(array([[-2.19629085]]), array([[-2.19629085]]))"
"array([[-1.45490672],\n",
" [-0.83091413]])"
]
},
"execution_count": 3,
Expand All @@ -93,39 +84,19 @@
}
],
"source": [
"ml.head(0, 0.3, 1), ml.head(0.3, 0, 1)"
"ml.head(2, 3, 2)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([-2.])"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.bc"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"self.neq 1\n",
"self.neq 2\n",
"solution complete\n"
]
}
Expand All @@ -138,179 +109,69 @@
"Q = 500\n",
"rw = 0.2\n",
"#ml = ttim.ModelMaq(kaq=k, z=[H, 0], tmin=1e-3, tmax=10)\n",
"ml = ttim.Model3D(kaq=k, z=np.linspace(H, 0, 3), Saq=Ss, tmin=1, tmax=10, M=1)\n",
"w = ttim.Well(ml, tsandQ=[(0, Q)], rw=rw, layers=[0])\n",
"ml = ttim.Model3D(kaq=k, z=np.linspace(H, 0, 3), Saq=Ss, tmin=1, tmax=10, M=10)\n",
"w = ttim.Well(ml, tsandQ=[(0, Q)], rw=rw, layers=[0, 1])\n",
"\n",
"ml.solve()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-1.91918112+1.06535953e-16j, -0.9644074 +3.24375132e-01j,\n",
" -1.36452571+8.86641773e-01j]])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.potential(2, 3, 0)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[[-0.4258245 +0.j , 0.38997477-0.11823995j,\n",
" -0.31134016+0.1887967j ],\n",
" [-1.49335662+0.j , -1.35438217+0.44261508j,\n",
" -1.05318555+0.69784507j]]])"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"p = w.potinf(2, 3, 0)\n",
"p"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-1.91918112+1.06535953e-16j, -0.9644074 +3.24375132e-01j,\n",
" -1.36452571+8.86641773e-01j]])"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sum(w.parameters[0] * p, 1)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[[-0.4258245 +2.36380082e-17j, 0.38997477-1.18239951e-01j,\n",
" -0.31134016+1.88796704e-01j],\n",
" [-1.49335662+8.28979450e-17j, -1.35438217+4.42615083e-01j,\n",
" -1.05318555+6.97845069e-01j]]])"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sum(w.parameters[0][:, :, np.newaxis, :] * p, 1)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 1, 2, 3)"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(w.parameters[0][:, :, np.newaxis, :] * p).shape"
]
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 2, 3)"
"array([[-1.14291044],\n",
" [-1.14291045]])"
]
},
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.potinf(2, 3, 0).shape"
"ml.head(2, 3, 2)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"cell_type": "markdown",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 1, 1, 3)"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.parameters[0][:, :, np.newaxis, :].shape"
"### Headwell - doesn't work yet"
]
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1, 2, 3)"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
"name": "stdout",
"output_type": "stream",
"text": [
"self.neq 1\n",
"solution complete\n"
]
}
],
"source": [
"(w.parameters[0] * w.potinf(2, 3, 0)).shape"
"k = 25\n",
"H = 20\n",
"T = k * H\n",
"S = 1e-3\n",
"t = np.logspace(-5, 0, 11)\n",
"rw = 0.3\n",
"hwell = -2\n",
"tmin = 0.1\n",
"tmax = 10\n",
"\n",
"ml = ttim.ModelMaq(kaq=25, z=[20, 0], Saq=S / 20, tmin=tmin, tmax=tmax)\n",
"w = ttim.HeadWell(ml, tsandh=[(0, hwell)], rw=rw)\n",
"#w = ttim.Well(ml, tsandQ=[(0, 800)], rw=rw)\n",
"ml.solve()"
]
},
{
Expand All @@ -321,8 +182,7 @@
{
"data": {
"text/plain": [
"array([[20.21428209],\n",
" [11.24658674]])"
"(array([[-2.19629085]]), array([[-2.19629085]]))"
]
},
"execution_count": 7,
Expand All @@ -331,80 +191,28 @@
}
],
"source": [
"ml.potential(2, 3, 2)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-26.28626275],\n",
" [-14.11308935]])"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ml.potential(2, 3, 2)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[[-0.4258245 +0.j , 0.38997477-0.11823995j,\n",
" -0.31134016+0.1887967j ],\n",
" [-1.49335662+0.j , -1.35438217+0.44261508j,\n",
" -1.05318555+0.69784507j]]])"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.potential(2, 3)"
"ml.head(0, 0.3, 1), ml.head(0.3, 0, 1)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[-1.91918112+1.06535953e-16j, -0.9644074 +3.24375132e-01j,\n",
" -1.36452571+8.86641773e-01j]])"
"array([-2.])"
]
},
"execution_count": 20,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w.potential(2, 3, 0)"
"w.bc"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit b582daa

Please sign in to comment.