Skip to content

Commit

Permalink
update post template
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinAchondo committed Jun 10, 2024
1 parent 8ea3049 commit 9cba3bb
Showing 1 changed file with 37 additions and 8 deletions.
45 changes: 37 additions & 8 deletions xppbe/Post/Post_Template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"outputs": [],
"source": [
"import os\n",
"import json\n",
"import numpy as np"
]
},
Expand All @@ -31,12 +30,12 @@
"metadata": {},
"outputs": [],
"source": [
"from xppbe.Simulation import Simulation\n",
"from xppbe import Simulation\n",
"from xppbe import xppbe_path\n",
"\n",
"simulation_name = os.path.basename(os.getcwd())\n",
"\n",
"simulation = Simulation(f'{simulation_name}.yaml', results_path=xppbe_path, load_results=True)\n",
"simulation = Simulation(f'{simulation_name}.yaml', results_path=xppbe_path)\n",
"\n",
"simulation.create_simulation()\n",
"print(simulation.domain_properties)"
Expand All @@ -55,8 +54,8 @@
"metadata": {},
"outputs": [],
"source": [
"Iter = 5\n",
"simulation.load_model(Iter, save=False)\n",
"Iter = 20000\n",
"simulation.load_model_for_Post(Iter, save=False)\n",
"Post = simulation.Post"
]
},
Expand All @@ -82,7 +81,7 @@
"metadata": {},
"outputs": [],
"source": [
"Post.plot_aprox_analytic(N=8000,zoom=True, lims_zoom=[[0.95,1.05],None], value='react')"
"Post.plot_G_solv_history(known=True, method='PBJ');"
]
},
{
Expand All @@ -91,7 +90,7 @@
"metadata": {},
"outputs": [],
"source": [
"Post.plot_line_interface()"
"Post.plot_phi_line_aprox_known('PBJ', value='react', theta=0, phi=np.pi/2, N=600);"
]
},
{
Expand All @@ -100,7 +99,37 @@
"metadata": {},
"outputs": [],
"source": [
"Post.plot_phi_contour(n=np.array([1,1,1]))"
"Post.plot_phi_line_aprox_known('PBJ', value='react', theta=np.pi/2, N=400);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Post.plot_phi_line_aprox_known('PBJ', value='react', theta=np.pi/2, phi=np.pi, N=300);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Post.plot_interface_3D(jupyter=True);"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"vertices = Post.mesh.mol_verts.astype(np.float32)\n",
"elements = Post.mesh.mol_faces.astype(np.float32)\n",
"phi_known = Post.phi_known('APBS','phi', vertices,'')\n",
"Post.plot_interface_3D_known(phi_known, vertices, elements, jupyter=True);"
]
}
],
Expand Down

0 comments on commit 9cba3bb

Please sign in to comment.