### started buildfem documentation

parent faea2f28
 function nu = bas_D2nu(mu,D) function nu = bas_D2nu(mu, D) % % nu = bas_D2nu(mu,D) % nu = bas_D2nu(mu, D) % % Converts a the parameter D as expected by abaqus for an Ogden material % model to the Poisson ratio nu, based on the Ogden stiffness mu. ... ...
 function D = bas_nu2D(mu,nu) function D = bas_nu2D(mu, nu) % % D = bas_nu2D(mu,nu) % D = bas_nu2D(mu, nu) % % Converts a material's Poisson ratio nu to the parameter D as expected by % abaqus for an Ogden material model based on the Ogden stiffness mu. ... ...
 % !TeX root = BasilLab.tex \begin{savequote} In the computer model, all the microfilaments were given certain quantitative properties with names that mean something to physicists: a viscous damping coefficient' and an elastic spring constant'. Never mind exactly what these mean: they are the kind of things physicists like to measure in a spring. \qauthor{Richard Dawkins \cite{Dawkins2009}} \end{savequote} \chapter{Building the FEM}\label{buildfem} In this chapter we discuss the core of BasilLab: \bas{buildFEM} and its ouput \texttt{basil\_job.py\index{basil\_job.py@\texttt{basil\_job.py}}}. \section{Building parameters} The function \bas{buildFEM} accepts a number of parameters that are provided in a structure as an argument to \bas{buildFEM} (section \ref{buildmodel}). When parameters are omitted, defaults are provided (table \ref{buildfemoptions}). \begin{table}[p!] \center \caption{Options for \bas{buildFEM}. \textbf{Bold} values are the \textbf{defaults} when the argument is omitted. The default value for \texttt{basilhome} is read from \bas{getDataRoot}.}\label{buildfemoptions}\small \begin{tabulary}{\linewidth}{l c l R} \hline\noalign{\smallskip} \texttt{param.} & value & type & description\\ \noalign{\smallskip}\hline\noalign{\smallskip} \texttt{basilhome} & \textbf{default} & string & directory where the modelling data will be sought in the subdirectory \texttt{}\\\hline\noalign{\smallskip} \texttt{seed} & \textbf{1} & float & value for Abaqus to seed' the model before meshing; determines the global element size\\\hline\noalign{\smallskip} \texttt{elOrder} & 1 & integer & use linear elements \\ & \textbf{2} && \textbf{use quadratic elements}\\ \hline\noalign{\smallskip} \texttt{ri} & \textbf{1.5} & float & indenter radius\\ \hline\noalign{\smallskip} \texttt{numCpus} & \textbf{4} & integer & number of CPU's that Abaqus will use during the simulation; will only have an effect when \texttt{submit = 1}\\ \hline\noalign{\smallskip} \texttt{numDomains} & \textbf{4} & integer & number of domains that Abaqus will use during the simulation; will only have an effect when \texttt{submit = 1}\\ \hline\noalign{\smallskip} \texttt{timePeriod} & \textbf{100} & float & duration (in seconds) for the indentation step for Abaqus\\ \hline\noalign{\smallskip} \texttt{maxNumInc} & \textbf{1e6} & integer & maximum number of iterations in the indentation step for Abaqus\\ \hline\noalign{\smallskip} \texttt{initialInc} & \textbf{1} & float & time used for the first attempt in the first increment in the indentation step for Abaqus\\ \hline\noalign{\smallskip} \texttt{minInc} & \textbf{1e-6} & float & minimum increment time; Abaqus will abort when the required increment time in the indentation step becomes smaller than this value\\ \hline\noalign{\smallskip} \texttt{cast} & 0 & integer & do not model the alginate cast around the leg\\ & \textbf{1} & & \textbf{model the alginate cast around the leg}\\ \hline\noalign{\smallskip} \texttt{submit} & \textbf{0} & integer & \textbf{do not run the simulation when the FEM has been build} \\ & 1 & & run the simulation when the FEM has been build\\ \hline\noalign{\smallskip} \texttt{plot} & \textbf{0} & integer & \textbf{do not write a python script to extract a plot from the \texttt{odb}-file} \\ & 1 & & write a python script to extract a plot from the \texttt{odb}-file\\ \hline\noalign{\smallskip} \texttt{fixBone} & \textbf{0} & integer & \textbf{model tibia movement in the indentation step} \\ & 1 & & tibia does not move or rotate in the simulation\\ \hline\noalign{\smallskip} \texttt{discon} & \textbf{0} & integer & \textbf{do not use Abaqus' discontinuous' option for the simulation} \\ & 1 & & use Abaqus' discontinuous' option for the simulation \\ \hline\noalign{\smallskip} \texttt{inp} & 0 & integer & do not write the Abaqus input file \\ & \textbf{1} & & \textbf{write the Abaqus input file} \\ \hline\noalign{\smallskip} \texttt{cae} & \textbf{0} & integer & \textbf{do not write the Abaqus cae file} \\ & 1 & & write the Abaqus cae file \\ \hline\noalign{\smallskip} \texttt{Ogden} & \textbf{[0.0156, 21.4, 60]} & row & \textbf{Ogden material parameters for the soft tissue} (see section \ref{ogden}) \\ \hline\noalign{\smallskip} \texttt{exec} & 0 & integer & do not submit the model python script to Abaqus\\ & \textbf{1} & & \textbf{submit the model python script to Abaqus} \\ \hline\noalign{\smallskip} \texttt{odbT} & \textbf{5} & integer & period that Abaqus uses to write simulation results to the \texttt{odb}-file in the indentation step\\ \hline\noalign{\smallskip} \texttt{indOff} & \textbf{0} & float & move indenter an extra \texttt{indOff} mm from the skin before the simulation\\ \noalign{\smallskip}\hline \end{tabulary} \end{table} \subsection{Step parameters} The model consists of four separate modelling steps. The first three steps each last 1\,second and are used to apply the tibia rotation in the FEM. The fourth step is the actual indentation step: in this step both the indentation and tibia displacement (after rotation) are applied. The parameters that e.g.\ affect step size and incrementation (such as \texttt{timePeriod} and \texttt{maxNumInc}) only apply to this last indentation step. The total simulation time' of the model is therefore $3+\text{\texttt{timePeriod}}$\,seconds. \subsection{Ogden material parameters}\label{ogden} Abaqus requires three parameters for the Ogden material law: a stiffness parameter $\mu_0$, a non-linearity parameters $\alpha$, and a parameter $D$ that describes the initial bulk modulus (see section 4.6.1 Hyperelastic material behavior' in the Abaqus Theory Manual of the \adoc{}). The parameter $D$ is a measure for the compressibility of the material, and is related to the initial bulk modulus $K_0$ according to: \begin{equation} K_0 = \frac{2}{D} \end{equation} The Poisson's ratio $\nu$ can be calculated from $\mu_0$ and $K_0$ with (see section 22.5.1 Hyperelastic behavior of rubberlike materials' in the Abaqus Analysis User's Manual of the \adoc{}): \begin{equation} \nu = \frac{3\frac{K_0}{\mu_0}-2}{6\frac{K_0}{\mu_0}+2} \end{equation} BasilLab provides the function \bas{D2nu} to calculate the Poisson's ratio $\nu$ from $\mu_0$ and $D$, and the function \bas{nu2D} to calculate $D$ from $\mu_0$ and a Poisson's ratio $\nu$: \begin{lstlisting}[numbers=none] >> nu = bas_D2nu(0.0156, 60) nu = 0.2976 >> D = bas_nu2D(0.0156, nu) D = 60.0000 \end{lstlisting} Thus, the default material parameters in \bas{buildFEM} use a Poisson's ratio of 0.3 (steel).\\ \noindent The material parameter option \texttt{Ogden} for \bas{buildFEM} accepts a three element input, or a four element input. The three element input should have the format [$\mu_0$, $\alpha$, $D$]. With the four element input, you can supply the Poisson's ratio explicitly in the fourth value, i.e.\ the format becomes [$\mu_0$, $\alpha$, 0, $\nu$]. In this case, \bas{buildFEM} will call \bas{nu2D} with $\mu_0$ and $\nu$, and the third value in the input will be overwritten with the calculated parameter $D$. Thus, the options $\text{\texttt{Ogden}} = \begin{bmatrix}0.0156, & 21.4, & 60\end{bmatrix}$ and $\text{\texttt{Ogden}}= \begin{bmatrix}0.0156, & 21.4, & 0, & 0.2976\end{bmatrix}$ are equivalent. \section{The \texttt{odbT} parameter} By default, Abaqus writes simulation results to the \texttt{odb}-file for every (successful) increment. To reduce the size of the \texttt{odb}-file \ No newline at end of file