Correction of mould cavity geometry for warpage compensation

Warpage is one of the most challenging defects occurring in plastic injection moulded parts. Various approaches to overcome this issue have been proposed in the literature, but they all provide only partial solutions to the problem. This paper proposes a new method for the compensation and minimisation of warpage. The method is based on Mould Cavity (MC) correction. In contrast to other similar methods, here the MC correction is accomplished through a direct comparison of the local deviations of the warped part’s geometry to the desired geometry of the part. Modifying the MC shape accordingly yields parts with a lower shape discrepancy from the desired geometry compared to the nonadjusted shape. The key novelty of the paper is the development of software that iteratively adjusts the MC shape to minimise local deviations. In every iteration, the warped part is compared to the desired geometry in order to compute local deviations between both geometries. Computation is done first by determining the point normal vector of the warped geometry mesh and its piercing point through desired geometry mesh. Second, distance between the base point and the piercing point is calculated. After all local deviations are determined, the MC geometry is adjusted accordingly. Two case studies demonstrate the method’s capabilities. In the first case we present a curved thin-walled plate part. The maximum warpage value of 0.005 mm (0.7% of the initial maximum warpage) was reached after three iterations of MC geometry correction and remained stable afterwards. In the second case the method was tested on the box-shaped part. The maximum warpage dropped from initial 0.711 mm to 0.066 mm after three iterations.


Introduction
Plastic injection moulding is a widely used manufacturing process that is constantly being developed and improved. Many researchers have tried to improve the process by investigating the process technology (e.g. optimisation of filling, packing and cooling), the behaviour of the materials used, and Computer-Aided Engineering (CAE) tools to improve the predictive ability of numerical simulations. An essential objective in a practical sense is producing highquality products under realistic manufacturing conditions. One of the challenges is the warpage of injection moulded parts.
Warpage is influenced by every aspect of the injection moulding process and mostly driven by the non-uniform shrinkage. A pvT relationship describes material's volumetric response (shrinkage and expansion) to complex temperature and pressure distribution inside the mould cavity. An inhomogeneous pressure field distribution depends on both the process parameters and the part and mould design -its value decreases in radial direction from the gate [1,2] and is dependent on the part's shape and thickness. Another important factor for the non-uniform shrinkage is the inhomogeneous temperature field. It can occur due to bad cooling design or improper process parameters. Important mechanism for the warpage is a temperature difference between the cavity plate and the core plate [2,3]. Furthermore, relaxation of the stress state induced during the moulding process is another mechanism that causes the warpage [3][4][5].
It should be noted, however, that as plastic parts replace geometrically complex parts from other materials -usually produced to a high dimensional accuracy -different strategies are needed to solve the warpage problem. The importance of solving the warpage problem is therefore increasing, and many different strategies have been attempted to date.
The most conventional strategy is to reduce the warpage by optimising the process parameters, the idea being that process parameters impact the magnitude of the warpage and the shape of the warped part. The literature [6][7][8][9][10][11] identifies the following parameters as the most influential: melt temperature, injection and cooling time, and injection packing pressure. Changing the value of these process parameters causes a change in the material state during the moulding process, e.g. temperature and pressure field distribution in the material. Many researchers have therefore studied the influence of each parameter extensively [6,9,[11][12][13].
When selecting different values of the process parameters, one can find the optimal combination, which manifests itself in the lowest possible value of maximum warpage. The strategies used to determine the optimal combination of the process parameters employ different optimisation methods, e.g. Response Surface Method [10], Dual Response Surface Method [14], Glowworm Swarm Optimisation [15], the Kriging model [16,17], genetic algorithms [8] and others [7]. Most of them succeed in reducing warpage by up to 50%.
The main cause of warpage is the heterogeneous shrinkage of the part, mainly due to the heterogeneous temperature field distribution. A well-designed cooling system can minimise the temperature gradients on the surface of the MC. To analyse this effect, Kitayama et al. [18,19] compared the warpage results of a part produced in a mould with a conventional cooling system to those obtained using a mould with a conformal cooling system. The latter enables a more homogeneous temperature field distribution of the mould, leading to lower warpage values. Furthermore, they analysed the relationship between warpage and cycle time. They showed that the shorter the cycle time, the higher the warpage. On the other hand, it is possible to reduce warpage and cycle time simultaneously by using the conformal cooling system. Effect of cooling on warpage was shown also by Nian et al. [20]. By adjusting the layout of the cooling channels and setting the coolant temperature separately for each channel, they succeeded in moving the centre of the hot core inside the part closer to the neutral axis of the part, thereby reducing the final warpage.
Hopmann and Nikoleizig [21] have likewise focused on the temperature field distribution. The objective of their analysis was to bring the local heat and the cooling demands of the part into equilibrium with the local heat and the cooling supply of the mould's tempering system. By doing this, they were able to determine the optimal position and size of the cooling channels to enable a more homogeneous temperature distribution and thus reduce the part's warpage.
Warpage can also result from stresses induced in the part during the process. Sudsawat and Sriseubsai [5] produced injection moulded parts from polystyrene and analysed the residual stress values in the part before and after annealing. The annealing was found to reduce the warpage by more than 75% (the annealing took place at 85 °C for 120 min).
Another way to reduce the final shrinkage is to introduce a different moulding strategy. Nian et al. [22] carried out research on the warpage of the headlight lampshades. They analysed the warpage under various process conditions and with different mould designs. As a result they managed to reduce the warpage value by 57%. Additionally, they introduced the External gasassisted injection moulding (eGAIM) which helps the packing pressure to be evenly distributed along the cavity. As a result, the final warpage was further reduced for 20%.
The aforementioned researchers achieved the warpage reduction by improving the process conditions. An alternative approach involves altering the part's geometry so as to decrease warpage. For example, changing the wall thickness of a thin-walled part was conceptualised by Lee and Kim [23]. By changing the thickness of each wall individually, they were able to find a combination of wall thicknesses that yielded the least amount of warpage. Another research, based on a similar idea, was conducted by Pal et al. [24]. They tried to reduce the warpage of a box-shaped part by adding a step to the edges. By varying the dimensions, they found an optimal combination of height and depth of the step. The final solution, however, was only optimal for the specific dimensions of the part under investigation.
The third strategy for tackling the warpage problem is adjusting the geometry of the MC. The basic principle of this strategy is to generate an inversion of the geometry of the warped part and use it as a new MC. For example, Huang et al. [25] and Tseng et al. [26] implemented the idea of correcting the MC by developing a 3D Volume Shrinkage Method (3DVSCM). They based their method on the part shrinkage compensation computed by the injection moulding simulation and used this shrinkage to compensate the MC by size scaling. The scaling measure is different in each of the three directions of the coordinate system. After MC geometry correction, all 12 critical dimensions of the part in question were found to be improved and to be within the desired tolerances. A different approach to the MC geometry correction has been suggested by Zwicke et al. [27][28][29]. The conventional way to compensate for warpage is to simulate the complete injection moulding process, correcting the MC according to the simulation results. The authors' proposal divides the simulation into two stages -the first encompasses filling, packing, and cooling before the ejection of the part from the mould. The second stage simulates the shrinkage and the warpage compensation after ejection using an inverse simulation. The inputs to the optimisation are the temperature and residual stress field distributions after the filling-packing phase and the desired geometry of the part. The result is a corrected initial MC geometry, which yields the final part geometry that corresponds to the desired geometry of the part.
The literature survey reveals a lack of a suitable method for compensating or reducing the warpage of injection moulded parts. Current methods are either limited in terms of their constraints (e.g. process parameter optimisation) or methodology (e.g. 3DVSCM), or insufficiently developed to be applied in practice (the inverse simulation by Zwicke et al.). This paper therefore introduces a new method to compensate for the final warpage values of injection moulded parts. In the following sections the new method is described in detail. First, the general concept of the MC correction is presented, followed by a thorough description of the proposed mould cavity geometry correction method. In the last two sections we present two case studies where the new method was successfully employed.

Conventional reverse geometry method
The proposed method is conceptually similar to the 3DVSCM method described above, the principle being that one can reduce the warpage by correcting the geometry of the MC. The method encompasses two steps: 1. Use the desired part geometry as the MC and determine the warped geometry of the part after it has cooled down to room temperature. 2. Correct the initial MC geometry by taking the warped part geometry into account.
In the first step, an accurate determination of the warped part geometry is essential. As in 3DVSCM, this can be achieved through computer simulation of the injection moulding process. Here, an accurate and detailed description of the process parameters and tool geometry is required in order to determine the final part geometry correctly. Existing software packages enable computer simulation of the injection moulding process required in this step. Research focusing on the validation of injection moulding simulation has been conducted, for example, by Pedro et al. [30], Baum et al. [31], Wang et al. [32] and Islam et al. [33]. We should emphasise that the first step is not the subject of this paper and that correct and sufficiently reliable injection moulding simulation results are assumed to be available.
In this paper, the focus will be on the second step, in which the correction of the initial MC geometry takes place. After ejection from the mould, the part shrinks and warps due to the heterogeneous temperature field distribution and the stresses induced during the moulding process. As a result, the final part geometry is warped and differs from the desired part geometry. By comparing the final warped part geometry to the desired geometry, it is possible to compute the distribution of local deviations between the coordinates of points belonging to the warped and the desired part geometry.
The main principle of the method is to use the information on these local deviations to correct the initial MC geometry. The most convenient way to correct MC geometry is to use the displacement u i , given by the warpage analysis for each node on the part mesh. Adding a displacement u i with the opposite sign to the position vector r P i of mesh node P i yields the position of the reversed geometry r P rev i : By applying the geometry defined by the relation (1) to the MC geometry, the result can be utilised as the new MC geometry in the process of warpage minimisation (Fig. 1). As a result, we expect this geometry to deliver improved results, with reduced local deviations between the new and the desired geometry.
The idea above is simple and can provide a satisfactory result in some cases, depending on the moulding process and the part geometry.
Still, large deviations can occur even after the MC geometry has been corrected using the reverse geometry. Besides, the displacement field used to create the reversed geometry offers limited information for generating the new MC geometry. Only the relationship between the warped part and the MC geometry is known, meaning that the MC geometry can be corrected only in the first iteration, where the displacement field and local deviations represent the same information. In the subsequent iterations, however, this relation, as well as the convergence of the method, can no longer be guaranteed.

Mould cavity geometry correction method
In this section, we propose a new method of compensating for the injection moulded part warpage that aims to overcome the challenges mentioned above. The basis of the method is the Enhanced Displacement Adjustment (E-DA) method, developed by Cafuta and Mole [34][35][36][37] for use in sheet metal forming. Similar to injection moulding, where distortion of the shape manifests as warpage, the geometric accuracy in metal forming is hampered by springback and the thinning of the formed sheet metal part. Our newly proposed method is based on the same idea as the E-DA method: correcting the MC geometry according to the distorted part shape.
In the previous section, we presented the basic idea of the MC correction method (c.f. Fig. 1). In principle, the only information needed to correct the MC geometry is the warpage displacement vector field. However, to increase the efficiency and robustness of the method and to improve the outcome, a more sophisticated way of processing the information for MC geometry correction needs to be defined. Here, the correction of the MC geometry is no longer based on the warpage displacement field but on the local deviations between the warped and the desired part geometry. The following sections describe the computation of the local deviations and how these deviations are employed to update the MC geometry.
After obtaining the local deviations and updating the MC geometry, we perform a new injection moulding simulation with the corrected MC shape (Fig. 2). Using the corrected MC geometry yields a part with smaller local deviations from the desired geometry. By iterating the process, the part's final shape approaches the desired one. The iteration loop is terminated when both the maximum d max and the average deviation d avg fall below a prescribed tolerance value.
We present the proposed method below, where the geometries of the surfaces in interaction are defined in Sect. 3.1. After defining the surface topologies, we present a computation of deviations between the warped and the desired part geometry. Finally, Sect. 3.3 presents the algorithmic treatment of the MC correction via the iteration process.

Geometry definition
There are three different geometries involved in the method: • desired part geometry -D, • MC geometry in kth iteration -T k , • warped part geometry in kth iteration -W k . Fig. 1 Warpage reduction by the Reverse Geometry Method: a initial MC geometry after moulding simulation yields warped geometry of the part (warpage analysis by commercial software), b the warped geometry is reversed using the displacement field obtained through warpage analysis, c the reversed geometry is used as the new MC geometry, which generally better approximates the desired part geometry

Fig. 2 Mould Cavity Geometry Correction
Method: (a) initial MC geometry after moulding simulation yields warped geometry (warpage analysis), which is (b) compared with the desired geometry of the part. This stage is called the computation of local deviations. Once the deviations have been determined, the MC geometry is adjusted (c) to produce a part with reduced warpage (d). Finally, the iterative moulding simulation and the MC correction process are repeated until convergence The desired part geometry represents the target part geometry. It stays the same throughout all the iterations. The other two, by contrast, change during each iteration loop.
Both the part and the MC are volumetric bodies bounded by closed surfaces. We describe each of those surfaces using a triangular mesh consisting of linear Triangular Elements (TEs) with three nodes (Fig. 3). We assume that the coordinates of the three nodes of each TE are known in advance. However, we denote the ith node in the mesh as P D i , P T k i and P W k i , corresponding to the desired, the MC, and the warped part geometry, respectively. In a similar way, the TEs will be

Determination of geometry deviation
An accurate determination of the deviations between the warped part geometry and the desired geometry is crucial for the accuracy and hence the efficiency and robustness of the method. A deviation between W k and D in point P W k i is defined as a length of a vector d In order to determine the deviation as accurately as possible at all points on the surface W k , we must place special attention on the determination of the normal vector n P W k i and the piercing point P pier i .

Normal vector
Normal vector at a point (x 0 , y 0 ) on surface z = f (x, y) is given by the expression: Since the surface discretisation using a TE mesh could lead to erroneous results, a new definition for the normal vector n P i at each node is needed. In the case of the TE mesh, the computation of the normal vector n E j of element E j is straightforward, since only a cross product of two vectors ( r 12 and r 13 ) across the element's edges needs to be computed ( Fig. 5): (3) n E j = r 12 × r 13 .  The normal vector n E j of a triangular element is determined by the cross product of vectors r 12 and r 13 . For an accurate determination of the surface normal in point P i , the procedure is repeated for all the elements connecting to point P i . By taking the sum over all the vectors constructed, the average normal vector n app P i at point P i can be determined after normalisation Taking the sum of vectors constructed from all the elements connected to the node P i and normalising it gives the approximation of the normal vector n app P i of the surface at the node P i . In the case of a fine mesh, this approximation is accurate enough to give reliable final results. The accuracy of normal vector computation, however, can be improved, even in the case of a coarse mesh, by adding another step.
As defined by TEs, the curvature of the surface can be reconstructed to a smooth surface by using a polynomial approximation over a chosen number of nodes in the vicinity of the point P i . The expression for the polynomial surface S spanning 6 points, for example, is given by the equation: where Surface S is defined in the local coordinate system (x n , y n , z n ) with the origin at node P i and the z n axis aligned with the previously determined normal vector n app P i . The six coefficients A 0 , A 1 , ..., A 5 are computed by solving Eq. (4) for the six nodes over which the surface is interpolated. Figure 6 shows the approximate normal vector n app P i and the normal vector n P i defined by polynomial surface.
The nodes that define such a surface are arbitrary in principle, but specific combinations can provide more accurate results. Here, the first point selected is the node P i , at which the surface's normal vector is computed. The other five points chosen are those nodes of the TEs that share the same node P i . If the number of such nodes is greater than five, only the five most distant nodes can be selected.
After interpolating the polynomial surface over the selected points, the normal vector n P i can be computed using the relation (2), where point (x 0 , y 0 ) = (0, 0) is in the local coordinate system (x n , y n , z n ) . Hence, the normal vector is given by:

Piercing point
Since we are comparing the warped part geometry W k with the desired one ( D ), the piercing point lies on this surface. Determining the piercing point starts with finding the TE on the surface mesh D that is pierced by the normal vector n P W k i .
It should also be emphasised that we can also treat the desired surface D as a TE mesh, meaning that we can rebuild the surface in subregions by using polynomial surfaces. Firstly, if we consider the surface D as a TE mesh, the piercing point lies precisely in the matching TE. In that case, the intersection point between the normal vector n P W k i and the matching TE plane needs to be determined. However, since the actual surface is smooth and not discretised, the TE mesh is only an approximation of the actual surface. Accordingly, the raw mesh data only gives approximate information about the location of the piercing point. In reality, the piercing point has some offset from the matching plane defined by the TE. For this reason, it is more appropriate to rebuild the surface using polynomial interpolation to get a more accurate location of the point. This is done in a similar way as when determining a normal vector.
We approximate the desired part surface by spanning the second-order polynomial surface over six nodal points. The first three points are the nodes belonging to the TE being pierced ( E pier ), i.e. Q 1 , Q 2 and Q 3 . The other three ( Q 4 , Q 5 and Q 6 ) are the nodes of the three TEs that share an edge with the pierced TE ( E pier in Fig. 7).
After selecting the six anchor nodes we are able to determine coefficients A i of the polynomial surface defined by expression (4). Again, the surface is defined in the local coordinate system (x n , y n , z n ) . The piercing point is given by the simple expression:

Deviation at the sharp edge
After computing the normal vector and the piercing point precisely, we can compute the deviation vectors d  While the method is effective for continuous geometries, an obstacle arises when geometries contain singularities, such as sharp edges or corners (e.g. box-shaped parts, plates).
In such cases, the computed deviations at the edges are more accurate if we divide the closed surface into several subsurfaces. This way, the same edge is taken into consideration twice. Accordingly, two different distances between the edge and the surface D being compared with are computed (c.f. Fig. 8). The distance between the edge on the surface W i and the edge on the surface D is then given by Since we divide the external surfaces of the part and the MC into subsurfaces, there is a possibility that the normal vector does not pierce any of the TE of the desired surface D sub j . This can happen, for example, when point P i lies on an outer edge of the subsurface or close to it. The subsurfaces of the desired geometry D therefore need to be extended to ensure that every normal vector of the subsurface W sub j k has its matching TE on the surface D.

Correction of mould cavity geometry
Once we compare the warped part geometry W k with the desired geometry D by computing local deviations d W k i , the MC geometry correction takes place. The procedure is similar to the one described at the beginning of Sect. 2, wherein the computed local deviations between the warped part and the desired geometry are applied to the MC geometry but in the reversed direction.
Conventionally, injection moulding simulation software uses the same mesh for the part and the MC. We can take advantage of this fact and use the local deviation d This shape correction method is robust but lacks flexibility. We can therefore introduce a different approach to preserve the quality of the TE mesh even after the MC geometry correction.
Let us again define a local coordinate system with the origin in point P T k i and with the z axis in the direction of deviation vector d W k i . Using the approach given by (9), the difference between the points P T k i and P T k+1 i would only be in the z n coordinate of the local coordinate system -the other two coordinates ( x n and y n ) would not change and would remain zero. In order to introduce flexibility to the method, we remove the constraint on the motion of the point in the x n − y n plane. The z n coordinate will change according to the computed local deviation |d i | , and the other two will change freely according to the motion of the neighbouring nodes. The motion of point P i -constrained in the z n axis and free in the x n − y n plane of the local coordinate system -is applied to all the nodes of the TE mesh T k+1 .
The motion of the nodes is affected by the neighbouring nodes. This feature is especially useful for the edge nodes, which are oriented in the direction of the part's thickness. Typically, the part warps in the thickness direction. As a result, the edges oriented in the same direction experience the biggest dislocation during the warping. While it was necessary to introduce node position flexibility in order to Fig. 7 Six anchor nodes for polynomial surface determination: three nodes are taken from the TE being pierced, whereas the other three are the nodes of the three TEs that share an edge with the pierced TE   Fig. 8 Edge deviation determination: for sharp edges, we divide the surface into several subsurfaces. While the deviation vector can be determined for each pair of subsurfaces, the edge deviation is computed as a sum, i.e. e = e1 + e2 keep the even distance between the edge nodes, most of the edges of the part should be treated differently. In that case, the motion of nodes in the vicinity of an edge should not affect the nodes lying on this edge. Therefore, we translate all nodes that are part of a non-thickness edge according to expression (9).

Case study A
In the previous section, we described and explained a new method of warpage compensation. To demonstrate the functionality and efficiency of the method, we present two case studies that demonstrate how the method is employed. In the first case, the method is tested on a plate-shaped part with dimensions 150 × 100 × 2 mm . The part is not completely flat but has some curvature of proportionally big radii along both edges. The geometry of the part is presented in Fig. 9.
There are two reasons to use a part shaped this way: first, by introducing the initial curvature, we control the warpage direction. Secondly, the curved part's stiffness depends on the curvature, which makes finding a shape that compensates for the warpage of the moulded part more difficult.

Process overview
The material used for the part is Acrylonitrile Butadiene Styrene (ABS) Ronfalin 1337U produced by LyondellBasell. Material properties were measured in the laboratory of the simulation software provider and are included in its software package Moldex3D [38]. In addition, some of the material properties are specified in Table 1.
The tool consists of a cavity plate, core plate and runner. Figure 10 shows the tool model in Moldex3D. To cool the mould we use four cooling channels of 10 mm diameter placed 18 mm away from the bottom surface of the part. They are all located in the core plate in order to induce a temperature gradient between the top and bottom surfaces of the part. Note that this further increases the warpage of the part.
Process conditions are set to be within the recommended range for the chosen material. The values of the process conditions are listed in Table 2.

Process simulation
We conduct the injection moulding process virtually using a commercial software package that allows us to simulate the entire process, including the calculation of warpage. The following paragraph presents the background of the simulation in Moldex3D [38].
Simulation calculation consists of five steps, beginning with the transient thermal analysis of the mould. First, the coolant's temperature, the mould's initial temperature, and the melt temperature are considered. Then, after reaching the steady-state, we use the computed temperature field distribution of the cavity surface as the boundary condition for the filling phase analysis. Here, we utilise the Finite Volume Method (FVM) to compute the temporal variation of the melt temperature and pressure. Once the MC is 98% filled up, the computation proceeds to the packing phase, followed by another transient thermal analysis, in which the convergence of the mould temperature field distribution considering the actual computed melt temperature is determined. During this phase, the part cools down to room temperature.  The last step in the analysis is the calculation of the warpage, where the Finite Element Method (FEM) is employed to compute the stress-strain field distributions. We use the temporal temperature variation from the previous phases to determine the current values of temperaturedependent material properties. At each time increment, we compute the warpage by considering the temperature gradients and the coefficient of thermal expansion. After that, the stress relaxation is analysed.
The first part of the warpage phase considers the inmould constraint effect. The part is still in the mould and cannot deform freely. Therefore, the contact behaviour between the rigid mould and the plastic part needs to be considered. After ejection, the warpage calculation proceeds until the part reaches room temperature.
To analyse the influence of mesh density on the magnitude of the warpage and to optimise the simulation time, we monitor how the maximum deviation between the part and the desired shape d k max changes with the reduction of the element size. In the presented case, the part and runner consist of three principal layers of a mesh constructed from Finite Volumes (FVs). The central layer (i.e. the core) is assembled from tetrahedral FVs, while the upper and bottom layers are wedge-shaped FVs. These two meshes that belong to the surface topology are the socalled Boundary Layer Meshes (BLM). Mould is meshed with tetrahedral FVs, whereas the cooling channels are meshed with brick FVs.
We perform the mesh convergence analysis with all the input data taken from Sect. 4.1. In the analysis, we compare the warped shape of the part with the desired one for different mesh densities. By checking the deviation of the warped part, we compute two parameters, i.e. the maximum d k max and the average deviation d k avg , which are given by: and The values of maximum and average deviation for different mesh densities are shown in Table 3. As the table shows, we conducted simulations with four different mesh densities, denoted A to D. The case A features the coarsest mesh, while the case D presents the densest and thus also the most computationally intensive mesh. The table indicates that the most significant change of d k max takes place when increasing the mesh density from case A to case B, which is approx. 5% of the value. The value changes for less than 2% per mesh for the rest of the consecutive meshes. Since the computational effort increases substantially with mesh density, we employ mesh density B for the iterative procedure of warpage minimisation. A detail of the actual mesh is shown in Fig. 11.

Results
Before the MC geometry optimisation, we set the initial cavity shape to be the same as the desired geometry of the part itself. The results of the part geometry after reaching room temperature are shown in Fig. 12a. The part's initial  i is shown as a field distribution in Fig. 12b. Here we can see that the deviation values of the part range from −0.69 to 0.66 mm. The final part geometry differs from the initial mould geometry due to the shrinkage and warpage of the part. The former occurs throughout the part and represents an approximately 3.2% reduction in all the part dimensions. The latter causes the part to change its shape. In general, several mechanisms cause the warpage. In this case, the temperature gradient between the cavity plate and the core plate is the primary mechanism inducing the warpage. It was introduced deliberately by placing the cooling channels only on one side of the part. The temperature difference at the moment of ejection is shown in Fig. 12d. The difference in the centre is almost 17 °C, whereas it is almost negligible on the edges, where cavity and core plates are in contact.
The warped shape of the part is compared to the desired one. During the optimisation procedure, we control the maximum deviation d k max and the average deviation d k avg given by the expressions (10) and (11) respectively. The area where the gate is located (the gate scar) is irrelevant to this study, so the deviations of its nodes are not taken into account. The maximum deviation of the first iteration d 1 max is 0.683 mm and the average deviation d 1 avg is 0.209 mm.
After the first iteration, the MC geometry correction (Fig. 2) takes place. We re-imported the corrected MC geometry into the injection moulding simulation software and performed another iteration of injection simulation. We ran ten iterations for this case study in order to demonstrate that the method is convergent and stable. The results of both the maximum and the average deviation ( d k max and d k avg ) for all 10 iterations are shown in Fig. 13. The data show a substantial improvement in the final part geometry already in the first iteration. Within the next three iterations, the discrepancy between the part and the desired geometry becomes negligible. After the fourth iteration, the maximum and the average deviation values are 0.0049 mm and 0.0012 mm, respectively (c.f. Fig. 12c). In the following iterations, the discrepancy between W and D becomes even smaller. However, in the following steps the values range between 0.006 mm and 0.002 mm for the d k max and between 0.0020 mm and 0.0006 mm for the d k avg .

Case study B
In the second case the method is tested on a part with a more complex geometry. A box-shaped part with four screw bosses and the outlet hole is presented. Its overall thickness is uneven. Geometry and dimensions of the part are shown in Figs. 14 and 15 and the CAD model is available as supplementary material.

Process overview
Again, the material used was ABS Ronfalin 1337U. Some of the material properties are listed in Table 1. In this case we used cooling channels in both the cavity and the core plate (Fig. 16). There are four channels on both sides with diameter of 8 mm. Process conditions are listed in Table 4.

Process simulation
The part, mould, runner and cooling channels are meshed in a similar way as in the previous case. The part and the

Results
The first injection moulding simulation of the box-shaped part gives the warped geometry shown in Fig. 17a. Again, the main cause of the warpage is the temperature difference between the core and the cavity side of the mould, which arises due to the depth of the part. The side walls of the part warp towards the centre and the screw bosses follow them. The maximum deviation d 1 max is 0.711 mm and is found at the centre of the top edge of the two longer side walls. The controlled distances A and B (Fig. 15) are 0.669 mm and 0.335 mm, respectively, shorter than the nominal value.
The calculated warped geometry of the part is taken as the input for the first MC geometry correction. 10 iterations have been made and the results of both the maximum and the average deviation ( d k max and d k avg ) are shown in Fig. 18. Fig. 12 a Warped part geometry after the first iteration. For the purposes of graphical representation, the deformation is amplified by factor of 5. b Warpage after the first iteration is presented as the part's initial deviation from the desired geometry d W 0 i and illustrated as a field distribution. c Warpage after 4th iteration. d Temperature change field distribution between the cavity and core plates at the time of ejection. The difference in the centre is almost 17 °C, whereas it is almost negligible on the edges, where the cavity and core plates are in contact. e Comparison of the MC geometries in the 1st and 4th iteration Fig. 13 The maximum and the average deviation ( d k max and d k avg ) of the curved plate for 10 iterations. The discrepancy between the part and the desired geometry becomes negligible within four iterations    Similarly as in the first study case, both the maximum and the average deviation drop gradually after the first iteration. The average deviation in the third iteration d 3 avg reaches 0.0009 mm and stays in range between 0.0004 mm and 0.0012 mm in the following steps. The maximum deviation d k max decreases from initial 0.711 mm to 0.066 mm in three iterations, which equals to 91% reduction of maximum warpage. In the following iterations it gets lower than 0.1 mm but does not go below 0.01 mm as in the case of the curved plate. Figure 17c shows that the location of the maximum deviation is specific and is located at the top of the screw bosses.
Furthermore, the characteristic dimensions were checked after the first, third and last iteration (Table 5). Since the characteristic dimensions were measured virtually as the distance between two particular nodes, the measured values do not correspond directly to the calculated deviations between the warped and the desired geometry. The values of both controlled dimensions successfully approach the nominal value. Final distance deviation d for A and B is 0.056 mm and 0.075 mm respectively.

Conclusion
This paper presents a new method of warpage compensation for injection moulded parts. We develop an algorithm that enables iterative correction of the MC geometry. It consists of two steps: in the first step, we compute the local deviations between the warped part geometry and the desired geometry of the part; in the second step, the MC geometry correction takes place. An algorithm for a more accurate calculation of the surface's normal vector and the piercing point location is implemented. In the case of the geometry correction, a procedure was devised that permits effective adjustment of the mould cavity shape.
The method was tested on two case studies. First, we used a part with the shape of a curved plate. This shape gives a less intuitive response to the MC geometry correction and can be used as a benchmark in the following studies. The warpage of the part was computed using existing injection moulding simulation software. The method and the developed program were tested and found to be functional. The initial maximum and average deviations ( d 1 max and d 1 avg ) were 0.683 mm and 0.209 mm respectively. In the optimisation process, the warpage was reduced by 99% in only three iterations. At this point, the maximum and average deviations were 0.0049 and 0.0012 mm, respectively.
In the second case we used a box-shaped part with more complex geometrical features. Also in this case both the maximum and the average deviation were reduced substantially in the first three iterations of MC geometry correction. d max was reduced by 91% to 0.066 mm and d avg was reduced by 99% to 0.0012 mm.
The proposed method is a new and powerful tool for the compensation of warpage in injection moulded parts. It can be used with any part geometry and does not depend on the way the part warpage is determined -it can be performed with the help of injection moulding simulation software or on the basis of the actual plastic injection moulding process followed by the measurement of the part geometry. Another significant advantage of this method over other approaches is that its functionality is independent of the process parameters. The process parameters can therefore be optimised according to other needs (e.g. material properties, time efficiency) instead of the warpage problem.
Author contribution The authors declare that they are all participants in the work, and none of them performed only administrative functions.
Funding The authors received financial support from the Slovenian Research Agency (ARRS) (research core funding no. P2-0263 and project funding no. L2-3172).
Availability of data and material Data and materials are available and can be shared upon request.

Declarations
Ethics approval The authors claim that there are no ethical issues involved in this research.
Consent to participate All the authors have consented to participate in and contribute to this research.

Consent for publication
All the authors have consented to publish the research. There are no potential copyright/plagiarism issues involved in this research.

Conflict of interest
The authors declare no competing interests.