From 9cba3bbbd89dc72b2a14556089d30caa032533aa Mon Sep 17 00:00:00 2001 From: martinachondo Date: Mon, 10 Jun 2024 19:50:33 -0400 Subject: [PATCH] update post template --- xppbe/Post/Post_Template.ipynb | 45 ++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/xppbe/Post/Post_Template.ipynb b/xppbe/Post/Post_Template.ipynb index 793c2fb..f11bc1d 100644 --- a/xppbe/Post/Post_Template.ipynb +++ b/xppbe/Post/Post_Template.ipynb @@ -7,7 +7,6 @@ "outputs": [], "source": [ "import os\n", - "import json\n", "import numpy as np" ] }, @@ -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)" @@ -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" ] }, @@ -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');" ] }, { @@ -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);" ] }, { @@ -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);" ] } ],