Commit 313c64c1 authored by matecellab's avatar matecellab
Browse files

first rough manual draft finished

parent 8f3e0144
......@@ -586,7 +586,7 @@ for b = 1:numel(basil)
fprintf(fid,'myModel.steps[''step-4''].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)\n');
if param.discon == 1
fprintf(fid,'myModel.steps[''step-4''].control.setValues(allowPropagation=OFF, resetDefaultValues=OFF, discontinuous=ON, lineSearch=(5.0, 1.0, 0.0001, 0.25, 0.1))\n',basil(b));
fprintf(fid,'myModel.steps[''step-4''].control.setValues(allowPropagation=OFF, resetDefaultValues=OFF, discontinuous=ON, lineSearch=(5.0, 1.0, 0.0001, 0.25, 0.1))\n');
end
% job
......
......@@ -88,7 +88,7 @@
\Huge{\textbf{BasilLab User Manual }}\\
\mbox{}\\
\vfill
%\includegraphics[width = 0.9\linewidth]{the_mother_of_all_suspicious_files.png}\\ \smallskip
\includegraphics[width = 0.9\linewidth]{the_mother_of_all_suspicious_files.png}\\ \smallskip
\hfill\href{https://xkcd.com/1247/}{\normalsize https://xkcd.com/1247/}\\
\vfill
\mbox{}\\
......
e% !TeX root = BasilLab.tex
% !TeX root = BasilLab.tex
\begin{savequote}
I can't be as confident about computer science as I can about biology. Biology easily has 500\,years of exciting problems to work on. It's at that level.
\qauthor{Donald Knuth, Computer Literacy Bookshops Interview (1993)}
\end{savequote}
\chapter{\bas{buildFEM}}\label{buildfem}
In this chapter we discuss the core of BasilLab: \bas{buildFEM} and its ouput \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}.
In this chapter we discuss the core of BasilLab: \bas{buildFEM} and its output \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}}.
\section{Building parameters}
......@@ -734,18 +734,52 @@ myModel.StaticStep(name='step-4', previous='step-3', description='indent basil14
myModel.boundaryConditions['rotateBone'].setValuesInStep(stepName='step-4', vr1=0)
myModel.boundaryConditions['moveBone'].setValuesInStep(stepName='step-4', u1=0.117971, u2=0.073269, u3=0.000000)
myModel.boundaryConditions['moveIndenter'].setValuesInStep(stepName='step-4', u1=1.259584, u2=4.022614, u3=0.638464)
\end{lstlisting}
In the initial step, we fix the rotations of the indenter (line \texttt{311}) and any movement of the cast (if applicable, lines \texttt{313--314}).
In the first analysis step (lines \texttt{315--319}), we first prohibit translations of the indenter (line \texttt{317}) and tibia (line \texttt{318}). These zero values for translations will be propagated throughout the following steps, until we will change them in the fourth (last) analysis step. In this first step, we only rotate the tibia over the $z$-axis (line \texttt{319}). Note that the tibia rotations are prescribed as rotation \textsl{velocities}. So when the duration of the step is changed, these velocities will also have to change.
In the second analysis step, rotation velocity over the $z$-axis is (re)set to zero, and we rotate the tibia over the $y$-axis (line \texttt{322}). Similarly, in the third analysis step the rotation velocity over the $y$-axis is (re)set to zero, and we rotate the tibia over the $x$-axis (line \texttt{325}).
The fourth analysis step is used to translate the tibia (which now has the `deformed' orientation) and to actually indent the leg. First we (re)set the tibia rotation velocity over the $x$-axis to zero (line \texttt{328}), and next we prescribe the tibia (line \texttt{329}) and indenter (line \texttt{330}). Note that \texttt{param}-parameters for \bas{buildFEM} for the step duration and -incrementation only affect this last (indentation) step.\\
\noindent Finally, we use the step-module to change the default solution technique of Abaqus (these lines are obsolete when you do use the default solution techniques):
\begin{lstlisting}[language=apython, firstnumber=last]
# set solution technique
myModel.steps['step-1'].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)
myModel.steps['step-2'].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)
myModel.steps['step-3'].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)
myModel.steps['step-4'].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)
myModel.steps['step-4'].control.setValues(allowPropagation=OFF, resetDefaultValues=OFF, discontinuous=ON, lineSearch=(5.0, 1.0, 0.0001, 0.25, 0.1))
\end{lstlisting}
In the initial step, we fix the rotations of the indenter (line \texttt{311}) and any movement of the cast (if applicable, lines \texttt{313--314}).
For our analysis, we change the matrix storage method from 'symmetric' to `unsymmetric' (lines \texttt{332-335}). This greatly helps Abaqus to deal with the rather difficult contact modelling in our model.
In the first analysis step (lines \texttt{315--319}), we first prohibit translations of the indenter (line \texttt{317}) and tibia (line \texttt{318}). These zero values for translations will be propagated throughout the following steps, until we will change them in the fourth (last) analysis step. In this first step, we only rotate the tibia over the $z$-axis (line \texttt{319}). Note that the tibia rotations are prescribed as rotation \textsl{velocities}. So when the duration of the step is changed, these velocities will also have to change.
Line \texttt{336} is only written when \texttt{param.discon == 1}. It activates the 'discontinuous' and 'line search' options for Abaqus. This may, or may not, help Abaqus to reach converge. We do not recommend to use this parameter by default. Try it only when Abaqus does not manage to finish the analysis with this option.
In the second analysis step, rotation velocity over the $z$-axis is (re)set to zero, and we rotate the tibia over the $y$-axis (line \texttt{322}). Similarly, in the third analysis step the rotation velocity over the $y$-axis is (re)set to zero, and we rotate the tibia over the $x$-axis (line \texttt{325}).
\subsection{Output}
At the end of the script we create a `job' for Abaqus. In the \texttt{job}, we can define which analysis results should be written to the \texttt{basil\-<basilid>.odb\index{basil<basilid>.odb@\texttt{basil<basilid>.odb}}}-file:
\begin{lstlisting}[language=apython, firstnumber=last]
# create job
import job
myModel.fieldOutputRequests['F-Output-1'].setValues( variables=('S', 'LE', 'U', 'RF', 'COORD', 'CSTATUS', 'CFORCE', 'CDISP', 'CSTRESS', 'ELEN','ELEDEN', 'EVOL'), numIntervals=25, timeMarks=OFF)
mdb.models['Basil140611'].historyOutputRequests['H-Output-1'].suppress()
mdb.Job(name='basil140611', model='Basil140611', description='Experiment on Basil the Rat', type=ANALYSIS, numCpus=4, numDomains=4)
\end{lstlisting}
We are only interested in the `field' output (line \texttt{340}), and `history' output is suppressed (line \texttt{341}). The value of \texttt{param.odbT} can be used to limit the frequency with which Abaqus writes the analysis results to the \texttt{odb}-file (line \texttt{340}: \texttt{numIntervals = param.odbT}). Results are always written to the \texttt{odb}-file at the start and at the end of a step.
The \texttt{name} in line \texttt{342} determines the name of Abaqus input-file, \texttt{basil\-<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}}, and therefore the name of the Abaqus output-file \texttt{basil\-<basilid>.odb\index{basil<basilid>.odb@\texttt{basil<basilid>.odb}}}. Note that the parameters for the number of CPUs (\texttt{param.numCpus}) and domains (\texttt{param.numDomains}) for the analysis on line \texttt{342} only have an effect for an analysis submitted through Abaqus cae (e.g.\ when \texttt{param.submit = 1}). When you submit the input file manually for analysis, these parameters will have to be explicitly defined (again). \\
\noindent The final lines of \texttt{basil<basilid>\_job.py\index{basil<basilid>\_job.py@\texttt{basil<basilid>\_job.py}}} are used to define the output of the script itself:
\begin{lstlisting}[language=apython, firstnumber=last]
mdb.jobs['basil140611'].submit()
mdb.jobs['basil140611'].writeInput()
mdb.saveAs(pathName='basil140611.cae')
\end{lstlisting}
Line \texttt{343} is only written by \bas{buildFEM} when \texttt{param.submit = 1}. With this line, Abaqus not only builds the model, but also and immediately submits the job for analysis. The Abaqus input-file \texttt{basil\-<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}} will be written and Abaqus will use \texttt{param.numCpus} CPUs and \texttt{param.numDomains} domians for the analysis.
The fourth analysis step is used to translate the tibia (which now has the `deformed' orientation) and to actually indent the leg. First we (re)set the tibia rotation over the $x$-axis to zero (line \texttt{328}), and next we prescribe the tibia (line \texttt{329}) and indenter (line \texttt{330}). Note that \texttt{param}-parameters for \bas{buildFEM} for the step duration and -incrementation only affect this last (indentation) step.
Line \texttt{344} is only written by \bas{buildFEM} when \texttt{param.inp = 1} and will have the script write the Abaqus (ascii) input-file \texttt{basil\-<basilid>.inp\index{basil<basilid>.inp@\texttt{basil<basilid>.inp}}}. In the end, it is this input-file that is submitted for analysis. There is no analysis without (such) an ascii input-file, ever, with Abaqus.
Line \texttt{345} is only written by \bas{buildFEM} when \texttt{param.cae = 1} and will have the script write the (binary) Abaqus model file \texttt{basil\-<basilid>.cae\index{basil<basilid>.cae@\texttt{basil<basilid>.cae}}}. With this file you van view and adapt your model in the Abaqus cae GUI.
......@@ -146,7 +146,27 @@ morekeywords = {WireSpline,
matrixStorage,
solutionTechnique,
useDensity,
part
part,
steps,
control,
allowPropagation,
resetDefaultValues,
discontinuous,
lineSearch,
fieldOutputRequests,
variables,
numIntervals,
timeMarks,
historyOutputRequests,
suppress,
Job, jobs,
model,
numCpus,
numDomains,
writeInput,
saveAs,
pathName,
submit
}}
\lst@definelanguage{basillab}
{alsolanguage = Octave,
......
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