@@ -25,11 +25,11 @@ The new URL is \href{https://gitlab.tue.nl/stem/mlfem_nac/}{https://gitlab.tue.n

This exercise refers to a directory \texttt{\textcolor{red}{oneD}} and a demo script \texttt{\textcolor{red}{demo\_fem1d}}. \\

The engine \kwc{fem1d} is now in the directory \kwo{/library/main}, and the demo script is now called \kwc{demo\_1d\_diffusion.m} (in the directory \kwo{/demofiles}).

The engine \kwc{fem1d} is now in the directory \kdir{/library/main}, and the demo script is now called \demo{demo\_1d\_diffusion.m} (in the directory \kdir{/demofiles}).

\subsection*{Exercises 14.8 \& 14.9, page 326}

See exercise 14.7: the demo script \texttt{\textcolor{red}{demo\_fem1d}} is now called \kwc{demo\_1d\_diffusion.m} (in the directory \kwo{/demofiles}).

See exercise 14.7: the demo script \texttt{\textcolor{red}{demo\_fem1d}} is now called \demo{demo\_1d\_diffusion.m} (in the directory \kdir{/demofiles}).

\section*{Chapter 15}

...

...

@@ -38,7 +38,7 @@ See exercise 14.7: the demo script \texttt{\textcolor{red}{demo\_fem1d}} is now

These exercises refers to a demo script \texttt{\textcolor{red}{demo\_fem1dcd}} in a directory \texttt{\textcolor{red}{oned}}. \\

The demo script is now called \kwc{demo\_1d\_conv\_diffusion.m} (in the directory \kwo{/demofiles}, the engine \kwc{fem1dcd} can be found in the directory \kwo{/library/main}).

The demo script is now called \demo{demo\_1d\_conv\_diffusion.m} (in the directory \kdir{/demofiles}, the engine \kwc{fem1dcd} can be found in the directory \kdir{/library/main}).

\section*{Chapter 16}

...

...

@@ -46,19 +46,19 @@ The demo script is now called \kwc{demo\_1d\_conv\_diffusion.m} (in the director

This exercises refers to a demo script \texttt{\textcolor{red}{demo\_cd}}. \\

The demo script is now called \kwc{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kwo{/demofiles})

The demo script is now called \demo{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kdir{/demofiles})

The engine \kwc{fem1dcd} can be found in the directory \kwo{/library/main}, and the element functions \kwc{elcd} and \kwc{elcd\_a}) in the directory \kwo{/library/elmlib}.

The engine \kwc{fem1dcd} can be found in the directory \kdir{/library/main}, and the element functions \kwc{elcd} and \kwc{elcd\_a}) in the directory \kdir{/library/elmlib}.

\subsection*{Exercise 16.6, pages 360}

See exercise 16.3: the demo script \texttt{\textcolor{red}{demo\_cd}} is now called \kwc{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kwo{/demofiles})

See exercise 16.3: the demo script \texttt{\textcolor{red}{demo\_cd}} is now called \demo{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kdir{/demofiles})

\subsection*{Exercise 16.7, pages 362}

This exercise refers to \texttt{\textcolor{red}{demo\_cd}} in a directory \texttt{\textcolor{red}{TwoD}}.\\

See exercise 16.3: the demo script is now called \kwc{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kwo{/demofiles}).

See exercise 16.3: the demo script is now called \demo{demo\_2d\_planar\_conv\_diffusion.m} (in the directory \kdir{/demofiles}).

\section*{Chapter 18}

...

...

@@ -66,10 +66,10 @@ This exercise refers to \texttt{\textcolor{red}{demo\_cd}} in a directory \textt

This exercise refers to a demo script \texttt{\textcolor{red}{demo\_bend}} in a directory \texttt{\textcolor{red}{twode}}. \\

The demo script is now called \kwc{demo\_2ds\_bar\_bending.m} (in the directory \kwo{/demofiles}).

The demo script is now called \demo{demo\_2ds\_bar\_bending.m} (in the directory \kdir{/demofiles}).

\subsection*{Exercise 18.6, pages 396}

The demo script \texttt{\textcolor{red}{demo\_shear}} is now called \kwc{demo\_2ds\_bar\_shear.m} (in the directory \kwo{/demofiles}).

The demo script \texttt{\textcolor{red}{demo\_shear}} is now called \demo{demo\_2ds\_bar\_shear.m} (in the directory \kdir{/demofiles}).

@@ -260,7 +260,7 @@ And to extract a value for a degree of freedom over time, you simply use

\noindent Unless you wish to start your time-dependent simulation with the value `zero' for all degrees of freedom at the zero\ap{th} (initial) time-step, you will have to set the initial conditions of your problem. As explained in the previous section \eqref{soltime}, initial conditions are set in \kwo{sol(:, 1)}.

But \kwo{sol} is not known until you ran the engine from \kwo{/library/main}, and the engine needs \kwo{sol} for the initial conditions for the first time increment. So for time-dependent problems with nonzero initial conditions you have to initialize \kwo{sol} with the initial state of the system in the first column before you call the engine from \kwo{/library/main}.\\

But \kwo{sol} is not known until you ran the engine from \kdir{/library/main}, and the engine needs \kwo{sol} for the initial conditions for the first time increment. So for time-dependent problems with nonzero initial conditions you have to initialize \kwo{sol} with the initial state of the system in the first column before you call the engine from \kdir{/library/main}.\\

\noindent This may pose some challenges, in particular because we do not know yet where the engine is going to put the solutions in \kwo{sol} at this point in the pre-processing phase. So we may have to ask \kwc{equatnr} for \kwo{pos} and \kwo{dest}:

\begin{lstlisting}[language=mlfem,numbers=none]

...

...

@@ -269,7 +269,7 @@ But \kwo{sol} is not known until you ran the engine from \kwo{/library/main}, an

\noindent Another challenge may arise if wish to prescribe certain initial conditions for a certain part of the geometry, say a curve. You do not know which nodes were placed on that curve by the mesh generator \kwc{crmesh}, so you cannot find out which degrees of freedom in \kwo{sol(:, 1)} to adapt. Chapter \ref{crmesh} explains how you can get such information from \kwc{crmesh}.\\

\noindent Note that the engine from \kwo{/library/main} will initialize \kwo{sol} with all zeros in the first column if you fail to initialize \kwo{sol(:, 1)} yourself beforehand.

\noindent Note that the engine from \kdir{/library/main} will initialize \kwo{sol} with all zeros in the first column if you fail to initialize \kwo{sol(:, 1)} yourself beforehand.

And finally also note that when you initialize \kwo{sol(:, 1)}, it is best to initialize the entire array \kwo{sol} for all time-steps instead of only a first column:\warning

\caption{The \kwo{points}, \kwo{curves} and actual mesh. With \textbf{(a)} this figure is produced by \kwc{plotpts} and \kwc{plotcrvs} in \kwo{/userfiles} and shows the \kwo{points} with their numbers in red and the \kwo{curves} with their numbers in blue; and \textbf{(b)} the resulting mesh (as plotted by \kwc{plmesh}). \label{meshexample}}

\caption{The \kwo{points}, \kwo{curves} and actual mesh. With \textbf{(a)} this figure is produced by \kwc{plotpts} and \kwc{plotcrvs} in \kdir{/userfiles} and shows the \kwo{points} with their numbers in red and the \kwo{curves} with their numbers in blue; and \textbf{(b)} the resulting mesh (as plotted by \kwc{plmesh}). \label{meshexample}}

\end{figure}

\noindent Note that this example presents \textsl{a} way of working with this geometry. Choices such as the order of \kwo{points}, \kwo{curves} and \kwo{subarea} definitions or the directions in \kwo{curves} and \kwo{subarea} definitions are entirely free, as long as they are internally and mutually consistent.

The values for $\vec{v}$ (lines 47--48) are passed to a function \kwc{elcd\_a}, and that function creates a 2D flow profile based on these parameters (section \ref{elcd}). So if you wish to change the actual profile, you have to adapt \kwc{elcd\_a}.

Note that this demo indeed uses a different profile than provided by the \kwo{/library} function, so this adapted copy

Note that this demo indeed uses a different profile than provided by the \kdir{/library} function, so this adapted copy

\begin{lstlisting}[language=mlfem]

function [ax, ay] = elcd_a(x, y, vx, vy)

% [ax, ay] = elcd_a(x, y, vx, vy)

...

...

@@ -117,7 +117,7 @@ end

% part of mlfem_nac: https://gitlab.tue.nl/STEM/mlfem_nac

\end{lstlisting}

is placed in \kwo{/demofiles} (section \ref{using}).\\

is placed in \kdir{/demofiles} (section \ref{using}).\\

\noindent All the arrays from section \ref{meshspec} have now been defined. This sets up the mesh (coordinates in \kwo{coord}, topology in \kwo{top}, element parameter in \kwo{mat.mat} and element type in \kwo{mat.types}), and the `material properties' (parameters for equation \ref{elcdeq}, in \kwo{mat.mat}).

This demo solves the 2D convection-diffusion equation with a planar geometry of a straight tube. In the first part of the tube a material diffuses from the wall into the fluid.

...

...

@@ -66,44 +66,44 @@ The demo partitions the rectangular geometry in two \kwo{subarea}s for the bound

These demos use a variety of post-processing functions to be able to visualize velocity fields, pressures and stream lines from the (raw) results.

\subsection*{\kwc{demo\_2df\_axi\_aneurism.m}}

\subsection*{\demo{demo\_2df\_axi\_aneurism.m}}

This demo analyses stationary flow (Stokes equation) in a vessel with an aneurism (figure \ref{demomeshaxianeurism}) in an axi-symmetric configuration.

The demo manually adapts the mesh from \kwc{crmesh} to create the aneurism.

This demo analyses (steady-state) flow in a tube with an axi-symmetric configuration. The inflow is flat with a linear increase of the velocity in the boundary layer and develops to a Poisseuille flow with a parabolic profile.

The demo partitions the rectangular domain in various \kwo{subarea}s for the inflow boundary conditions and for post-processing of the results at a particular plane in the tube.

\subsection*{\kwc{demo\_2df\_axi\_stenosis.m}}

\subsection*{\demo{demo\_2df\_axi\_stenosis.m}}

This demo analyses instationary flow (Navier-Stokes equation) in a vessel with a stenosis (figure \ref{demomeshaxistenosis}) in an axi-symmetric configuration.

The demo manually adapts the mesh from \kwc{crmesh} to create the stenosis.

\caption{Mesh for \kwc{demo\_2df\_axi\_stenosis.m}. \label{demomeshaxistenosis}}

\caption{Mesh for \demo{demo\_2df\_axi\_stenosis.m}. \label{demomeshaxistenosis}}

\end{figure}

\subsection*{\kwc{demo\_2df\_planar\_cavity.m}}

\subsection*{\demo{demo\_2df\_planar\_cavity.m}}

This demo belongs to \cite[figures 2.6--2.8]{Oomens2019} and analyses driven cavity flow (Stokes equation) on a square domain with a planar configuration.

...

...

@@ -111,7 +111,7 @@ The demo uses essential boundary conditions on all edges, and therefore shows ho

\caption{Mesh for \kwc{demo\_2df\_planar\_splitvessel.m}. \label{demomeshplanarsplitvessel}}

\caption{Mesh for \demo{demo\_2df\_planar\_splitvessel.m}. \label{demomeshplanarsplitvessel}}

\end{figure}

\subsection*{\kwc{demo\_2df\_planar\_valve.m}}

\subsection*{\demo{demo\_2df\_planar\_valve.m}}

This demo analyses instationary flow (Navier-Stokes equation) in a cavity behind an open valve in a planar configuration (figure \ref{demomeshplanarvalve}).

...

...

@@ -132,7 +132,7 @@ The demo uses a non-trivial set-up for the definition of the domain (\kwo{points

\caption{Mesh for \kwc{demo\_2df\_planar\_valve.m}. The (impenetrable) valve is indicated with the blue line.\label{demomeshplanarvalve}}

\caption{Mesh for \demo{demo\_2df\_planar\_valve.m}. The (impenetrable) valve is indicated with the blue line.\label{demomeshplanarvalve}}

\end{figure}

...

...

@@ -140,63 +140,63 @@ The demo uses a non-trivial set-up for the definition of the domain (\kwo{points

\subsection{Linear}

\subsection*{\kwc{demo\_2ds\_axi\_cyl.m}}

\subsection*{\demo{demo\_2ds\_axi\_cyl.m}}

This demo analyses the planar deformation of a thick walled (hollow) cylinder in an axi-symmetric configuration with linear (`Hookean') elements.

The demo uses post-processing functions from \kwo{/library/postlib} to get results at an arbitrary line through the mesh, and compares these results with the theoretical solution.

The demo uses post-processing functions from \kdir{/library/postlib} to get results at an arbitrary line through the mesh, and compares these results with the theoretical solution.

See also \kwc{demo\_2ds\_axi\_cylup.m}.

See also \demo{demo\_2ds\_axi\_cylup.m}.

\subsection*{\kwc{demo\_2ds\_axi\_cylup.m}}

\subsection*{\demo{demo\_2ds\_axi\_cylup.m}}

This demo analyses the planar deformation of a thick walled (hollow) cylinder in an axi-symmetric configuration.

The demo uses the linear library \kwc{femlin\_e} with a fluid-pressure element (\kwc{elup}) to solve the problem with an incompressible Neo-Hookean material law (\kwc{elup}), for small deformations (\kwc{femlin\_e}).

The demo further uses post-processing functions from \kwo{/library/postlib} to get results at an arbitrary line through the mesh, and compares these results with the theoretical solution.

The demo further uses post-processing functions from \kdir{/library/postlib} to get results at an arbitrary line through the mesh, and compares these results with the theoretical solution.

See also \kwc{demo\_2ds\_axi\_cyl.m}.

See also \demo{demo\_2ds\_axi\_cyl.m}.

\subsection*{\kwc{demo\_2ds\_bar\_bending.m}}

\subsection*{\demo{demo\_2ds\_bar\_bending.m}}

This demo belongs to \cite[Example 18.1]{Oomens2018} and analyses the bending of a bar with linear (`Hookean') elements in a plane stress configuration.

The demo shows how to apply nodal forces and compares the analysis results with the linear theory for bar bending in the post-processing phase.

See \kwc{demo\_2ds\_barcneo\_bending.m} for a non-linear implementation.

See \demo{demo\_2ds\_barcneo\_bending.m} for a non-linear implementation.

\subsection*{\kwc{demo\_2ds\_bar\_shear.m}}

\subsection*{\demo{demo\_2ds\_bar\_shear.m}}

This demo belongs to \cite[exercise 18.6]{Oomens2018} and analyses the difference between (theoretical) simple shear and an `actual' shearing experiment with linear (`Hookean') elements in a plane stress configuration.

The demo shows how to apply height dependent boundary conditions (for the simple shear case), and how obtain reaction forces from the analysis results with \texttt{q} (global stiffness matrix from \kwc{femlin\_e}) and \kwo{sol}.

See \kwc{demo\_2ds\_barcneo\_shear.m} for a non-linear implementation.

See \demo{demo\_2ds\_barcneo\_shear.m} for a non-linear implementation.

This demo analyses the bending of a bar with non-linear (`Neo-Hookean') elements in a plane strain configuration.

The demo shows how to apply nodal forces and compares the analysis results with the linear theory for bar bending in the post-processing phase.

See \kwc{demo\_2ds\_bar\_bending.m} for a linear implementation.

See \demo{demo\_2ds\_bar\_bending.m} for a linear implementation.

\subsection*{\kwc{demo\_2ds\_barcneo\_shear.m}}

\subsection*{\demo{demo\_2ds\_barcneo\_shear.m}}

This demo analyses the (theoretical) simple shear case from \cite[exercise 18.6]{Oomens2018} with non-linear (`Neo-Hookean') elements in a plane strain configuration.

The demo shows how to apply height dependent boundary conditions, and how obtain reaction forces from the right-hand-side array \kwo{rhs} in the analysis results.

See \kwc{demo\_2ds\_bar\_shear.m} for a linear implementation.

See \demo{demo\_2ds\_bar\_shear.m} for a linear implementation.

\subsection*{\kwc{demo\_2ds\_barcneo\_uniax.m}}

\subsection*{\demo{demo\_2ds\_barcneo\_uniax.m}}

This demo analyses uniaxial extension of a bar with non-linear (`Neo-Hookean') elements in a plane strain configuration.

In this chapter we will have a closer on \kwc{demo\_1d\_conv\_diffusion.m}:

In this chapter we will have a closer on \demo{demo\_1d\_conv\_diffusion.m}:

\begin{lstlisting}[language=mlfem]

%%%%%%%%%%%%%%%%%%%%%%%% demo of fem1dcd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% %

...

...

@@ -88,7 +88,7 @@ Note that before anything else, we start with the definition of the global geome

19 & 20 & 21 & 1 & 1\end{bmatrix}

\end{equation*}

}

\caption{Meshes for the demo \kwc{demo\_1d\_conv\_diffusion.m} (10 elements on $[0, 1]$) with \textbf{(a)} linear elements (\kwo{norder}$=1$), and \textbf{(b)} quadratic elements (\kwo{norder}$=2$). Node numbers are on top of the mesh, element numbers (color coded) are between brackets below the mesh. Note the differences (e.g.\ number of nodes, width of \kwo{top}), and the similarities (e.g.\ the numbers of rows in \kwo{top}). \label{1dmeshes}}

\caption{Meshes for the demo \demo{demo\_1d\_conv\_diffusion.m} (10 elements on $[0, 1]$) with \textbf{(a)} linear elements (\kwo{norder}$=1$), and \textbf{(b)} quadratic elements (\kwo{norder}$=2$). Node numbers are on top of the mesh, element numbers (color coded) are between brackets below the mesh. Note the differences (e.g.\ number of nodes, width of \kwo{top}), and the similarities (e.g.\ the numbers of rows in \kwo{top}). \label{1dmeshes}}

\caption{Figure produced by demo file \kwc{demo\_1d\_conv\_diffusion.m}. The (upper) straight blue line is for the initial conditions, the other \kwo{ntime} lines are the results for the \kwo{ntime} time-steps. Also $u(x=0)=0$ and $u(x=1)=1$, always, as prescribed. See also figure \ref{Fig:ch2fig2}.\label{fig:Ch5fig1}}

\caption{Figure produced by demo file \demo{demo\_1d\_conv\_diffusion.m}. The (upper) straight blue line is for the initial conditions, the other \kwo{ntime} lines are the results for the \kwo{ntime} time-steps. Also $u(x=0)=0$ and $u(x=1)=1$, always, as prescribed. See also figure \ref{Fig:ch2fig2}.\label{fig:Ch5fig1}}

@@ -9,7 +9,7 @@ The chapter is still `under construction' (purpose and functionality of some ele

\section{General}

The element functions are held in the directory \kwo{/library/elmlib}. All elements come with so `support' functions, and a number of elements allows working with axi-symmetric geometries, and/or with time-dependent problems. \\

The element functions are held in the directory \kdir{/library/elmlib}. All elements come with so `support' functions, and a number of elements allows working with axi-symmetric geometries, and/or with time-dependent problems. \\

\noindent In general (the 1D elements are an exception), an element function is called as:

\begin{lstlisting}[language=mlfem,numbers=none]

...

...

@@ -27,7 +27,7 @@ Element matrices are build with $\col{N}$, the column with shape functions for t

\subsection{Element support functions}

Each element `\kwo{elmfnc}' comes with additional `support' functions in \kwo{/library/elmlib}. These support functions are relevant when you wish to change element types for a certain problem, e.g.\ from a linear to a quadratic element or from a triangle to a quadrilateral. The `main' element functions `\verb|elmfnc|' in the following sections may work for different shape functions, number of nodes etc., but all the actual bookkeeping for this is done in the `support' functions.\\

Each element `\kwo{elmfnc}' comes with additional `support' functions in \kdir{/library/elmlib}. These support functions are relevant when you wish to change element types for a certain problem, e.g.\ from a linear to a quadratic element or from a triangle to a quadrilateral. The `main' element functions `\verb|elmfnc|' in the following sections may work for different shape functions, number of nodes etc., but all the actual bookkeeping for this is done in the `support' functions.\\

\noindent\kwo{elmfnc\_i}: these functions provide all sorts of information such as the number of degrees of freedom for each node, the shape function identifiers to be used in \kwo{elmfnc\_s}, and information about the number of derived quantities at each integration point and nodal points as computed by \kwo{elmfnc\_d}.\\

\kwo{elmfnc\_s}: these functions compute the shape functions and their derivatives locally (per element) based on information from \kwo{elmfnc}.\\

...

...

@@ -92,7 +92,7 @@ end

% part of mlfem_nac: https://gitlab.tue.nl/STEM/mlfem_nac

\end{lstlisting}

The default behavior of \kwc{elm1d\_c} is to use a constant value $c$ for \kwo{mat.mat}\texttt{(1)}$\geq0$, and to switch to a coordinate dependent value otherwise. You can use a copy of this function (original in \kwo{/library/elmlib}) in your working directory to change this behavior. \\

The default behavior of \kwc{elm1d\_c} is to use a constant value $c$ for \kwo{mat.mat}\texttt{(1)}$\geq0$, and to switch to a coordinate dependent value otherwise. You can use a copy of this function (original in \kdir{/library/elmlib}) in your working directory to change this behavior. \\

\noindent Call:

\begin{lstlisting}[language=mlfem,numbers=none]

...

...

@@ -108,7 +108,7 @@ with

\begin{itemize}

\item the theory behind this element is described in chapter 14 of the book `Biomechanics: Concepts and Computation' \cite{Oomens2018}.

\item each node has single degree of freedom.

\item this element is used in \kwc{demo\_1d\_diffusion.m}.

\item this element is used in \demo{demo\_1d\_diffusion.m}.

\end{itemize}

...

...

@@ -167,7 +167,7 @@ h & = \max(x_\mathrm{e}) - \min(x_\mathrm{e})\\

\item the theory behind this element for the Galerkin method (\texttt{fsupg}$=0$) is described in chapter 15 of the book `Biomechanics: Concepts and Computation' \cite{Oomens2018}.

\item this is a linear element (there is no `\kwo{norder}$=2$') but \kwo{norder}$=1$ still has to be explicitly set for the element support functions.

\item each node has single degree of freedom.

\item this element is used in \kwc{demo\_1d\_conv\_diffusion.m}.

\item this element is used in \demo{demo\_1d\_conv\_diffusion.m}.

~\\ The parameters $v_{x,y}$ in \kwo{mat.mat}\texttt{(2:3)} are passed to the function \kwc{elcd\_a} together with the integration point coordinates $x$ and $y$. So the function \kwc{elcd\_a} can be used to work with a coordinate dependent velocity profile $(a_x, a_y)$ based on $(v_x, v_y)$.

The default behavior of \kwc{elcd\_a} in \kwo{/library/elmlib} is to use constant velocities ($a_x = v_x$, $a_y = v_y$). An example with coordinate dependent profiles can be found in \kwo{/demofiles}:

The default behavior of \kwc{elcd\_a} in \kdir{/library/elmlib} is to use constant velocities ($a_x = v_x$, $a_y = v_y$). An example with coordinate dependent profiles can be found in \kdir{/demofiles}:

\item the theory behind this element is described in chapter 16 of the book `Biomechanics: Concepts and Computation' \cite{Oomens2018}.

\item each node has single degree of freedom.

\item this element is used in \kwc{demo\_2d\_1dmimic\_conv\_diffusion.m}\\and \kwc{demo\_2d\_planar\_conv\_diffusion.m}.

\item this element is used in \demo{demo\_2d\_1dmimic\_conv\_diffusion.m}\\and \demo{demo\_2d\_planar\_conv\_diffusion.m}.

\end{itemize}

...

...

@@ -320,7 +320,7 @@ The matrices $\mat{B}$ and $\mat{H}$ are calculated with:

\item the theory behind this element is described in chapter 18 of the book `Biomechanics: Concepts and Computation' \cite{Oomens2018}.

\item the plane strain and plane stress $\mat{H}$ matrices are the subject of exercise 18.1 in the book `Biomechanics: Concepts and Computation' \cite{Oomens2018}.

\item each node has two degrees of freedom.

\item this element is used in \kwc{demo\_2ds\_axi\_cyl.m}, \kwc{demo\_2ds\_bar\_bending.m} and \\\kwc{demo\_2ds\_bar\_shear.m}.

\item this element is used in \demo{demo\_2ds\_axi\_cyl.m}, \demo{demo\_2ds\_bar\_bending.m} and \\\demo{demo\_2ds\_bar\_shear.m}.

\end{itemize}

\subsection{Isotropic Hookean with reduced integration: \kwc{eler}}\label{eler}

...

...

@@ -448,7 +448,7 @@ Mandatory input consists of the two parameters $\kappa$ and $G$ in equation \ref

\item the theory behind this element is described in chapter 3 of the lecture notes for the course 8MM30--NAC II \cite{Oomens2019}.

\item each node has two degrees of freedom.

\item this element uses the updated Lagrange method.

\item this element is used in \kwc{demo\_2ds\_barcneo\_shear.m} and \kwc{demo\_2ds\_barcneo\_uniax.m}.

\item this element is used in \demo{demo\_2ds\_barcneo\_shear.m} and \demo{demo\_2ds\_barcneo\_uniax.m}.

\end{itemize}

...

...

@@ -464,7 +464,7 @@ This element is an implementation of the isotropic linear elastic element \kwc{e

\item each node has two degrees of freedom.

\item this element uses the support functions from \kwc{elcneo}.

\item this element uses the total Lagrange method.

\item this element is used in \kwc{demo\_2ds\_barcneo\_bending.m}.

\item this element is used in \demo{demo\_2ds\_barcneo\_bending.m}.

\item the linear quads with mid-point (\kwo{ietype}$> 5$, figure \ref{elupbilin}) do not satisfy the \textsl{inf-sup} condition \cite[section 2.3.2]{Oomens2019}.

The `engine' park (chapter \ref{introduction}, phase 2) of \mlfem{} consists of six scripts. These scripts can be found in the \kwo{/library/main}. They

The `engine' park (chapter \ref{introduction}, phase 2) of \mlfem{} consists of six scripts. These scripts can be found in the \kdir{/library/main}. They

\begin{itemize}

\item read and interpret the input arrays (\kwo{coord}, \kwo{top}, \kwo{mat}, \kwo{bndcon}, etc.);

\item call the element functions to calculate the element contributions to the stiffness matrix and right-hand side of each element;

...

...

@@ -88,7 +88,7 @@ mat.mat(3) = f % the distributed load or source term

mat.mat(4) = norder % 1 for a linear element, 2 for a quadratic element

mat.types = 'elm1d' % element type

\end{lstlisting}

This engine is used in \kwc{demo\_1d\_diffusion.m}.

This engine is used in \demo{demo\_1d\_diffusion.m}.

@@ -400,7 +400,7 @@ ntime = 10; % number of time steps

\subsection{Options for \kwc{sysbuild}}\label{sysbuildextra}

The engines for 2D problems (\kwc{femlin\_cd}, \kwc{femlin\_e}, \kwc{femnl} and \kwc{femnlt}) use the function \kwc{sysbuild} for building matrices and calculating solutions. This function \kwc{sysbuild} requires an input argument \kwc{options} (table \ref{optionssysbuild}) that is set by the main engine.

The engines for 2D problems (\kwc{femlin\_cd}, \kwc{femlin\_e}, \kwc{femnl} and \kwc{femnlt}) use the function \kwc{sysbuild} for building matrices and calculating solutions. This function \kwc{sysbuild} requires an input argument \kwo{options} (table \ref{optionssysbuild}) that is set by the main engine.

\begin{table}[h]

\center

\caption{The \kwo{options} input argument for \kwc{sysbuild}. The value \texttt{1} switches an option on, the value \texttt{2} switches an option off.\label{optionssysbuild}}

\caption{Installation of \mlfem . With \textbf{(a)} browse \textsl{with Matlab} to your \textsl{unpacked}\mlfem -directory and run the script \kwc{startup\_nac.m} for installation of \mlfem ; and \textbf{(b)} successful installation and execution of the demo file \kwc{demo\_1d\_conv\_diffusion.m} should result in this figure (see also chapter \ref{demosimple}).}

\caption{Installation of \mlfem . With \textbf{(a)} browse \textsl{with Matlab} to your \textsl{unpacked}\mlfem -directory and run the script \kwc{startup\_nac.m} for installation of \mlfem ; and \textbf{(b)} successful installation and execution of the demo file \demo{demo\_1d\_conv\_diffusion.m} should result in this figure (see also chapter \ref{demosimple}).}

\end{figure}

\noindent After unpacking the following steps have to be taken:

...

...

@@ -35,22 +35,22 @@ Note that you \textsl{have} to unpack the archive. Some operating systems allow

\item Select the correct `current directory', i.e.\ browse to your \textsl{unpacked} archive folder \textsl{in Matlab}. Make sure that you see that Matlab lists the \textsl{unpacked} folders (figure \ref{Fig:ch2fig1}, top left Matlab panel).

\item In this folder, there is a script called \kwc{startup\_nac.m}. This is a script that sets the \mlfem-library paths for Matlab, so that all scripts in the different libraries can be found by Matlab. \\

Run that script (right mouse button, run; or type \kwc{startup\_nac.m} in the command window). After you have run \kwc{startup\_nac.m} your Matlab environment should look like figure \ref{Fig:ch2fig1}.

\item The program library includes a number of demo files, which are examples of simulations that can be done with the finite element code. These demo files can be found in the directory \kwo{/demofiles}. To test whether the software is properly installed you change to the directory \kwo{/demofiles} and run \kwc{demo\_1d\_conv\_diffusion.m}. This should result in figure \ref{Fig:ch2fig2}.

\item The program library includes a number of demo files, which are examples of simulations that can be done with the finite element code. These demo files can be found in the directory \kdir{/demofiles}. To test whether the software is properly installed you change to the directory \kdir{/demofiles} and run \demo{demo\_1d\_conv\_diffusion.m}. This should result in figure \ref{Fig:ch2fig2}.