\usepackage{showexpl}% not a real PSTricks package
\usepackage{babel}
\usepackage{makeidx,luximono}
\makeindex
\usepackage[dvips,colorlinks,linktocpage]{hyperref} % PDF-support
%
\lstset{explpreset={numbers=left,numberstyle=\tiny,numbersep=.3em,
xleftmargin=1em,columns=flexible,language=PSTricks,keywordstyle=\small\ttfamily\bfseries,
moredelim=**[is][\bf\color{blue}]},
pos=t,width=-99pt,
overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,basicstyle=\ttfamily\small}
%
\begin{document}
%
\title{\texttt{pst-stru}:\newline Structural schemes v0.12}
\author{Giuseppe Matarazzo\thanks{%
Thanks to Manuel Luque who inspired and initially supported this work.\newline
Documentation revised by Herbert Vo�\newline
This program can be redistributed and/or modified under the terms
of the LaTeX Project Public License Distributed from CTAN archives
in directory macros/latex/base/lppl.txt.}}
\maketitle
\begin{abstract}
\texttt{pst-stru} is a PSTricks package to draw structural schemes in
civil engineering analysis (beams, portals, archs, piles).
\end{abstract}
\section[Elastic line]{Elastic Line of a simple beam loaded with
concentrated load P at the center line}
\noindent
{\emph Bernoulli's Equation}: $EJ\eta''=-M$ \\
\noindent
The {\bf elastic curve} of the assigned beam AB (P loaded at mid-span) is
obtained by computing the Bending Moment of the auxiliary beam A'B'
to which is applied the BM of AB (EJ=const)
\[
EJ\cdot \eta = \frac{Pl^2}{16}x - \frac{P}{12}x^3
\quad \quad 0 \leq x \leq l/2
\]
\begin{LTXexample}[wide=true]
\begin{pspicture}(-1,-2.4)(9,4.5)
\pnode(0,3){A}\pnode(8,3){B}\pnode(0,0){A1}\pnode(8,0){B1}\pnode(4,0){M}
\psline[linewidth=1.5pt](0,3)(8,3) % Beam AB
\psArrowCivil[RotArrows=0,length=1.5,start=0.5,%
linecolor=blue,arrowsize=1.8mm,OffsetLabel=0.2,linewidth=1pt](A)(B){\rput{90}{P}}
\rput{0}(A){\hinge} \rput{0}(B){\roller}
\psline[linecolor=red,fillcolor=yellow,fillstyle=solid](0,0)(4,1)(8,0)
\rput(0,2){\Large A} \rput(8,2){\Large B}
%% 1st half load
\multido{\nStart=1.00+0.05}{-19}{%
\psArrowCivil[RotArrows=0,length=\nStart,start=\nStart,linecolor=magenta](A1)(M){}}
%% 2nd half load
\multido{\nStart=1.00+0.05}{-19}{%
\psArrowCivil[RotArrows=180,length=\nStart,start=\nStart,linecolor=magenta](B1)(M){}}
\pcline{<->}(4,0)(4,1)\lput*{:R}{\bf d}
\rput(6,1){$d=P\frac{l}{2}$} \rput(0,0.5){\Large A'} \rput(8,0.5){\Large B'}
\pcline[linecolor=blue]{|-|}(0,-2)(8,-2)\lput*{:U}{\bf $l$}
% Paramenters #1 P = 6 #2 l=8 #3 scale factor =0.02
%----------- Elastic curve of beam AB ----------------------
\def\ElasticAB#1#2#3{#1 16.0 div #2 #2 x mul mul mul
#1 -12.0 div x x x mul mul mul add #3 mul neg}
\pscustom[linecolor=blue,linewidth=1pt,fillstyle=solid,fillcolor=lightgray]{%
\psplot[]{0.0}{4.0}{\ElasticAB{6}{8}{0.02}}
\psline(4,0)(0,0)}
\psline[linewidth=1.5pt](0,0)(8,0) % Beam A'B'
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}
\begin{pspicture}(-1,-3.5)(11,3)
% Total span is (K+1) times L, say AC=(K+1)*L [K=dimensionless value]
\triload[K=1,P=8,L=5] % k=1 -> AB=BC
% \triload[K=0.333,P=8,L=7.5] % k=1/3, like example 6
% \triload[K=2,P=8,L=3] % k=2 -> BM always NEGATIVE in the whole structure
% \triload[K=2.5,P=8,L=2] % k>2 -> Reaction in C downwards
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}
\begin{pspicture}(-1,-5.5)(11,2.5)
% \psgrid[subgriddiv=0,griddots=10,gridlabels=7pt,gridcolor=magenta]
% Total span is (K+1) times L, say AC=(K+1)*L [K=dimensionless value]
% \triload[K=1,P=8,L=5] % k=1 -> AB=BC
\triload[K=0.333,P=8,L=7.5] % k=1/3, like example 6
% \triload[K=2,P=8,L=3] % k=2 -> BM always NEGATIVE in the whole structure
% \triload[K=2.5,P=8,L=2] % k>2 -> Reaction in C downwards
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}
\begin{pspicture}(-1,-3)(11,5)
% \psgrid[subgriddiv=0,griddots=10,gridlabels=7pt,gridcolor=magenta]
% Total span is (K+1) times L, say AC=(K+1)*L [K=dimensionless value]
% ------------------------------------
% \triload[K=1,P=8,L=5] % k=1 -> AB=BC
% \triload[K=0.333,P=8,L=7.5] % k=1/3, like example 6
\triload[K=2,P=8,L=3] % k=2 -> BM always NEGATIVE in the whole structure
% \triload[K=2.5,P=8,L=2] % k>2 -> Reaction in C downwards
% ------------------------------------
\end{pspicture}
\end{LTXexample}
\begin{LTXexample}
\begin{pspicture}(-1,-3)(11,4)
% \psgrid[subgriddiv=0,griddots=10,gridlabels=7pt,gridcolor=magenta]
% Total span is (K+1) times L, say AC=(K+1)*L [K=dimensionless value]
% ------------------------------------
% \triload[K=1,P=8,L=5] % k=1 -> AB=BC
% \triload[K=0.333,P=8,L=7.5] % k=1/3, like example 6
% \triload[K=2,P=8,L=3] % k=2 -> BM always NEGATIVE in the whole structure
\triload[K=2.5,P=8,L=2] % k>2 -> Reaction in C downwards
% ------------------------------------
\end{pspicture}
\end{LTXexample}
\clearpage
\section{Non-symmetric superimposed dead load}
\clearpage
\section[Triangular distributed load p]{Simple Beam with one overhang: triangular distributed load p}
\begin{LTXexample}
\begin{pspicture}(-1,-3.5)(9,1.5)
\pnode(0,0) {A}\pnode(2,0) {B}\pnode(8,0) {C}
\rput{0}(C){\hinge}\rput{0}(B){\roller}
\psline[linecolor=red,fillcolor=yellow,fillstyle=solid](0,0)(8,0)(8,1)(0,0)
\multido{\nStart=1.00+0.025}{-37}{%
\psArrowCivil[RotArrows=0,length=\nStart,start=\nStart,%
linecolor=magenta](A)(C){}}
\rput(8.3,0.4){\large p} \rput(0,-0.4){\Large A}
\rput(2,-1){\Large B} \rput(8.3,-0.6){\Large C}
\pcline[offset=0,linecolor=blue]{|-|}(0,-3)(2,-3) \lput*{:U}{\bf $\frac{l}{3}$}
\pcline[offset=0,linecolor=blue]{|-|}(2,-3)(8,-3) \lput*{:U}{\bf $l$}
%%%========================================================================
% Paramenters: #1 p = 6 #2 l = 6 #3 scale factor =0.15
%----------- Bending Moment in span AB ----------------------
\def\MflettAB#1#2#3{#1 #2 div -.125 mul x mul x mul x mul #3 mul neg}
\pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{
\psplot[]{0}{2}{\MflettAB{6}{6}{0.15}}\psline[](2,0)(0,0)}
%----------- Shear in span AB ----------------------
\def\TaglioAB#1#2#3{#1 #2 div -.375 mul x mul x mul #3 mul}
\pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{
\psplot[]{0}{2}{\TaglioAB{6}{6}{0.15}}\psline[](2,0)(0,0)}
%----------- Bending Moment in span BC ----------------------
\def\MflettBC#1#2#3{#1 #2 div -.125 mul x mul x mul x mul
#1 3.375 div #2 mul x mul add #1 10.125 div #2 mul #2 mul sub #3 mul neg}
\pscustom[linecolor=blue,linewidth=1pt,fillstyle=hlines]{%
\psplot[]{2}{8}{\MflettBC{6}{6}{0.15}}\psline[](8,0)(2,0)}
%----------- Shear in span BC ----------------------
\def\TaglioBC#1#2#3{#1 #2 div -.375 mul x mul x mul
#1 3.375 div #2 mul add #3 mul}
\pscustom[linecolor=green,linewidth=1pt,fillstyle=crosshatch]{%
\psplot[]{2}{8}{\TaglioBC{6}{6}{0.15}}\psline[](8,0)(2,0)(2,1.4)}
%%%========================================================================
\psline[linewidth=1.5pt](0,0)(8,0) % Printing beam AC after diagrams BM/S
\rput(3,1.6){\em {\scriptsize Shear diagram (green boundary)}}
\rput(3,-1.6){\em {\scriptsize Bending Moment diagram (blue boundary)}}
\rput(2,-1.9){\scriptsize [assumed positive downwards]}
\rput(5,-1){\bf {\large +}} \rput(2.5,0.6){\bf {\large +}}
\rput(7.7,-1.3){\bf {\Large -}}
\end{pspicture}
\end{LTXexample}