## 2 Materials and Methods
The crystal grows normally to the crystallization front, e.g., at point II, \(\varphi(x,x_{c},y)\), the crystal grows along the inward normal of the boundary, i.e., along with the temperature gradient, G, at an angle \(\alpha\) to the x-axis, as shown in Figure 1. To find the crystal axis equation as a function, \(x(y)\), the theory of orthogonal trajectories can be applied, see [18]. Since the trajectory of the shifted Lame curves and the trajectory of the crystal axis are orthogonal, the crystal axis equation can be found by solving the following partial differential equation:  
\[\frac{\partial\varphi}{\partial y}\mathrm{d}x=\frac{\partial\varphi}{\partial x }\mathrm{d}y. \tag{2}\]  
Finding the partial derivatives of Equation (1), substituting these into Equation (2), and rearranging the terms results in:  
\[\mathrm{d}x=\frac{mb}{nL_{r}}\left(1-\left(\frac{y}{b}\right)^{n}\right)^{ \frac{m-1}{n}}\left(\frac{y}{b}\right)^{1-n}\mathrm{d}y. \tag{3}\]  
Figure 1: Schema of a solidifying crystal axis, \(x(y)\), following an ellipse-shaped weld pool. Taking the indefinite integrals on both sides of Equation (3) gives:  
\[x(y)=\frac{mb^{\frac{n}{n}}}{nL_{\tau}}\int\left(b^{n}-y^{n}\right)^{\frac{m-1}{m}} y^{1-n}\mathrm{d}y+const. \tag{4}\]  
The constant in Equation (4) can be found by using the condition \(x(y=b)=0\) and equals zero in the case of ellipse-shaped weld pool boundaries, i.e., using \(m=n=2\) for the reconstruction procedure. Nonetheless, in the general case the constant is not zero. Using the condition given above the general columnar crystal axis equation is found:  
\[x(y)=\frac{mb^{n}}{n(n-2)L_{\tau}}\left(y^{2-n}{}_{2}F_{1}\left(\frac{1}{m}-1, \frac{2}{n}-1;\frac{2}{n};\left(\frac{y}{b}\right)^{n}\right)-b^{2-n}{}_{2}F_{ 1}\left(\frac{1}{m}-1,\frac{2}{n}-1;\frac{2}{n};1\right)\right) \tag{5}\]  
for \(n\
eq 2\); \({}_{2}F_{1}\) is the hypergeometric function [19]. To check the validity of the general solution for the columnar crystal axis, derived above, the known solution for weld pool boundaries with ellipse-shaped rear part, i.e., \(m=n=2\), is compared to the solution obtained with Equation (5) for different \(m\) and \(n\) values. The solution for ellipse-shaped weld pool boundaries is derived in [9] and given as:  
\[x(y)=\frac{b^{2}}{L_{\tau}}\left(\sqrt{1-\left(\frac{y}{b}\right)^{2}}-ln\left| \frac{1+\left(1-\left(\frac{y}{b}\right)^{2}\right)^{\frac{1}{2}}}{\frac{y}{b} }\right|\right). \tag{6}\]  
The comparison of the results is shown in \[\varphi(x,\ x_{c},\ y)=\left(\frac{x-x_{c}}{L_{r}}\right)^{m}+\left(\frac{y}{ b}\right)^{n}-1=0,\ \text{for}\ y\geq 0,\ x\leq\ x_{c},\ m>1,\ n>1. \tag{1}\]0 Because Equation (5) has a singularity at \(n=2\), the results obtained with Equation (6) for \(m=n=2\) are compared with the results obtained with Lame curves for \(m=2\) and \(n=1.99\). As seen in Figure 2, the calculated crystal axes are nearly identical, at least from a practical point of view. Furthermore, the shape parameters were slightly varied to demonstrate one of the biggest advantages of the proposed algorithm, namely its flexibility to account for weld pool boundaries of almost any shape, thus significantly improving the accuracy of subsequently calculated crystallization parameters such as the solidification rate. By making use of the solutions presented in Equations (5) and (6) the remaining crystallization parameters, the growth rate, \(R(x(y))\), and the cross-sectional area, \(W\), of the columnar crystal, can be calculated as well. Thereby, the growth rate represents the change in the crystal  
\[\varphi(x,\ x_{c},\ y)=\left(\frac{x-x_{c}}{L_{r}}\right)^{m}+\left(\frac{y}{ b}\right)^{n}-1=0,\ \text{for}\ y\geq 0,\ x\leq\ x_{c},\ m>1,\ n>1. \tag{1}\]1 Comparison of the calculated crystal axis, \(x(y)\), for a weld pool boundary reconstructed with ellipses (\(m=n=2\)) and Lame curves.