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

Rename sample_prior_perm #29

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions notebooks/ES_2D_Heat_Equation.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@


# %%
def sample_prior_perm(N):
def sample_prior_conductivity(N):
mesh = np.meshgrid(np.linspace(0, 1, nx), np.linspace(0, 1, nx))
lperms = np.exp(geostat.gaussian_fields(mesh, rng, N, r=0.8))
return lperms
return np.exp(geostat.gaussian_fields(mesh, rng, N, r=0.8))


# Evensens' formulation of the Ensemble Smoother has the prior as
# a (nx * nx, N) matrix, i.e (number of parameters, N).
A = sample_prior_perm(N).T
A = sample_prior_conductivity(N).T

# We'll also need a list of matrices to run simulations in parallel later on.
# A list is also a bit easier to interactively visualize.
Expand Down Expand Up @@ -109,7 +108,7 @@ def interactive_prior_fields(n):

# %%
# Set the coefficient of heat transfer for each grid cell.
# alpha_t = sample_prior_perm(1).T.reshape(nx, nx)
# alpha_t = sample_prior_conductivity(1).T.reshape(nx, nx)
# Let's use as true parameter field one relization from the prior
# to make it easier for the Ensemble Smoother to find the solution.
alpha_t = alphas[0]
Expand Down