Index: DamEngine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.pdf =================================================================== diff -u -r942 -r945 Binary files differ Index: DamEngine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex =================================================================== diff -u -r942 -r945 --- DamEngine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex (.../DAM Engine - Technical Design.tex) (revision 942) +++ DamEngine/trunk/doc/Dam Engine - Technical Design/DAM Engine - Technical Design.tex (.../DAM Engine - Technical Design.tex) (revision 945) @@ -487,6 +487,7 @@ \section{\ProgramName supporting modules} \label{sec:DAMEngineSupportingModules} \subsection{Failure mechanism wrapper interface} +\label{sec:FailureMechanismWrapperInterface} For each \kernel a specific wrapper will be written. This wrapper must implement a specific interface, so the \ProgramName can support the use of the \kernel. The interface that must be implemented is IFailureMechanism.\newline Example: @@ -758,28 +759,48 @@ \chapter{Adding a Failure Mechanism} \label{chapterAddingFailureMechanism} Adding a new failure mechanism to \ProgramName is something that should be releative easy to do. The architecture of \ProgramName has been setup in a way that all failure mechanism specific code is put as much as possible in 1 place. -\section{Failure Mechanism Wrapper} -\label{sec:FailureMechanismWrapper} +When a new failure mechanism is to be implemented, several steps have to be taken. +\begin{itemize} + \item Add Failure Mechanism Wrapper (this is the main place for all failure mechanism specific code). + \item Create an Instance of a Failure Mechanism Wrapper. + \item Add Failure Mechanism Specific Data to Data Model. + \item Add Failure Mechanism Specific Data to XML Input. + \item Add Failure Mechanism Specific Data to XML Output. +\end{itemize} -\section{Creating an Instance of a Failure Mechanism Wrapper} -\label{sec:CreatingInstanceFailureMechanismWrapper} +In the following sections the steps are illustrated with the piping Bligh Failure mechanism. -\section{Adding Failure Mechanism Specific Data to Data Model} -\label{sec:AddingFailureMechanismSpecificDataToDataModel} +\section{Add Failure Mechanism Wrapper} +\label{sec:AddFailureMechanismWrapper} +Create a failure mechanism wrapper that conforms to the failure mechanism wrapper interface as described in \autoref{sec:FailureMechanismWrapperInterface}. The implementation of the wrapper for Piping Bligh can be found in the class \newline +Deltares.DamEngine.Calculators.KernelWrappers.DamPipingBligh. -\section{Adding Failure Mechanism Specific Data to XML Input} -\label{sec:AddingFailureMechanismSpecificDataToXmlInput} +\section{Create an Instance of the Failure Mechanism Wrapper} +\label{sec:CreateInstanceFailureMechanismWrapper} +To be able to use the Failure Mechanism wrapper an instance has to be instantiated. For all failure mechanisms this is done in \newline Deltares.DamEngine.Calculators.KernelWrappers.Common.KernelWrapperHelper.CreateKernelWrapper(). -\section{Adding Failure Mechanism Specific Data to XML Output} -\label{sec:AddingFailureMechanismSpecificDataToXmlOutput} +\section{Add Failure Mechanism Specific Data to Data Model} +\label{sec:AddFailureMechanismSpecificDataToDataModel} +This is only needed, if the data that is already implemented in the \ProgramName, is not enough to meet the necessary input data for the failure mechanism kernel. Or if more result data has to be added to accommodate the passing of the failure mechanism output. For piping Bligh e.g. the Soil parameter Soil.PermeabKx has been added (among other parameters) as input. As output the output class PipingDesignResults has been added. + +\section{Add Failure Mechanism Specific Data to XML Input} +\label{sec:AddFailureMechanismSpecificDataToXmlInput} +This is only needed when the data model has been changed (see \autoref{sec:AddFailureMechanismSpecificDataToDataModel}) to accommodate more input properties. To change the input XML definition, the DamInput.xsd definition or one of its dependend xsd's has to be adapted (see \autoref{app:DamInput}). Also the reader and writer routines have to be adapted. This can be done in the class \newline +Deltares.DamEngine.Interface.FillDamFromXmlInput. + +\section{Add Failure Mechanism Specific Data to XML Output} +\label{sec:AddFailureMechanismSpecificDataToXmlOutput} +This is only needed when the data model has been changed (see \autoref{sec:AddFailureMechanismSpecificDataToDataModel}) to accommodate more output properties. To change the output XML definition, the DamOuput.xsd definition or one of its dependend xsd's has to be adapted (see \autoref{app:DamOutput}). Also the reader and writer routines have to be adapted. This can be done in the class \newline +Deltares.DamEngine.Interface.FillXmlOutputFromDam. %------------------------------------------------------------------------------ \chapter{Literature} \label{chapterLiterature} \bibliography{../DAM_references/dam_references} \appendix %---------------------------------------- -\chapter{DamInput} \label{app:DamInput.XSD} +\chapter{DamInput} +\label{app:DamInput} These are the XSD's that apply to the input XML of the \ProgramName. \section{DamInput.xsd}