Skip to content

Commit 21a104c

Browse files
committed
Update the Spherical Kernel Toy model
Verified that this gives consistent results on hyperion for 16 / 32 / 48 / 96 cores and, just in case, 53. Not sure if the variations should be considered significant, to be honest, but there is nothing especially suspicious in the solutions. Grid has 480000 tetrahedral elements, P2 for velocity, P1 for pressure 16: Pressure (C1): (83577, 4.501686375938372e-05, -0.7372135020091626, 0.7297416090999129, 3.762374422418013, 40.86046689261976, np.float64(0.14133832355990378)) 32: Pressure (C1): (83577, 0.00011456943015901214, -0.7382004092043332, 0.7033917668241267, 9.575369264399757, 40.878594801302334, np.float64(0.1414010288694044)) 96: Pressure (C1): (83577, 0.0003194554969466519, -0.7394435695222795, 0.7056720965038505, 26.699132068310327, 41.07756585313935, np.float64(0.1420892793237494)) 53: Pressure (C1): (83577, 8.779219727421255e-05, -0.7371671638813321, 0.6970817607318897, 7.337408471586862, 40.92046307139055, np.float64(0.14154585323277188))
1 parent eb4c731 commit 21a104c

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Notebooks/Examples-Stokes_Kernels/Ex_Stokes_Spherical_Kernels.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
# Optional - read in a different solution if you want to just use this for
228228
# visualisation - set the `expt_name` here
229229

230-
expt_name="Spherical_Kernel_np_7"
230+
expt_name="Spherical_Kernel_np_96"
231231

232232
import os
233233

@@ -258,7 +258,8 @@
258258
pvmesh.point_data["V"] = vis.vector_fn_to_pv_points(pvmesh, v_soln_ckpt.sym)
259259
pvmesh.point_data["R"] = vis.scalar_fn_to_pv_points(pvmesh, radius_fn)
260260

261-
pvmesh_c = pvmesh.clip_scalar(scalars="R", value=0.95).clip()
261+
# pvmesh_c = pvmesh.clip_scalar(scalars="R", value=0.95).clip()
262+
pvmesh_c = pvmesh.clip(normal="z")
262263

263264
skip = 10
264265
points = np.zeros((meshball._centroids[::skip].shape[0], 3))
@@ -279,14 +280,14 @@
279280
pl = pv.Plotter(window_size=(750, 750))
280281

281282
pl.add_mesh(
282-
pvmesh,
283+
pvmesh_c,
283284
cmap="coolwarm",
284-
edge_color="Grey",
285-
edge_opacity=0.33,
285+
edge_color="Black",
286+
# edge_opacity=0.33,
286287
scalars="P",
287288
show_edges=True,
288289
use_transparency=False,
289-
opacity=0.9,
290+
opacity=1.0,
290291
show_scalar_bar=False
291292
)
292293

@@ -296,16 +297,16 @@
296297
vsol_rms = np.sqrt(velocity_points.point_data["V"][:, 0] ** 2 + velocity_points.point_data["V"][:, 1] ** 2).mean()
297298
# print(vsol_rms)
298299

299-
pl.export_html("stokes_sphere_plot.html")
300+
pl.export_html("stokes_sphere_plot_96.html")
300301
# pl.show(cpos="xy", jupyter_backend="trame")
301302

302303

303304
# +
304305
from IPython.display import IFrame
305-
IFrame(src="./stokes_sphere_plot.html", width=750, height=750)
306+
IFrame(src="./stokes_sphere_plot_96.html", width=750, height=750)
306307

307308

308309
# -
309310

310311

311-
312+
p_soln.stats()

Notebooks/Examples-Stokes_Kernels/media/stokes_sphere_plot.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Notebooks/Examples-Stokes_Kernels/stokes_sphere_plot.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)