From f14f4d457ed02ad91ae5e7767007a2577e0e9d63 Mon Sep 17 00:00:00 2001 From: Lars Hubatsch <hubatsch@pks.mpg.de> Date: Fri, 27 Aug 2021 21:47:42 +0200 Subject: [PATCH] Simulate droplet diffusion in ellipsoidal cells-shaped volume. --- Fenics_FloryHugg_Binary.ipynb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Fenics_FloryHugg_Binary.ipynb b/Fenics_FloryHugg_Binary.ipynb index bbba925..ee8f5aa 100644 --- a/Fenics_FloryHugg_Binary.ipynb +++ b/Fenics_FloryHugg_Binary.ipynb @@ -74,13 +74,13 @@ " string = (string+'(x[0]-'+str(p[0])+')*(x[0]-'+str(p[0])+\n", " ')+(x[1]-'+str(p[1])+\n", " ')*(x[1]-'+str(p[1])+')+(x[2]-'+str(p[2])+')*(x[2]-'+\n", - " str(p[2])+')<=.05*.05 ? .76 :' )\n", + " str(p[2])+')<=.1*.1 ? .76 :' )\n", " string = string + '.268'\n", " return string\n", "\n", "# f = Expression((create_expr([[0.5, 0.5, 0.5]]), 1), degree=1)\n", "\n", - "file = fol+'Meshes/points_clean.txt'\n", + "file = fol+'Meshes/points_clean_ellipsoid.txt'\n", "points = np.loadtxt(file, delimiter=',')\n", "f = Expression((create_expr(points), 1), degree=1)\n", "\n", @@ -109,7 +109,7 @@ "# domain = ms.Sphere(Point(0, 0, 0), 1.0)\n", "# mesh = ms.generate_mesh(domain, 100)\n", "mesh = Mesh()\n", - "with XDMFFile(\"Meshes/mesh1.xdmf\") as infile:\n", + "with XDMFFile(\"Meshes/mesh_ellipsoid.xdmf\") as infile:\n", " infile.read(mesh)\n", "P1 = FiniteElement(\"Lagrange\", mesh.ufl_cell(), 1)\n", "ME = FunctionSpace(mesh, P1*P1)\n", @@ -170,7 +170,7 @@ "source": [ "# Output file\n", "# file = File(\"output.pvd\", \"compressed\")\n", - "file_c = XDMFFile('c_long.xdmf')\n", + "file_c = XDMFFile('c_long_ellipsoid.xdmf')\n", "\n", "# Step in time\n", "t = 0.0\n", @@ -258,8 +258,8 @@ "outputs": [], "source": [ "from fem_utils import convert_msh_to_xdmf\n", - "path_to_msh = \"/Users/hubatsch/Desktop/frap_theory/Meshes/box_with_spheres.msh\"\n", - "path_to_xdmf = \"Meshes/mesh1.xdmf\"\n", + "path_to_msh = \"/Users/hubatsch/Desktop/frap_theory/Meshes/ellipsoid.msh\"\n", + "path_to_xdmf = \"Meshes/mesh_ellipsoid.xdmf\"\n", "convert_msh_to_xdmf(path_to_msh, path_to_xdmf)" ] } -- GitLab