Commit de4cc4eb authored by Mark van Turnhout's avatar Mark van Turnhout
Browse files

small documentation update

parent 71fce416
......@@ -178,21 +178,21 @@ The $3\times 3$ matrix (centres of mass, Euler angles) is written to \texttt{Bon
\subsection{Map indenter movement}\label{mapind}
The indenter movement is of course needed as boundary condition in the FEM. Mapping of the indenter comprises of three steps: (1) The function \bas{estCylPos} finds the 3D orientation and the centre of mass of the indenter with the help from \texttt{MRI\_slices\_loading.mat\index{MRI\_slices\_loading.mat@\texttt{MRI\_slices\_loading.mat}}} and \texttt{contour\_skin\_loading.mat\index{contour\_skin\_loading.mat@\texttt{contour\_skin\_loading.mat}}}; next (2) \bas{estIndDisp}{} uses \texttt{contour\_skin\_preload.mat\index{contour\_skin\_preload.mat@\texttt{contour\_skin\_preload.mat}}} to find the start position of the indenter (for the FEM); and finally (3) \bas{estIndDisp}{} uses \texttt{contour\_skin\_loading.mat\index{contour\_skin\_loading.mat@\texttt{contour\_skin\_loading.mat}}} to find the end position of the indenter.\\
The indenter movement is of course needed as boundary condition in the FEM. Mapping of the indenter comprises of three steps: (1) The function \bas{estCylPos} finds the 3D orientation and the centre of mass of the indenter with the help from \texttt{MRI\_slices\_loading.mat\index{MRI\_slices\_loading.mat@\texttt{MRI\_slices\_loading.mat}}} and \texttt{contour\_skin\_loading-ncc.mat\index{contour\_skin\_loading-ncc.mat@\texttt{contour\_skin\_loading-ncc.mat}}}; next (2) \bas{estIndDisp}{} uses \texttt{contour\_skin\_preload-ncc.mat\index{contour\_skin\_preload-ncc.mat@\texttt{contour\_skin\_preload-ncc.mat}}} to find the start position of the indenter (for the FEM); and finally (3) \bas{estIndDisp}{} uses \texttt{contour\_skin\_loading-ncc.mat\index{contour\_skin\_loading-ncc.mat@\texttt{contour\_skin\_loading.mat-ncc}}} to find the end position of the indenter.\\
\noindent First, we find the orientation of the indenter in the MRI-data during indentation. The skin contours during indentation are loaded from \texttt{contour\_skin\_loading.mat\index{contour\_skin\_loading.mat@\texttt{contour\_skin\_loading.mat}}} and used to dismiss voxel data that belongs to the soft tissue in the \texttt{MRI\_slices\_loading.mat\index{MRI\_slices\_loading.mat@\texttt{MRI\_slices\_loading.mat}}}-MR-data. We are left with the very bright indenter and some noise in these images and from these we can threshold the voxels that belong to the indenter. A call to \bas{getIndDir} gives us the eigenvectors of the mass moment of inertia of the indenter voxels, and the centre of mass of these voxels.
\noindent First, we find the orientation of the indenter in the MRI-data during indentation. The skin contours during indentation are loaded from \texttt{contour\_skin\_loading-ncc.mat\index{contour\_skin\_loading-ncc.mat@\texttt{contour\_skin\_loading-ncc.mat}}} and used to dismiss voxel data that belongs to the soft tissue in the \texttt{MRI\_slices\_loading.mat\index{MRI\_slices\_loading.mat@\texttt{MRI\_slices\_loading.mat}}}-MR-data. We are left with the very bright indenter and some noise in these images and from these we can threshold the voxels that belong to the indenter. A call to \bas{getIndDir} gives us the eigenvectors of the mass moment of inertia of the indenter voxels, and the centre of mass of these voxels.
We use the eigenvector that is closest to the image $\vec{x}\vec{y}$-plane as the (main) orientation of the indenter. This orientation vector $\vec{v}$ is transformed to a rotation matrix $\mat{R}$ by the \gibbon-script \gib{vecAngle2Rot} such that
\begin{equation}
\vec{v}^\text{T} = \begin{bmatrix} 0& 0& 1\end{bmatrix}\cdot \mat{R}^\text{T}
\end{equation}
A first estimate of the indenter tip position during indentation is calculated from the centre of mass and the indenter orientation. The results are written to disk as a $4\times 3$ matrix in \basilhome\texttt{/<basilid>}\texttt{/Indenter\_tipNR.txt}. The first row of this matrix contains the estimate of the indenter tip position $[x y z]$ (in mm), and the second to last rows are the $3 \times 3$ rotation matrix $\mat{R}$ from \gib{vecAngle2Rot}.\\
A first estimate of the indenter tip position during indentation is calculated from the centre of mass and the indenter orientation. The results are written to disk as a $4\times 3$ matrix in \basilhome\texttt{/<basilid>}\texttt{/Indenter\_tipNR.txt\index{Indenter\_tipNR.txt@\texttt{Indenter\_tipNR.txt}}}. The first row of this matrix contains the estimate of the indenter tip position $[x y z]$ (in mm), and the second to last rows are the $3 \times 3$ rotation matrix $\mat{R}$ from \gib{vecAngle2Rot}.\\
\noindent Next, in \bas{estIndDisp} we use the skin contours before indentation \texttt{contour\_skin\_preload.mat\index{contour\_skin\_preload.mat@\texttt{contour\_skin\_preload.mat}}} and the indenter orientation and tip position from \bas{estCylPos} to find the start position of the indenter for the FEM: the indenter is moved `backwards' along its (main) orientation until the indenter tip is 1 mm outside the undeformed skin contours. \\
\noindent Next, in \bas{estIndDisp} we use the skin contours before indentation \texttt{contour\_skin\_preload-ncc.mat\index{contour\_skin\_preload-ncc.mat@\texttt{contour\_skin\_preload-ncc.mat}}} and the indenter orientation and tip position from \bas{estCylPos} to find the start position of the indenter for the FEM: the indenter is moved `backwards' along its (main) orientation until the indenter tip is 1 mm outside the undeformed skin contours. \\
\noindent Finally, we use the skin contours during indentation \texttt{contour\_skin\_loading.mat\index{contour\_skin\_loading.mat@\texttt{contour\_skin\_loading.mat}}} and the indenter orientation and tip position from \bas{estCylPos} to find the end position of the indenter. The indenter is moved along its (main) orientation until the indenter tip starts to penetrate the (deformed) skin contours. This is a minimalisation problem that uses \bas{estIndEnd} as anonymous function to minimize.\\
\noindent Finally, we use the skin contours during indentation \texttt{contour\_skin\_loading-ncc.mat\index{contour\_skin\_loading-ncc.mat@\texttt{contour\_skin\_loading-ncc.mat}}} and the indenter orientation and tip position from \bas{estCylPos} to find the end position of the indenter. The indenter is moved along its (main) orientation until the indenter tip starts to penetrate the (deformed) skin contours. This is a minimalisation problem that uses \bas{estIndEnd} as anonymous function to minimize.\\
\noindent The results of \bas{estIndDisp} are written to \basilhome\texttt{/<basilid>}\texttt{/Indenter\_StartEnd.txt} in a $2 \times 3$ matrix. The first row contains the coordinates of the indenter tip $[x y z]$ (in mm) before indentation, the second row contains the coordinates of the indenter tip during indentation.
\noindent The results of \bas{estIndDisp} are written to \basilhome\texttt{/<basilid>}\texttt{/Indenter\_StartEnd.txt\index{Indenter\_StartEnd.txt@\texttt{Indenter\_StartEnd.txt}}} in a $2 \times 3$ matrix. The first row contains the coordinates of the indenter tip $[x y z]$ (in mm) before indentation, the second row contains the coordinates of the indenter tip during indentation.
\subsection{Putting it all together: \bas{prepFEM}}
......@@ -229,6 +229,7 @@ file in \basilhome\texttt{/<basilid>/}& written by & needed for \\
\texttt{Bone\_preload\_loading.txt\index{Bone\_preload\_loading.txt@\texttt{Bone\_preload\_loading.txt}}} & \bas{mapBone} & \bas{buildFEM}\\
\texttt{Bone\_preload\_postload.txt\index{Bone\_preload\_postload.txt@\texttt{Bone\_preload\_postload.txt}}} & \bas{mapBone} & post-processing\\
\texttt{Indenter\_tipNR.txt\index{Indenter\_tipNR.txt@\texttt{Indenter\_tipNR.txt}}} & \bas{estCylPos} & \bas{estIndDisp}, \bas{buildFEM}\\
\texttt{Indenter\_Lc.mat\index{Indenter\_Lc.mat@\texttt{Indenter\_Lc.mat}}} & \bas{estCylPos} & backward compatibility\\
\texttt{Indenter\_StartEnd.txt\index{Indenter\_StartEnd.txt@\texttt{Indenter\_StartEnd.txt}}} & \bas{indDisp} & \bas{buildFEM}\\
\noalign{\smallskip}\hline
\end{tabulary}
......@@ -242,16 +243,29 @@ The FEM building process is described in detail in the next chapter. Briefly, we
\end{lstlisting}
where \texttt{param} is a structure with modelling options (see chapter \ref{buildFEM}).
The (main) output of \bas{buildFEM} is the python script \texttt{basil<basilid>\_job.py}, and the FEM can be build by calling Abaqus with
The (main) output of \bas{buildFEM} is the python script \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}, and the FEM can be build by calling Abaqus with
\begin{lstlisting}[numbers=none, language=bash]
mark@telab11:~$ abaqus cae noGUI=basil<basilid>_job.py
\end{lstlisting}
The (Abaqus) output will be the input-file that Abaqus needs to run the model (again: in the \textsl{working directory}): \texttt{basil<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}}
\section{Running the FE model}
\section{Running the FE model}
The \texttt{basil<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}} file can be submitted to Abaqus to run the job\footnote{With \texttt{<jobid>}, you tell Abaqus to write the results of the simulation to \texttt{<jobid>.odb}. In this manual, it is assumed that \texttt{basil<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}} gets \texttt{<jobid> = basil<basilid>} and that the results are written to \texttt{basil<basilid>.odb\index{basil<basilid>.odb@\texttt{basil<basilid>.odb}}}.}:
\begin{lstlisting}[numbers=none, language=bash]
mark@telab11:~$ abaqus job=<jobid> input=basil<basilid>.inp
\end{lstlisting}
The Abaqus input file \texttt{basil<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}} is human readable but visually not very pleasing. With \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}, you can ask Abaqus to (also) write \texttt{basil<basilid>.cae\index{basil<basilid>.cae@\texttt{basil<basilid>.cae}}} which can be opened with the Abaqus pre-processing GUI. Then you can have a look at the model, and run the model from the Abaqus GUI.
Abaqus writes the FEM results to a (binary) file \texttt{basil<basilid>.odb\index{basil<basilid>.odb@\texttt{basil<basilid>.odb}}} (\texttt{odb} = output database).
\section{Post-processing of FE results}
BasilLab does not provide any post-processing functionality beyond conversion of a selection of parameters from the (binary) Abaqus output database \texttt{basil<basilid>.odb\index{basil<basilid>.odb@\texttt{basil<basilid>.odb}}} to human and Matlab readable text-files; and some basic plotting of the FEM results.
\subsection{Extracting data from the \texttt{odb}-file}
\subsection{Basic plotting of FEM results}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment