Synergy of modeling processes in the area of soft and hard modeling

High complexity of production processes results in more frequent use of computer systems for their modeling and simulation. Process modeling helps to find optimal solution, verify some assumptions before implementation and eliminate errors. In practice, modeling of production processes concerns two areas: hard modeling (based on differential equations of mathematical physics) and soft (based on existing data). In the paper the possibility of synergistic connection of these two approaches was indicated: it means hard modeling support based on the tools used in soft modeling. It aims at significant reducing the time in order to obtain final results with the use of hard modeling. Some test were carried out in the Calibrate module of NovaFlow&Solid (NF&S) simulation system in the frame of thermal analysis (ATAS-cup). The authors tested output values forecasting in NF&S system (solidification time) on the basis of variable parameters of the thermal model (heat conduction, specific heat, density). Collected data was used as an input to prepare soft model with the use of MLP (Multi-Layer Perceptron) neural network regression model. The approach described above enable to reduce the time of production process modeling with use of hard modeling and should encourage production companies to use it.


Introduction
Starting from the 90s of the last century, a distinct trend can be observed in scope of use of dedicated methods and computer systems for modeling and simulation of production processes [1][2][3][4][5][6]. It is related to high technological complexity of these processes, as well as complexity of physicochemical phenomena accompanying them. Modeling of processes brings many benefits, such as selection of an optimal solution (the most beneficial solution by assumed criteria) [7], possibility of verifying assumptions before applying them in practice, as well as making it possible to eliminate errors (among others, by virtual application of Trial & Error method) [8]. Hereby, it needs to be stated that authors understand the model as a simplified object, which represents the real state. Behavior of a model or its properties are similar to a modeled phenomenon [9].
Considering the above mentioned statements, 2 types of models can be distinguished [10]: physical models and mathematical models. The first type exists in reality and is used mostly in universities or research institutes, can be a specially designed laboratory stand or a mockup in a decreased scale (e.g. electrical analogue used for physical modeling of stationary temperature field through the cross section of a pressure mold with filled cavity and cooling vents). The mathematical models, on the other hand, have a virtual shape and they are a modern alternative, which is very helpful in modeling phenomena and physical processes, often using dedicated computer systems. An activity consisting in use of mathematical models is known as the mathematical modeling (the results are presented using mathematical relationships) [11].
Subsequently, division of the mathematical modeling is related to a way of representing the nature of a process or phenomenon and it regards method of use of available data. The hard modeling is based on application of derivative/differential equations from the range of mathematical physics, known as early as in 19 th century. The soft modeling, on the other hand, uses empirical cases gathered in data bases and operates on a basis of matching to the optimal variant, according to strictly defined criteria. Wider description of the problem, related not only to a model but also to coefficients of databases is presented in [12].
In this paper, the authors indicate possibilities of synergy of both groups of modeling (hard and soft), on example of aiding the hard modeling on the basis of tools applied in soft modeling. It was aimed at significant acceleration of obtaining end results from a hard model in some specific cases, not related to 3D modeling. Other cases of application of both soft and hard modeling in studies are presented in [13][14].
The tests conducted using dedicated computer systems (separately for hard and soft modeling) indicated high compatibility of prognoses. The above mentioned approach will help to reduce time of modeling of production processes with use of link between soft and hard modeling and it is an encouragement to apply such solutions in production companies and research institutes. In the further chapters of the paper, methodology of studies, their results and analysis are presented.

Thermal model -Calibrate
Initial simulation study was performed using the NovaFlow&Solid simulation system, in the Calibrate module [15]. This module is used to conduct one-dimensional simulation (1-D) of heat transfer for the basic shapes: sphere, cylinder, plate and thermal analysis cup (ATAS-cup). The last example was used for the studies -the ATAS-cup of dimensions of 60x60mm (geometric modulus = 1 cm), with a thermocouple located in the thermal center of the casting, which is at the height of 30 mm in the casting axis.
The Calibrate module allows obtaining the cooling curve and, what follows, determination of time of casting solidification and comparing it with a curve obtained from an experiment.
Then, in case of different results, it is necessary to change values of particular thermophysical parameters of an alloy and/or mold. It will allow better matching of simulation results to the experiment.
In this paper, an assumption was made that the thermo-physical parameters of an alloy variate with temperature and are not varianted during the process. However, values of parameters of molding sand (green sand) were changed -they were assumed as mean, constant values (unchanged in function of temperature). It was a kind of simplification, which is often made for the molding sand, in case of testing of a simulation code.

Thermo-physical properties of the AC-42000 alloy
The authors proposed using the AlSi7Mg alloy (AC-42000), widely applied in the industry, for the simulation studies. The thermo-physical properties and chemical composition of this alloy are presented in Tables 1 and 2.
On the basis of the introduced chemical composition, internal thermodynamic solver -Thermo-Calc, built in the NovaFlow&Solid 4.7 system, determines characteristic temperatures (liquidus -Tliq and solidus -Tsol, beginning and end of solidification) [14].    Table 3 presents values of thermo-physical parameters (INput parameters) of the green sand and predicted value of solidification time for these parameters, obtained from the simulation in the Calibrate module (OUTput parameter). The input values for the particular records are assumed as constant mean values. Each variant of the simulation (Simulation number, Sim. no) contains different combination of values of parameters, which result out of physics of the modeled phenomenon.
Finally, 70 cases of simulation were performed, related to prognosis of the ST parameter for various settings of the HC, D and ST parameters, while results of 65 first courses were used for teaching of the soft model and 5 last cases were independently used to compare quality of prognosis. Time of realization of a single course of simulation, considering changing of settings of specific parameters, was approx. 120 seconds. Selected values of INput parameters (INput_par) and the OUTput parameter (OUTput_Par) obtained from the simulation are presented in Table 3. Table 3. The values of input and output parameters used in the Calibrate simulation. Selected data records presented.

Sim.
No.  outside the Calibrate module. The authors proposed further, expanded studies in direction of prediction of the OUTput variable ST, considering simultaneous share of all three parameters. The aim is to prepare a soft mathematical model in form of a neural network, which can be asked in a much shorter time than using the Calibrate module (instead 120 seconds it is less than 5 seconds). Moreover, the elaborated studies were used, by the way, to test quality of the hard model and its capability of generalizing. The detailed results of studies regarding application of a neural network MLP-BFGS aimed at aiding of the hard modeling are presented in the next chapter.

The artificial neural network algorithm MLP-BFGS
To predict the OUTput variable ST using the soft modeling, the authors proposed use of a solution which is quite popular and tested in industrial practice -Multi Layer Perceptron (MLP) neural network [16]. The model was designed using the STATISTICA 10.0 network. The BFGS (MLP-BFGS, Broyden-Fletcher-Goldfarb-Shanno) algorithm was decided to be used, as it is an improved algorithm regarding the popular algorithm of Back Propagation (BP) due to consideration of variable set metric scale. [17]. The following assumptions regarding testing of the above mentioned algorithm were made: x 80% are learning records, 10% are testing records and the remaining 10% are validating records.
x Learning of the network assumes use and testing of the following activation functions: linear, logistic, tanh and exponential. x To compare values of prognosis of the neural network with results of the Calibrate simulation, 5 additional data records obtained as a result of Calibrate modeling, were used. Finally, architecture of MLP neural network was used along with the activation functions mentioned above, while teaching of the network consisted in selecting weights in such a way, to make the network represent relations between the INput and the OUTput variables in the most correct way. The selected algorithm of the network adjusts weights of neurons in such a way, to ensure that for any values of the INput variables, the OUTput value of the neural network has as small difference from the OUTput value obtained from the Calibrate model as possible.
The BFGS teaching algorithm was used, with possibility of returning the 5 best suited models, considering used activation function and number of hidden layers. The applied error function, used for comparing network responses with real values, is the Sum of Square (SOS). With an assumed number of hidden layers (between 3 and 10) and a number  Tab. 2): x Network model MLP-BFGS 3-9-1.
x Network model MLP-BFGS 3-3-1.  Table 3 presents summary of obtained results of prediction of the solidification time ST of the AC-42000 alloy for 5 cases of the best suited model, along with 5 additional validating records (not to be confused with 10% of validating records on the stage of the network learning), which are independent results of simulation in the Calibrate model. These results, as an empirical validation, were not taking part in teaching the network.
Predictions of the neural network were named as the MLP-BFGS_Model. Adjustment of a given network for the results obtained from the Calibrate model was estimated using the formula (1). The best matching is presented by the model no. 1 (MLP-BFGS_Model_No#1), for which 4 of 5 OUTput values are the closest to the real value. In this model, logistic function of activation was used for the hidden layer (hl activation) and linear function of activation was used for the output layer (ol activation). The worst matching was presented by the network no. 4 (MLP-BFGS_Model_No#4) with tangent function of activation for both hidden and output layer.  The network behavior was also examined with different number of neurons : (1-3), (1)(2)(3)(4)(5), (3)(4)(5), (3)(4)(5)(6)(7)(8), but their accuracy was lower than 80%. It is also noteworthy, that with each new generation of a network with the same number of hidden layers, the network can return different models, with different activation functions. The authors noticed, that the most frequent case concerns generating of a logistic and a linear function. The authors propose future expansion of studies in scope of differentiation of values of model parameters (among other things -different number of hidden layers with different number of saved networks) and increase of records asking the network. It is therefore important to remember, that too high fitting of the INput data to the OUTput values may result in overfitting of the network.
Results of the conducted simulation indicate, that the MLP network with the BFGS algorithm is good in predicting of solidification times for a higher number of records (at least several dozens). As such, ready model of the network can be used to shorten time of calculations in the hard modeling simulation systems. In future, the authors plan to test other soft modeling methods, including regression trees, among others.

Summary
The paper presents study of possibility of predicting (in scope of HARD computer simulation) of output values on the basis of variable parameters of a heat model, taken from a database for casting a cup for the thermal analysis (Calibrate) and then comparing these predictions with results of a computer simulation. The initial simulation studies were conducted using the NovaFlow&Solid system in the Calibrate module and the STATISTICA system in the Neural Network module. The studies indicate large synergy of both areas.
The tests conducted using dedicated computer systems (separately for the hard and soft modeling) indicated high convergence of prognoses, illustrated in Tab. 3 and Tab. 4. The authors propose to expand future studies with differentiation of values of model parameters (among other things, different number of hidden layers with different number of saved networks), as well as increase of records asking the network. It needs to be considered, that too high fitting of INput data to the OUTput data will result in overfitting of the network.
The further studies concern problems of predicting the OUTput values on the basis of independent INput values using Regression Trees. In this project, this problem is merely suggested and authors propose to expand these studies in future.