![]() ![]() ![]() Although this looks correct, there is a problem with this set-up as there are actually two separate surfaces which will generate two independent meshes. The two disks should now be visible as shown in Figure 5. Make sure surfaces are visible by double clicking the main window (in the region with the drawing) and ticking geometry visibility > surfaces. Next an outer disc must be added which is done in the same way as the inner disk but this time with a radius of 3. 3 – Inner Disk Settings Fig 4 – Inner disk geometry. The inner disk should now be visible as shown in Figure 4. After the disk has been added the q key on the keyboard can be pressed to exist the disc drawing mode. Note that you need a disc, rather than a circle as the circle is only a line object rather than a surface object. Choose x, y and z as zero and the vertical and horizontal radius as 0.5 as shown in Figure 3. To do this by opening Geometry > Elementary Entries > Add > Disk. Start by drawing the inner disk centred at the origin with a radius of 0.5. The window should resemble the one shown in Figure 2. Open Gmsh and make a new file, for this post the filename geo.geo will be used. I’ve recorded the whole mesh generation process which can be viewed on peertube or here as a gif. * mshr is the FEniCS built-in mesh generating package. One big advantage of this is that the subdomains and boundary conditions can be automatically identified by FEniCS, and also that it allows complex geometries to be used. Rather than doing this the geometry will be made and then subsequently meshed using Gmsh. Finite Element Solution with FEniCSįEniCS can also be used to solve this problem, however unlike with the previous example specifying the mesh and boundary conditions with mshr* could be time consuming. The electric field is then found from the gradient of this function giving Which is the final solution for the potential. Which can be re-arranged for the constants c1 and c2 and re-substituted into the general solution giving Inserting the relevant values into the general solution gives the equations Where c1 and c2 are constants determined by the boundary conditions.Īt the outer boundary s = b the value of the electric potential is set by the boundary conditions. Following the procedures in the solution can be found, which has a general form Which is a Cauchy-Euler equation for which solutions are published in numerous sources. In this case it will be assume that there is no θ dependence which gives Which can be looked up from a number of references (it’s the cylindrical one but without any z-variation which can be found in ) (s is the radial coordinate). The Laplacian operator in polar coordinates is If this is unfamiliar then the previous post gives a brief background, but more thorough backgrounds are available. The problem that has to be solved is the Laplace equation in the annular region We would like to find the electric potential and field distribution within the free-space annulus. The free space region is bounded by a conducting ring of radius b held at the electric potential Vb. A central conducting disc of radius a is held at electric potential Va and surrounded by an annular region of free space. The geometry that will be solved in this example is indicated in Figure 1. In this case the tool that will be used is called GMsh, although it is also possible to use more general CAD software to define the geometry which will be demonstrated in future posts specifically for 3D problems. The finite-element method allows the solution of these problems for more complex geometries too, and this will be the focus of this post.įEniCS has the ability to import a mesh, this means that it is possible to define the geometry of a problem and generate a mesh using external tools. That particular geometry was chosen for two reasons first was because it is a simple problem for which there is a well known analytical formula and second because it allowed the mesh to be generated from within FEniCS as it was just a rectangle. PIn the previous post the Laplace equation was solved between two infinite parallel plates subject to certain boundary conditions using FEniCS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |