There are two essential items that we need to know define a problem. The first one is the geometry or physical shapes. The geometry should be specified using rectangular coordinates. The other important aspect is the material properties, such as permeability, permittivity and charge density. The potentials of known boundaries can also be taken as a material property.
In any problem, the geometry is specified using a set of points and a set of lines or edges. So if there are any circular boundaries, they need to be represented as a set of straight lines. In order to specify material properties, you need to have a closed boundary. A boundary can be specified using a set of edges. Although this description seems confusing, an example will hopefully make things simple and clear.
We will now consider solving a simple problem using pdnmesh. We will consider a small solenoid and plot its field pattern. The solution will be as given in the following figure.
A solenoid is a coil, wound around a metal like iron. When a current is passed through the coil, the metal core acts as a magnet. Since the coil is very thin, we can assume it to be a thin sheet in which a current is flowing. Moreover, we can assume the potential of this sheet to be a constant. Note that the coil is sectioned along the axial plane in the figure. So we see two currents, one coming to us and one going down to the paper. So the potentials of the top and bottom sheets will have equal magnitudes and opposite signs.
The problem can be defined as seen in
There are eight points numbered 0 to 7. Correspondingly, there are eight edges. Generally points should be numbered such that the ascending order is anti clockwise.
In the data file, the first lines should give the detail of individual points. Hence the first portion of the file may look like as given in figure. However, comments starting with a '#' and empty lines will be ignored.
#this is a comment # no. of points 8 # point data 0 -8 -8 0 1 1 8 -8 0 1 2 8 8 0 1 3 -8 8 0 1 4 1 1 30 1 5 -1 1 30 1 6 -1 -1 -30 1 7 1 -1 -30 1
The first line should give the number of points. Then data about each point follows line by line. In each line, the format is:
(point number) (x coordinate) (y coordinate) (the potential) (fixed or variable)
Point and line numbering should start from 0. Each point may have a known, fixed potential or an unknown, variable potential. If the potential is known, 1 should be given as the last entry of each line. In this example all points have fixed potentials. Note that points 4 and 5 have a potential of 30 and points 6 and 7 have a potential of -30. All other points have zero potential.
Next, the input should specify the edge data. First line should be the number of edges. Do not insert any blank line between point data and edge data. The detail is given in figure
# no. of edges 8 # edge data 0 0 1 1 1 1 2 1 2 2 3 1 3 3 0 1 4 4 5 1 5 5 6 0 6 6 7 1 7 7 4 0
For each edge, the following should be specified.
(edge number) (point 1) (point 2) (Dirichlet or Neumann)
Edges can either be Dirichlet or Neumann depending on the boundary condition. For Dirichlet edges, the potential is fixed and for Neumann edges the gradient of the potential is fixed. Hence for a Dirichlet edge, any point upon which will have fixed potential. We give 1 for a Dirichlet edge and the potential of any point is linearly interpolated from the edge points. For a Neumann edge we give 0.
For material edges, that need not satisfy any boundary condition we give 0 as well. Moreover, it should be remembered to have all edges of the outer boundary with known potential for a unique solution. Otherwise the program will warn you about singular matrices.
In figure edges 5 and 7 are not Dirichlet but that does not mean that they are Neumann. Moreover, edge 4 will have a potential of 30 because its end points both have the same potential. The same is true for edge 5. Both these edges represent the surface currents running on the periphery of the solenoid.
Finally, in the input file, we should specify the boundary detail. Boundaries need not be closed except the outer one, but almost always they are closed. Boundaries are required to define the shape of the problem as well as the material properties of the problem.
From versions 0.2.2 and onwards, thers is a minor change in definig boundaries. Now you need to give permeability , permittivity and charge/current density for all boundaries.
For instance, in this problem, There are two boundaries as given in figure. The point set 0, 1, 2, and 3 specify the outer boundary and the point set 4, 5, 6 and 7 represent the solenoid core.
Always, the outer boundary will be need to be specified and this should be done before other boundaries.
For any material, three parameters must be specified. However, for some problems only two are needed. For instance, in an magnetostatic problem, they can be the permeability and the current density and for an electrostatic problem, they can be the permittivity and the charge density .
Please remember that for no material, will the values of permeability or permittivity be zero. In the worst case, they would take values of free space. It is much easier to work with relative permeabilities or permittivities. Once the answer is obtained, it can be scaled back to the true value.
Sometimes the detail within a boundary may not be important or interesting. For example, within a small conductor, the potential variation can be considered negligible. Hence, the triangles within this boundary can be removed and this reduces the size of the problem. This can be done by giving 0 as a parameter in the boundary detail specification.
# no. of boundaries 2 # outer boundary 4 1 1 1 0 0 1 2 3 # solenoid core 4 1 10 1 0 4 5 6 7
The boundary data for this problem is given in figure Figure 2.2, “The problem geometry”. First, the number of boundaries is specified. Next the outer boundary detail is given. The outer boundary has four edges, it is closed, the triangles will not be deleted, its permeability is 1.0 (relative value), permittivity is 1.0, and its current density is 0. Next, the numbers of the edges in that boundary is given line by line. The general format for boundary information is
(number of edges) (keep triangles?(yes:1 no:0)) (permeability:mu) (permittivity:epsilon) (current/charge density:rho)
Hence, we can see that the inner boundary (solenoid core) has 10.0 as its permeability and 1.0 as its permittivity and 0 as its current density.
The complete data file is given below.
# complete data file 8 0 -8 -8 0 1 1 8 -8 0 1 2 8 8 0 1 3 -8 8 0 1 4 1 1 30 1 5 -1 1 30 1 6 -1 -1 -30 1 7 1 -1 -30 1 8 0 0 1 1 1 1 2 1 2 2 3 1 3 3 0 1 4 4 5 1 5 5 6 0 6 6 7 1 7 7 4 0 2 4 1 1 1 0 0 1 2 3 4 1 10 1 0 4 5 6 7