Computer Simulation of High‐Frequency Electromagnetic Fields

High-frequency and microwave electromagnetic fields are used in billions of various devices and systems. Design of these systems is impossible without detailed analysis of their electromagnetic field. Most of microwave systems are very complex, so analytical solution of the field equations for them is impossible. Therefore, it is necessary to use numerical methods of field simulation. Unfortunately, such complex devices as, for example, modern smartphones cannot be accurately analysed by existing commercial codes. The chapter contains a short review of modern numerical methods for Maxwell's equations solution. Among them, a vector finite element method is the most suitable for simulation of complex devices with hundreds of details of various forms and materials, but electrically not too large. The method is implemented in the computer code radio frequency simulator (RFS). The code has friendly user interface, an advanced mesh generator, efficient solver and post-processor. It solves eigenmode problems, driven waveguide problems, antenna problems, electromagnetic-compatibility problems and others in frequency domain.


Introduction
High-frequency electromagnetic fields are used now in telecommunications and radar systems, astrophysics, plasma heating and diagnostics, biology, medicine, technology and many other applications. Special electromagnetic systems excite and guide these fields with given time and space distribution. A designer or a researcher of such systems ought to know in detail their electromagnetic field characteristics. This goal can be achieved or by experimental study, often too long in time and expensive, or by computer simulation. The last choice becomes more and more preferable with fast progress of computational electrodynamics and computer efficiency.
All macroscopic electromagnetic phenomena are governed by Maxwell's equations. Unfortunately, these remarkable equations have so many solutions, that choice of the one satisfying given initial and boundary conditions (BC) often becomes very difficult problem. A number of commercial computer codes based on numerical solution of Maxwell's equations are available at this time. These codes make possible high-frequency electromagnetic field simulation. Researches have not yet created a universal code, efficiently simulating electromagnetic field excited by an arbitrary technical or nature source in an arbitrary medium. Some codes are more suitable for solving one kind of problems and other codes-another kind. Hence, developing new, more universal and efficient computer codes is an actual task. On the other side, a designer of electromagnetic devices and systems has to choose most efficient computer code for solving his/her particular problem. He/she can do right choice only if he/she understands the basics of a numerical method used in the given code.
The goal of the presented chapter is to formulate electromagnetic problems and to describe in short prevailing numerical methods of its solving. As an example, the chapter also gives more detailed description of the radio frequency simulator (RFS) computer code, developed in collaboration of Saint-Petersburg State Electrotechnical University and LG Russian R&D Centre. Some results obtained by means of this code demonstrate its accuracy and efficiency.
The author hopes that this chapter would be useful for researchers and designers of modern telecommunication devices and systems.

Basic equations
Maxwell's equations are the basic ones, describing macroscopic electromagnetic fields in an arbitrary medium. In modern notation, these equations have the form Here, ε, μ are the absolute permittivity and permeability, ε 0 ¼ 10 7 =ð4πc 2 Þ, μ 0 ¼ 4π Á 10 À7 are the dielectric and magnetic constants (we use the SI units in this chapter) and ε r , μ r are the relative permittivity and permeability, which can be scalars or tensors, depending on medium properties. Equations (1), (2), (5) and (6) form a system of 12 scalar differential equations of the first order with 12 unknowns-components of E, H, D, B vectors, which are functions of space coordinates and time. To solve this system, one needs to define initial and boundary conditions. These conditions together with the equations form an electrodynamics problem (EMP).
Initial conditions define electric and magnetic field intensities in the computational region at the initial moment of time.
The most frequently used boundary conditions (BC) are as follows: • On the surface separating two dielectrics: where n is the unit normal to the surface directed from the first medium to the second and J s is the surface electric current density.
• On the surface of perfect electric conductor (PEC): • Similarly, on the surface of perfect magnetic conductor (PMC) • Approximate Leontovich boundary condition holds on the impedance surface: where Z s is the surface impedance. For metals, Z s ¼ð1 þ jÞ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi ωμ=ð2σÞ p .
• We define radiation (adsorption) condition on the surface throw where radiation propagates without reflections. Higdon [1] proposed general absorption boundary conditions (ABCs) theory of arbitrary order of approximation. For a wave, propagating under arbitrary angle ϕ to the border x ¼ Const, the first-order Higton's ABC are where ξ is constant, providing solution stability and u is the phase velocity of the wave. Higher order ABC can be constructed by multiplying several first-order operators (11).
Another expression for ABC can be derived from the wave equation. For the wave propagating along the normal e n to the border, we get ð∇ · ĖÞ τ þ jk 0 ffiffiffiffiffiffiffiffi ffi ε r μ r p e n · · Ė ¼ 0 (12) There are two types of EMPs: an inner problem, when the solution is defined in a closed space region with certain boundary conditions on its border, and an outer problem presuming existence of the solution in the unbounded space excluding some regions with prescribed conditions on their boundaries. We ought also to define field sources in the computational region and initial conditions-electrical and magnetic fields at some moment of time. The proper initial and boundary conditions guarantee existence and uniqueness of the solution [2, 3].
Equations (1)-(4) presume arbitrary time dependence of sources and fields. But very often field dependence on time expresses by the harmonic law: a ¼ a m cos ðωt þ ϕÞ, where a is any component of the field, ω ¼ 2πf is the angular frequency, f is frequency and ϕ is the initial angle. In this case, we can simplify Maxwell's equations, using notation where ĖðrÞ¼E x e jϕ x e x þ E y e jϕ y e y þ E z e jϕ z e z is the complex electric field amplitude (phasor). Magnetic field H is presented similarly. Using these notations, we can write Maxwell's equations for phasors: Here, _ ε ¼ ε 0 _ ε r , _ μ ¼ μ 0 _ μ r are the complex absolute permittivity and permeability and _ ε r ¼ðε 0 r þ jε ″ r Þ, _ μ r ¼ðμ 0 r þ jμ ″ r Þ are the relative complex permittivity and permeability. The equation systems (14)- (17) are simpler than the original one because it does not contain time as independent variable and has only six unknown functions.

Basis stages of electromagnetic problem solution
Solution of a given electromagnetic problem can be divided on several subsequent steps (stages): 1. Problem formulation-defining the goal of the computation, necessary input and output data, admissible inaccuracy of the results.

2.
Analytical treatment-formulating of equations, initial and boundary conditions, geometrical description of the computational region and filling medium properties. The choice of the numerical solution method, transforming equations to the form, most suitable for the chosen method, a-priory analysis of equations and their solutions properties.
3. Problem discretization-transfer from continuous functions to discrete ones and from functional equations to the system of linear algebraic equations (SLAE), in the certain sense approaching the initial problem.

4.
Algebraic solution-choosing the most efficient numerical method and solving the SLAE with the prescribed accuracy.

5.
Post-processing-calculation of fields, characteristics and parameters of the electromagnetic system and visualization of the results.
Each stage of the solution adds its own contribution to the total solution error. The first step adds the so-called inherent error arising due to inaccuracy of input data. This error cannot be eliminated on the next stages of solution. The second stage adds mathematical model error caused by imperfect adequateness of the model to the real physical process. Problem discretization adds the so-called numerical method error, the value of which depends on the quality of the discretization process. At last, computational error arises on stages 4 and 5 due to finite accuracy of numbers presentation in a computer and finite number of operations. With progress in the computational mathematics and computer, the main error sources move from the uncontrolled first stages to the fourth and fifth stages, where we can often predict the error value a-priory.

Numerical methods classification
The solution of real-life electromagnetic problem is a very complicated task. There are no universal methods, capable to solve efficiently an arbitrary problem. Hence, a number of numerical methods were elaborated, each of them is the most efficient for its particular range of problems. The numerical methods divide on two large groups.
The first group solves problems involving Maxwell's equation (1)-(4), containing time as an independent variable. This group makes possible to find the solution in time domain (TD) with arbitrary time dependence of fields. This group of methods is the most suitable for solving non-linear problems. If the problem is linear, Fourier transform can be used to find frequency spectrum of the solution.
The most popular method of this group is the Finite Difference Time Domain (FDTD) method, proposed by Yee [4,5]. Another method, successfully used in time domain, is the Finite Integration Technique (FIT), firstly proposed by Weiland [6]. The Transmission Line Matrix (TLM) method, proposed by Johns and Beurle [7], also works efficiently in time domain. Its detailed description can be found in [8]. These methods were implemented in a number of computer codes, such as SPEAG SEMCAD™ (FDTD), CST Studio Suite™ (FIT, TLM) and many others.
The second group deals with Eqs. (14)- (17) for field phasors, supposing harmonic time dependence of fields. This group provides solution in Frequency (or Spectral) Domain (FD). The finite element method (FEM) is one of the most efficient representatives of this group. The first application of this method to the solution of mechanical problems refers to the year 1943 [9]. The book [10] contains detailed description of the method, which is rather universal and accurate. The Method of Moments (MoMs) and its varieties are also frequently used in FD. In contrast with FEM, MoM uses integral form of basic equations, where electric current density distribution on conducting surfaces excited by external sources is unknown. The book [11] reflects modern state of the MoM. Mentioned methods were implemented in codes ANSIS HFSS™ (FEM), Altair FEKO™ (MoM, FEM) and other commercial computer codes. Of course, there exist many other numerical methods and various implementations.

Most of modern methods allow implementation both in TD and in FD.
Because it is impossible to give detailed representation of all numerical methods in a limited space, we give here more detailed information about the FEM method, which was implemented in the computer code radio frequency simulator (RFS) [12].

Main features of the method
The finite element method belongs to the variational methods of solving partial differential equation (PDE). It presumes formulating a functional, which is stationary (has minimum or maximum value) on the equation solution. In order to find functional extremum, the computational region is partitioned on a number of subregions (finite elements). After that, we approximate an unknown function in each finite element (FE) by superposition of basis functions. Basis functions have to be simple and form a linearly independent system. Applying Ritz method or Galerkin algorithm, we fulfil discretization of the problem, that is, transition from the partial difference equation to the system of linear algebraic equations (SLAE). Numerical solution of the SLAE gives unknown coefficients of basic functions, which are used to restore electromagnetic field. At last, needed components of electromagnetic field and system parameters are calculated.

Mesh generation
Partitioning of the computational region (mesh generation) is the first stage of problem solution by FEM. It supposes dividing the computation region on a set of subregions-finite elements. FEs must densely fill the region and be nearly conformal to its border. In contrast to FDTD or FIT methods, a FEM mesh can be irregular and contain FEs of different forms. Tetrahedron FEs are used most commonly, because they allow dense packing and quite correctly approximate curvilinear borders. However, mesh generation for regions with complex forms filled with different materials is a very complex task.
Delaunay tessellation is a common way of mesh building. It includes several stages. Firstly, a surface triangle mesh is generated. Then, a volume mesh based on the surface mesh and covering the whole computational region is being built. The method can build a rather good mesh without self-intersections. Some commercial codes, such as SYMMETRIX MeshSym™, can be used to generate mesh by this procedure.
Unfortunately, this method cannot be applied to tessellation of complex geometrical models consisting of hundreds of parts made from various materials. Usually, an electromagnetic simulation code imports such models from various CAD systems (see, e.g. Figure 1). As a rule, imported models contain a number of errors caused by insufficient attention of a designer or arising in the process of graphic formats transforms. As a result, mesh generator fails to build the mesh.
On the other side, CAD models are often excessively detailed. They contain peculiarities, not influenced on electromagnetic field. Figure 2 shows an example of such extra detailed CAD model. The application of standard mesh generator to such a model can result in excess mesh size. Correction and simplification of the model manually needs several working days of the qualified engineer.
An advanced method of mesh generation was developed and implemented in the RFS simulation code. The algorithm begins from assigning materials and attributes to the model parts.
Most important objects, such as ports, printed circuit board (PCB) and antennas, are labelled as 'electrically important'. This is the only stage of the algorithm, which is made manually. This stage can be omitted for simple models. Then the code builds surface meshes for each detail of the system. The third stage presumes elimination of individual meshes interceptions and building united surface mesh. Electrically important, metal parts and parts with higher permittivity have priority in this process. At last, a global volume mesh is generated [13]. The user

Computer Simulation 200
can control mesh quality (maximum to minimum ratio of tetrahedron's dimensions and other mesh parameters).
We proved this algorithm on more than 190 models of mobile handsets and showed its 100% reliability. Generated meshes contained more than 1.5 billion tetrahedrons. Figure 3 shows a CAD model of the handset (a), surface mesh (b) and volume mesh (c), built by the described algorithm.

Basic equation
Consider a region V, delimited by a surface S, where electromagnetic field has to be calculated. We suppose that the region V is filled by linear medium. Applying curl operator to Eq. (15) and substituting into result Eq. (14), we get PDE of the second order where J imp is the imposed current density, k ¼ ω=c is wave number, c ¼ðε 0 μ 0 Þ À1=2 is the light velocity in free space, σ is medium conductivity and η 0 ¼ ffiffiffiffiffiffiffiffiffiffiffiffi μ 0 =ε 0 p ¼ 120π ohm is the intrinsic impedance of free space. After solving this equation, we can find magnetic field by means of Eq. (15): To solve Eq. (16), we divide the computation region on finite elements and approximate the field in each FE by superposition of basis functions. It is natural to approximate vector unknown function in Eq. (16) by a set of vector basis functions. We name such variant of FEM as vector finite element method (VFEM).
Nedelec [14] proposed a set of vector basis functions for triangle and tetrahedral FE. These functions are associated with tetrahedron edges and have the form where ζ mn is the barycentric function of the vertex (node) node n of the edge m (m ¼ 1, …, 6, n ¼ 1, 2). The barycentric functions are polynomials of the first order. For a given Descartes coordinate system where p is vertex number. As a tetrahedron has six edges, Nedelec's basis consists of six functions. Figure 4 shows the numbering scheme for nodes and edges, needed for the correct use of Nedelec's functions.
where x p , y p , z p , p ¼ 1…4 are the coordinates of the p-th tetrahedron's node.
Nedelec's basis functions have the following properties: 1. Dimension of these functions is L À1 .
2. They have zero divergence and their curl is constant inside the FE. This property provides the absence of spurious solutions of the problem.
3. Projection of the function w m on the edge m is constant, and its projection on the other edges is equal to zero. Hence, these functions provide continuity of tangential electric field on the border between neighbouring tetrahedrons.

4.
Circulation of function w m along its edge is equal to unity.
Full first-order polynomial set for electric field approximation contains 12 functions (3 E-vector projections, each needs four functions). However, Nedelec's set contains only six basis functions. Hence, it does not form full first-order polynomial system. The order of approximation by these functions is lower than one. Finite elements with these functions are called FE of order 1/2 or CT/LN (constant tangential/linear normal) according to the behaviour of these functions along edges and in normal direction to them.
Striving for increasing approximation accuracy led to creating another set of basis functions with higher order of approximation. A set of 20 functions (12 associated with edges and eight with faces) forms FE of order 1.5 or LN/QN (linear tangential/quadratic normal) [15,16]. There exist basis functions of order 2.5 and higher, but they are rarely used.
With the aim of simplicity, we consider further only Nedelec's basis functions. So, electric field intensity in q-th tetrahedron is approximated as where N q is the total number of tetrahedrons.
Coefficients _ x q m have the sense of voltage on edge (with reverse sign). Really, taking integral along an edge due to the fourth property of basis functions.
Let us consider q-th tetrahedron. According to Galerkin's method, we multiply Eq. (16) by basis function w q m , belonging to this tetrahedron and integrate the product over the tetrahedron volume V q . As a result, we obtain the so-called week form of Eq. (16): Transformation of the first term of this equation and subsequent substitution into result approximation (19) gives a system of linear algebraic equations: where N q is the total number of FE in the computation region.
The system of Eq. (25) can be written in matrix form: where Q q , T q , U q , R q are square matrices having dimension 6 · 6, S q , B q are column vectors having six components, dependent on the given boundary conditions and implicit current density in the q-th finite element. Depending on BC, S q can sometimes be a square 6 · 6 matrix.
Equation (26) is called the local matrix equation, and matrix Q q is the local matrix of q-th FE. Such matrices should be built for every FE in the computational region.
Components of matrices T q , U q , R q and vectors S q , B q are defined by the expressions Medium in these expressions is supposed to be homogeneous inside the FE. Index 'q' denoted FE number is omitted. We can see that in order to calculate elements (27)-(31), it is sufficient to calculate two integrals: We use the next algorithm for the calculation of matrices and vectors elements: For each tetrahedron • Coefficients of the barycentric functions are calculated by means of Eq. (22).
• Auxiliary values are calculated: It can be easily shown that ∇ · w m ¼ 2v m1, m2 .
Construction of the global matrix (assembling) for all tetrahedrons is a rather complex task, because many nodes, edges and faces are common for neighbour FEs (see Figure 5, which shows two neighbour tetrahedrons, separated for reader's convenience). They have three common vertices and three common edges. Hence, the united matrix for two FEs has only 9 dimensions instead of 12.
The code RFS uses the next algorithm for building the global matrix: 1. Calculate a local matrix for the tetrahedron number one (q = 1). Give its edges global numbers from 1 to N c ¼ 6: 2. Choose the tetrahedron with q =2 Figure 5. Two neighbour tetrahedrons. Edges e1 1 and e2 2 ,e3 1 and e3 2 ,e5 1 and e6 2 and vertices v1 1 and v1 2 ,v2 1 and v3 2 , v4 1 and v4 2 are common for both FEs. b. Do this procedure for all edges of the tetrahedron.
3. Repeat point 2 for every tetrahedron in the region testing whether a given edge of the tetrahedron coincides with any edge, previously included in analysis.
Similar assembling procedure is valid for basis functions of higher order.
As a result, we get a global matrix of the problem, a global vector of the right side of Eq. (26) and a global vector of unknowns. Dimension of the global matrix is equal to the total number of coefficients (degrees of freedom) in formulas (23).

Numerical approximation of boundary conditions
• Border between two dielectrics. A finite element mesh is built so that every tetrahedron lies inside one of the media. Hence, the common face of two neighbour tetrahedrons lies on the separation surface or approximate it in the case of curvilinear border. Due to basis function properties, tangential electric field of both tetrahedrons is equal on the face edges, consequently electric fields are equal on the whole face area. As a result, BCs (7) for electric field are satisfied automatically. As for magnetic field intensity, its continuity on the border between media with different permeabilities is not guaranteed.
• Electrical wall. According to Eq. (8), tangential electric field on PEC surface is equal to zero. Hence, three coefficients of Eq. (25) belonging to edges, lying on the surface, are equal to zero. Corresponding rows and columns of local matrix of the given tetrahedron have to be eliminated.
• Magnetic wall. According to Eq. (9), surface tangential magnetic field on the PMC is equal to zero. We can see from Eqs. (27)-(31) that only term s m has to be changed: This expression is equal to zero as the mixed product under the integral has two vectors (H, e n ) with the same direction. Therefore, PMC BC does not change local matrix.
• Absorption boundary conditions. Formula for matrix elements s mn can be derived from Eq. (11): Expressions for the higher order ABC can be found in [10].

Computer Simulation
• Impedance surface. Impedance surface has finite surface conductivity σ s . Such surface is a good approximation of the metal surface in microwave frequency band. Using Leontovich BC (10), we can derive expression These values must be added to the corresponding elements of the local matrix. Of course, they are nonzero only for functions associated with edges lying on the impedance surface.
• Excitation sources. Electromagnetic field in the system excites by electric current or by electric or magnetic fields, defined on a part of the system border. In the first case, we use Eq. (26) to calculate right-hand vector elements. In the second case, we define the so-called ports-surfaces on which nonzero excitation field exists. Frequently, we define port as cross section of the regular transmission line (TL). Such ports are called wave ports.I fT L cross section has simple form (rectangular, circular, etc.), we can define field on the port analytically. Otherwise, we have to solve two-dimensional (2D) boundary problem.
Together with wave ports, lumped ports (LPs) are often used. These ports are defined by current I and intrinsic admittance Z i . LPs are used when excitation source dimensions are very low compared to the whole-system dimensions or wavelength. Geometrical model of LP is a segment of a straight line (linear LP) or a rectangle (planar LP). Linear and planar LPs are implemented in the RFS code. Arbitrary number of tetrahedron's edges or (and) faces can cover such LPs. We suppose that surface current density and electric field distributions on the PL are homogeneous. Values of right-hand vector for a planar LP are calculated by Eq. (31), where J imp ¼ I=w, I is port current and w is port width. Implemented model of the LP excludes limitations imposed on the mesh generator by other models.
• Lumped elements. Embedding of lumped elements (LEs) into 3D field model enlarges the capability of the code, as an LE excludes the necessity of generating very fine mesh inside such parts as resistors, capacitors and inductors. In the RFS code, linear and planar LEs are implemented [17].
The presence of LEs modifies the global matrix by adding to diagonal matrix elements terms where Y is the admittance of the LE, l is its length. The RFS code implements models of a resistor, capacitor and inductor, and their parallel connection. The number of LEs in the model is unlimited.

Fast-frequency sweep
The finite element method in frequency domain solves the problem at one specific frequency. Calculation of the system frequency response (e.g. S-matrix) needs solving the problem many times (often several hundreds or even thousands). This procedure takes much computation time.
Considerable economy of computational resources can be achieved by implementing the socalled fast-frequency sweep (FFS). The algorithm of FFS is based on model-order reduction (MOR) technique. According to the MOR, we seek solution in one frequency point and then expand left and right sides of Eq. (21) in frequency power series. Terms with the same power are equated and full solution as a function of frequency is restored. The RFS code implements one of such algorithms-well conditioned asymptotic wave form evaluation (WCAWE) [18]. This method was adapted to the RFS procedures, particularly for LE models, and showed high efficiency, making possible to calculate system fields and parameters in three-octave frequency band using full solution only in one frequency point. Hence, computation time for wideband systems decreases by tens and hundreds times without losing accuracy.

The RFS code description
The RFS code is designated to solve complex 3D electromagnetic problems, especially mobile handsets modelling. It contains graphic user interface for creating and editing geometric objects or for import CAD models. Geometric primitives, besides boxes, cylinders, spheres, pyramids and cones, include coaxial and strip lines and wizards for creating human head and hand models (phantoms), spiral antennas and other objects. All Boolean operations, such as extrusion, skinning and others, are also implemented. The code includes a rich material library.
Two types of meshing are available: exact automatic meshing based on Delaunay tessellation and hand meshing with automatic geometry corrections. We recommend the last one for meshing complex models, imported from CAD codes, for example, for full models of a handset. Two types of basis functions can be used: low order (CT/LN) and high order (LT/QN). The last is used as default, but for complex models with many small details, we recommend low-order basis.
The code solves several types of problems: driven solution in one frequency point, driven solution in frequency band with given frequency step (solution in each point or FFS), eigenmode, EMS and EMI problems. The code can perform parametric solution when one or several geometric or (and) material parameters changes in a given order. The results can be represented as functions of these parameters.
Post-processing includes the calculation of S-, Y-and Z-parameters, field distribution in a volume, on a surface or along a line, the calculation of cavities intrinsic impedance, specific absorption rate (SAR) and EMC/EMI parameters. Results are represented in one-dimensional (1D), 2D and 3D graphs, tables and can be exported in a file.

Computation results
Firstly, we validated the code by solving problems having analytical solution. One of such problems is an eigenvalue problem for cylindrical cavity. A cylindrical cavity has curvilinear surface, so calculation can demonstrate the quality of surface approximation by a tetrahedron mesh. The analysed cavity had radius 10 mm and height 15 mm. Cavity walls were supposed to be perfectly conducting. Eight eigen frequencies and eigen fields were calculated using high-order basis functions (LT/QN).
Computation results together with analytical data are shown in Table 1. The table also contains relative calculation error δ. Azimuthal inhomogeneous modes are twice degenerated. Numerical errors remove this degeneration, so two eigen frequencies for each mode are given. Degenerated modes differ by their field, turned by 90°in azimuth direction and computation results confirm this phenomenon. Difference between degenerated eigen frequencies is no more than hundreds of per cent.
The table demonstrates that eigen frequency calculation error decreases with mesh refinement and not exceeds 0.1% on the last mesh.
Another example, an electric dipole, consisted of two perfectly conducting cylinders, connected to the linear-lumped source ( Figure 6). To solve this outer problem, we ought to constrain   computational region by the so-called air box with ABC on its surface. The code automatically determines air box size so that the minimal distance between the dipole and the air box is not less than λ=4, where λ is wavelength in free space.
Cylinders have diameter 0.5 mm and length 9.5 mm. Together with a lumped port of 1-mm length, the total dipole length is 20 mm. Excitation frequency was chosen to be 1.5 GHz, so the ratio l=λ ¼ 0:1. Such a dipole can be considered as elemental (Figure 6a). Its directivity is described by the formula Dðθ, ϕÞ¼1:5sin 2 θ: Figure 6b shows mesh used in simulation. The sphere inside cylinder contains refined local mesh, surrounding the dipole. The total number of tetrahedrons is 64553. The 3D directivity chart is shown in Figure 6c, and 2D directivity chart in plain ϕ ¼ 0i nFigure 6d. Calculated dipole directivity is 1.506 with relative error of 0.4 %. This error can be caused by the finite diameter of cylinders.

Figure 7a
shows handset together with human head and hand phantoms. The handset has PIFA-type antenna. Reflection coefficient of this antenna in the presence of the phantoms was calculated by RFS code and code SEMCAD [19], based on FDTD method.
Finite element mesh built by the RFS code in the phantom contains only 200,000 tetrahedrons. The total mesh size was about 450,000 tetrahedrons. Efficient algorithm of SAR calculation, implemented in the RFS code, provides using such comparatively small mesh size without the loss of accuracy. SEMCAD hexagonal mesh had about 1.5 billion of cells. Figure 7b shows the module of reflection coefficient versus frequency for FRS and SEMCAD. As can be seen, both codes give similar results, especially for resonant frequencies.
We also calculated maximum SAR level in a brain tissue, averaged on 1 g of the tissue. The results are shown in Table 2. As can be seen, both codes give similar results, but SEMCAD solution time was nearly five times greater than RFS. Computer Simulation 210

Conclusion
The problem of high-frequency electromagnetic field simulation is formulated. A short survey of numerical methods for solving high-frequency electromagnetic problems is presented. It was shown that one of the most efficient methods for solving inner EMP and outer EMP with moderate electrical size is the vector finite element method in frequency domain. The algorithm of this method, including mesh generation, building of the global matrix, boundary conditions approximation, SLAE solving and FFS technique was described. Some peculiarities of lumped ports and elements implementation into the RFS computer code were also depicted. Simulation results for a simple systems having analytical solution, as well as for complex problems, such as handset antenna analysis near human head show high accuracy and efficiency of the code. The code can be used for the solution of antenna problems, waveguide problems, PCB analysis and microwave resonator problems.