Commit 3a62d1f3 authored by matecellab's avatar matecellab
Browse files

documentation update, switched the order of some lines in *job.py, moved...

documentation update, switched the order of some lines in *job.py, moved fixation of indenter rotation to initial step
parent 383387cf
......@@ -547,15 +547,23 @@ for b = 1:numel(basil)
% boundary conditions and loads
fprintf(fid,'\n# create loading steps, BNC''s\n');
fprintf(fid,'import step\n');
% first step, rotate bone over z-axis
fprintf(fid,'Iregion=myModel.rootAssembly.instances[''indenter-1''].sets[''indenterRP'']\n');
fprintf(fid,'Bregion=myModel.rootAssembly.instances[''leg-1''].sets[''boneRP'']\n');
% initial step, prohibit indenter rotations
fprintf(fid,'# initial step, prohibit indenter rotations\n');
fprintf(fid,'myModel.DisplacementBC(name=''fixIndRot'', createStepName=''Initial'', region=Iregion, ur1=0, ur2=0, ur3=0, localCsys=None)\n');
% fix cast (in initial step)
if param.cast == 1
fprintf(fid,'# fix cast\n');
fprintf(fid,'Cregion=myModel.rootAssembly.instances[''cast-1''].sets[''castRP'']\n');
fprintf(fid,'myModel.EncastreBC(name=''fixCast'', createStepName=''Initial'', region=Cregion, localCsys=None)\n');
end
% first step, rotate bone over z-axis
fprintf(fid,'# first step, rotate bone over z-axis\n');
fprintf(fid,'myModel.StaticStep(name=''step-1'', previous=''Initial'', description=''Rotate bone over z-axis'', timePeriod=1, maxNumInc=100, initialInc=1, minInc=1e-6, maxInc=1, nlgeom=ON)\n');
fprintf(fid,'myModel.DisplacementBC(name=''moveIndenter'', createStepName=''step-1'', region=Iregion, u1=0, u2=0, u3=0, ur1=0, ur2=0, ur3=0, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='''', localCsys=None)\n');
fprintf(fid,'myModel.DisplacementBC(name=''moveIndenter'', createStepName=''step-1'', region=Iregion, u1=0, u2=0, u3=0, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='''', localCsys=None)\n');
fprintf(fid,'myModel.DisplacementBC(name=''moveBone'', createStepName=''step-1'', region=Bregion, u1=0, u2=0, u3=0, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='''', localCsys=None)\n');
fprintf(fid,'myModel.VelocityBC(name=''rotateBone'', createStepName=''step-1'', region=Bregion, vr1=0, vr2=0, vr3=%f, amplitude=UNSET, localCsys=None, distributionType=UNIFORM, fieldName='''')\n',bcom(3,3));
fprintf(fid,'myModel.VelocityBC(name=''rotateBone'', createStepName=''step-1'', region=Bregion, vr1=0, vr2=0, vr3=%f, amplitude=UNSET, localCsys=None, distributionType=UNIFORM, fieldName='''')\n',bcom(3,3));
% second step, rotate bone over y-axis
fprintf(fid,'# second step, rotate bone over y-axis\n');
fprintf(fid,'myModel.StaticStep(name=''step-2'', previous=''step-1'', description=''Rotate bone over y-axis'', timePeriod=1, maxNumInc=100, initialInc=1, minInc=1e-6, maxInc=1, nlgeom=ON)\n');
......@@ -570,13 +578,7 @@ for b = 1:numel(basil)
basil(b),param.timePeriod,param.maxNumInc, param.initialInc, param.minInc, param.maxInc);
fprintf(fid,'myModel.boundaryConditions[''rotateBone''].setValuesInStep(stepName=''step-4'', vr1=0)\n');
fprintf(fid,'myModel.boundaryConditions[''moveBone''].setValuesInStep(stepName=''step-4'', u1=%f, u2=%f, u3=%f)\n', diff(bcom(1:2,:),1));
fprintf(fid,'myModel.boundaryConditions[''moveIndenter''].setValuesInStep(stepName=''step-4'', u1=%f, u2=%f, u3=%f)\n', diff(indSE(1:2,:),1));
% fix cast (in initial step)
if param.cast == 1
fprintf(fid,'# fix cast (in initial step)\n');
fprintf(fid,'Cregion=myModel.rootAssembly.instances[''cast-1''].sets[''castRP'']\n');
fprintf(fid,'myModel.EncastreBC(name=''fixCast'', createStepName=''Initial'', region=Cregion, localCsys=None)\n');
end
fprintf(fid,'myModel.boundaryConditions[''moveIndenter''].setValuesInStep(stepName=''step-4'', u1=%f, u2=%f, u3=%f)\n', diff(indSE(1:2,:),1));
fprintf(fid,'# set solution technique\n');
fprintf(fid,'myModel.steps[''step-1''].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)\n');
fprintf(fid,'myModel.steps[''step-2''].setValues(matrixSolver=DIRECT, matrixStorage=UNSYMMETRIC, solutionTechnique=FULL_NEWTON)\n');
......
......@@ -680,4 +680,41 @@ The cast is converted into a rigid surface similar as the tibia surface (lines \
\caption{The full model assembly (including cast) in Abaqus (rotated for clarity). The yellow lines are the symmetry axis of the indenter and assist-disc (construction lines in the sketches), RP's are the reference points for the indenter, bone, and cast. The assist-disc will be dismissed when the simulation is submitted for analysis. \label{abaqus_fullAssembly}}
\end{figure}
\subsection{Loading steps (boundary conditions)}
\ No newline at end of file
\subsection{Loading steps (essential boundary conditions)}
There are no prescribed pressures or forces in the model. We prescribe the movement of the tibia (rotation and translation) and the movement of the indenter (translation). When the cast is modelled we also prescribe that the cast is not allowed to move in any way (no rotations, no displacement, in Abaqus: `encastre'). The soft tissue of the leg is free to move about, except of course when movement happens to be limited by contact.
These essential boundary conditions are prescribed in 4 different steps. The first three steps \textsl{rotate} the tibia over three axis and have a duration of 1\,s each. In the fourth step we translate both the indenter and the tibia, simultaneously. This last step has a duration of \texttt{param.timePeriod} (100\,s by default):
\begin{lstlisting}[language=apython]
# create loading steps, BNC's
import step
Iregion=myModel.rootAssembly.instances['indenter-1'].sets['indenterRP']
Bregion=myModel.rootAssembly.instances['leg-1'].sets['boneRP']
# initial step, prohibit indenter rotations
myModel.DisplacementBC(name='fixIndRot', createStepName='Initial', region=Iregion, ur1=0, ur2=0, ur3=0, localCsys=None)
# fix cast
Cregion=myModel.rootAssembly.instances['cast-1'].sets['castRP']
myModel.EncastreBC(name='fixCast', createStepName='Initial', region=Cregion, localCsys=None)
# first step, rotate bone over z-axis
myModel.StaticStep(name='step-1', previous='Initial', description='Rotate bone over z-axis', timePeriod=1, maxNumInc=100, initialInc=1, minInc=1e-6, maxInc=1, nlgeom=ON)
myModel.DisplacementBC(name='moveIndenter', createStepName='step-1', region=Iregion, u1=0, u2=0, u3=0, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='', localCsys=None)
myModel.DisplacementBC(name='moveBone', createStepName='step-1', region=Bregion, u1=0, u2=0, u3=0, amplitude=UNSET, fixed=OFF, distributionType=UNIFORM, fieldName='', localCsys=None)
myModel.VelocityBC(name='rotateBone', createStepName='step-1', region=Bregion, vr1=0, vr2=0, vr3=0.007654, amplitude=UNSET, localCsys=None, distributionType=UNIFORM, fieldName='')
# second step, rotate bone over y-axis
myModel.StaticStep(name='step-2', previous='step-1', description='Rotate bone over y-axis', timePeriod=1, maxNumInc=100, initialInc=1, minInc=1e-6, maxInc=1, nlgeom=ON)
myModel.boundaryConditions['rotateBone'].setValuesInStep(stepName='step-2', vr2=0.023280, vr3=0.0)
# third step, rotate bone over x-axis
myModel.StaticStep(name='step-3', previous='step-2', description='Rotate bone over x-axis', timePeriod=1, maxNumInc=100, initialInc=1, minInc=1e-6, maxInc=1, nlgeom=ON)
myModel.boundaryConditions['rotateBone'].setValuesInStep(stepName='step-3', vr1=0.012235, vr2=0.0)
# fourth step, move bone and indenter
myModel.StaticStep(name='step-4', previous='step-3', description='indent basil140611s leg', timePeriod=100.000000, maxNumInc=1000000, initialInc=1.000000, minInc=0.000001, maxInc=5.000000, nlgeom=ON)
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)
# 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)
\end{lstlisting}
The first step is used to rotate the tibia over the $z$-axis (line \texttt{6}). Translation of the tibia is prohibited (line \texttt{8})
\ No newline at end of file
......@@ -120,7 +120,31 @@ morekeywords = {WireSpline,
smoothClosedSpline,
RemoveFaces,
deleteCells,
Stitch
Stitch,
StaticStep,
previous,
description,
timePeriod,
maxNumInc,
initialInc,
minInc,
maxInc,
nlgeom,
DisplacementBC,
u1, u2, u3, ur1, ur2, ur3, vr1, vr2, vr3
amplitude,
fixed,
distributionType,
fieldName,
localCsys,
VelocityBC,
boundaryConditions,
setValuesInStep,
stepName,
encastreBC,
matrixSolver,
matrixStorage,
solutionTechnique
}}
\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