Commit 09b58ee5 authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

update element matrices in documenation

parent 10ca8ebb
......@@ -13,12 +13,12 @@ The element functions are held in the directory \kwo{/library/elmlib}. All eleme
\noindent In general (the 1D elements are an exception), an element function is called as:
\begin{lstlisting}[language=mlfem,numbers=none]
[qme, qde, qe, rhse] = name(ielem, coord, top, mat, pos, sol, ...
[Me, Ce, Ke, rhse] = name(ielem, coord, top, mat, pos, sol, ...
extra1, extra2, extra3)
\end{lstlisting}
Not all elements require (all) \texttt{extra} input arguments.
The first three output arguments contain the element matrices $\mat{M}_\mathrm{e}$ (\kwo{qme}, `mass'), $\mat{C}_\mathrm{e}$ (\kwo{qde}, `damping' or `convective') and $\mat{K}_\mathrm{e}$ (\kwo{qe}, `stiffness' ). The fourth output argument \kwo{rhse} contains the column for $\col{f}_\mathrm{e}$, the `right-hand-side' array' for the element.
The first three output arguments contain the element matrices $\mat{M}_\mathrm{e}$ (\kwo{Me}, `mass'), $\mat{C}_\mathrm{e}$ (\kwo{Ce}, `damping' or `convective') and $\mat{K}_\mathrm{e}$ (\kwo{Ke}, `stiffness' ). The fourth output argument \kwo{rhse} contains the column for $\col{f}_\mathrm{e}$, the `right-hand-side' array' for the element.
Not all matrices are used in all elements. Output for a redundant element matrix is an empty array.
......@@ -100,7 +100,7 @@ The default behavior of \kwc{elm1d\_c} is to use a constant value $c$ for \kw
\end{lstlisting}
with
\begin{align}
\text{\kwo{qe}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \deriv{\col{N}}{x} c \deriv{\colt{N}}{x} \diff x \label{qe}\\
\text{\kwo{Ke}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \deriv{\col{N}}{x} c \deriv{\colt{N}}{x} \diff x \label{Ke}\\
\text{\kwo{rhse}} & = \col{f}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} f \diff x \label{rhse}
\end{align}
......@@ -143,13 +143,13 @@ parameter & description & comment\\
\noindent Call:
\begin{lstlisting}[language=mlfem,numbers=none]
[qme, qde, qe, rhse] = elm1dcd(ielem, coord, top, mat)
[Me, Ce, Ke, rhse] = elm1dcd(ielem, coord, top, mat)
\end{lstlisting}
with
\begin{align}
\text{\kwo{qme}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N}\colt{N} \diff x \\
\text{\kwo{qde}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} v \deriv{\colt{N}}{x} \diff x \\
\text{\kwo{qe}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \deriv{\col{N}}{x} c \deriv{\colt{N}}{x} \diff x \tag{\ref{qe}}\\
\text{\kwo{Me}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N}\colt{N} \diff x \\
\text{\kwo{Ce}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} v \deriv{\colt{N}}{x} \diff x \\
\text{\kwo{Ke}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \deriv{\col{N}}{x} c \deriv{\colt{N}}{x} \diff x \tag{\ref{Ke}}\\
\text{\kwo{rhse}} & = \col{f}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} f \diff x \tag{\ref{rhse}}
\end{align}
For the Galerkin method. The Streamline upwind Petrov-Galerkin formulation uses a different mass and convection matrix:
......@@ -157,8 +157,8 @@ For the Galerkin method. The Streamline upwind Petrov-Galerkin formulation uses
h & = \max(x_\mathrm{e}) - \min(x_\mathrm{e})\\
\beta & = \frac{\abs{v}\cdot h}{2c}\\
\alpha & = \coth(\beta)-\frac{1}{\beta}\\
\text{\kwo{qme}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \left(\col{N}+\frac{h\alpha v}{2\abs{v}}\pderiv{\col{N}}{x}\right) \colt{N}\diff x \\
\text{\kwo{qde}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \left(\col{N}+\frac{h\alpha v}{2\abs{v}}\pderiv{\col{N}}{x}\right) v \deriv{\colt{N}}{x} \diff x
\text{\kwo{Me}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \left(\col{N}+\frac{h\alpha v}{2\abs{v}}\pderiv{\col{N}}{x}\right) \colt{N}\diff x \\
\text{\kwo{Ce}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \left(\col{N}+\frac{h\alpha v}{2\abs{v}}\pderiv{\col{N}}{x}\right) v \deriv{\colt{N}}{x} \diff x
\end{align}
......@@ -209,14 +209,14 @@ The default behavior of \kwc{elcd\_a} in \kwo{/library/elmlib} is to use consta
\noindent Call:
\begin{lstlisting}[language=mlfem,numbers=none]
[qme, qde, qke, rhse] = elcd(ielem, coord, top, mat, pos, sol, ...
[Me, Ce, Ke, rhse] = elcd(ielem, coord, top, mat, pos, sol, ...
soln)
\end{lstlisting}
with
\begin{align}
\text{\kwo{qme}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N}\colt{N} \diff\Omega_\mathrm{e}\\
\text{\kwo{qde}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} \left(v_x \pderiv{\colt{N}}{x} + v_y \pderiv{\colt{N}}{y}\right) \diff \Omega_\mathrm{e} \\
\text{\kwo{qke}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} c\left(\pderiv{\col{N}}{x} \pderiv{\colt{N}}{x} + \pderiv{\col{N}}{y} \pderiv{\colt{N}}{y} \right) \diff\Omega_\mathrm{e} \\
\text{\kwo{Me}} & = \mat{M}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N}\colt{N} \diff\Omega_\mathrm{e}\\
\text{\kwo{Ce}} & = \mat{C}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \col{N} \left(v_x \pderiv{\colt{N}}{x} + v_y \pderiv{\colt{N}}{y}\right) \diff \Omega_\mathrm{e} \\
\text{\kwo{Ke}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} c\left(\pderiv{\col{N}}{x} \pderiv{\colt{N}}{x} + \pderiv{\col{N}}{y} \pderiv{\colt{N}}{y} \right) \diff\Omega_\mathrm{e} \\
\text{\kwo{rhse}} & = \col{f}_\mathrm{e} = \col{0}
\end{align}
......@@ -290,15 +290,15 @@ Mandatory input consists of the two parameters $E$ and $\nu$ in equations \ref{e
\noindent Call:
\begin{lstlisting}[language=mlfem,numbers=none]
[qme, qde, qe, rhse] = ele(ielem, coord, top, mat, pos, sol, ...
[Me, Ce, Ke, rhse] = ele(ielem, coord, top, mat, pos, sol, ...
soln)
\end{lstlisting}
with
\begin{align}
\text{\kwo{qe}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \matt{B}\mat{H}\mat{B} \diff\Omega_\mathrm{e} \label{qeele}\\
\text{\kwo{Ke}} & = \mat{K}_\mathrm{e} = \int_{\Omega_\mathrm{e}} \matt{B}\mat{H}\mat{B} \diff\Omega_\mathrm{e} \label{qeele}\\
\text{\kwo{rhse}} & = \col{f}_\mathrm{e} = \col{0}
\end{align}
The output arguments \kwo{qme} and \kwo{qde} are empty: these are not used, but they are included for consistency between element function calls.
The output arguments \kwo{Me} and \kwo{Ce} are empty: these are not used, but they are included for consistency between element function calls.
The matrices $\mat{B}$ and $\mat{H}$ are calculated with:
\begin{align}
......@@ -380,7 +380,7 @@ parameter & description & comment\\
\noindent Call:
\begin{lstlisting}[language=mlfem,numbers=none]
[qme, qde, qe, rhse] = elefib(ielem, coord, top, mat, pos, sol, ...
[Me, Ce, Ke, rhse] = elefib(ielem, coord, top, mat, pos, sol, ...
soln)
\end{lstlisting}
with the output as in \kwc{ele} except that the $\mat{H}$ matrix is given by:
......
......@@ -6,7 +6,7 @@ morekeywords = {clearvars,function,end,unique,numel},
classoffset=1,
morekeywords={coord, top, pos, dest, nodfrc, bndcnd,inode,ielem,maxnodelm,iimat,iitype, mat,types,idof,ibnd,bndcon,nodfrc,sol,points,curves,subarea,usercurves,userpoints,
usersurfaces,itime,norder,istat,ntime,dt,theta,ietype, nincr, newtoptions,solinc,itype,
qe, qem, qme, qke, rhse, qde, qed,soln},
Ke, Me, Ce, rhse, soln},
keywordstyle=\color{orange},
classoffset=2,
morekeywords={startup_nac,
......
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