Skip to content

Commit

Permalink
Merge pull request #27 from dafeda/anim_es
Browse files Browse the repository at this point in the history
Remove unused cell that creates animations
  • Loading branch information
dafeda authored Jul 31, 2023
2 parents 8452608 + 84010f5 commit 14ef2a2
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions notebooks/ES_2D_Heat_Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,6 @@ def sample_prior_perm(N):

u_t = pde.heat_equation(u_init, alpha_t, dx, dt, k_start, k_end, rng=rng, scale=scale)

# %% [markdown]
# # How-to create animation (Press `y` to convert from markdown to code)
#
# import matplotlib.animation as animation
# from matplotlib.animation import FuncAnimation
#
# fig, ax = plt.subplots()
# p = ax.pcolormesh(u[0], cmap=plt.cm.jet)
# fig.colorbar(p)
#
# def animate(k):
# return p.set_array(u[k])
#
# anim = animation.FuncAnimation(
# fig, animate, interval=1, frames=k_end, repeat=False
# )
# anim.save("heat_equation_solution.gif", writer="imagemagick")

# %% [markdown]
# ## Plot every cells' heat transfer coefficient, i.e., the parameter field

Expand Down Expand Up @@ -169,7 +151,6 @@ def interactive_truth(k):
# ## Define placement of sensors and generate synthetic observations based on the true temperature field

# %%
# Heat sources are kind of like injection wells
# We can think about heat sources as injection wells.
# Sensors would then typically be placed where we have production wells.
# We'll place the sensors close to heat-sources because the plate cools of quite quickly.
Expand Down Expand Up @@ -214,7 +195,9 @@ def interactive_truth(k):
ax.invert_yaxis()
ax.set_title("True temperature field with sensor placement")
utils.colorbar(p)
ax.plot([i + 0.5 for i in x], [j + 0.5 for j in y], "s", color="white", markersize=5)
_ = ax.plot(
[i + 0.5 for i in x], [j + 0.5 for j in y], "s", color="white", markersize=5
)

# %% [markdown]
# # Ensemble Smoother (ES)
Expand Down

0 comments on commit 14ef2a2

Please sign in to comment.