diff --git a/doc/manual/figures/beam_example.pdf b/doc/manual/figures/beam_example.pdf new file mode 100644 index 000000000..f3622c743 Binary files /dev/null and b/doc/manual/figures/beam_example.pdf differ diff --git a/doc/manual/figures/elements/bernoulli_2.pdf b/doc/manual/figures/elements/bernoulli_2.pdf new file mode 100644 index 000000000..033cc2944 Binary files /dev/null and b/doc/manual/figures/elements/bernoulli_2.pdf differ diff --git a/doc/manual/manual-bibliography.bib b/doc/manual/manual-bibliography.bib index 6944be15f..6b9976a9a 100644 --- a/doc/manual/manual-bibliography.bib +++ b/doc/manual/manual-bibliography.bib @@ -1,30 +1,39 @@ @Misc{mumps, title = {MUMPS : a parallel sparse direct solver}, url = {\url{http://graal.ens-lyon.fr/MUMPS/}}, key = {sparse matrix, direct solver, parallelisme} } @book{curnier92a, title={M{\'e}thodes num{\'e}riques en m{\'e}canique des solides}, author={Curnier, A. and Curnier, A. and Curnier, A.}, url={http://books.google.ch/books?id=-Z2zygAACAAJ}, year={1992}, publisher={EPFL} } @Article{hughes-83a, author = {Hughes, T.J.R. and Belytschko, T.}, title = {A precis of developments in computational methods for transient analysis}, journal = {Journal. of Applied Mechanics (ASME)}, year = {1983}, volume = {50}, pages = {1033-1041} } @book{simo92, title={Computational Inelasticity}, author={Simo, J.C. and Hughes, T.J.R.}, year={1992}, publisher={Springer} } +@book{frey2009, + title={M{\'e}thodes des {\'e}l{\'e}ments finis: Analyse des structures et milieux continus}, + author={Frey, F. and Jirousek, J.}, + isbn={9782880748524}, + series={Trait{\'e} de g{\'e}nie civil de l'Ecole Polytechnique F{\'e}d{\'e}rale de Lausanne}, + url={http://books.google.fr/books?id=bCBtQgAACAAJ}, + year={2009}, + publisher={PPUR} +} \ No newline at end of file diff --git a/doc/manual/manual-elements.tex b/doc/manual/manual-elements.tex index 6e3c268ec..1f11839a8 100644 --- a/doc/manual/manual-elements.tex +++ b/doc/manual/manual-elements.tex @@ -1,125 +1,157 @@ \section{Elements\index{Elements}} The base for every finite element computation is its mesh and the elements that are used within that mesh. What kind of element types can be used depends on the mesh, but also on the dimensionality of the problem (1D, 2D or 3D). In \akantu several isoparametric Langrangian element types are supported. Each of these types is discussed in some detail below, starting with the 1D-elements all the way to the 3D-elements. More detailed information (shape function, location of Gaussian quadrature points, and so on) can be found in Appendix~\ref{app:elements}. %%%%%%%%%% 1D %%%%%%%%% \subsection{Isoparametric Elements in 1D\index{Elements!1D}} In \akantu there are two types of isoparametric elements defined in 1D. These element types are called \code{segment\_2} and \code{segment\_3} and are depicted schematically in Figure~\ref{fig:elements:1D}. Some of the basic properties of these elements are listed in Table~\ref{tab:elements:1D}. \begin{figure}[!htb] \begin{center} \begin{tabular}{m{0.3\textwidth}m{0.1\textwidth}m{0.3\textwidth}} \subfloat[\code{segment\_2}]{ \includegraphics[width=0.3\textwidth]{figures/elements/segment_2} \label{fig:elements:segment2} } & & \subfloat[\code{segment\_3}]{ \includegraphics[width=0.3\textwidth]{figures/elements/segment_3} \label{fig:elements:segment3} } \end{tabular} \end{center} \caption{A schematic overview of the three supported 1D element types in \akantu. In each element the node numbering as used in \akantu is indicated and also the quadrature points are highlighted (gray circles).} \label{fig:elements:1D} \end{figure} \begin{table}[!htb] \begin{center} \begin{tabular}{l||c|c|c} Element type & Order & \# nodes & \# quad. points \\ \hline \code{segment\_2} & linear & 2 & 1 \\ \code{segment\_3} & quadratic & 3 & 2 \\ \end{tabular} \end{center} \caption{Some basic properties of the two 1D isoparametric elements in \akantu.} \label{tab:elements:1D} \end{table} + +\subsection{Bernoulli beam elements \index{Bernoulli}} +These elements allow to compute the displacements and rotations of structures constituted by Bernoulli beams. \akantu defines them for both 2D and 3D problems in the element types \code{\_bernoulli\_beam\_2} and \code{\_bernoulli\_beam\_3}. A schematic depiction of a beam element is shown in Figure~\ref{fig:elements:bernoulli} and some of its properties are listed in Table~\ref{tab:elements:bernoulli}. + +\note{Beam elements are of mixed order: the axial displacement is linearly interpolated while transverse displacements and rotations use cubic shape functions.} + +\begin{figure}[htb] + \centering + \includegraphics[scale=1.1]{figures/elements/bernoulli_2} + \caption{A schematic depiction of a Bernoulli beam element (applies to 2D and 3D) in \akantu. The node numbering as used in \akantu is indicated and also the quadrature points are highlighted (gray disks).} + \label{fig:elements:bernoulli} +\end{figure} +\begin{table}[htb] + \centering + \begin{tabular}{c||c|c|c|c} + Element type &\#nodes &\#quad. points & \#dimensions & \#d.o.f.\\\hline\hline + \code{\_bernoulli\_beam\_2} & 2&3 &2 &4\\\hline + \code{\_bernoulli\_beam\_2} & 2&3 &3 &6 + \end{tabular} + \caption{Some basic properties of \akantu's beam elements} + \label{tab:elements:bernoulli} +\end{table} + %%%%%%%%%% 2D %%%%%%%%% \subsection{Isoparametric Elements in 2D\index{Elements!2D}} In \akantu there are four types of isoparametric elements defined in 2D. These element types are called \code{triangle\_3}, \code{triangle\_6}, \code{quadrangle\_4} and \code{quadrangle\_8} and all of them are depicted in Figure~\ref{fig:elements:2D}. As with the 1D elements some of the most basic properties of these elements are listed in Table~\ref{tab:elements:2D}. \begin{figure}[!htb] \begin{center} \begin{tabular}{m{0.3\textwidth}m{0.1\textwidth}m{0.3\textwidth}} \subfloat[\code{triangle\_3}]{ \includegraphics[width=0.3\textwidth]{figures/elements/triangle_3} \label{fig:elements:triangle3} } & & \subfloat[\code{triangle\_6}]{ \includegraphics[width=0.3\textwidth]{figures/elements/triangle_6} \label{fig:elements:triangle6} } \\ \subfloat[\code{quadrangle\_4}]{ \includegraphics[width=0.3\textwidth]{figures/elements/quadrangle_4} \label{fig:elements:quadrangle4} } & & \subfloat[\code{quadrangle\_8}]{ \includegraphics[width=0.3\textwidth]{figures/elements/quadrangle_8} \label{fig:elements:quadrangle8} } \end{tabular} \end{center} \caption{A schematic overview of the four supported 2D element types in \akantu. In each element the node numbering as used in \akantu is indicated and also the quadrature points are highlighted (gray circles).} \label{fig:elements:2D} \end{figure} \begin{table}[!htb] \begin{center} \begin{tabular}{l||c|c|c} Element type & Order & \# nodes & \# quad. points \\ \hline \code{triangle\_3} & linear & 3 & 1 \\ \code{triangle\_6} & quadratic & 6 & 3 \\ \hline \code{quadrangle\_4} & quadratic & 4 & 4 \\ \code{quadrangle\_8} & cubic & 8 & 9 \\ \end{tabular} \end{center} \caption{Some basic properties of the four 2D isoparametric elements in \akantu.} \label{tab:elements:2D} \end{table} %%%%%%%%%% 3D %%%%%%%%% \subsection{Isoparametric Elements in 3D\index{Elements!3D}} In \akantu there are three types of isoparametric elements defined in 3D. These element types are called \code{tetrahedron\_4}, \code{tetrahedron\_10} and \code{hexahedron\_8} and all of them are depicted schematically in Figure~\ref{fig:elements:3D}. As with the 1D and 2D elements some of the most basic properties of these elements are listed in Table~\ref{tab:elements:3D}. \begin{figure}[!htb] \begin{center} \begin{tabular}{m{0.3\textwidth}m{0.3\textwidth}m{0.3\textwidth}} \subfloat[\code{tetrahedron\_4}]{ \includegraphics[width=0.3\textwidth]{figures/elements/tetrahedron_4} \label{fig:elements:tetrahedron4} } & \subfloat[\code{tetrahedron\_10}]{ \includegraphics[width=0.3\textwidth]{figures/elements/tetrahedron_10} \label{fig:elements:tetrahedron10} } & \subfloat[\code{hexahedron\_8}]{ \includegraphics[width=0.3\textwidth]{figures/elements/hexahedron_8} \label{fig:elements:hexahedron8} } \end{tabular} \caption{A schematic overview of the three supported 3D element types in \akantu. In each element the node numbering as used in \akantu is indicated and also the quadrature points are highlighted (gray spheres).} \label{fig:elements:3D} \end{center} \end{figure} \begin{table}[!htb] \begin{center} \begin{tabular}{l||c|c|c} Element type & Order & \# nodes & \# quad. points \\ \hline \code{tetrahedron\_4} & linear & 4 & 1 \\ \code{tetrahedron\_10} & quadratic & 10 & 4 \\ \hline \code{hexahedron\_8} & cubic & 8 & 8 \\ \end{tabular} \end{center} \caption{Some basic properties of the three 3D isoparametric elements in \akantu.} \label{tab:elements:3D} \end{table} + + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "manual" +%%% End: + + diff --git a/doc/manual/manual-macros.sty b/doc/manual/manual-macros.sty index 4eab4bcb9..069a1754d 100644 --- a/doc/manual/manual-macros.sty +++ b/doc/manual/manual-macros.sty @@ -1,28 +1,28 @@ % Some new commands \newcommand{\akantu}{{\texttt{\textbf{Akantu}}}\xspace} \newcommand{\code}[1]{\texttt{#1}} -\newcommand{\note}[1]{\textbf{Note: }\textit{#1}} +\newcommand{\note}[2][]{\textbf{Note#1: }\textit{#2}} \newcommand{\todo}[1]{~({\small\color{red}\textbf{TODO: }\textbf{#1}})} \renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}} \newcommand{\mat}[1]{\ensuremath{\boldsymbol{#1}}} \newcommand{\st}[1]{{\mathrm{#1}}} \newcommand{\eg}{\emph{e.g.},\xspace} \newcommand{\ie}{\emph{i.e.},\xspace} \newcommand{\realnum}{\mathbb{R}} % \newcommand{\intnum}{\mathbb{Z}} % Requires: \newcommand{\natnum}{\mathbb{N}} % \usepackage{pxfonts} \newcommand{\compnum}{\mathbb{C}} % \newcommand{\ratnum}{\mathbb{Q}} % \newcommand{\half}{\ensuremath{\tfrac{1}{2}}\xspace} \newcommand{\quart}{\ensuremath{\tfrac{1}{4}}\xspace} \newcommand{\third}{\ensuremath{\tfrac{1}{3}}\xspace} \newcommand{\twothird}{\ensuremath{\tfrac{2}{3}}\xspace} \newcommand{\sixth}{\ensuremath{\tfrac{1}{6}}\xspace} \newcommand{\eighth}{\ensuremath{\tfrac{1}{8}}\xspace} \newcommand{\invsqrtthree}{\ensuremath{\tfrac{1}{\sqrt{3}}}\xspace} diff --git a/doc/manual/manual-structuralmechanicsmodel.tex b/doc/manual/manual-structuralmechanicsmodel.tex index d1e46886f..69a02a2ab 100644 --- a/doc/manual/manual-structuralmechanicsmodel.tex +++ b/doc/manual/manual-structuralmechanicsmodel.tex @@ -1,217 +1,207 @@ -\section{Structural Mechanics model\todo{Till}} Static structure -mechanics problems can be handled using the structural mechanics -model. So far, \akantu\ provides 2D and 3D Bernouilli beam elements -\cite{REFERENCE}. Just as for the \code{SolidMechanicsModel}, the -model is created for a given \code{Mesh}. The model will create its -own \code{FEM} object to compute the interpolation, gradient, -integration and assembly operations. The -\code{StructuralMechanicsModel} constructor is used like +\section{Structural Mechanics model\todo{Till}} +Static structure mechanics problems can be handled using the +\code{StructuralMechanicsModel}. So far, \akantu\ provides 2D and 3D Bernoulli +beam elements \cite{frey2009}. Just as for the \code{SolidMechanicsModel}, the +model is created for a given \code{Mesh}. The model will create its own +\code{FEM} object to compute the interpolation, gradient, integration and +assembly operations. The \code{StructuralMechanicsModel} constructor is used +like \begin{cpp} StructuralMechanicsModel model(mesh, spatial_dimension); \end{cpp} -where \code{mesh} is a \code{Mesh} object defining the -structure for which the equations of statics are to be solved, and -\code{spatial\_dimension} is the dimensionality of the problem. If -\code{spatial\_dimension} is omitted, the problem is assumed to have -the same dimensionality as the one specified by the mesh. Note that -dynamic computations are not supported to date. +where \code{mesh} is a \code{Mesh} object defining the structure for which the +equations of statics are to be solved, and \code{spatial\_dimension} is the +dimensionality of the problem. If \code{spatial\_dimension} is omitted, the +problem is assumed to have the same dimensionality as the one specified by the +mesh. +\note[\ 1]{Dynamic computations are not supported to date.} +\note[\ 2]{Structural meshes are be created and loaded as described in + Section~\ref{sect:common:mesh} with \code{MeshIOMSHStruct} instead of \code{MeshIOMSH}.} + +\vspace{1cm} This model contains at least the the following \code{Vectors}: \begin{description} -\item[boundary] contains a \code{boolean} value for each degree of -freedom specifying whether that degree is blocked or not. A Dirichlet -boundary condition can be prescribed by setting the \textbf{boundary} -value of a degree of freedom to \code{true}. A Neumann boundary -condition can only be applied if the \textbf{boundary} value of a -degree of freedom is \code{false}. If a degree of freedom has a -\textbf{boundary} value that is \code{false}, the -\textbf{displacement}, \textbf{velocity}, \textbf{acceleration} and -\textbf{residual} are computed by the solve algorithm when relevant, -otherwise these vectors contain the imposed value (zero by default -after the initialization). +\item[boundary] contains a \code{boolean} value for each degree of freedom + specifying whether that degree is blocked or not. A Dirichlet boundary + condition can be prescribed by setting the \textbf{boundary} value of a degree + of freedom to \code{true}. A Neumann boundary condition can only be applied + if the \textbf{boundary} value of a degree of freedom is \code{false}. If a + degree of freedom has a \textbf{boundary} value that is \code{false}, the + \textbf{displacement} and \textbf{residual} are computed by the solve + algorithm when relevant, otherwise these vectors contain the imposed values + (zero by default after the initialization). -\item[displacement and rotation] contains the generalized -displacements of all degrees of freedom. It can be either a computed -displacement for free degrees of freedom or an imposed displacement in -case of blocked ones ($\vec{u}$ in the following). +\item[displacement\_rotation] contains the generalized displacements of all + degrees of freedom. It can be either a computed displacement for free degrees + of freedom or an imposed displacement in case of blocked ones ($\vec{u}$ in + the following). -\item[force and moment] contains the generalized external forces -applied to the nodes ($\vec{f_{\st{ext}}}$ in the following). +\item[force\_moment] contains the generalized external forces applied to the + nodes ($\vec{f_{\st{ext}}}$ in the following). -\item[residual] contains the difference between external and internal -forces and moments. On blocked degrees of freedom, \textbf{residual} -contains the support reactions. ($\vec{r}$ in the following). It -should be mentioned that at equilibrium \textbf{residual} should be -zero on free degrees of freedom. +\item[residual] contains the difference between external and internal forces and + moments. On blocked degrees of freedom, \textbf{residual} contains the support + reactions. ($\vec{r}$ in the following). It should be mentioned that at + equilibrium \textbf{residual} should be zero on free degrees of freedom. \end{description} -Some examples to help to understand how to use this model will be -presented in the next sections. +An example to help to understand how to use this model will be presented in the +next section. \subsection{Model setup} \label{sec:structMechMod:setup} \subsubsection{Initialization} +The easiest way to initialize the structural mechanics model is: +%\begin{cpp} +% model.initModel(); +% +% StructuralMaterial mat1; +% mat1.E=2.05e11; +% mat1.I=0.00128; +% mat1.A=0.01; // for example +% +% model.addMaterial(mat1); ASK NICO ABOUT THIS CRAP +% +% model.initVectors(); +% model.initImplicitSolver(); +%\end{cpp} +%The method \code{initModel} computes the shape functions, \code{addMaterial} sets the material parameters to be used, \code{initVectors} initializes all the internal vectors mentioned before and \code{initImplicitSolver} creates the stiffness matrix. + +\begin{cpp} + model.initFull(); +\end{cpp} +The method \code{initFull} computes the shape functions, initializes the internal vectors mentioned above and creates the stiffness matrix. + Material properties are defined using the \code{StructuralMaterial} structure described in Table~\ref{tab:structMechMod:strucMaterial}. \begin{table}[htb] \centering \begin{tabular}{c|c} field & description \\\hline\hline \code{E} & Young's modulus \\\hline \code{A} & Cross section area \\\hline \code{I} & Second cross sectional moment of inertia (for 2D elements) \\\hline \code{Iy} & \code{I} around beam $y$--axis (for 3D elements) \\\hline \code{Iz} & \code{I} around beam $z$--axis (for 3D elements) \\\hline \code{GJ} & Polar moment of inertia of beam cross section (for 3D elements) \end{tabular} \caption{Material properties for structural elements as defined by the structure \code{StructuralMaterial}.} \label{tab:structMechMod:strucMaterial} \end{table} -The structural mechanics model is initialized in a few steps: +Materials can be added to the model's \code{element\_material} vector using \begin{cpp} - model.initModel(); - - StructuralMaterial mat1; - mat1.E=2.05e11; - mat1.I=0.00128; - mat1.A=0.01; // for example - - model.addMaterial(mat1); ASK NICO ABOUT THIS CRAP - - model.initVectors(); - model.initImplicitSolver(); + model.addMaterial(material); \end{cpp} -The method \code{initModel} computes the shape functions, \code{addMaterial} sets the material parameters to be used, \code{initVectors} initializes all the internal vectors mentioned before and \code{initImplicitSolver} creates the stiffness matrix. - -\subsubsection{Setting boundary conditions} +They are used just like for the \code{SolidMechanicsModel} +see Section~\ref{sect:smm:CL}. +\subsubsection{Setting boundary conditions}\label{sect:structMechMod:boundary} -Both Dirichlet and Neumann type boundary conditions are applied to nodes the same exact way as for \code{SolidMechanicsModel}, see Section~\ref{sect:smm:boundary}. Additionally, \code{SolidMechanicsModel} provides the methods \code{computeForcesByStressTensor}, \code{computeForcesByTractionVector} and \code{computeForcesFromFunction} to compute consistent forces from applied constant stresses, constant tractions +Both Dirichlet and Neumann type boundary conditions are applied to nodes the +same exact way as for \code{SolidMechanicsModel}, see +Section~\ref{sect:smm:boundary}. The method \code{computeForcesFromFunction} +can still be used to apply Neumann-type boundary conditions. -\subsection{Static analysis\label{sect:smm:static}} +\subsection{Static analysis\label{sect:structMechMod:static}} -The \code{SolidMechanicsModel} class can handle different analysis methods, the -first one being presented is the static case. In this case, the equation -to solve is, -\begin{equation}\label{eqn:smm:static} +The \code{StructuralMechanicsModel} class can perform static analyses of +structures. In this case, the equation to solve is the same as for the +\code{SolidMechanicsModel} used for static analyses +\begin{equation}\label{eqn:structMechMod:static} \mat{K} \vec{u} = \vec{f_{\st{ext}}}~, \end{equation} -where $\mat{K}$ is the global stiffness matrix, $\vec{u}$ the displacement -vector and $\vec{f_{\st{ext}}}$ the external forces vector applied to the +where $\mat{K}$ is the global stiffness matrix, $\vec{u}$ the generalized displacement +vector and $\vec{f_{\st{ext}}}$ the vector of generalized external forces applied to the system. To solve such a problem the static solver of the -\code{SolidMechanicsModel}\index{SolidMechanicsModel} object is used. First a -model has to be created and initialized. To create the model, a mesh that can -be read from a file is needed, as explained in section \ref{sect:common:mesh}. -Once an instance of a \code{SolidMechanicsModel} is obtained, the easiest way to -initialize it is to use the \code{initFull}\index{SolidMechanicsModel!initFull} -function by giving a material file containing the material parameters, and a -type of analysis. +\code{StructuralMechanicsModel}\index{StructuralMechanicsModel} object is used. First a +model has to be created and initialized. To create the model, a mesh is required. +Once an instance of a \code{StructuralMechanicsModel} is obtained, the easiest way to +initialize it is to use the \code{initFull}\index{StructuralMechanicsModel!initFull} +function. \begin{cpp} - SolidMechanicsModel model(mesh); - model.initFull("material.dat", _static); + StructuralMechanicsModel model(mesh); + model.initFull(); \end{cpp} \begin{itemize} -\item \code{model.initFull} initializes all the needed vectors to zero. If a - material file is given it also parses it and creates the requested materials. - The last parameter of this function is the type of solver to use. Here the - \code{\_static} solver is used. +\item \code{model.initFull} initializes all internal vectors to zero. \end{itemize} -Once the model is created and initialized the boundary conditions can be set as -explained in section \ref{sect:smm:boundary}. Boundary conditions will -prescribe the external forces for the free degrees of freedom -$\vec{f_{\st{ext}}}$ and displacements for the others. To completely define the -system represented by equation (\ref{eqn:smm:static}), the global stiffness +Once the model is created and initialized, the boundary conditions can be set as +explained in Section \ref{sect:structMechMod:boundary}. Boundary conditions will +prescribe the external forces or moments for the free degrees of freedom +$\vec{f_{\st{ext}}}$ and displacements or rotations for the others. To completely define the +system represented by equation (\ref{eqn:structMechMod:static}), the global stiffness matrix $\mat{K}$ must be assembled. -\index{SolidMechanicsModel!assembleStiffnessMatrix} +\index{StructuralMechanicsModel!assembleStiffnessMatrix} \begin{cpp} model.assembleStiffnessMatrix(); \end{cpp} -In fact, to find the equilibrium, Equation (\ref{eqn:smm:static}) is modified in -order to apply a Newton-Raphson convergence algorithm. - -\begin{align}\label{eqn:smm:static-newton-raphson} - \mat{K}^{i+1} \delta\vec{u}^{i+1} &= \vec{r} \\ - &= \vec{f_{\st{ext}}} - \vec{f_{\st{int}}}\\ - &= \vec{f_{\st{ext}}} - \mat{K}^{i} \vec{u}^{i}\\ - \vec{u}^{i+1} &= \vec{u}^{i} + \delta\vec{u}^{i+1}~,\nonumber -\end{align} -where $\delta\vec{ u}$ is the increment of displacement to be added from one -iteration to the other, and $i$ is the number of the Newton-Raphson iteration. - -So in a Newton-Raphson iteration, $\mat{K}$ is updated according to the -displacement computed at the previous iteration and one loops until the forces -are balanced, \ie $\vec{r} = 0$. One can also iterate until the increment of -displacement is zero which also means that the equilibrium is found. This can be -done as follow: -\index{SolidMechanicsModel!updateResidual} -\index{SolidMechanicsModel!solveStatic} +The computation of the static equilibrium is performed using the same +Newton-Raphson solution algorithm as described in +Section~\ref{sect:smm:static}. + +\note{To date, +\code{StructuralMechanicsModel} handles only constitutively and +geometrically linear problems, the algorithm is therefore guaranteed +to converge in one iteration.} \begin{cpp} model.updateResidual(); - model.solveStatic(); + model.solve(); \end{cpp} +\index{StructuralMechanicsModel!updateResidual} +\index{StructuralMechanicsModel!solve} + \begin{itemize} -\item \code{model.updateResidual} assembles the internal forces and remove them +\item \code{model.updateResidual} assembles the internal forces and removes them from the external forces. -\item \code{model.solveStatic} solves the equations +\item \code{model.solve} solves the equations (\ref{eqn:smm:static-newton-raphson}). The \textbf{increment} vector of the model will contain the new increment of displacements, and the \textbf{displacement} vector is also updated to the new displacements. \end{itemize} -For an elastic problem the solution is directly found at the first -iteration. But for a non-elastic case, one needs to iterate as long as the norm -of the residual is not zero (given a specific tolerance). -\begin{cpp} - Real norm; - Real tolerance = 1e-3; - UInt count = 0; - model.updateResidual(); - while(!model.testConvergenceResidual(tolerance, norm) && (count < 100)) { - model.solveStatic(); - model.updateResidual(); - }; -\end{cpp} +At the end of the analysis the final solution is stored in the +\textbf{displacement} vector. A full example of how to solve a +structure mechanics problem is presented in the code +\code{example/manual/WHERE-DO-EXAMPLES-GO?}. This example is composed +of a 2D beam, clamped at the left end and supported by two rollers as +shown in Figure \ref{fig:structMechMod:exem1_1}. The problem is +defined by the applied load $q=\unit{6}{\kilo\newton\per\metre}$, +moment $\bar{M} = \unit{3.6}{\kilo\newton\metre}$, moments of inertia +$I_1 = \unit{250\,000}{\power{\centi\metre}{4}}$ and $I_2 = +\unit{128\,000}{\power{\centi\metre}{4}}$ and lengths $L_1 = +\unit{10}{\metre}$ and $L_2 = \unit{8}{\metre}$. The resulting +rotations at node two and three are $ \varphi_2 = 0.001\,167\ \mbox{and}\ \varphi_3 = -0.000\,771.$ -At the end of the analysis the final solution is stored in the -\textbf{displacement} vector. A full example of how to solve a static problem -is presented in the code \code{example/manual/implicit\_static.cc}. This -example is composed of a 2D plate of steel, blocked with rollers on the left and -bottom sides as shown in Figure \ref{fig:smm:static}. The nodes from the right -side of the sample are displaced by $0.01\%$ of the length of the plate. -\begin{figure}[!htb] - \centering - \includegraphics{figures/implicit_static} - \caption{Numerical setup\label{fig:smm:static}} -\end{figure} + \begin{figure}[htb] + \centering + \includegraphics[scale=1.1]{figures/beam_example} + \caption{2D beam example} + \label{fig:structMechMod:exem1_1} + \end{figure} -The results of this analysis is depicted in Figure -\ref{fig:smm:implicit:static_solution}. -\begin{figure}[!htb] - \centering - \includegraphics[width=.6\linewidth]{figures/static_analysis} - \caption{Solution of the static analysis. Left: the initial condition, right: - the solution (deformation magnified 50 times)} - \label{fig:smm:implicit:static_solution} -\end{figure} -%%% Local Variables: %%% mode: latex %%% TeX-master: "manual" %%% End: +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "manual" +%%% End: