\chapter{Static Axisymmetric Rod}
\label{cha:simulation}

see appendix~\ref{apx:pub4}



\chapter{Rotating 3D Crankshaft}

\section{Geometry}

A \acrshort{cad} model of a forged 6 cylinder diesel crankshaft was provided by the manufacturer.
The geometry was then cut at the first and second main bearings so reduce the simulated domain to the first rod bearing including its counterweights. 



\begin{figure}[htbp]
    \centering
    \includegraphics[width=\linewidth]{Abbildungen/crankshaft_b6.png}
    \caption{Sideview of full geometry with the modeled region highlighted in red.}\label{fig:xcad-crankshaft-1}
\end{figure}


% \begin{figure}[htbp]
%     \centering
%     \includegraphics[width=0.5\linewidth]{example-image}
%     \caption{CAD model of the inductor.}\label{fig:cad-inductor}
% \end{figure}

A \acrshort{cad} model of the inductor was created from a technical drawing and incorporated into the global mesh.
Its geometry was simplified by cutting the plumbing leading up to the horse shoe induction coil and replacing it with straight radial tubing.
The mesh was generated by our partners at the \acrshort{ecs}, with the following key properties:
The bearing's surface element size was \qty{0}{\mm}??, growing fo a coarser \qty{0}{\mm}?? after 5 mm depth, with the webbing and rest od the crankshaft set to an element size  of \qty{0}{\mm}??.
The inductor was sized to \qty{0}{\mm}?? at the field-generating portion and above that was replaced with radial struts meshed to \qty{0}{\mm}??.
The air was set to \qty{0}{\mm}?? in the gap between the bearing and the inductor, growing to \qty{0}{\mm}?? at the model boundary.
Figure~\ref{fig:crank-sim-inductor-net} shows the bulk of these portions in a cutaway, with the inductor and bearing surface shown in red to highlight their grouping for rotation.

\begin{figure}[htbp]
    \centering
    \includegraphics[width=0.85\linewidth]{Abbildungen/Draufsicht_overlay.png}
    \caption[Front view of rotating inductor and surface sections.]{Front view of rotating inductor and surface sections, highlighted in red.}\label{fig:crank-sim-inductor-net}
\end{figure}  

\subsection{Rotational movement}

Movement in simulations is accompanied by remapping and remeshing operations that are usually handled by the simulation suit between timesteps.
Since this model relied on externally managed time-stepping, the relative rotational movement of the inductor around the bearing surface was handled externally as well.
A simple rotational algorithm was implemented that would move move a defined group of nodes by a set number of positions along a regular mesh and reconstruct interface elements that were sheared in the process. 

\begin{figure}[htbp]
    \centering
    \subfloat[Initial state]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotation_scheme1.png}}\\
    \subfloat[Interface layer of elements is skewed by movement. The nodes move by one position.]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotation_scheme2.png}}\\
    \subfloat[Initial state is recreated by reknitting the elements with the now present nodes.]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotation_scheme3.png}}\\
    \caption[Scheme of partial remeshing for relative movement.]{Scheme of partial remeshing for relative movement between two groups of nodes.}\label{fig:rotation-scheme}
\end{figure}

\begin{figure}[htbp]
    \centering
    \begin{tabular}{cc}
        \subfloat[Cylinder of air surrounding the model]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotator_markiert.png}} &
        \subfloat[rotating cylinder containing the inductor.]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotator_geschnitten.png}} \\
        \subfloat[Actual geometry]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotator_ohneluft.png}} & 
        \subfloat[Cutaway to show rotating surface region.]{\includegraphics[width=0.45\linewidth]{Abbildungen/rotator_ohneluft_cut.png}} 
    \end{tabular}
    \caption[Division of the model into stationary and rotating sections.]{Division of the model into stationary and rotating sections, the latter highlighted in red.}\label{fig:crank-sim-model}
\end{figure}

Figure~\ref{fig:rotation-scheme} shows the steps for a translational example.
For the rotational movement of the inductor, a  circular air segment  was defines with a regular intersection of elements every degree, as shown in figure~\ref{fig:crank-sim-model}.
This subset of the model included a portion of the surface of the crankshaft, to allow for coarser meshing outside the magnetic field of the inductor.
Figure~\ref{fig:crank-sim-inductor-net} shows the circular that the air mesh was centered around  the crank bearing and sized to barely include the counter-weighted webs since they would experience close to no electromagnetic field.

\subsubsection{Mesh Import}
With the model mesh being externally generated for each step through the above algorithm, automated importing of meshes and models became an issue:
\emph{Abaqus} does not support the import of all Keywords, especially among those used for EM simulation.
There fore a master configuration file was created for the process which would provide the basis of all model data to be added to the imported mesh file, an example of which is given in listing~\ref{lst:import-config}. 

\paragraph{Input File}
must include {\ttfamily*PART} and {\ttfamily*ASSEMBLY} keywords, as well as all necessary Sets and Surfaces.
Section and material allocation, boundary conditions, and coordinate systems are optional, and can be appended via the configuration file.
Step information mut not be included.

\paragraph{Configuration File}
contains the Instance and Part definitions, a Set that includes all nodes, a reference to the file containing the magnetic material definition, as well as information on the  symmetry of the system.
For electromagnetic sub models, the non-linear magnetic material must be explicitly defined for the Labridis algorithm.
Additionally, further model parameters are defined, such as Boundary Conditions, Steps, and Output Requests.

\paragraph{Control File}  
lists a table of references to individual models and in which order to execute them:
\begin{center}
    \ttfamily
    \begin{tabular}{llll}
        \textbf{\#number} & \textbf{electromagnetic} & \textbf{thermal} & \textbf{mechanical} \\
        100 &  crank\_induction & crank\_heating \\
        1 & -- & crank\_quench \\
        -- & -- & -- & crank\_stress
    \end{tabular}
\end{center}

The first line is a comment and serves legibility.
The following lines list models to import, along with the number of repetitions for time stepping.
The line {\ttfamily 100  crank\_induction  crank\_heating} describes an electromagnetic calculation followed by a thermal calculation whose time step duration is defined in the file {\ttfamily crank\_heating.toml}, and these two calculations are repeated 100 times, with the electromagnetic model always taking its thermal boundary condition from the preceding thermal result.

The stress analysis calculation requires no number, is always expected at the final position, and takes all preceding thermal results as boundary condition for their own calculation time step.


\lstset{numbers=left,
  inputencoding=latin1,
  basicstyle=\scriptsize\ttfamily,
  keywordstyle=\color{blue},         
  breaklines=true, 
  showtabs=false,
  showstringspaces=false,
  numberstyle=\tiny
}

\begin{lstlisting}[float, caption=model specific TOML config file for electromagnetic simulation, captionpos=b, label=lst:import-config]
part = "EDDYCURRENT"
instance = "EDDYCURRENT-1"
workpiece = "SET-ROD"
symmetry = 72

[ sections.Section-Rod ]
    type = "HomogeneousSolidSection"
    region = "SET-ROD"
    material = "Material-Rod"

[ materials ]
    Material-Rod = '../mat/50CrMo4'

[ referenced.rootAssembly.CSYS-CYLINDRICAL ]
    type = "DatumCsysByThreePoints"
    coordSysType = "abc.CYLINDRICAL"
    origin = [0.0, 0.0, 0.0]
    point1 = [1.0, 0.0, 0.0]
    point2 = [1.0, 0.0, -1.0]

[ bcs ]
    [ bcs.BC-Film-Air ]
        type = "FilmCondition"
        surface = "EDDYCURRENT-1.SURF-BC-MANTLE"
        filmCoeff = 20
        sinkTemperature = 25
        definition = "abc.EMBEDDED_COEFF"

    [ bcs.BC-Rad-Out ]
        type = "RadiationToAmbient"
        surface = "EDDYCURRENT-1.SURF-BC-MANTLE"
        emissivity = 0.9
        ambientTemperature = 25

    [ bcs.PreField-T]
        type = "Temperature"
        createStepName = "Initial"
        region = "EDDYCURRENT-1.SET-ROD"
        distributionType = "abc.UNIFORM"
        interpolate = "abc.ON"
        magnitudes = 25

[ steps.Step-1 ]
    type = "HeatTransferStep"
    previous = "Initial"
    response = "abc.TRANSIENT"
    timePeriod = 0.25
    timeIncrementationMethod = "abc.AUTOMATIC"
    maxNumInc = 10000
    initialInc = 0.0125
    minInc = 2.5e-6
    maxInc = 0.025
    deltmx = 20

[ outputrequests.FieldOutput-1 ]
    type = "FieldOutputRequest"
    createStepName = "Step-1"
    variables = ["TEMP", "HBF", "COORD", "NT", "EVOL", "SDV"]

\end{lstlisting}

\section{Abort due to calculation time}

The calculation of a single electromagnetic iteration step on the \acrshort{mcl} workstation server amounts to \qty{\sim 3.6}{\hour}. 
The process is made up of \num{5.5} revolutions of the crankshaft at a coarse increment of \ang{10} per time step, which sum up to \num{195} individual thermal simulations. 
The average amount of iteration steps required until the Labridis algorithm converges was observed to lie at \num{\sim 15}.

Thus the estimated time to completion for just the electromagnetic portion of the rotational model amounts to 438 days.

A majority of this time is spent on overhead due to repeated restarts of the \emph{Abaqus} solver, and the electromagnetic itself is made inefficient due to the solver not making use of more than a single processing core.
(For larger models the bulk of said overhead is spent on pre-processing; for smaller models the loading of the \emph{Abaqus CAE} software and license acquisition dominate proportionately.)

{\color{red}Based on the general lack of support for electromagnetic calculations (absent EM user subroutines, single core solving), \emph{Abaqus CAE} is not suitable for large induction models!??}

\section{Alternative Calculation Scheme}

To achieve a timely simulation result with which to approximate the residual stress distribution, the process model was simplified to a weakly coupled thermo-mechanical system.

The mechanical mesh of the full rotational calculation scheme was used as a base.
A thermal simulation of the heating was executed with a simplified heating curve (see figure~\ref{fig:thermal-approx-curve}) applied to the entire bearing surface and some of the webs, as observed in Publication~\ref{apx:pub2}.
Figure~\ref{fig:kw-thermal-heating} shows the estimated superposition of the inductors rotational heat.

A {\ttfamily*VISCO} calculation then takes that thermal result as a volumetric temperature boundary condition for the material model and stress evolution.

\begin{figure}[htbp]
    \centering
    \includegraphics[width=7cm]{Abbildungen/approx_temp_curve.png}
    \caption[Simplified temperature curve.]{Simplified temperature curve applied to the whole area marked in figure~\ref{fig:kw-thermal-heating}}\label{fig:thermal-approx-curve}
\end{figure}  

\begin{figure}[htbp]
    \centering
    \includegraphics[height=7cm]{Abbildungen/KW_therm_heating.png}
    \caption[Heated surface mesh of the crankshaft.]{Heated surface mesh of the crankshaft as interpreted from the cross sections in figure~\ref{fig:hardness-samples} and appendix~\ref{apx:pub2}.}\label{fig:kw-thermal-heating}
\end{figure}


\section{Results}

The results obtained by the thermal approximation were 


\begin{figure}[p]
    \centering
    \begin{tabular}{cc}
        \subfloat[Radial Stresses after heating]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-heating-S-Rad.png}} &  
        \subfloat[Radial Stresses after quenching]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-aircool-S-Rad.png}} \\
        \subfloat[Tangential Stresses after heating]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-heating-S-Tan.png}} &  
        \subfloat[Tangential Stresses after quenching]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-aircool-S-Tan.png}} \\
        \subfloat[Axial Stresses after heating]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-heating-S-Axi.png}} &  
        \subfloat[Axial Stresses after quenching]{\includegraphics[width = 0.45\linewidth]{Abbildungen/kw-th-aircool-S-Axi.png}}
    \end{tabular}
    \caption[Stress component distribuiton of crankshaft.]{Sectional views of stress component distributions before and after quenching. It must be noted that the image scales of \textbf{(a)}, \textbf{(c)},and \textbf{(e)} are equalized but reduced by a factor 3 to those of \textbf{(b)}, \textbf{(d)}, and \textbf{(f)}.}\label{fig:plate-stress-distro}
\end{figure}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=\linewidth]{Abbildungen/kw_th_time_data_heat_axi.png}
    \caption{Evolution of axial strain components and stresses during heating.}\label{fig:time_data_ax_h}
\end{figure}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=\linewidth]{Abbildungen/kw_th_time_data_heat_tan.png}
    \caption{Evolution of tangential strain components and stresses during heating.}\label{fig:time_data_tan_h}
\end{figure}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=\linewidth]{Abbildungen/kw_th_time_data_quench_axi.png}
    \caption{Evolution of axial strain components and stresses during quenching.}\label{fig:time_data_ax_q}
\end{figure}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=\linewidth]{Abbildungen/kw_th_time_data_quench_tan.png}
    \caption{Evolution of tangential strain components and stresses during quenching.}\label{fig:time_data_tan_q}
\end{figure}





\section{Validation}

\begin{figure}[thbp]
    \centering
    \subfloat[full Mechanical Mesh]{\includegraphics[width=0.4\linewidth]{Abbildungen/KW_mech_full.png}} \quad\quad
    \subfloat[Free-cut Sample plate Mesh]{\includegraphics[width=0.4\linewidth]{Abbildungen/KW_mech_cut.png}}
    
    \caption{Meshes of the two steps during the free-cutting simulation.}\label{fig:hexrd-sample-cut-sim}
\end{figure}



\begin{figure}[thbp]
    \centering
    \includegraphics[width=0.75\linewidth]{Abbildungen/kw-th-cut-S-Rad_vgl.png}
    \caption[Comparison of radial stresses before and after cutting plates.]{Comparison of radial stresses before \textbf{(left)} and after \textbf{(right)} cutting the sample plate.}\label{fig:plate_cut_stress_rad}
\end{figure}


\begin{figure}[thbp]
    \centering
    \includegraphics[width=0.75\linewidth]{Abbildungen/kw-th-cut-S-Tan_vgl.png}
    \caption[Comparison of tangential stresses before and after cutting plates.]{Comparison of tangential stresses before \textbf{(left)} and after \textbf{(right)} cutting the sample plate.}\label{fig:plate_cut_stress_tan}
\end{figure}


\begin{figure}[thbp]
    \centering
    \includegraphics[width=0.75\linewidth]{Abbildungen/kw-th-cut-S-Axi_vgl.png}
    \caption[Comparison of axial stresses before and after cutting plates.]{Comparison of axial stresses before \textbf{(left)} and after \textbf{(right)} cutting the sample plate.}\label{fig:plate_cut_stress_ax}
\end{figure}

\begin{figure}[thbp]
    \centering
    \begin{tabular}{lr}
    \subfloat[Disk 1 - Radial]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk1-S-Rad-vgl.png}} & 
    \subfloat[Disk 2 - Radial]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk2-S-Rad-vgl.png}} \\
    \subfloat[Disk 1 - Tangential]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk1-S-Tan-vgl.png}} &
    \subfloat[Disk 2 - Tangential]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk2-S-Tan-vgl.png}} \\
    \subfloat[Disk 1 - Axial]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk1-S-Axi-vgl.png}} &
    \subfloat[Disk 2 - Axial]{\includegraphics[width=0.49\linewidth]{Abbildungen/kw-th-disk2-S-Axi-vgl.png}} \\
    \end{tabular}
    \caption[Comparison of stresses before and after cutting disks.]{Comparison of stresses before \textbf{(left)} and after \textbf{(right)} cutting sample disks.}\label{fig:disk_cut_stress}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=0.6\linewidth]{Abbildungen/kw_th_vgl_rad.png}
    \caption[Comparison of radial stresses between HEXRD and simulation.]{Comparison of radial stresses measured by HEXRD \textbf{(left)} and calculated by \textit{Abaqus} \textbf{(right)}. }\label{fig:plate_stress_comp_rad}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=0.6\linewidth]{Abbildungen/kw_th_vgl_axi.png}
    \caption[Comparison of axial stresses between HEXRD and simulation.]{Comparison of axial stresses measured by HEXRD \textbf{(left)} and calculated by \textit{Abaqus} \textbf{(right)}. }\label{fig:plate_stress_comp_ax}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=0.6\linewidth]{Abbildungen/kw_th_vgl_tau.png}
    \caption[Comparison of shear stresses between HEXRD and simulation.]{Comparison of shear stresses measured by HEXRD \textbf{(left)} and calculated by \textit{Abaqus} \textbf{(right)}. }\label{fig:plate_stress_comp_tau}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=0.6\linewidth]{Abbildungen/kw_th_vgl_delta-s.png}
    \caption[Comparison of differential stresses between HEXRD and simulation.]{Comparison of the differential stress $\sigma_{axi} - \sigma_{rad}$ along line \textbf{V} as measured by HEXRD \textbf{(red)} and calculated by \textit{Abaqus} \textbf{(blue)}. }\label{fig:plate_stress_comp_delta}
\end{figure}
