\chapter{Introduction} 
\label{chapterIntroduction}

\section{Purpose and scope of this document} \label{sec:PurposeAndScope}

This document contains the functional design for the \ProgramName, a user interface for the DAM Engine. The DAM Engine is designed for the automated calculation of the strength of dikes.
DAM was developed by Deltares with and for STOWA for all water authorities.
This document describes requirements and functional design of \ProgramName. 
What will actually will be implemented depends on the requirements of the clients using this \ProgramName.
If some functionality is not (yet) needed, then that part does not need to be implemented. 

\subsection{Future options}
\label{sec:FutureOptions}
As mentioned above this document contains some options that will not be implemented in the first release, but are foreseen to be implemented in the near future. Therefore although sometimes a reference will be made to these options, these will not be described in detail yet.

That applies in particular to the following subjects:
\begin{itemize}
	\item NWO module("Niet Waterkerende Objecten")
	\item WBI failure mechanisms (Piping, Macrostability)
\end{itemize}
\section{Other system documents} 
\label{sec:SystemDocuments}

The full documentation on the program comprises the following documents.

\renewcommand{\arraystretch}{1.3}

\begin{table}[H]
%\caption{xxx}
%\label{xxx}
\begin{tabular}{|p{40mm}|p{\textwidth-40mm-24pt}|} \hline
\textbf{Title} & \textbf{Content} \\ \hline
\ProgramName - Architecture Overall \newline \citep{DAM_ArchitectureOverall} & Description of overall architecture of the \ProgramName and its components. \\ \hline
\ProgramName- Functional Design\newline  \citep{DAMEngine_FunctionalDesign} & Description of the requirements and functional design. \\ \hline
\ProgramName - Technical Design\newline \citep{DAMEngine_TechnicalDesign}& Description of the implementation of the technical design of \ProgramName. \\ \hline
\ProgramName - Technical documentation \newline \citep{DAMEngine_TechnicalDocumentation} & Description of the arguments and usage of different software components, generated from in-line comment with Doxygen. \\ \hline
\ProgramName - Test Plan \newline \citep{DAMEngine_TestPlan} & Description of the different regression and acceptation tests, including target values.  \\ \hline
\ProgramName - Test Report \newline \citep{DAMEngine_TestReport} & Description of the test results (benchmarks and test scripts). \\ \hline
Architecture Guidelines \newline \citep{ArchitectureGuidelines} & Architecture guidelines that are used by DSC-Deltares. \\ \hline
\end{tabular}
\caption{\small \ProgramName system documents.}
\label{table-SystemDocuments}
\end{table}

\section{Document revisions}
\label{sec:DocumentRevisions}
\subsection{Revision 0.1}
\label{sec:Revision01}
First concept of the document.

\subsection{Revision 0.3}
\label{sec:Revision03}
Added more functional requirements.
\begin{itemize}
	\item Create Design project.
	\item Create Calamity project
	\item Perform Design calculation - No adaption.
	\item Perform Design calculation - With adaption.
	\item Display results in graphic view.
	\item Open individual D-Stability projects.
	\item Multi-language.
	\item Multi-core calculation.
	\item Changing units.
	\item Real-time validation.
	\item Calculation log.
	\item Undo-Redo.
\end{itemize}

\subsection{Revision 0.4}
\label{sec:Revision04}
Removed functional requirement:
\begin{itemize}
	\item Create Calamity project
\end{itemize}

\chapter{Non-functional requirements}

\chapter{Functional requirements}

Main purpose of the \ProgramName
The \ProgramName can import data and combines this data to make geotechnical calculations. After calculations (made by DAM Engine) the \ProgramName shows the results and make analyzation possible.

\section{User story Data format}
As a geotechnical engineer I want to store my data in a predescribed format, so that I can reuse the data. The design of this functionality is described in \autoref{sec:USDataFormat}.

\section{User story GIS Data combination}
As a geotechnical engineer I want to combine GIS data per location, so that I don't have to do that by hand. The design of this functionality is described in \autoref{sec:DataExtraction}

\section{User story Soil Data combination}
As a geotechnical engineer I want to combine subsoil with surfaceline per location, so that I don't have to draw 2D geometries. The design of this functionality is described in \autoref{sec:GeometryGeneration}

\section{User story Create Design project}
As a geotechnical engineer I want to create a Design project in which I can import project information and perform calculations with certain settings and for given situations.
I can either just calculate the safety factors of the current situation or design (adapt geometry) to a required safety factor.
The design of this functionality is described in \autoref{sec:USCreateDesignProject}.

\section{User story DAMLive configuration}
As a geotechnical engineer I want to make a DAMLive configuration, so that I can make calculations with DAM engine, using sensors for the input of piezometric lines. 
The design of this functionality is described in \autoref{sec:USDAMLiveConfiguration}.

\section{User story Save and Open project}
As a geotechnical engineer I want to save the current state of a project and open existing projects to see what data is used and which calculations are made with what result.
The design of this functionality is described in \autoref{sec:USSavingOpeningProject}.

\section{User story Data display}
As a geotechnical engineer I want to see the data per location in tables, cross section and map view, 
so I can check the data before calculation. 
The design of this functionality is described in \autoref{sec:USDataDisplay}.

\section{User story Data editing}
As a geotechnical engineer I want to edit the data per location, so I can adapt the data before calculation. 
The design of this functionality is described in \autoref{sec:USDataEdit}.

\section{User story Calculation settings}
As a geotechnical engineer I want to see and be able to adapt the calculation settings, so I can decide what calculations are made.
The design of this functionality is described in \autoref{sec:USCalcSettings}.

\section{User story Perform Design calculation - No adaption}
As a geotechnical engineer I want to be able to make a calculation in a Design project based on the input parameters. 
The most important outcome of the calculation are the safety factors.
The design of this functionality is described in \autoref{sec:USCalculationDesignNoAdaption}.

\section{User story Perform Design calculation - With adaption}
As a geotechnical engineer I want to be able to make calculations in a Design project 
with adaption of the geometry of the dike
if the calculated safety factor is lower than the required safety factor. 
The adaptation must have the options to increase the crest, change the angle of the slope, 
create a berm or a combination of these options according to given settings.
The design of this functionality is described in \autoref{sec:USCalculationDesignWithAdaption}.

\section{User story Display results in table form}
As a geotechnical engineer I want to see the results of the calculations, so I can evaluate the calculations. 
The design of this functionality is described in \autoref{sec:USDisplayResultsTable}.

\section{User story Display results in graphic view}
As a geotechnical engineer I want to see the results of the calculations in a graphic view, so I can evaluate the calculations. 
This includes the adapted surfaceline and the resulting slipcircle.
The design of this functionality is described in \autoref{sec:USDisplayResultsGraphic}.

\section{User story Export data}
As a geotechnical engineer I want to export data as tables (CSV-format) and/or shapes, so I can use the data for other purposes.
The design of this functionality is described in \autoref{sec:USDataExport}.

\section{User story Open individual D-Stability projects}
As a geotechnical engineer I want to be able to open each individual stability calculation in D-Stability.
The design of this functionality is described in \autoref{sec:USOpenDStability}.

\section{User story Multi-language}
As a geotechnical engineer I want to be able to set the language of the User Interface to Dutch or English.
The design of this functionality is described in \autoref{sec:USMultiLanguage}.

\section{User story Multi-core calculation}
As a geotechnical engineer I want to be use multiple processor cores during the calculations to decrease the total calculation time.
The design of this functionality is described in \autoref{sec:USMultiCore}.

\section{User story Changing units}
As a geotechnical engineer I want to be be able to change the units that are used in the User Interface.
The design of this functionality is described in \autoref{sec:USUnits}.

\section{User story Real-time validation}
As a geotechnical engineer I want the input data to be validated 
during the use of the application (real-time/on the fly) given the (calculation) settings. 
The validation results are shown in a validation overview.
The design of this functionality is described in \autoref{sec:USRealTimeValidation}.

\section{User story Calculation log}
As a geotechnical engineer I want to see a log of the errors and warnings that are generated during a calculation.
The design of this functionality is described in \autoref{sec:USCalculationLog}.

\section{User story Undo-Redo}
As a geotechnical engineer I want to be able to undo and redo my changes of the data in the User Interface.
The design of this functionality is described in \autoref{sec:USUndoRedo}.

