Index: dam engine/trunk/doc/Dam Engine - Functional Design/DAM Engine - Functional Design.tex
===================================================================
diff -u -r310 -r365
--- dam engine/trunk/doc/Dam Engine - Functional Design/DAM Engine - Functional Design.tex	(.../DAM Engine - Functional Design.tex)	(revision 310)
+++ dam engine/trunk/doc/Dam Engine - Functional Design/DAM Engine - Functional Design.tex	(.../DAM Engine - Functional Design.tex)	(revision 365)
@@ -108,15 +108,19 @@
 \section{REQ Data.Content}\label{sec:REQDataContent}
 The \ProgramName has a defined content for the data input, so DAM Clients know how to arrange the input data.
 
-\section{REQ Data.Combination}\label{sec:REQDataCombination}
-The \ProgramName combines data per location. Locations are defined with RD-coordinates
+\section{REQ Data.Combination}\label{sec:REQDataCombi}
+The \ProgramName combines data per location when data is provide in GIS-files. Locations are defined by RD-coordinates.
 
+\section{REQ Data.Generation.Geometry}\label{sec:REQDataGenerationGeometry}
+The \ProgramName can combine a surface line with a subsoil scenario. The result is a geometry, usable for the failure mechanism Macrostability. 
 
+section{REQ Data.Generation.Waterpressures}\label{sec:REQDataGenerationWater}
+The \ProgramName can combine the hydraulic data with a subsoil scenario. The result is a schematization of the waterpressures, usable for the failure mechanisms Piping and Macrostability. 
 
 \section{REQ Calc.Type}\label{sec:REQCalcType}
 The \ProgramName provides three types of calculations:
 \begin{enumerate}
-	\item One-fold calculation: the input goes 'through' the kernel and generates one main calculation answer (assessment);
+	\item One-fold calculation: the input goes 'through' the kernel(s) and generates one main calculation answer (assessment);
 	\item Goal-seeking calculation: the input contains one variable and a desired outcome, the answer is the variable sufficient for the goal (design);
 	\item Time-lapsed calculation; calculations are made as time serie (operational).
 \end{enumerate}
@@ -130,24 +134,28 @@
 	\item Design of normative NWO-location, given dimensions of NWO and required safety factor: Design-NWO
 \end{itemize}
 
-
 \section{REQ Calc.Assess.General}\label{sec:REQCalcAssessGeneral}
+The DAM engine provides a Factor of safety. This may be one calculation or several. More than one calculation becames available when using several locations and/or several scenarios.
 
+\section{REQ Calc.Assess.Loadscenarios}\label{sec:REQCalcAssessLoadscenarios}
+The DAM engine must be able to calculate several load scenarios with different input data per location.
 
 \section{REQ Calc.Assess.Regional}\label{sec:REQCalcAssessRegional}
 For the assessment of regional dikes, \ProgramName must calculate several assessment scenarios (RRD-scenario), depending on:
- 
+  
  \begin{itemize}
-	\item the type embankment (peat/other); green block in \autoref{fig:RRDPeat.png} and \autoref{fig:RRDClay.png)
-	\item the hydraulic shortcut (yes/no); brown block in \autoref{fig:RRDPeat.png} and \autoref{fig:RRDClay.png) and in detail in \autoref{fig:HydraulicShortcut}
-	\item the uplift situation (yes/no); blue block in \autoref{fig:RRDPeat.png} and \autoref{fig:RRDClay.png)
+	\item the type embankment (peat/other); green block in \autoref{fig:RRDClay} and \autoref{fig:RRDPeat};
+	\item the hydraulic shortcut (yes/no); brown block in \autoref{fig:RRDClay}, \autoref{fig:RRDPeat} and in detail in \autoref{fig:HydraulicShortcut};
+  \item the uplift situation (yes/no); purple blocks in \autoref{fig:RRDClay} and blue blocks in \autoref{fig:RRDPeat}.
 \end{itemize}
 
+This results in a variation of RRD scenarios, summed up in \autoref{tab:RRDScenarios}
+
 \begin{figure}[H]
   \begin{center}
     \includegraphics[width=15cm]{pictures/RRDClay.png}
   \end{center}
-  \caption{Flowchart of embankements other than peat}
+  \caption{Flowchart of embankments other than peat}
   \label{fig:RRDClay}
 \end{figure}
 
@@ -156,15 +164,16 @@
   \begin{center}
     \includegraphics[width=15cm]{pictures/RRDPeat.png}
   \end{center}
-  \caption{Flowchart of embankements of peat}
+  \caption{Flowchart of embankments of peat}
   \label{fig:RRDPeat}
 \end{figure}
 
 \begin{figure}[H]
   \begin{center}
     \includegraphics[width=15cm]{pictures/HydraulicShortcut.png}
   \end{center}
-  \caption{FlowcharHydraulicShortcut}
+  \caption{Flowchart of hydraulic shortcut}
+	\label{fig:HydraulicShortcut}
 \end{figure}
 
 
@@ -186,45 +195,202 @@
 11 & Dry & yes/no & yes & Piping \\ \hline
 \end{tabular}
 \caption{RRD scenarios}
-\label{RRDScenarios}
+\label{tab:RRDScenarios}
 \end{table}
 
 
-
-\subsection{The condition (dry/wet)
-For embankements made of peat is it ne
-
-
-
-
-
 \section{REQ Calc.Operational.Sensor}\label{sec:REQOperationalSensor}
+The DAM Engine must be able to use sensor data as input for the generation of water pressures.
 
-
 \section{REQ Calc.Design.Geometry}\label{sec:REQDesignGeometry}
+The DAM engine must be able to generate new profiles (surfacelines) based on desired Factor of safety.
 
 \section{REQ Calc.Design.NWO}\label{sec:REQDesignNWO}
 This will not be part of the first implementation of DAM Engine and therefor this paragraph has
 not yet been written.
 
-
 \section{REQ Failuremechanism}\label{sec:REQFailuremechanism}
 
 The \ProgramName provides calculations for following failure mechanisms, so the DAM Clients can provide this functionality.
 \begin{enumerate}
-	\item Macrostability inwards
-	\item Macrostability outwards
-	\item Piping
+	\item Macrostability inwards;
+	\item Macrostability outwards;
+	\item Piping;
 \end{enumerate}
 
-
 \section{REQ Output.format}\label{sec:REQOutputFormat}
 The \ProgramName has a defined format for the data output, so DAM Clients know how to present the output data.
 
-\section{REQ Data.Content}\label{sec:REQDataContent}
-The \ProgramName has a defined content for the data output, so DAM Clients know how to present the input data.
 
+\chapter{REQDataGenerationWater}\label{sec:REQDataGenerationWater}
 
+The \ProgramName can combine the hydraulic data with a subsoil scenario. The result is a schematization of the waterpressures, usable for the failure mechanisms Piping and Macrostability. 
+
+\section{Conditions under which the automatic generation works} \label{sec:Conditions}
+Under certain circumstances, the kernel must be able to produce the water pressures in the geometry. If the following circumstances are met, the water pressures will be schematized following the guidelines [Technisch Rapport Waterspanningen bij dijken (2004)] during a high water tide.
+
+The requirements to automatically produce water pressures are as follows:
+\begin{itemize}
+	\item Minimum of one and maximum of two aquifers;
+	\item The aquifers reach from one boundary to the other (CNS 8);
+	\item The generator only works if the high water table is on the left side.
+\end{itemize}
+
+\section{Procedure for schematisation of the water pressures}\label{sec:procedure}
+
+The steps for the schematization of the water pressures are:
+\begin{enumerate}
+	\item The schematisation of the phreatic plane (see \autoref{sec:frea-vlak}).
+	\item Initial schematisation of piezometric heads  (see \autoref{sec:ini_stijghoogten}).
+	\item Checking for uplift (see \autoref{sec:contr_opdrijf}).
+	\item Definitive schematisation of pore pressures  (see \autoref{def_wsp}).
+\end{enumerate}
+
+\section{Schematisation of the phreatic plane}\label{sec:frea-vlak}
+There are currently two different approaches to the schematisation of the position of the phreatic plane: :  
+\begin{enumerate}
+	\item ExpertKnowledgeRRD
+	\item ExpertKnowledgeLinearInDike
+\end{enumerate}
+
+The schematisation method can be selected by the user in the base data (attribute: PLLineCreationMethod). The schematisation method and the associated values can be defined at the location level.
+
+The phreatic plane is referred to as Piëzometric Line 1 (PL1). 
+
+\subsection {ExpertKnowledgeRRD}
+The ExpertKnowledgeRDD method sets out the location of the phreatic plane at a maximum of 6 points: A to F. \autoref{fig:PL1_RRD}	lists these points. The level of the phreatic plane is defined by entering a number of vertical offsets relative to the outer water level or the ground level. \Autoref{tab:OffsetRRD} lists for each point how it is determined/recorded. The location of the phreatic plane between the points is determined on the basis of linear interpolation. 
+
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=0.5\textwidth]{pictures/PL1_RRD.png}
+	\caption{Schematisation freactic line (PL1) Macrostability inward using ExpertKnowledgeRRD}
+	\label{fig:PL1_RRD}
+\end{figure}
+
+\begin{table}[H]
+	\centering
+		\begin{tabular}{ |p{25mm} |p{100mm} |}
+    \hline
+\textbf{Punt}	& \textbf{Elevation determined by}	\\ \hline
+\textit{A} & Intersection of the water level with the outer slope (determined automatically) \\ \hline
+\textit{B} & Outer water level – stated offset \\ \hline
+\textit{C} & Outer water level – stated offset \\ \hline
+\textit{D} & Ground level shoulder base inside – stated offset\\ \hline
+\textit{E} & Ground level  inner toe – stated offset\\ \hline
+\textit{F} & Intersection of polder level with ditch (is determined automatically). \\ \hline
+		\end{tabular}
+	\caption{Parameters for each schematisation point used to locate the phreatic plane in the ExpertKnowledgeRRD schematisation option}
+	\label{tab:OffsetRRD}
+\end{table}
+
+Lower levels relative to the reference point/plane are stated as positive values. When schematising a rise in the phreatic plane under the crest, the offset are stated as a negative value. 
+
+
+\subsection {ExpertKnowledgeLineairDike}
+Here, the phreatic plane starts where the outer water level (Point A in \autoref{fig:PL1_Lineair} intersects the outer slope. It then continues in a straight line to point E and then to point F. 
+
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=0.5\textwidth]{pictures/PL1_Lineair.png}
+	\caption{Schematisation freactic line (PL1) Macrostability inward using ExpertKnowledgeLineair}
+	\label{fig:PL1_Lineair}
+\end{figure}
+
+
+\subsection{Particular cases} \label{sec:ParticularCases}
+
+The checks below apply to the four scenario's.
+
+\paragraph*{Free water}
+The procedure must check that the phreatic plane along the dike does not extend beyond the slope. If this the case, the location is automatically adapted to follow the surface level one centimeter lower. \\
+Free water in the polder side is allowed. However the polder water level is limited by the surface level outside (right geometry boundary).
+
+\paragraph*{No ditch, no shoulder}
+If there is no shoulder, point D will be omitted. If there is no ditch, the offset at point E will be continued with a limit of 1 cm below the surface line.
+
+\paragraph*{Phreatic line goes up}
+The procedure must ensure that the location of the phreatic plane is not below the stated polder level at points D and E as a result of the stated offsets. If this is the case, the location of the phreatic plane will automatically be matched to the polder level. In addition, the procedure must ensure that the phreatic plane at points D and E is not higher than at the preceding points. Point C may be higher than point B.
+
+\subsection{Minimum values below dike crest} \label{sec:MinimumValues}
+The phreatic levels at points B and C is limited by user-defined minimal values:
+\begin{itemize}
+	\item Z$_{\text{min;crest river}}$, the minimum value below the dike top at river;
+	\item Z$_{\text{min;crest polder}}$, the minimum value below the dike top at polder.
+\end{itemize}
+
+The minimum value below point B when point B does not correspond to the dike top at river must be deduced by interpolation or extrapolation between points (X$_{\text{crest river}}$; Z$_{\text{min;crest river}}$) and (X$_{\text{crest polder}}$; Z$_{\text{min;crest polder}}$.
+
+
+\section {Initial schematisation of piezometric heads}\label{sec:ini_stijghoogten}
+\ProgramName can manage a maximum of two aquifers. \ProgramName also takes the ‘penetration layer’ (TAW, 2004) into account. For the time being, this option works only with 1D soil profiles. If the calculations have to be made without a penetration layer, a value of 0 should be entered (attribute: PenetrationLength).
+
+\ProgramName defines the aquifers from bottom to top (in the direction of the surface). A piezometric line (PL3) is assigned to the bottom layer (which is also an aquifer) (\autoref{fig:wsp_1WL}). The pore pressures in the penetration layer are schematised using PL2. PL4 will be allocated to any additional aquifer. \autoref{tab:piezolijnen} gives an overview of the various piezometric lines and associated schematisati
+on.
+
+If several aquifers are stacked in succession one above the other, \ProgramName will allocate the same PL to all of them, assuming a hydrostatic range for the pore pressures. The separation between the aquifer and cohesive layer is then determined by the top of the highest aquifer in the stack.
+
+For the purposes of the stability calculations, \ProgramName schematises the piezometric heads in the vertical direction using linear interpolation in the soft layers. A hydrostatic range is assumed in the dike body, the soil layers where the phreatic plane is located and the aquifers. 
+
+\begin{table}[H]
+	\centering
+		\begin{tabular}{ |p{25mm} |p{100mm} |}
+    \hline
+\textbf{PL}	& \textbf{Description}	\\ \hline
+\textit{PL1} & Freatische lijn. Phreatic line. For stability calculations with a stationary phreatic plane. The  schematisation for PL1 is described in \autoref{sec:frea-vlak}\\ \hline
+\textit{PL2} & The pore pressure at the top of the penetration layer. The PL2 is not affected by the piezometric head in the underlying aquifer and it is constant (in other words, there is no damping) over the entire width of the cross-section. The user enters the value for PL2 (attribute: HeadPL2), as well as the thickness of the penetration layer. DAM 1.0 uses the PL2 only if the thickness of the penetration layer >0 m.\newline
+Note: at present, the use of PL2 is still limited to 1D soil profiles.
+\\ \hline
+\textit{PL3} & Pore pressure in the bottom aquifer. The value can be entered (attribute: HeadPL3). If no value is entered, PL3 is considered to be the same as the outer water level stated in the scenarios (see section 2.6). 
+\newline
+The value for PL3 at the inner toe (\autoref{fig:dempingfactor}) depends on the stated damping factor (attribute: DampingPL3). This damping factor expresses the degree to which PL3 is damped to PL2. Zero means no damping (PL3 is constant). And the value 1 suggests full damping to PL2 (attribute: PL2). If no value has been entered for PL2, the polder water level will be used (attribute: PolderLevel). Beyond the inner toe, the PL3 declines to the polder level at a gradient to be stated (attribute: SlopeDampingPiezometricHeightPolderSide). The PL3 then matches the polder level. A value can be entered for the gradient of this PL slope. The default value is 0. This means there is no slope.  
+ \\ \hline
+\textit{PL4} & Pore pressure in an intermediate aquifer (if present). The schematisation for PL4 is similar to that described for PL3. However, PL3 should be read as PL4.\newline
+Note: Both PL3 and PL4 use the same gradient for the slope of the PL line on the polder side.
+\\ \hline
+		
+	\end{tabular}
+	\caption{Overview and description of piezometric lines}
+	\label{tab:piezolines}
+\end{table}
+
+
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=1\textwidth]{pictures/wsp_1WL.png}
+	\caption{Schematisatie van waterspanningen in de situatie van \'e\'en watervoerende laag}
+	\label{fig:wsp_1WL}
+\end{figure}
+
+
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=1\textwidth]{pictures/dempingfactor.png}
+	\caption{Gebruik van dempingsfactor (f) en reductie pi\"ezolijn aan de polderzijde (X) voor schematisatie horizontaal stijghoogteverloop}
+	\label{fig:dempingfactor}
+\end{figure}
+
+
+\section {Controle op opdrijven}\label{sec:contr_opdrijf}
+Vanaf de binnenteen tot midden slootbodem, wordt door \ProgramName berekeningen gemaakt of er opdrijven optreedt. Hiervoor wordt de formule uit het VTV (2006) gebruikt en de initiële schematisatie van de stijghoogten (zie \autoref{sec:ini_stijghoogten})\newline
+
+\begin{equation}
+\label{eq_opdrukveiligheid}
+	opdrukveiligheid = \frac{\sigma_g}{\sigma_w}
+\end{equation}
+
+Als er geen sloot aanwezig is, worden de berekeningen tot de grens van het dwarsprofiel uitgevoerd. Indien er opdrijven wordt berekend, reduceert \ProgramName de PL3 of PL4 naar een waarde waarbij opdrijven net niet meer optreedt, of te wel labiel evenwicht (zie \autoref{fig:redPL})
+
+\begin{figure}[H]
+	\centering
+		\includegraphics[width=1\textwidth]{pictures/redPL.png}
+	\caption{Reductie stijghoogte bij opdrijven. \ProgramName controleert van de binnenteen tot het einde van het profiel op opdrijven en past daarop de stijghoogte aan tot labiel evenwicht}
+	\label{fig:redPL}
+\end{figure}
+
+\section {Definitieve schematisatie waterspanningen}\label{def_wsp}
+Op basis van de initi\"ele generatie van de waterspanningen en controle op opdrijven wordt de definitieve schematisatie van de waterspanningen aangemaakt. Hierbij wordt in horizontale richting lineair ge\"interpoleerd tussen de verschillende (berekende) knikpunten in de PL lijnen.
+
+
 %------------------------------------------------------------------------------
 %\chapter{System Architecture} \label{chapterSystemArchitecture}
 %
