A DISTRIBUTED METHOD FOR TRANSIENT SIMULATIONS THAT DYNAMICALLY CONSIDERS SUPPLEMENTARY RESULTS FROM AUTONOMOUS SOFTWARE AGENTS

. Based on autonomous software agents capable of calculating individual numerical field problems, a distributed method for solving transient field problems is presented. The software agents are running on distributed resources connected via a network and represent a dynamic calculation environment. Communication and data exchange between multiple agents enables their collaboration and allows decisions based on distributed overall knowledge. As unique characteristics, no central unit influences the solution process at any time. The presented simulation example and its evaluated calculation process proves the method to benefit from redundant resources


Introduction
Using the finite element method (FEM) to solve transient simulations is mostly done by sequentially calculating discrete time steps.The time stepping is controlled by the error (1) calculated for each time step .The number of degrees of freedom (dofs) is given as , and represent desired tolerances, is the approximation of the solution and is the solver's estimation of the (local) absolute error [5].The optimal step size is (2) with as order of the method and as previous step.The optimal steps size is multiplied by a safety factor and used for calculating the next time step [2].If is satisfied the solution is used and a next time step is calculated.Otherwise results are discarded and another step size is chosen.
Alternatives to a sequential calculation sequence represent parallel time integration methods proposed during the last 50 years [4].In analogy, the developed parallel method aims on a faster calculation compared to a sequential one by performing multiple redundant shootings in parallel and selecting the largest valid steps size by evaluating error criteria like .Since redundant resources are provided within common business networks, they are used for calculating redundant shootings and the related partial time steps.A goal oriented usage of these additional resources is the major target of this contribution.For topics like efficiency and scalability, trust is given to the principles of the market for providing results.Within a working market, these issues are automatically evaluated by the participants and there is no need for further attention within the solution strategy.
The following contribution is organized in five sections.While section I gives the introduction for this new way of handling transient simulations, section II describes the implemented calculation framework.In section III the solution process of this framework is explained.The numerical model given in section IV proves the concepts functionality and allows its discussion based on numerical results.Section V finally concludes this contribution and outlines related topics.

Calculation system
Here, a distributed calculation system with independent and autonomous calculation units is used to solve transient FEM simulations.The calculation units are implemented based on the paradigm of agent based programming [7].This enables autonomous and distributed software units to cooperate and to fulfill own goals based on individual strategies.Here, each software agents represents an independent computer with different hard-and software capabilities.This setup is shown in Fig. 1 for p agents within a computer network.Available software capabilities are FEM tools.These are provided to the agents by interfaces and enables them to handle and perform numeric field calculations.In comparison to previous work, capabilities for a transient simulation were added [8].The agents' goal is to make profit.Therefore, agents apply their behaviours and all their capabilities accordingly.This means that the autonomous agents use their individual scheduler, their own business model and as many resources as considered necessary.It also enables a cooperative usage of the resources by multiple applications within every software agent.In the same way a competition between the agents is started to maximize their profit.Compared to cluster computing agents do not provide calculation time here.They offer individually calculated results that were derived from a global numerical model.Consequently, different solutions coexist within the calculation system.For additional processing steps like transient or coupled simulation or postprocessing an adequate payment is expected by the agents.Suitable payment criteria for a user are the calculation time, the re- Enabling redundant agents to compete within the solution process of a transient numerical simulation, the agents resulting goal is to contribute to the overall solution.Therefore, they perform calculations without fulfilling distributed tasks or parallelize them in a common manner.They gain profit by quickly providing best and cheapest partial simulation results to the user before other competing agents do.For the considered transient simulation, partial tasks arise from different safety factors for calculating a time step .These independent partial tasks are calculated in parallel.Communication between the agents avoids the calculation of duplicated parameter sets.It also enables a globally concerted uniform decision for the largest valid time step fulfilling (1).The iterative solution process with multiple time steps is achieved by exchanging the latest valid result.

Numerical method
To implement an adequate global calculation method for transient electrical engineering problems, the method is supposed to handle differential algebraic and stiff simulations [9].Therefore, an implicit time integration scheme is preferred with a variable and adaptive time stepping based on selected error criteria.Within each time step a nonlinear system of equations is likely and must therefore been solved.The first order predictor of the implemented second order backward differential formulation (bdf) is a given in [2] as The bdf with a linear damping matrix and a nonlinear stiffness matrix is given as According to [2], the parameter is weighting the current and previous time step by . ( The second order backward differential term is (6) with the weighting factors (7) and Because of the second order accuracy of the time solution, a third order error estimator is used.The estimator for and the three previous results , , is given as As relative time discretization error is used.Its absolute tolerance depends on the type of the dependent variable.Especially for multiphysics systems this absolute tolerance must be chosen appropriately.Analog to relative errors for the nonlinear Newton steps and the iterative linear solver are calculated.A time step is valid if all three errors , , are within their predefined tolerances.Larger time steps during the simulation lead to large time errors in the numerical result, an increased number of iteration in the linear and the nonlinear solver and might end up in divergence.The optimal time step size for the nonlinear Newton method is (10) with as number of Newton iterations.If the required accuracy is not reached during the linear Krylov iterations, is repeatedly calculated with a heuristically reduced safety factor [6].In case of or are not satisfied during the calculation of , the time step is repeatedly calculated with (11) The time step is also used as approximation of Since is only an approximation for the safety factor is used to avoid its repeated calculation [5].
For a parallel and redundant calculation of the time riod by a software agents system, each agent applies a unique time step multiplier to create and perform its simulations.The individual time step of agent is given as (12) Fig. 2 shows the resulting configuration of a software agents system.The multiplier is generated based on the number of currently available and potentially contributing software agents.If only one agent is available is chosen according to [2].In case of more agents, larger time steps speed up the calculation.Smaller time steps avoid a re-initialization in case of no or slow convergence and require less effort during the nonlinear and the linear solver iterations.For a dynamic calculation environment it also makes sense to adapt according to the amount of available resources after finishing the calculation of a time step.The agent with the largest time step fulfilling all error criteria proposes the solution for the actual time step .Same holds for the next optimal step size , so other agents are able to derive their time step by using their multiplier .In case off all agents fail the new time step is chosen under the condition that all new time steps multiplied with the factor are smaller than all previous steps.For a global time the calculation finally ends.

Numerical validation
To demonstrate the performance of the method a tuned circuit is considered.It contains a lumped capacitor with and an inductor with a coil of 50 thin windings including its nonlinear and lossy core.The eddy current losses and the nonlinear BHmaterial properties of the magnetic core are evaluated using the FEM based on the geometric 3D model shown in Fig. 3.For its calculation the sector symmetry, its horizontal symmetry and infinite elements at the border of the surrounding air are used [10].

Fig. 3. Geometric model of the nonlinear and lossy inductance
The evaluated differential equation in the magnetic core is (13) with the scalar permeability as nonlinear function of the magnetic flux density . Here the modified vector potential defined by is used.The advantage of this modification is the vanishing electric scalar potential resulting in a smaller equation system [3].
For the surrounding air region and the windings is considered.Within the region of the windings the additional source term is added to the right side to handle the electric current.Here has a length of one, points in the direction of the homogenized electric current density and normal to the cross section area of the coil.The conductivity in the air and coil is set to to provide a well posed equation system .The core is modelled with an electric conductivity .The coupled ordinary differential equations are ( 14) and ( 15) with the number of windings and the capacitor .The introduced electric current leads to the differential algebraic equation system (16) that also supports a higher accuracy for during calculation.Initially the capacitor is charged with and the electric current is zero.Analogy to the nonlinear stiffness matrix of the FEM model is .Its linear damping matrix is due to the cores conductivity.The lumped capacitor is considered as .The integral operator couples to the voltage at the capacitor.Via as auxiliary variable the current density is impressed into the FEM model by the operator .This results in a model with dof.One of them represents the electric current within the resonant circuit and another the electric voltage at the capacitor .The other dofs are used for the magnetic vector potential and describe the field variable.
The considered software agents system contains five agents with similar capabilities and hardware resources.They are running on five Intel i5-4690 with 4 cores at .For evaluation the time between and is chosen.During the calculation process every agent performs at maximum 3 nonlinear iterations with 20 linear iterations per time step .These are performed by the biconjugate gradient stabilized method (BiCGStab) with a vector multigrid preconditioner and a direct solver for the coarse problem.The number of Newton iterations are chosen as constant to achieve an equal distribution of the calculation effort.This also avoids idle time or time outs while waiting for partial results.The agents' time step multipliers are chosen as shown in Tab. 1.The evaluated norm of the magnetic flux density indicates the saturation and the skin effect within the core at .It is shown in Fig. 6 by cutting the core along the symmetry planes.The mesh properly resolves the decay of the magnetic flux density due to the skin effect.The magnetic flux density in the core at is shown in Fig. 7. There, the magnetic flux has penetrated the complete core and the saturation effect dominates.Due to the data exchange between the agents and their interest on contributing to further tasks all results shown in the Fig. 4-7 exist at every agent.

Table 1. Time steps applied by the different software agents
Here the agents system requires steps to fulfill the error criteria within every time step.Compared to another run of the computation with just one agent with about 96 iterations are avoided.This is due to the replacement of the propose time step by results of other agents (22 times) and a totally avoided re-initialisation (74 times).The multipliers considered during the solution are shown in Fig. 8.The results mostly confirm as advised in [2] and automatically chosen by the agents system.The usage of multiple software agents leads to a calculation time reduction of .Repeating this experiment with other error criteria the time reduction obviously relates to the number of spared iterations.Highlighting finally, that even in the worst case the presented system is as fast as a calculation without redundant resources.

Conclusion
Within this contribution a new way of handling transient simulations is presented based on a software agents system.Details about the software agents system and the applied numerical method are given.Demonstrated on the transient simulation of a resonant circuit the method was validated.The results show that the calculation process profits from using redundant resources.Even in the worst case the presented system is as fast as a common calculation system.The additionally achieved flexibility of the calculation process is also beneficial for nonpermanent calculation resources.

Fig. 1 .
Fig. 1.Software agent system with own resources for field calculation costs for calculation like for a usage of software licences.

1 Fig. 2 .
Fig. 2. Time steps selection for autonomous software agents results of the agents are shown in Fig.5for four selected iterations near the minima of .Agents that do not converge at all are not shown.The maximum time steps fulfilling all error criteria are highlighted with a circle.These results are chosen as next starting point for further time steps.The adaptive time stepping within the method is also shown in Fig.5by the distinct width of each iteration.The calculated time dependent and I are shown in Fig. 4. Calculation was done within .Additionally, reference solutions for and I are given computed with much smaller time steps.They are evaluated on Intel Xeon E5-2630 with eight cores at within and show a good agreement.

Fig. 8 .
Fig. 8. Multipliers for time steps chosen to fulfill the error criteria