Mobile Agent-Based Dynamic Interaction and Computational Steering
Overview

Two challenging problems in the area of scientific computation are
(1) long computation time, and
(2) large-scale, distributed, and diverse data sets.
As the scale of science and engineering applications rapidly expands, these two problems become more manifest than ever.

The Mobile Agent-based Dynamic Interaction and Computational Steering (MADICS) allows users to apply new or modified algorithms to a running program by altering certain sections of the program code without stopping the execution and recompiling the program.

MADICS Framework

In order to utilize mobile agents to alter application algorithms, an application needs to possess functionality to receive mobile agents from a distributed system and execute mobile agents to update corresponding algorithms. Besides, an application also needs to be able to transmit data of interest to hosts asking for the data. With the Mobile-C library, a user program can encompass a Mobile-C agency to handle multiple mobile agents, in which case multiple algorithms and data sets within the program can be dynamically manipulated. Figure 1 shows the MADICS framework. A distributed simulation consists of geographically located Mobile-C enabled programs. A steering host contains a Mobile-C enabled program used to monitor and control a distributed simulation through mobile agents.

From a binary application's perspective, it can call functions and access data in any mobile agent code through the Mobile-C API. Mobile agent space functions and data associated with an AEE are independent of those associated with other AEEs in the same agency.

On the other hand, from a mobile agent's perspective, it can call functions and access data in the binary space from within its mobile code. In addition, a mobile agent can also control other mobile agents in the same agency.

Therefore, with the Mobile-C library, a user from the steering host can deliver a mobile agent on the fly to a particular agency of the distributed simulation to control another mobile agent, such as calling functions and accessing data in the mobile agent code, terminating the execution of the mobile agent code, removing the mobile agent from the agency, replacing an existing mobile agent with the delivered agent to provide modified functions using different algorithms.


Figure 1: MADICS framework
Dynamic Improvement of Convergence Rate for Simulation of Temperature Distribution

The simulation presented in this section is to find the steady state temperature distribution on a 1 m × 1 m square field with an initial temperature of 3.5 degree for each node on a computational grid of 100 × 100 nodes. The number of iterations required to finish the simulation is directly related to the tolerable maximum residual and the convergence rate of temperature.

Since the tolerable maximum residual of the simulation is fixed (0.001), the convergence rate of temperature therefore dominates the number of iterations to finish the simulation. The convergence rate of temperature is related to the numerical method used to calculate the temperature on each node of the computational grid. In this simulation, we implemented two services with the same name using Point Jacobi and Point Successive Over Relaxation (SOR) methods.

Figure 2 shows the steady-state temperature distribution on this square field. Figures 3 and 4 show the convergence history of temperature without and with altering the numerical method during runtime, respectively. As shown in Figure 3, with only the Point Jacobi method, the simulation takes a total of 1210 iterations to converge to the tolerable maximum residual, 0.001 degree. However, as shown in Figure 4, with the ability to switch the numerical method from the Point Jacobi to Point SOR method via mobile agents during the simulation, at the 101th iteration in this example, the convergence rate of temperature is improved so that the simulation only takes a total of 410 iterations to converge to the tolerable maximum residual.


Figure 2: Steady-state temperature distribution on a square field with a non-uniform computational grid


Figure 3: Convergence history of temperature without altering the numerical method during runtime


Figure 4: Convergence history of temperature with altering the numerical method during runtime
Veiw the code
Download the code
Dynamic CFD Data Post Processing

The MADICS has been applied to the dynamic data post processing of a research project that investigates a new computational approach for predicting stall-inception in multi-stage axial compressors. The NASA Stage35 single-stage compressor was used in the investigation.

Figure 5 shows a side view of the numerical Stage35 model for simulation purposes. Figure 6 shows an example of the multi-block OH structured-grid used for the Stage35 airfoil passages. The dimensions of each grid block used in the numerical model are given in Table 1.


Figure 5: Stage35 model


Figure 6: Multi-block OH structured-grid

Table 1: Grid dimensions

In this project, the unsteady-flow simulation results consist of large data sets containing the values for the independent flow variables that can be used to calculate the dependent flow variables which describe the flow physics associated with rotor, stator, and stage stall-inception. When the unsteady-flow simulation results are continuously updated, the continuous post processing of the results to obtain dependent flow variables is necessary for predicting stall-inception. It is very likely that a researcher could aim at certain dependent variables for the current simulation cycle, but shift targets to different variables for the next simulation cycle.

The independent flow variables included in this application are density, axial velocity, radial velocity, tangential velocity, and energy. Besides, the dependent flow variables, pressure and temperature, are chosen for demonstration of the dynamic algorithm alteration.

We currently use two separately located machines to run the same MPI program in parallel to extract the unsteady pressure or temperature envelope of one rotor from part of the large-scale unsteady-flow simulation results. The framework of this computation is the same as the one shown in Figure 1. The unsteady-flow simulation results are located in a Linux Beowulf cluster, and shared with two Linux machines through the Internet. The two Linux machines are also the hosts where the MPI program is running. The Mobile-C agency embedded in the MPI program is capable of receiving mobile agents and executing mobile agent code in order to perform dynamic algorithm alteration.

Figures 7 and 8 show the calculated unsteady pressure and temperature envelope of the rotor at the point just below the blade tip for the flow rate near stall.


Figure 7: Unstead pressure envelope of the rotor just below the blade tip for the flow rate near stall


Figure 8: Unstead temperature envelope of the rotor just below the blade tip for the flow rate near stall
Examples

Example 1: Change an algorithm in a running application

Veiw the code
Download the code

Example 2: Change a parameter in a running application

Veiw the code
Download the code