This action might not be possible to undo. Are you sure you want to continue?
Solution of Electrostatics Problems with COMSOL
This section gives examples demonstrating how Comsol can be used to solve some simple electrostatics problems.
We start with a solution of Laplace’s equation, ∇2 u = 0, where u is the potential. The easiest way to solve this problem is to choose the application mode Laplace’s Equation from the subsection Classical PDE’s of the COMSOL Multiphysics section PDE Modes. Let’s ﬁnd a solution on a square with a side length equal to 2π . To draw the square, point the cursor to the uppermost “Rectangle/Square” icon and left-click your mouse, while keeping the Shift key pressed. Then specify the width and height (2*pi) of the square in the popped-up window. A solution of Laplace’s equation is known to be entirely determined by its boundary conditions. Therefore, go directly to the Boundary Settings, highlight, step by step, each of the four boundaries by clicking them, and let the right-hand side of the Dirichlet boundary condition r be equal to (cos(x))2 and (cos(y ))2 for the horizontal and vertical sides, respectively. Initialize and reﬁne the mesh (the triangle symbols on the main (upper) icon bar) and, ﬁnally, hit the equal sign to ﬁnd a solution. The resulting distribution of u in the square is shown in the upper panel of Fig. 1. This distribution can be exported to a text ﬁle. Such a ﬁle has been used to produce the plot in the lower panel with the help of another graphical software. This plot demonstrates one of the main properties of solutions of Laplace’s equation: they tolerate no local maxima or minima, extreme values of u occur only at the boundary.
Elementary Point Charge
In the second example, the electric ﬁeld of an elementary charge Q0 is computed. Although Comsol can model point charges, we prefer to consider the elementary charge uniformly distributed over a small spherical volume V0 , so that the charge density ρ is equal to Q0 /V0 inside and zero outside the sphere, where Q0 = 1.602 × 10−19 C. To produce a spherical domain, we have to use the 2D space dimension for axial symmetry, in which Comsol employs the cylindrical coordinates (r, z, ϕ). Here, 3 the sphere is represented by a circle of the radius r0 , such that V0 = 4πr0 /3. Note that the parameters Q0 , r0 , and V0 and their values can be speciﬁed as “Constants” in a special table, after which their names can be used everywhere in the current model. To be able to see how the ﬁeld looks outside the sphere, we surround our small charged sphere by another concentric sphere of a much larger radius. Like the square in the ﬁrst example, the circles can easily be drawn by clicking the “Ellipse/Circle (Centered)” icon, while keeping the Shift key pressed, and entering necessary radii in the popped-up window. To compute the electric ﬁeld, we solve Poisson’s equation for the potential V in the Electrostatics application mode of the COMSOL Multiphysics/Electromagnetics section. In the Subdomain Settings, we specify the
draw two squares with slightly diﬀerent side lengths. You can play with diﬀerent postprocessing options to ﬁgure out what they do or you can read the COMSOL Multiphysics User’s Guide that is downloaded as a web page with other Comsol reference pages when you click the button Help. therefore it is actually safe to be in a car (not a convertible though!) during a thunderstorm. The upper panel of Fig. In the Boundary Settings.values of ρ in our two subdomains (the charged small sphere and empty large sphere) and the value of εr = 1 for the relative permittivity in either of them. Its ratio to the respective expression from Coulomb’s law is plotted in the lower panel for z = 0. In the XY-plane of the screen the enclosure is represented by a square with sides of a ﬁnite thickness (to obtain it. 1. 3. we leave all the standard settings. V = 1000 V. wherever you see it. an enclosure made of a conducting material (e.032 × 106 [S/m] for steel. The resulting distribution of the electric ﬁeld and potential are shown in Fig. respectively. therefore it can be used as an exercise. highlight both of them by pressing Ctrl-A. we choose the “Ground” and “Continuity” conditions for the outer and inner spheres. The ﬁnal two steps are to mesh the subdomains and solve the problem. as usually. e. 4. prescribe the upper side of the large square a high potential.g. 2 presents the solution in a form that can be customized using a number of options in the Postprocessing section. We see that the strong external ﬁeld does not penetrate the enclosure.3 Electric Dipole The third example is an electric dipole consisting of two opposite elementary charges uniformly distributed over two small spheres that are separated by a speciﬁed distance. Its solution is shown in Fig. and click the icon “Difference” that will subtract the smaller square from the larger one. One of such derivatives gives the radial (in the cylindrical coordinates) component of the electric ﬁeld Er .4 Faraday’s Cage The fourth example is a model of Faraday’s cage. Outline the enclosure by a square of a larger radius. In the Boundary Settings. The ﬁnal two steps are to mesh the subdomains and solve the problem. The left and right sides of the large square should be in “Electric insulation”. It is convenient that the Comsol solution contains not only the dependent variable (the potential V in the present case) but also its various derivatives. z ). 2 .. The lower plot is obtained using the option Line/Extrusion of the Cross-Section plot Parameters section in Postprocessing. y. steel) placed in a strong external electric ﬁeld. It shows that the Faraday cage blocks out the external static electric ﬁeld. 1.g. In the Subdomain Settings. and let its lower side be at “Ground” (V = 0). like a shield.e. All sides of the enclosure are subject to the “Continuity” interior boundary conditions. i. This problem is similar to the previous one. except the electric conductivity of the enclosure walls for which we use the value of σ = 4. We use the 2D space dimension that employs Cartesian coordinates (x.
1 Eddy Currents The ﬁrst example is a tutorial model of eddy currents (the blue region in Fig. This allows us to see the box’s content through its boundaries. 4. This is a consequence of the well-known general rule saying that (eddy) currents generated in a conductor by a varying magnetic ﬂux (in the present example. while the upper boundary has the potential V = 1 V. The electric sensor is a box inside of which there are objects of diﬀerent forms with diﬀerent relative permittivities (in this example.1. it is produced by the alternating current) have such orientation and strength that their associated magnetic ﬁeld counteracts the ﬂux change that has caused their generation. respectively). 3. The resulting potential diﬀerence produces an electric ﬁeld directed from the upper to lower boundary that induces a surface charge on the boundaries. The lower boundary is grounded (V = 0). 6) induced in a metallic cylinder by an alternating current in a surrounding coil. and 5. Only a cross-section of the coil wire is shown in the ﬁgure (the red circle). This problem is solved in the 2D axisymmetric geometry. the original version of which can be found in the COMSOL Multiphysics/Electromagnetics section of the Model Library. respectively). They are followed by a description of our original Comsol model designed to simulate a small puck magnet falling through a long copper tube. The distribution of the current density in the coil (the current is stronger near the surface of the wire) demonstrates the so-called “skin eﬀect” in a conductor with an alternating current – a shift of the current toward the conductor’s surface. This is a model of “electric sensor”. Streamlines of the magnetic ﬁeld are also shown. 5). It is seen that the current in the cylinder has a direction opposite to that of the current in the coil (the blue and red colors. 2 Solution of Magnetostatics Problems with COMSOL This section presents three examples of magnetostatics problems that are solved using pre-tested models from Comsol’s Model Library. The surface charge density depends on the permittivity and form of the objects that are encountered by the electric ﬁeld on its way in the box (Fig. The objects do not touch the lower and upper boundaries of the box. which is also caused by eddy currents but now in the coil. 2. 3 . the hidden objects are the letters “UVic” with the permittivities 2.5 Electric Sensor The ﬁnal electrostatics example is based on one of the pre-tested models supplied with the COMSOL package.
The middle one is twice as long as the other ones. therefore the particles farthermost from the Y axis are rapidly getting focused along the Y axis (blue portions of the tracks). The second quadrupole has a reverse magnetic ﬁeld. The quadrupole consists of an assembly of four permanent magnets. The upperright panel of Fig. While traveling through the ﬁrst quadrupole. when they enter the ﬁrst quadrupole. 4 . electric and magnetic lenses can focus beams of charged particles. The lower panels show how the magnetic ﬁeld B in the disk decays as the rotation slows down (note the diﬀerence in the color-bar B scales between the left and right panels).2. and all the particles are now focused inside the central circumference of smaller radius (red portions of the tracks).3 Magnetic Quadrupole Lens Just like optical lenses focus light. 7 shows how the disk’s angular velocity decreases with time. the changing magnetic ﬂux induces eddy currents in it. Initially. in which the disk is rotating. Fig. its associated integrated torque) resulting from the interaction between the currents and magnetic ﬁeld brakes the disk. the third quadrupole stabilizes their motion directed toward the Y axis. The magnet produces a constant magnetic ﬁeld B0 . 7). To strengthen the ﬁeld and keep it contained within the system. 8 shows a simple Comsol model of the magnetic quadrupole lens (upper panel) and the path of B5+ ions going through three consecutive magnetic quadrupole lenses (lower panel). such as CERN. When the conductive disk moves through the magnetic ﬁeld. the magnets are set in an iron cylinder. Finally.2 Magnetic Brake A magnet brake in its simplest form consists of a disk of conductive material and a permanent magnet (upper-left panel in Fig. and is rotated by 90 degrees around the central axis. and others.1 T. the particles get focused along the X axis and de-focused along the Y axis (green portions of the tracks). White arrows show the distribution of the normalized current density in the disk. 2. The rotation that starts with 200 revolutions per second completely stops in just 8 seconds for B0 = 0. The central part of the lower-panel plot shows projections of particle tracks onto the screen plane (XOY) as the particles move through the three consecutive quadrupoles in the Z direction (perpendicular to the screen). The color map and contour lines in the upper panel show the magnetic ﬁeld conﬁguration in a cross section of the ﬁrst and third quadrupoles. where the magnets work together to give a good approximation of a quadrupole ﬁeld. Systems of magnetic quadrupole lenses ﬁnd a common use in focusing both ion and particle beams in accelerators at nuclear and particle physics centers. The model is set up in a cross section of the geometry. SLAC. The ions are sent through a system of three consecutive quadrupole assemblies. This means the polarity of its magnets is reversed. and the Lorentz force (more precisely. the particles are assumed to be evenly distributed along the white circumference.
01 m. solve it. 9). To do this.g.0. are represented by rectangles (upper panel in Fig. Interaction of these currents with the magnetic ﬁeld produces the Lorentz force that slows down the magnet’s fall. The tube’s inner cross section has the diameter of 0. the puck magnet has the diameter of 0.003 m.0.4 Puck Magnet Falling Through the Copper Tube In our simple experiment. a free fall of the magnet from the height of L would take only tﬀ = 2L/g = 0. It has an appropriate equation template in which we should substitute a few parameters from our experiment. which is 14. the cross sections of the magnet and tube. as well as a region surrounding them. it is straightforward to write down the equation of motion. Boundary Settings should be “Magnetic insulation” for the external boundary and “Continuity” for the internal boundaries. σ = 5. It is convenient to use the 2D space dimension for axial symmetry to draw the parts of our experiment. hence.001 m thick.. (click Apply).81 × 10−2 m/s. tube Fz dV . we should go to Postprocessing/Subdomain Integration. the “Parametric Solver” has to be chosen in the Solver section.g.290 s.2)) have to be speciﬁed. range(0.412 m. These are the average velocity of the tube relative to the magnet. For comparison. e. the constitutive relation with the magnetization term should be selected for the magnet). 5 . The main result is that the integrated Lorentz force turns out to be proportional to the velocity of the magnet. we drop a small puck magnet into a vertically held copper tube. To produce a ﬁgure with a curve showing the dependence of tube Fz dV on vz . 9. Mz = 106 A/m. 9). and the name of the parameter (vz ) and a desired range of its values (e. This problem can easily be modeled with the COMSOL Multiphysics standard application mode Magnetostatics. like the one in the middle panel of Fig. the magnetic ﬁeld) of the puck magnet in our experiment if we will carry out another parametric study to determine a dependence of the volume integral of Fz /m on Mz (lower panel in Fig. the electric conductivity of copper. the latter containing enough information for one to understand where to put each of the parameters (of course.2. highlight (by clicking it) the right cross section of the tube (do not highlight its other side!).20 s for the puck magnet to appear at the bottom opening of the tube. and ask Comsol to compute a volume integral of the Lorentz force. and a reasonable test value for the magnetization of the puck magnet. The tube has the length L ≈ 0. where m = 2.5 times less than in our experiment! This huge diﬀerence is evidently caused by eddy currents that are induced in the copper tube by magnetic ﬂux changes arising from the motion of the magnet. Subdomain Settings are done in the equation template. vz = L/t = 9. For the Z axis directed up.0. click the button Plot.02. Surprisingly. while its walls are approximately 0.998 × 107 S/m. According to our measurements. It is instructive to ﬁnd out ﬁrst how the Lorentz force Fz depends on the tube velocity vz . After the solver has ﬁnished its work. it takes as many as t ≈ 4.938 × 10−3 kg is the mass of the puck magnet. and ﬁgure out that we can estimate the magnetization (and.008 m and the height of 0. From here on.
Figure 1: A solution of Laplace’s equation. 6 .
Figure 2: Electric ﬁeld of an elementary point charge. 7 .
Figure 3: Electric ﬁeld of a dipole. 8 .
Figure 4: Simple Faraday’s cage. 9 .
Figure 5: Electric sensor. 10 .
Figure 6: Eddy currents and the skin eﬀect. 11 .
12 .Figure 7: A simple magnetic brake.
13 .Figure 8: Focusing of a beam of charged particles by quadrupole magnetic lenses.
14 .Figure 9: A puck magnet falling through a copper tube.