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

started second section for building fem documentation

parent b0cb2c00
......@@ -144,4 +144,52 @@ This function \bas{rebuildFEM} can be very useful when you wish to change a sing
\end{lstlisting}
all parameters for \texttt{<basilid> = 140611}, \texttt{<basilid> = 140612} and \texttt{<basilid> = 140613} will be the same as before, except for the mesh seed size.\\
\noindent Note that each call to \bas{buildFEM} (and therefore to \bas{rebuildFEM}) will change the first line of \texttt{basil<basilid>\-\_modelparam.m\index{basil<basilid>\_modelparam.m@\texttt{basil<basilid>\_modelparam.m}}}. The \texttt{buildon}-information will have a new date and time.
\ No newline at end of file
\noindent Note that each call to \bas{buildFEM} (and therefore to \bas{rebuildFEM}) will change the first line of \texttt{basil<basilid>\-\_modelparam.m\index{basil<basilid>\_modelparam.m@\texttt{basil<basilid>\_modelparam.m}}}. The \texttt{buildon}-information will have a new date and time.
\section{Building the FEM}
When \bas{buildFEM} is called
\begin{lstlisting}[numbers=none]
>> bas_buildFEM([basilid1, basilid2, ... ], param)
\end{lstlisting}
the following files may be written in the current work directory for each \texttt{<basilid}$i$\texttt{>}:
\begin{center}
\begin{tabulary}{\linewidth}{l R}
\hline\noalign{\smallskip}
\texttt{file} & remarks\\
\noalign{\smallskip}\hline\noalign{\smallskip}
\texttt{basil<basilid>\_modelparam.m\index{basil<basilid>\_modelparam.m@\texttt{basil<basilid>\_modelparam.m}}} & see previous section, equal for each \texttt{<basilid}$i$\texttt{>}\\
\texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}} & main Abaqus python python script \\
\texttt{basil<basilid>\_meshContours.py\index{basil<basilid>\_meshContours.py@\texttt{basil<basilid>\_meshContours.py}}} & imported by \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}\\
\texttt{basil<basilid>\_castContours.py\index{basil<basilid>\_castContours.py@\texttt{basil<basilid>\_castContours.py}}} & when \texttt{param.cast = 1}\\
\texttt{basil<basilid>\_abaPlot.py\index{basil<basilid>\_abaPlot.py@\texttt{basil<basilid>\_abaPlot.py}}} & when \texttt{param.plot = 1}\\
\texttt{basil<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}} & when when \texttt{param.exec = 1} \& \texttt{param.inp = 1}\\
\texttt{basil<basilid>.cae\index{basil<basilid>.cae@\texttt{basil<basilid>.cae}}} & when when \texttt{param.exec = 1} \& \texttt{param.cae = 1}\\
\noalign{\smallskip}\hline
\end{tabulary}
\end{center}
The \texttt{inp}-file can be submitted to Abaqus for analysis:
\begin{lstlisting}[numbers=none, language=bash]
mark@telab11:~$ abaqus job=<jobid> input=basil<basilid>.inp
\end{lstlisting}
The \texttt{cae}-file can be opened with the Abaqus GUI. When this model is submitted for analysis from the GUI, the GUI will first write the \texttt{inp} file and then submits that \texttt{inp} file for analysis similar as above, from the GUI.
\subsection{Processing \texttt{param} options}
The function \bas{buildFEM} starts with some book-keeping. First the options in the parameter structure \texttt{param} are processed, and defaults substitued for missing values. When all necessary fields of \texttt{param} have been read or set, the first action of \bas{buildFEM} is to write the file \texttt{basil<basilid>\_model\-param.m\index{basil<basilid>\_modelparam.m@\texttt{basil<basilid>\_modelparam.m}}}.
All \texttt{<basilid}$i$\texttt{>} are processed with the same \texttt{param}-options, so this file is equal for each \texttt{<basilid}$i$\texttt{>} (except for the small differences in the \texttt{buildon}-time).
\subsection{Write mesh contours}
Before \bas{buildFEM} starts on the main Abaqus python script \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}, it first writes python commands for the contours that will determine the mesh geometry to a separate script \texttt{basil<basilid>\_meshContours.py\index{basil<basilid>\_meshContours.py@\texttt{basil<basilid>\_meshContours.py}}}. That script will later be imported into the main script.
In order to write the the mesh contours \bas{buildFEM} loads \texttt{Bone\_preload\_loading.txt\index{Bone\_preload\_loading.txt@\texttt{Bone\_preload\_loading.txt}}} to get the centre of mass of the tibia before indentation, and loads the segmented data before indentation \texttt{contour\_skin\_preload-ncc.mat\index{contour\_skin\_preload-ncc.mat@\texttt{contour\_skin\_preload-ncc.mat}}} and \texttt{contour\_bone\_preload-ncc.mat\index{contour\_bone\_preload-ncc.mat@\texttt{contour\_bone\_preload-ncc.mat}}}. These segmented contours are translated with the centre of mass of the tibia, and converted to circumferentially equidistant points (100 for the skin, 50 for the bone) with \bas{cylSurfPatch} and the \gibbon-function \gib{contourRegulariseAngle}.
The converted contours are then written to \texttt{basil<basilid>\_meshContours.py\index{basil<basilid>\_meshContours.py@\texttt{basil<basilid>\_meshContours.py}}} which contains 2 lines for each contour, e.g.:
\begin{lstlisting}[language=python, escapechar=!]
pts = [(-9.928135, 0.262538, -9.000000), (-9.863098, -0.045693, -9.000000), !\textnormal{(up to 100 or 50 triplets of coordinates)}!]
myPart.WireSpline(points=pts, mergeType=IMPRINT, meshable=ON, smoothClosedSpline=ON)
\end{lstlisting}
The first line
\ No newline at end of file
......@@ -16,6 +16,13 @@ And when you read the element volume from the Abaqus output, this volume is in m
\noindent See also section `1.2.2 Conventions' in the Abaqus Analysis User's Guide of the \adoc{} and the \href{http://furnace.wfw.wtb.tue.nl:2080/v6.14/books/popups/usb-tbl.html}{Conversion Tables, Constants, and Material Properties} provided by Abaqus.
\subsection{Frame of reference}
The $\vec{x}\vec{y}$-plane is the image plane of the MRI-scanner. The $\vec{z}$-direction is along the logitudinal direction of the rats leg (from knee to ankle).
The model is translated for Abaqus, such that the centre of mass of the tibia (before indentation) is at $(0, 0, 0)$. This centre of mass is determined from the segmented bone contours (e.g.\ section \ref{mapbone}).
\section{Large displacements and logarithmic strain}
The FE models are analysed with Abaqus' `Large Displacement' option for geometrically non-linear problems. As a result, Abaqus will output \textsl{logarithmic} strains `LE':
......@@ -24,9 +31,6 @@ The FE models are analysed with Abaqus' `Large Displacement' option for geometri
\end{equation}
When you use a hyperelastic material law (such as the Ogden material model that is used in BasilLab), Abaqus will also output the logarithmic strains `LE'. See section `1.2.2 Conventions' in the Abaqus Analysis User's Guide of the \adoc{}.
\subsection{Frame of reference}
The $\vec{x}\vec{y}$-plane is the image plane of the MRI-scanner. The $\vec{z}$-direction is along the logitudinal direction of the rats leg (from knee to ankle).
\section{Directory structure}\label{dirstruct}
......
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