OPTIMAL VOLTAGE CONTROL OF NON-STATIONARY EDDY CURRENT PROBLEMS

. A mathematical model is set up that can be useful for controlled voltage excitation in time-dependent electromagnetism. The well-posedness of the model is proved and an associated optimal control problem is investigated. Here, the control function is a transient voltage and the aim of the control is the best approximation of desired electric and magnetic ﬁelds in suitable L 2 - norms. Special emphasis is laid on an adjoint calculus for ﬁrst-order necessary optimality conditions. Moreover, a peculiar attention is devoted to propose a formulation for which the computational complexity of the ﬁnite element solution method is substantially reduced.

1. Introduction.In the last two decades, the optimal control of electromagnetic fields received increasing attention.Optimal control problems for processes in magnetohydrodynamics (MHD) were studied extensively since the mid of the 90ies.We mention exemplarily [15,16,13,14,11,23,10,12,9] and the references therein.Here, the state equations account for the flow of electrically conducting fluids and for the electromagnetic field.In the last years, the numerical analysis of controlled electric or magnetic fields in electrically conducting media became more active.We mention, for instance, [4,26,20,21,27,22,6].In the majority of these papers, distributed and/or time-dependent electrical currents were considered as controls.
The control of electrical voltages was first investigated in the time-harmonic case, see [17,18,28,24,25].Here, the dynamical system is of elliptic type.Often, it is more realistic to control the electrical voltage in a non-harmonic setting.This In our paper, the mathematical analysis for the optimal control of voltages is the central aspect.The associated model for the electromagnetic fields is close to that proposed in the seminal paper [5].We follow a slightly different approach.We merge the modeling ideas of [5] with both a specific approach aiming at reducing the complexity of the Maxwell equations for given voltages and some ideas of adjoining in [24,25].We should notice that, using our approach, specific difficulties arise in the process of adjoining.Here, differential operators on the boundary, namely, the surface gradient and the surface divergence, can be invoked to overcome this obstacle.The paper is organized as follows: in Section 2 we point out some assumptions and deduce the eddy current model.In Section 3 we devise the weak formulation of the problem and prove that it is well-posed.In Section 4 we derive the strong formulation, which shows more explicitly the role of the equations and boundary conditions, and that can be the starting point for non-variational numerical approximation methods.The fifth section is devoted to the formulation of the optimal control problem, whereas in Section 6 the adjoint problem and the necessary optimality conditions are derived.Some remarks on numerical approximation are included in Section 7.
2. Modeling the Maxwell system.The non-stationary Maxwell system reads where B, H, D, and E denote the magnetic induction, the magnetic field, the electric induction, and the electric field, respectively, and the following constitutive relations hold: D = εE, B = µH, J T = σE + J.The field J represents the applied electrical current surface density.The coefficients ε and µ are called electrical permittivity and magnetic permeability, respectively: they are symmetric and (uniformly) positive definite matrices, with bounded and measurable real functions as their entries.The same holds in the conducting region for the electrical conductivity σ, which vanishes in non-conducting regions.Also the electric charge volume density ρ is assumed to vanish in non-conducting regions.
Disregarding the displacement current term ∂D ∂t , we find the eddy current model, in which wave propagation is not taken into account: + curl E = 0 (Faraday equation) curl H = σE + J (Ampère equation) div(µH) = 0 div(εE) = 0 . (2.2) Here, the last equation has to be imposed only in non-conducting regions (while the relation div(εE) = ρ is used for computing the electric charge density in the conducting region, once E is there available).The electrical voltage is not directly visible in the Maxwell equations.Therefore, it is most natural that in control problems the electrical current was preferred as considered control.
Controlled voltages were mainly considered in the time-harmonic case (see the references [28,20,21], also cited in the Introduction).Here, instead, we are interested in voltage excitation for the non-stationary case.To set up an associated mathematical model is not a trivial task.We follow the presentation given in [3,Chap. 8] for the time-harmonic case, but we also rely on [5], where the main ideas are presented for including the voltage in the model.The principal novelty of our paper is a complete analysis of a mathematical model that can be used in the context of controlled electrical voltages, in a quite general geometrical setting and also including a numerical approximation scheme based on finite elements.After having established a suitable control model, the associate control theory is more or less standard.Nevertheless, some special tricks are needed to set up an adjoint calculus.Here, we follow ideas of our former papers [24,25].Moreover, we slightly modify the model proposed in [5] with a technique, introduced in [1,2], which reduces the computational complexity of the numerical approximation scheme and can be efficiently applied in any geometrical situation.
Assumption 2.1 (Assumptions on the geometry).The computational domain is a simply-connected bounded open set Ω ⊂ R 3 , with a connected and Lipschitz boundary ∂Ω.It is split into two Lipschitz subdomains, a conducting region Ω C and a non-conducting region Ω I = Ω\Ω C ; the latter is assumed to be connected.The conducting region Ω C is not strictly contained in Ω, i.e., ∂Ω C ∩ ∂Ω = ∅; the intersection is also assumed to be transversal, namely, the surfaces Γ C = ∂Ω C ∩ ∂Ω and Γ = ∂Ω C ∩ ∂Ω I intersect transversally.For the sake of simplicity, we suppose that Ω C is simply-connected.Moreover, we suppose that Γ C = Γ E ∪ Γ J , where Γ E and Γ J are two disjoint and connected surfaces on Γ C ('electric ports').
In Section 4.1 we present and analyze some more complex geometrical settings for the conducting domain Ω C .We set also Γ I = ∂Ω I ∩ ∂Ω.Therefore, with these notations we have 1).The unit outward normal vector on ∂Ω, ∂Ω C and ∂Ω I will be denoted by n, n C and n I , respectively.
We want to model the electromagnetic problem in the case of an electric current passing along the 'cylinder' Ω C , and to drive the problem by assigning a potential difference between Γ E and Γ J .

Assumption 2.2 (Assumptions on the given data). The matrix-valued functions
. The computational domain Ω with the conductor Ω C and the electric ports Γ E and Γ J .and uniformly positive definite in Ω I , Ω and Ω C , respectively.The given electrical current density J belongs to L 2 (0, T ; L 2 (Ω) 3 ) and satisfies div In order to show more clearly the subdomain where a field is considered, from now on we will write E C := E |Ω C , E I := E |Ω I and use a similar notation for H.A first point in the modeling is to require that the electric field is normal to the boundary on the two electric ports, namely, E C × n C = 0 on Γ E ∪ Γ J .More precisely, as proposed in [7], for each t ∈ [0, T ] we consider the no-flux boundary conditions µH We refer also to the comments presented in [3,Chap. 8], which show that other possible boundary conditions are not allowed for this type of problem.
In what follows, we will use the tangential differential operators div τ , curl τ and grad τ (see, e.g., [19,Chap. 3], [3, Chap.A1] for their definitions and properties).In particular, for a function φ defined on ∂Ω the tangential operator curl τ , as usual in a two-dimensional setting, is the rotation of the tangential gradient, namely, curl τ φ = grad τ φ×n; moreover, for a function v defined in Ω it holds n×grad v×n = grad τ (v |∂Ω ).
Since µH • n = 0 on ∂Ω, from the Faraday law one has, for each t ∈ [0, T ], Here, we used the vector calculus identity Because Ω is assumed to be simply-connected, the same holds for the surface ∂Ω.Hence the condition div τ (E(t) × n) = 0 assures that the tangential field E(t) × n is the tangential curl of some scalar potential: namely, for each t ∈ [0, T ] there exists a potential v(t) : Ω → R such that holds on ∂Ω.Moreover, we have E C (t) × n C = 0 on Γ E ∪ Γ J .Therefore, since the tangential derivatives of v are vanishing on Γ E ∪ Γ J , for each t ∈ [0, T ] the function v(t) must be constant on Γ E and on Γ J with respect to the space variable x.
We have thus proved that, under the assumption that Ω is simply-connected, for the eddy current problem the conditions The voltage excitation problem thus reads: given V E : [0, T ] → R and V J : [0, T ] → R, we look for a solution of the eddy current problem (2.2) satisfying for each t ∈ [0, T ] the boundary conditions along with the initial condition H |t=0 = H 0 := µ −1 B 0 .Here the vector field B 0 has to satisfy the necessary compatibility conditions div B 0 = 0 in Ω and B 0 • n = 0 on ∂Ω, that derive from taking the divergence of the Faraday equation (2.2) 1 and from (2.5) 1 .
Remark 1.It is worth noting that, if conditions (2.5) are satisfied, the quantities V J and V E are related by where γ is any curve lying on Γ I and joining the electric port Γ E to the electric port Γ J , and τ is the unit tangent vector on it.
In fact, from (2.5) 2 we know that E × n = −grad v × n on the boundary ∂Ω, and therefore, if a curve γ lies on ∂Ω and connects the points p − and p + , we have From (2.5) 3 we know that v |Γ J and v |Γ E are constants.Hence, taking any curve γ ⊂ Γ I ⊂ ∂Ω joining the electric port Γ E to the electric port Γ J , we have Hence (2.6) follows at once from (2.5) 4 .
In conclusion, the voltage excitation problem can also be written as the eddy current problem with the boundary conditions (2.3) and the additional condition (2.6).
Since σ is vanishing in Ω I , the electric field E I is not present in the Ampère equation (2.2) 2 .Therefore one can face the problem by splitting it in two steps: in the first step one considers the problem of finding H in Ω and E C in Ω C , satisfying the Faraday equation (2.2) 1 only in Ω C , the Ampère equation (2.2) 2 in Ω, with right hand side σE C + J C in Ω C and right hand side J I in Ω I , and the magnetic Gauss equation (2.2) 3 in Ω.In the second step the electric field in the non-conducting domain Ω I has to be obtained by solving, for each t ∈ [0, T ], the curl-div system (2.7) We refer to [3,Chap. 8] for the results concerning the solvability of this problem.Note that the first equation in (2.7) is nothing else than the Faraday equation in Ω I , and that the matching condition (2.7) 4 assures that the electric field defined by E C in Ω C and E I in Ω I has a well-defined curl, thus it satisfies the Faraday equation in the whole Ω.
In conclusion, if we are able to find, as indicated above, the magnetic field H in Ω × (0, T ) and the electric field E C in Ω C × (0, T ), for any fixed time t the determination of E I can be done as a successive step (or even avoided, if the knowledge of the physical quantity E I is not important in the problem at hand).
In view of the Ampère equation (2.2) 2 in Ω C , we can write hence it is also possible to formulate the first step of the solving procedure described above in terms of the magnetic field only.This will be apparent in the next section.
3. Weak formulation.We start reminding the definition of the (real) Hilbert spaces H(curl; Ω), H(div; Ω).They are defined as follows: We also need to recall some properties of the vector functions belonging either to H(curl; Ω) or to H(div; Ω) (see, e.g., [19], p. 107).For all w ∈ H(curl; Ω), we know that the tangential trace is continuous on interfaces, in particular the minus sign being due to the fact that on the interface Γ we have n C = −n I .For all w ∈ H(div; Ω), we know that the normal trace is continuous on interfaces, in particular Moreover, we also have that all w ∈ H(curl; Ω) satisfy (in a suitable weak sense) where Σ is any Lipschitz surface contained on Ω (see, e.g., [19], p. 59; [3], p. 313).
To set up a weak formulation of the eddy current problem, we introduce the spaces The former is endowed with the scalar product and norm induced by H(curl; Ω); for reasons that will be clear later, the latter is endowed with the scalar product (w, q) X := and the associated norm • X , which are equivalent to the standard scalar product and norm in L 2 (Ω) 3 .
It is straightforward to check that they are closed subspaces of H(curl; Ω) and L 2 (Ω) 3 , respectively.Since H(curl; Ω) and L 2 (Ω) 3 are separable Hilbert spaces, W and X are separable Hilbert spaces, too.
Multiplying the Faraday equation (2.2) 1 by w ∈ W, integrating in Ω, and integrating by parts we find for t ∈ (0, T ): Note now that the vector field curl w is clearly divergence free in Ω, because div curl = 0. Therefore, by (3.9) we have that curl Looking back at the definition of the space W, we also know that curl w I = 0 in Ω I , thus we conclude that curl w C •n C = 0 on Γ.Therefore, the divergence theorem implies and hence We have now to remind some results.First, from (2.5) we know that E(t) × n = −grad v(t) × n on ∂Ω, and that the potential v(t) has the properties that v |Γ J (t) and v |Γ E (t) do not depend on x and Second, since w ∈ W we know that curl w I = 0 in Ω I and thus curl w I • n = 0 on Γ I .Third, using an integration by parts formula on the boundary we have Hence the boundary term in (3.13) can be rewritten as Using the Ampère equation (2.2) 2 in Ω C we obtain (3.17) On the other hand we also have the Ampère equation (2.2) 2 in Ω I , namely, curl For the sake of simplicity, from now on we assume that J I = 0 in Ω I (the general case can be treated by following the arguments in [3,Chap. 8]).By this assumption we have that the Ampère equation in Ω I becomes curl H I = 0.
Problem.The weak formulation of the eddy current problem reads as follows: given the data for all w ∈ W and a.a.t ∈ (0, T ), and Note that, indeed, it would be enough to assume that the voltage drop Proving well-posedness of this problem is an easy task.
Moreover, there is a constant c w > 0 not depending on J C , V J , V E , and (3.20) Proof.The existence and uniqueness theory for this problem can be easily brought back to classical results, for instance the Lions theorem (see, e.g., [8], pp.512-513).
The couple of separable Hilbert spaces is given by W and X, with W ⊂ X; let us remind that X is endowed with the scalar product (3.12).
By [5,Lemma 3.2] we know that W is dense in X.Finally, the bilinear form for suitable constants β > 0 and α > 0 (say, , where σ max is an upper bound for the maximum eigenvalue of σ(x) in Ω C and µ min is a lower bound for the minimum eigenvalue of µ(x) in Ω), and thus all the hypoteses in [8], Theor. 1, pp. 512-513, are fulfilled.4. Strong formulation.Let us furnish the strong interpretation of the variational problem (3.18), as it is interesting in itself, and moreover can be the starting point for numerical approximation not based on variational methods.
We start by defining the space of harmonic fields 23) Here we have used the weight µ for orthogonality reasons (see (4.26) and (4.27)), as the scalar product in X is given by (3.12) .This space is trivial if and only if the domain Ω I is simply-connected.Its dimension coincides with the dimension of the first homology group of Ω I , namely, the first Betti number of Ω I .From a geometrical point of view, the first Betti number is the number of "handles" of the domain.
In the geometrical situation we are considering the space H µ I has dimension 1.We denote by ρ the basis function satisfying the normalization condition By the notation ∂ + Γ J we mean that the associated tangent vector τ + J is given by τ is just a normalizing factor.Note that, by the assumption on the geometry 2.1, we know that the intersection of Γ C and Γ is transversal, thus n C |Γ J and n C |Γ are not orthogonal.
On the other electric port Γ E we define ; in this way the two closed cycles ∂ + Γ J and ∂ + Γ E are homologically equivalent, and, due to the fact that ρ is curl free, we have as well.
Since the domain Ω I is not simply-connected, though the magnetic field H I is curl free in Ω I it is not possible to represent it as a gradient.However, it is the sum of a gradient plus a vector field belonging to H µ I .More precisely, for each t ∈ [0, T ] we can write where ψ I (t) ∈ H 1 (Ω I )/R and I 0 (t) ∈ R. It is also easily verified that the two terms in this decomposition are orthogonal in X, as by integration by parts we obtain at once since ρ ∈ H µ I .Let us explain the the physical interpretation of the function t → I 0 (t).Since ∂ + Γ J is a closed curve contained in Ω I , we clearly have Due to the matching condition H C (t) × n C = H I (t) × n C on Γ, by a direct manipulation we find (4.28) The closed curve ∂ + Γ J is not the boundary of a surface contained in Ω I , but it is the boundary of Γ J , and the surface Γ J is a part of the boundary of Ω C .Therefore, by the Stokes theorem we obtain This shows that I 0 (t) is the total current intensity passing at time t through Γ J in the direction of n C .
We are now in a position to state the following formal result: Theorem 4.1.In terms of the magnetic field H only, the strong form of problem (3.18) is the following:

.29) along with the voltage condition
where Proof.The conditions curl The Faraday equation (4.29) 1 follows straightforwardly taking in the weak formulation (3.18) a test function w ∈ C ∞ (Ω) 3 with supp w ⊂ Ω C and integrating by parts.
We can repeat the same computation with a test function w ∈ H(curl; Ω) with Using the Faraday equation (4.29) 1 just obtained in Ω C we find In (3.15) we have proved that for w ∈ W it holds Since w is arbitrary on Γ J , we have therefore obtained Converting the role of Γ J and Γ E , we obtain the same result on Γ E , proving that (4.29) 5 is satisfied.Now we choose w = grad η with η ∈ C ∞ 0 (Ω).We find Integrating by parts, we see that the same is true for Ω div(µH) η.Using that the initial datum H 0 satisfies div(µH 0 ) = 0 in Ω, we obtain Due to the fact that η is arbitray, this gives equation (4.29) 2 .
Finally, take in (3.18) a test function w ∈ W with w |Ω I = ρ.Integrating by parts we first find By the Stokes theorem, it follows since the test function w we are using satisfies w |Ω I = w I = ρ, we rewrite this relation as The proof that the solution to the variational problem (3.18) satisfies the boundary conditions (2.5) 2 -(2.5) 5 needs some additional effort.First of all, to determine the electric field E globally in Ω, one has to solve problem (2.7).Then we can conclude as follows: Theorem 4.2.Let H be the weak solution of problem (3.18).Then problem (2.7) has a unique solution E I in Ω I (in particular, (2.5) 5 is satisfied).Moreover, the electric field given by Proof.For the solvability of problem (2.7) refer to [3,Theor. 8.6] (the only difference being that there the right hand side comes from the time-harmonic expression of the time-derivative).
From the Faraday equation, the boundary condition (4.29) 6 and (3.10) we know that div Since ∂Ω is simply connected, for each t ∈ (0, T ) from (2.4) we have that (2.5) 2 is satisfied, i.e., E × n = −grad υ × n on ∂Ω.As seen before in (4.31) and (4.32), the voltage condition (4.30) can be also written as By the matching condition (2.7) 4 on Γ, this is equivalent to We have Γ ∪ (∂Ω ∩ ∂Ω I ) = ∂Ω I , hence integration by parts yields having used that curl ρ = 0 in Ω I .This relation and Faraday equation (2.7) 1 permit to rewrite (4.34) as (4.36) We need now to perform an integration by parts, related to the tangential operators grad τ and div τ , on the surface ∂Ω ∩ ∂Ω I , whose boundary is given by the two curves ∂Γ J and ∂Γ E .We set ν = n I|∂Ω × τ + J on ∂Γ J and ν = −n I|∂Ω × τ + E on Γ E .In this way, ν is a unit vector, tangential to ∂Ω ∩ ∂Ω I and orthogonal to the curves ∂Γ J and ∂Γ E ; in particular, it points outward ∂Ω ∩ ∂Ω I , looked as a surface on ∂Ω, on both ∂Γ J and ∂Γ E .An integration by parts on the surface ∂Ω ∩ ∂Ω I thus gives Here, we took into account that υ |Γ J = U J and υ |Γ E = U E do not depend on x and that, by (3.10), div τ (ρ By our definitions of ν, it is easy to check that ν × n I|∂Ω = τ + J on ∂Γ J and ν × n I|∂Ω = −τ + J on ∂Γ E .Therefore, ) and (4.25), and from (4.36) and (4.37) we conclude , and the boundary condition (2.5) 4 follows.
4.1.More general geometrical settings.Suppose that the geometrical situation is the one described before, with only one exception: we suppose that 2).Then, for each fixed t ∈ [0, T ], the surface potential v(t) turns out to be equal to a constant V k (t) on each surface Γ k J , k = 1, . . ., M , and equal to another constant V E (t) on Γ E .Proceeding as in (3.14) and (3.16), the boundary term ∂Ω (n × E) • w can be written as Therefore, the weak formulation of the problem needs only one change: the right hand side of (3.18) has to be substituted by A first alternative geometrical configuration: a connected conductor Ω C with five electric ports.
If interested in the strong formulation, a further step can be carried out: in the geometrical situation we are now considering the space of harmonic fields H µ I has dimension M , and a basis for it is given by the unique vector fields ρ l ∈ H µ I such that Taking in the weak formulation a test function w l ∈ W such w l|Ω I = ρ l , it is easy to see that equation (4.31) now becomes for l = 1, . . ., M .Moreover, proceeding as in the proof of (4.32), by the Stokes theorem one finds Furthermore, as in (4.28) we have Finally, writing H I (t) = grad ψ I (t) + Hence the voltage equation (4.30) becomes the system ) for each l = 1, . . ., M , where the M voltage jumps (V l − V E )(t) have been assigned.
A similar argument can be applied when the conductor Ω C is the (disjoint) union of M ≥ 2 connected components Ω C,k , k = 1, . . ., M , each one having two electric ports Γ E,k and Γ J,k (see Figure 3).
A second alternative geometrical configuration: a nonconnected conductor Ω C with four electric ports.
In this geometrical situation, we have to assign M voltage jumps (V J,k −V E,k )(t), k = 1, . . ., M , and the dimension of the space H µ I is still equal to M .Denoting by ρ l the basis function with the property that for each l = 1, . . ., M .
One can also consider the following geometrical situation.The conductor is composed by two connected components: one, denoted by Ω (1) C , is like the conductor in Section 1, and is a simply-connected domain not strictly contained in Ω.This means that it has an intersection with ∂Ω, denoted by ∂Ω (1) where Γ E and Γ J are two disjoint and connected 'electric ports' on ∂Ω.We also suppose that the intersection of ∂Ω C is like a hollow cylinder (namely, a torus), and is strictly contained in Ω.One can think of Ω C as an induction coil that envelops the workpiece Ω C , without touching it (see Figure 4).In this situation, one can identify two non-bounding cycles in Ω I : the first one, as in the previous cases, is σ (1) = ∂ + Γ J .The other one is σ (2) , a cycle linking the hollow cylinder Ω C , passing into its hole.Therefore, the dimension of H µ I is equal to 2. Let us choose a basis of H µ I .First we fix an orientation on σ (2) ; than one basis field It is readily seen that the voltage system now is given by for each l = 1, 2. Note that this example clearly shows that voltage drops cannot be imposed if the conducting domain Ω C is strictly contained in Ω and does not have electric ports (in that case, ρ 1 does not exist and (4.41) simply becomes an equation for ρ 2 , in which the first term at the right end side disappears).

5.
The optimal control problem.In the previous sections, we prepared the analysis of our state equation, i.e., our Maxwell control system.Now we take the voltage V J − V E as control function.For this reason, we set Thanks to Theorem 3.1 we know that (for fixed and given current density J C and initial function H 0 ) to each function V a unique magnetic field H in Ω and a unique electric field E C in Ω C are associated.Let us denote these fields by H V and E C,V , respectively, to indicate their correspondence to the given voltage V .The controlto-state mapping V → (H V , E C,V ) is affine between the corresponding spaces.By (3.20), it is also continuous.
The main goal of the control is to approach given state functions H d ∈ L 2 (desired magnetic field) and E C,d ∈ L 2 (desired electric field) in the associated L 2norms, while the "cost" for the electrical voltage V is considered by a Tikhonov regularization term with weight ν ≥ 0. This leads to minimizing the following objective functional, (5.42) The electric field ), hence we can express the objective functional entirely in terms of the magnetic field, (5.43) The control functions V may be restricted by the constraint V ∈ V ad , where V ad is a non-empty, convex, and closed subset of L 2 (0, T ).In this way, our optimal control problem admits the following short form: min (5.44) A control V * ∈ V ad is said to be optimal if In other words, an optimal control V * is defined by Theorem 5.1.If V ad is bounded or ν > 0, then the optimal control problem (5.44) has at least one optimal control.In the latter case, the optimal control is unique.
Proof.In view of Theorem 3.1, the control-to-state mapping V → (H V , E V ) is (affine) and continuous.Therefore, the functional F is weakly lower semicontinuous in L 2 (0, T ).The set V ad is convex and closed in L 2 (0, T ), hence weakly closed.If V ad is in addition bounded, then V ad is weakly compact and the result follows in a standard way.If ν > 0, then we can restrict the search for an optimal control to a bounded and weakly closed subset of V ad and the result follows in the same way.
To proceed with necessary optimality conditions, we need the derivative F of F .The derivative at V in the direction V is given by where ) are the states associated to V , with initial datum H 0 and current density J C , while H 0 V is the state associated to V , subject to vanishing initial datum and current density equal to zero.
Obviously, the terms depend linearly on V .However, V enters in an implicit way via H 0 V and curl H 0 V,C .For finding an explicit expression in terms of V , an adjoint equation is introduced in a standard way.This is based on a duality argument.Later, first-order optimality conditions for an optimal control V * are based on this approach.
6.The adjoint problem.Let us first define the adjoint equation.Definition 6.1 (Adjoint equation).Let V ∈ L 2 (0, T ) be a given control with corresponding states H V and E C, V .Moreover, let H d ∈ L 2 (0, T ; L 2 (Ω) 3 ), E C,d ∈ L 2 (0, T ; L 2 (Ω C ) 3 ) be the given desired states.The problem to find w ∈ L 2 (0, T ; W)∩ C 0 ([0, T ]; X) with for all h ∈ W and a.a.t ∈ (0, T ), and is called adjoint equation.Its solution w is said to be the adjoint state associated with V ∈ L 2 (0, T ) and denoted by w V .
Since the bilinear forms at the left hand side of (3.18) are symmetric, it is easy to confirm that the adjoint equation has a unique (weak) solution w, hence the adjoint state associated with V is uniquely determined.Moreover, the adjoint equation is well-posed.In particular, the mapping L 2 (0, T ) Now we have all prerequites to formulate optimality conditions.Theorem 6.2 (Necessary optimality conditions).Let V * be an optimal control of problem (5.44) and let H V * and E C,V * be the associated optimal magnetic and electric fields, respectively.Then the variational inequality has to be satisfied, where I 0, * is the total current intensity passing at time t through Γ J in the direction of n C that is generated by the adjoint magnetic field w V * .It is defined by Proof.We know that the optimal control V * must obey the variational inequality The first two terms at the right hand side of (5.45) with V substituted by V * and V substituted by Due to the fact that w V * |t=T = 0 and that (H 0 Hence, by a change of sign in this vanishing term and by taking into account the symmetry of the bilinear forms, equation (6.49) can be rewritten as having used (3.18) in the final equality.On the other hand, from the Stokes theorem and the matching condition w V * ,C × n C = −w V * ,I × n I , as in the proof of (4.32) we find and the result easily follows.
7. Some remarks on numerical approximation.In this section we only present how finite elements could be used for the space discretization of the state and the adjoint problems.A more detailed analysis will be the subject of a further research.
It is clear that an advantage of the proposed formulation (3.18) is that the magnetic field H is looked for in the space W, whose elements w have to satisfy the constraint curl w I = 0 in Ω I .Therefore, the number of degrees of freedom that are needed for the numerical approximation in Ω I is less than that necessary for a standard approximation of H(curl; Ω I ).
In other words, we know that in Ω I we have H I = grad ψ I + I 0 ρ, and it is natural to discretize this vector field by employing as degrees of freedom the nodal values of an approximation of the magnetic potential ψ I (plus the coefficient I 0 ).However, the explicit introduction of the magnetic potential ψ I is not required (in this sense, our method is simpler than that proposed in [5]).In fact, it is much straightforward to furnish a discretization of W by introducing a suitable finite dimensional subspace W h ⊂ W. This can be easily done: let us give the description of all the basis functions of W h .
Let us denote by N h the space of Nédélec finite elements of the lowest order, and by L h the space of piecewise-linear, globally continuous Lagrange elements (see, e.g., [19,Chap. 5]).As it is well-known, the degrees of freedom of N h are given by the line integral over the edges of the mesh, whereas the degrees of freedom of L h are expressed by the nodal values.
The basis of W h is constructed in this way: for all the edges in Ω C that have at most one endpoint on Γ we select the Nédélec basis function associated to that edge; for all the nodes that are in Ω I , except one, we select the gradient of the Lagrange basis function associated to that node; for the non-bounding cycle in Ω I we choose a curl free Nédélec element with line integral equal to 1 on that cycle (in a more general geometrical situation, this must be repeated for all the non-bounding cycles in Ω I ).In [1,Theor. 3] and [2, Theor.1] it is proved that this is a basis of W h .
A few additional words could be addressed to the way in which the curl free Nédélec element with line integral equal to 1 on the non-bounding cycle is constructed.In [1] it is shown how this can be done, in any geometrical configuration, by means of an automatic procedure that only needs the knowledge of the mesh of the domain.However, in many cases the construction is more direct and, in fact, simpler: it is enough to identify a surface Σ which 'cuts' the non-bounding cycle, and 'double' the nodes of the mesh on it.In this way the surface has two sides, and the vector field we need is the gradient of the piecewise-linear Lagrange interpolant taking value 1 on all the nodes on one side of Σ, and value 0 on all the other nodes, including those on the other side of Σ.
The spatial discretization of the state problem (3.18) is simply ) for all w h ∈ W h and for almost all t ∈ (0, T ).A similar discretization can be devised for the adjoint problem (6.46).We can thus conclude that, with respect to other formulations of the eddy current problem (say, in terms of the electric field E, or of the magnetic vector potential A satisfying curl A = µH), the one we propose is the cheapest one with respect to the total number of degrees of freedom.Moreover, the algebraic structure of the finite element stiffness matrix is quite favorable, as it is symmetric and positive semidefinite; consequently, any implicit time-discretization scheme will lead at each time step to the solution of an algebraic linear system associated to a sparse, symmetric and positive definite matrix.
16) having used(3.10)  in the fourth equality and (3.15) in the last one.
the boundary values of the function υ on Γ J and Γ E by υ |Γ J = U J and υ |Γ E = U E .Since we have definedE C = σ −1 (curl H C − J C ) in Ω C , the boundary condition (4.29) 5 states that E C × n C = 0 on Γ J ∪ Γ E ,namely, by (4.33), grad υ |ΩC × n C = 0 on Γ J ∪ Γ E .Both surfaces Γ J and Γ E are connected, thus we deduce that U J and U E do not depend on the space variable, which is condition (2.5) 3 .

( 1 )
C and ∂Ω is transversal.The other connected component Ω

Figure 4 .
Figure 4.A third alternative geometrical configuration: a nonconnected conductor Ω C with two electric ports.
Remark 2. Setting EC = σ −1 (curl H C − J C ) in Ω C ,it is clearly verified that with this definition the Ampère equation in Ω C is satisfied; moreover, (4.29) 1 can be read as the Faraday equation in Ω C .
.35) By (4.33) we have E × n = −grad υ × n on ∂Ω, hence the left hand side of (4.35) is given by