work on tuto

compare_results
Theophile Terraz 2024-09-30 17:38:11 +02:00
parent c4da75fe6a
commit 6c8a2013d9
2 changed files with 157 additions and 71 deletions

View File

@ -120,7 +120,8 @@ Utilisez le bouton de t
\section{Créer une première étude}
Dans la fenêtre principale, cliquez sur \texttt{[Fichier] => [Nouvelle étude]} pour créer une nouvelle étude. Choisissez un nom, par exemple Hogneau, et validez.
Dans la fenêtre principale, cliquez sur \texttt{[Fichier] => [Nouvelle étude]} pour créer une nouvelle étude.
Choisissez un nom, par exemple \textit{Hogneau}, et validez.
\begin{center}
\includegraphics[width=15cm]{img/NEWSTUDY.png}
@ -152,7 +153,7 @@ Fermez la fen
\section{Éditer la géometrie de la rivière}
Cliquez sur \texttt{[Géometrie] => [Modifier la géometrie]} pour définir la géométrie du bief sélectionné.
Cliquez sur \texttt{[Géometrie] => [Modifier la géometrie]} ou sur l'icône \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/geometry.png} pour définir la géométrie du bief sélectionné.
Pour Importer une géométrie depuis un fichier, cliquez sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/import.png}.
Sélectionnez le fichier \texttt{Data/Bief\_1.st}.
Vous devriez voir :
@ -173,10 +174,14 @@ S
\includegraphics[width=15cm]{img/editsect.png}
\par\end{center}
Sur le panneau de gauche se trouve la liste de tous les points de la section, avec leurs coordonnées, leur nom et leur abscisse transversale. La coordonnée Z du point le plus haut est inscrite en bleu et celle du point le plus bas en rouge. Les points peuvent avoir un nom. Si un point portant le même nom existe dans toutes les sections d'un bief, il forme une ligne longitudinale (ou ligne directrice). Par exemple, nous avons ici \textit{rg} et \textit{rd} qui représentent la rive gauche et la rive droite du lit mineur.
Sur le panneau de gauche se trouve la liste de tous les points de la section, avec leurs coordonnées, leur nom et leur abscisse transversale.
La coordonnée Z du point le plus haut est inscrite en bleu et celle du point le plus bas en rouge. Les points peuvent avoir un nom.
Si un point portant le même nom existe dans toutes les sections d'un bief, il forme une ligne longitudinale (ou ligne directrice).
Par exemple, nous avons ici \textit{rg} et \textit{rd} qui représentent la rive gauche et la rive droite du lit mineur.
Sur le graphique figure une projection de la section en travers.
Vous pouvez utiliser \texttt{[clic droit]} pour afficher une ligne d'eau fictive et visualiser des données géométriques utiles. Vous pouvez ensuite enlever cette ligne avec \texttt{[clic molette]}.
Vous pouvez utiliser \texttt{[clic droit]} pour afficher une ligne d'eau fictive et visualiser des données géométriques utiles.
Vous pouvez ensuite enlever cette ligne avec \texttt{[clic molette]}.
Vous pouvez maintenant fermer la fenêtre d'édition de la section en travers.
Revenons à la fenêtre \textit{Géométrie}.
@ -219,7 +224,8 @@ La fen
\section{Éditer les conditions aux limites}
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions aux limites et apports ponctuels]} ou sur l'icône \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/boundary_condition.png"}. Vous arrivez sur la fenêtre \textit{Conditions aux limites} :
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions aux limites et apports ponctuels]} ou sur l'icône \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/boundary_condition.png"}.
Vous arrivez sur la fenêtre \textit{Conditions aux limites} :
\begin{center}
\includegraphics[width=15cm]{img/boundary.png}
@ -230,7 +236,7 @@ Nous pouvons cliquer sur la nouvelle ligne pour s
Sélectionnez la cellule \textit{Nom} pour donner un nom à la condition limite.
Ici, nous définirons le débit mesuré lors de la crue de février 2002.
Vous pouvez nommer cette condition limite "crue2002".
Sélectionner la cellule \textit{Type} et utiliser la combo box pour mettre une loi Q(t) : débit en fonction du temps.
Sélectionner la cellule \textit{Type} et utiliser la combo box pour mettre une loi \textit{Q(t)} : débit en fonction du temps.
Sélectionnez la cellule \textit{Noeud} et attribuez cette condition au noeud amont.
Les noms des noeuds sont rappelés dans le panneau de droite, avec une vue du réseau.
Sélectionnez maintenant la ligne entière et cliquez sur le bouton d'édition \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}.
@ -256,7 +262,7 @@ Vous pouvez fermer les fen
\section{Créer les conditions initiales}
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions initiales]}.
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions initiales]} ou sur le racourci \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/boundary_condition.png"}.
Pour démarer, le code de calcul hydraulique a besoin de connaitre le débit et la cote de la surface libre de la rivière en tout point à l'instant initial.
Si vous ne connaissez pas ces conditions initiales, vous pouvez utiliser les boutons \texttt{[Générer une profondeur uniforme]}, \texttt{[Générer un débit uniforme]} ou \texttt{[Générer une cote uniforme]} pour laisser Pamhyr2 estimer une condition initiale à l'aide de la formule de Manning-Strickler.
Cliquez sur \texttt{[Générer un débit uniforme]} et saisissez un débit de $4 m^3/s$ dans la fenêtre contextuelle, et cochez \texttt{[Générer une profondeur]} pour générer une condition initiale de hauteur d'eau basée sur la formule de Manning-Strickler pour le débit donné.
@ -271,7 +277,7 @@ Vous pouvez
Cela revient à créer une bassine et à laisser le solveur la vider pour trouver un écoulement initial satisfaisant.
Lors des prochaines simulations, vous pouvez utiliser l'état final de la simulation précédente comme état initial.
Pour cela, cliquez sur \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/import.png} et retrouvez le résultat sous forma de fichier \textit{.BIN}.
Pour cela, cliquez sur \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/import.png} et retrouvez le résultat sous forme de fichier \textit{.BIN}.
Ce fichier de résultats se trouve normalement dans le sous-dossier \textit{\_PAMHYR\_/Hogneau/default-mage}.
Fermer la fenêtre \textit{Conditions initiales}
@ -284,7 +290,8 @@ Dans la fen
Dans un premier temps, vous devez définir des jeux de coefficients de Strickler.
Cliquez sur \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} pour ouvrir la fenêtre \textit{coefficients de Strickler}.
Vous pouvez y créer des couples de coefficients de Strickler, le premier pour le lit mineur, le second pour le lit moyen.
Cliquez quatre fois sur \textit{add} pour créer quatre nouveaux couples. Donnez-leur les valeurs suivantes :
Cliquez quatre fois sur \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} pour créer quatre nouveaux couples.
Donnez-leur les valeurs suivantes :
\begin{center}
\includegraphics[width=15cm]{img/K.png}
@ -294,8 +301,8 @@ Vous pouvez utiliser le bouton \includegraphics[width=0.5cm]{../../../src/View/u
Fermez la fenêtre \textit{Strickler}.
Dans la fenêtre \textit{Éditer les frottements}, ajoutez quatre lignes avec le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} pour créer quatre zones de frottement.
Chaque zone est définie par un PK \textit{début} et de \textit{fin} PK et un couple \textit{begin} et \textit{end} couple de Strickler.
Les couples de coefficients de Strickler à l'intérieur d'une zone sont interpolés à partir des couples \textit{begin} et \textit{end}.
Chaque zone est définie par un PK de \textit{début} et de \textit{fin} associés à un couple de coefficients de Strickler de \textit{début} et de \textit{fin}.
Les couples de coefficients de Strickler à l'intérieur d'une zone sont interpolés à partir des couples \textit{début} et \textit{fin}.
Dans notre cas, nous utiliserons des coefficients uniformes par zone.
Définissez les zones comme suit :
@ -315,13 +322,18 @@ Pamhyr2 permet de d
Dans notre cas, nous allons devoir modéliser deux ponts par des ouvrages hydrauliques.
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Ouvrages hydrauliques]} pour ouvrir la fenêtre des ouvrages hydrauliques.
Cliquez deux fois sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} pour créer deux ouvrages hydrauliques.
Chaque structure peut avoir un nom et doit avoir un bief et un PK. Définissez-les comme suit :
Chaque structure peut avoir un nom et doit avoir un bief et un PK.
Définissez-les comme suit :
\begin{center}
\includegraphics[width=15cm]{img/hs.png}
\par\end{center}
Sélectionnez le pont RD101 et cliquez sur \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} pour éditer les lois de cet ouvrage. Les ouvrages hydrauliques sont composés d'ouvrages hydrauliques élémentaires. Vous pouvez combiner les lois de plusieurs ouvrages hydrauliques élémentaires pour créer votre ouvrage. Un pont peut être modélisé comme une combinaison d'un orifice pour l'écoulement sous le pont et d'un déversoir pour l'écoulement au-dessus du pont. Créez deux ouvrages hydrauliques élémentaires à l'aide du bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} et définissez-les comme suit :
Sélectionnez le pont RD101 et cliquez sur \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} pour éditer les lois de cet ouvrage.
Les ouvrages hydrauliques sont composés d'ouvrages hydrauliques élémentaires.
Vous pouvez combiner les lois de plusieurs ouvrages hydrauliques élémentaires pour créer votre ouvrage.
Un pont peut être modélisé comme une combinaison d'un orifice pour l'écoulement sous le pont et d'un déversoir pour l'écoulement au-dessus du pont.
Créez deux ouvrages hydrauliques élémentaires à l'aide du bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} et définissez-les comme suit :
\begin{center}
\includegraphics[width=15cm]{img/SeuilRD101.png}
@ -329,7 +341,6 @@ S
\includegraphics[width=15cm]{img/OrificeRD101.png}
\par\end{center}
Revenez à la fenêtre \textit{Ouvrages hydrauliques} et appliquez la même procédure pour le pont de Thivencelle :
\begin{center}
@ -348,26 +359,27 @@ Dans la fen
Dans la fenêtre \textit{Paramètres du solveur}, sélectionnez l'onglet \textit{Mage v8}.
Gardez les paramètres du solveur par défaut, sauf le pas de temps minimum, que vous mettrez à 0.1.
En effet, durant la montée du pic de crue, le solveur a besoin de réduire le pas de temps suffisament pour permettre la convergence des itérations.
Pour accélérer les calculs, nous pouvons également dégrader la précision, à l'aide des facteurs de réduction de la précision.
Les précisions internes du solveur sont de $10{-9}$.
Cette précision est multipliée par le facteur de réduction de la précision : un facteur de 1000 ramènera donc la précision à $10{-5}$.
Pour utiliser ce facteur de réduction de la précision, il faut donner un \textit{nombre d'itérations à précision maximum} inférieur au \textit{nombre maximum d'itérations} : le solveur va d'abord tenter de converger avec un certain nombre d'itératons à la précision maximum avant de basculer sur une précision dégradée pour le reste des itérations.
% Pour accélérer les calculs, nous pouvons également dégrader la précision, à l'aide des facteurs de réduction de la précision.
% Les précisions internes du solveur sont de $10{-9}$.
% Cette précision est multipliée par le facteur de réduction de la précision : un facteur de 1000 ramènera donc la précision à $10{-5}$.
% Pour utiliser ce facteur de réduction de la précision, il faut donner un \textit{nombre d'itérations à précision maximum} inférieur au \textit{nombre maximum d'itérations} : le solveur va d'abord tenter de converger avec un certain nombre d'itératons à la précision maximum avant de basculer sur une précision dégradée pour le reste des itérations.
Fermer la fenêtre \textit{Paramètres du solveur}.
\section{Lancer la simulation}
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Lancer le solveur]}.
Sélectionnez \textit{Defaut-Mage - (Mage8)} et cliquez sur le bouton \textit{Exécuter}.
Deux fenêtres s'ouvrent : la fenêtre \textit{check list} et la fenêtre \textit{Log du solveur}.
La fenêtre \textit{Check list} donne quelques indications sur la validité de votre modèle, et la fenêtre \textit{Log du solveur} affiche les informations de calcul du solveur.
À partir de la fenêtre \textit{Log du solveur}, vous pouvez réexécuter le calcul en cliquant sur ou sur l'icône \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png}, et vous pouvez cliquer sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats}.
Sélectionnez \textit{Defaut-Mage - (Mage8)} et cliquez sur le bouton \textit{Lancer}.
La fenêtre \textit{Log du solveur} s'ouvre.
Cette fenêtre affiche les sorties texte du solveur.
À partir de la fenêtre \textit{Log du solveur}, vous pouvez réexécuter le calcul en cliquant sur l'icône \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/run.png}, et vous pouvez cliquer sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats}.
\section{Visualiser les résultats}
il est aussi possible d'ouvrir la fenêtre \textit{Résultats} si vous avez fermé la fenêtre \textit{Log du solveur}, en cliquant sur \texttt{[Résultats] => [Visualiser les derniers résultats]} à partir de la fenêtre principale.
Le panneau supérieur vous permet de sélectionner le bief, le panneau inférieur gauche vous permet de sélectionner une section dans ce bief.
Les trois diagrammes sur la droite montrent le bief et la section en travers de la même manière que dans la fenêtre \textit{Géométrie}. Vous pouvez utiliser le curseur du bas pour visualiser la cote de l'eau à différents pas de temps.
Les croix rouges dans les deux vues du haut correspondent aux points ou l'eau déborde de la géométrie.
Les trois diagrammes sur la droite montrent le bief et la section en travers de la même manière que dans la fenêtre \textit{Géométrie}.
Vous pouvez utiliser le curseur du bas pour visualiser les résultats à différents pas de temps.
Les croix rouges dans les deux vues du haut correspondent aux points ou l'eau déborde de la géométrie au moins une fois dans la simulation.
En pratique il n'y a pas de perte de volume par débordement en dehors du modèle, car le solveur ajoute un mur virtuel aux extrémités des sections.
Pour visualiser le débit, passez à l'onglet \textit{Hydrogramme}.
Pour créer des tracés 2D personnalisés, cliquez sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} en haut à gauche de la fenêtre.

View File

@ -112,9 +112,28 @@ Use the GNU Linux or the Windows download button depending on your system. On wi
\section{Create your first study}
On the main windows, click on \texttt{[Files] => [New Study]} to create a new study.
Give it a name, for example \textit{Hogneau}, and validate.
Click on \texttt{[River Network] => [Edit River Network]} to create the reaches of your river. In this window, you must define an oriented graph that represents the reaches of your river network: the edges are the reaches and the nodes are either upstream boundary conditions, downstream boundary conditions or junctions.
Press the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} to enter the \textit{add} mode. Create two nodes by clicking in the grey zone of the window, and create a link by clicking again on each node. press \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} again to exit the \textit{add} mode. You created your first reach, with an upstream node and a downstream node. In the lower part of the \textit{Edit River Network} window you can rename the nodes and the reaches. As the reach you created is automaticaly selected, all the next steps will apply to this reach. The window should look like that:
\begin{center}
\includegraphics[width=15cm]{img/NEWSTUDY.png}
\par\end{center}
During study, don't forget to save periodicaly your work, using the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/save.png} button on the main window.
\section{Create the structure of the river}
Click on \texttt{[River Network] => [Edit River Network]} or on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/network.png} shortcut to create the structure of your river.
In this window, you must define an oriented graph that represents the reaches of your river network: the edges are the reaches and the nodes are either upstream boundary conditions, downstream boundary conditions or junctions.
A default reach exists in a new study.
For this tutorial, we will delete it:
click on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/del.png} button to enter the \textit{Delete} mode, then click on the nodes.
We can now start with an empty window.
Press the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} to enter the \textit{Add} mode. Create two nodes by clicking in the grey zone of the window, and create a link by clicking again on each node.
Press \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} again to exit the \textit{Add} mode.
You created your first reach, with an upstream node and a downstream node.
In the lower part of the \textit{Edit River Network} window you can rename the nodes and the reaches.
As the reach you created is automaticaly selected, all the next steps will apply to this reach.
The window should look like that:
\begin{center}
\includegraphics[width=15cm]{img/network.png}
@ -125,13 +144,17 @@ Close the \textit{Edit River Network} window.
\section{Edit the river geometry}
Click on \texttt{[Geometry] => [Edit Geometry]} to define the geometry of the selected bief. Click on the \texttt{[Import]} button and select the file \texttt{Data/Bief\_1.st}. You should see:
Click on \texttt{[Geometry] => [Edit Geometry]} or on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/geometry.png} shortcut to define the geometry of the selected reach.
Click on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/import.png} button and select the file \texttt{Data/Bief\_1.st}.
You should see:
\begin{center}
\includegraphics[width=15cm]{img/Geo.png}
\par\end{center}
On the left panel is a list of all the cross sections with their name and longitudinal abscisa. In the top left plot you can see the top view of the river, on the top right panel the longitudinal cross-section of the river and in the bottom plot you can see the selected cross-section (blue) along with the next one (dashed purple) and previous one (dashed black). You can move in the section list using the slider at the very right of the window.
On the left panel is a list of all the cross sections with their name and longitudinal abscisa.
In the top left plot you can see the top view of the river, on the top right panel the longitudinal cross-section of the river and in the bottom plot you can see the selected cross-section (blue) along with the next one (dashed purple) and previous one (dashed black).
You can move in the section list using the right table or by clicking on the sections on one of the two upper plot.
You can edit the selected cross section by clicking on the \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} icon.
@ -141,58 +164,100 @@ select the cross section named \textit{PontRD101m} and open the edition window.
\includegraphics[width=15cm]{img/editsect.png}
\par\end{center}
On the left panel is the list of all the points of the section, with their coordinates, their name and their transversal absisa. The Z coordinate of the highest point is written in blue and the lowest in red. Points can have a name. If a point with the same name exists in every section in a reach, it forms a longitudinal line. For example, here we have \textit{rg} and \textit{rd} which represent the left bank and the right bank of the main chanel.
On the left panel is the list of all the points of the section, with their coordinates, their name and their transversal absisa.
The Z coordinate of the highest point is written in blue and the lowest in red.
Points can have a name.
If a point with the same name exists in every section in a reach, it forms a longitudinal line.
For example, here we have \textit{rg} and \textit{rd} which represent the left bank and the right bank of the main chanel.
On the plot is a projection of the cross section. You can use \texttt{[ctrl + click]} to select a point in the plot and \texttt{[shift + click]} to select a water line and visualize usefull geometric data. You can close the cross section edition window and the geometry edition window.
On the plot is a projection of the cross section. You can click on a point to select it in the plot and \texttt{[right click]} to draw a water line and visualize usefull geometric data.
You can then remove this line with \texttt{[scroll wheel click]}.
You can close the cross section edition window and the geometry edition window.
% TODO mesh
\section{Edit the boundary conditions}
From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and punctual contributions]}.You should see:
From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and punctual contributions]} or on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/boundary_condition.png"}.
You are now on the \textit{Boundary conditions} window:
\begin{center}
\includegraphics[width=15cm]{img/boundary.png}
\par\end{center}
Use the \textit{add} button on the top left of the window to add a liquid boundary condition.
Use the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} button on the top left of the window to add a liquid boundary condition.
On the new line, click to select the whole line, double click to select the cell.
Select the \textit{Type} cell to give a name to the boundary condition. here, we will define the flow discharge mesured during the february 2002 flood. You can name this boundary condition "flood2002".
Select the \textit{Type} cell and use the combo box to put a Q(t) law.
Select the \textit{Type} cell to give a name to the boundary condition.
Here, we will define the flow discharge mesured during the february 2002 flood.
You can name this boundary condition "flood2002".
Select the \textit{Type} cell and use the combo box to put a \textit{Q(t)} law.
Select the \textit{Node} cell and atribute this condition to the upstream node.
Names of the nodes are recalled in network in the right panel.
Now select the whole line and click on the edit button \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}. You opened the \textit{Edit Boundary Conditions} window.
On a text editor, open the \texttt{Data/Fevrier\_2002.txt} file. Copy the content of the file (for example with \textit{ctrl+a ctrl+c}) and paste it in the left panel of the \textit{Edit Boundary Conditions} window with \textit{ctrl+v}. You can now see the flow discharge curve:
Names of the nodes are recalled in the right panel with the network view.
Now select the whole line and click on the edit button \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}.
You opened the \textit{Edit Boundary Conditions} window.
In a text editor, open the \texttt{Data/Fevrier\_2002.txt} file.
Copy the content of the file (for example with \textit{ctrl+a ctrl+c}) and paste it in the left panel of the \textit{Edit Boundary Conditions} window with \textit{ctrl+v}.
You can now see the flow discharge curve:
\begin{center}
\includegraphics[width=15cm]{img/fev2002.png}
\par\end{center}
Close this window. Go back on the \textit{Boundary Conditions} window. Add a new line, give it a name, give it the textit{Z(T)} type and associate it to the downstream node of the network. Open the \textit{Edit Boundary Conditions} window (\includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}). Add two lines. In the first one, enter time: 0.00.00 and Z: 15.000.
On the second one, time: 1.00.00 and Z: 15.000. It creates a constant downstream water elevation. For the computaion, Mage will extrapolate continuously the water elevation, that's why we only need to define one hour.
Close this window.
Go back on the \textit{Boundary Conditions} window.
Add a new line, give it a name, give it the textit{Q(Z)} type (rating curve) and associate it to the downstream node of the network.
This downstream boundary condition corresponds to a weir.
There, the river transition from a fluvial flow to a torrential flow.
This allows us to compute a rating curve corresponding to the critical flow located over the weir.
Open the \textit{Edit Boundary Conditions} window (\includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}).
In the \textit{Edit boundary conditions} window click on \texttt{[Générer régime critique]} to comput the said rating curve.
Click on \texttt{[Make increasing]} to remove the points of the curve that are not strictly increasing.
You can close the the \textit{Edit Boundary Conditions} and the \textit{Boundary Conditions} window.
\section{Create initial conditions}
From the main window, click on \texttt{[Hydraulics] => [Initial conditions]}.
If you don't know the initial conditions in water elevation and flow discharge of the river, you can use \texttt{[Generate minimal height]} or \texttt{[Generate from discharge]} buttons to let Pamhyr2 estimate an initial condition using the Manning-Strickler formula.
Click on \texttt{[Generate from discharge]} and enter a discharge of $4 m^3$ in the pop-up window to generate an initial water height condition based on the Manning-Strickler formula and a uniform discharge of $4 m^3$. You should see:
From the main window, click on \texttt{[Hydraulics] => [Initial conditions]} or on the \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/boundary_condition.png"} shortcut.
To start, the numerical solver needs to know the water elevation and the discharge at every cross-section of the river.
If you don't know the initial water elevation and flow discharge conditions of the river, you can use the \texttt{[Generate minimal depth]}, \texttt{[Generate from discharge]} or \texttt{[Generate elevation]} buttons to let Pamhyr2 estimate an initial condition using the Manning-Strickler formula.
Click on \texttt{[Generate from discharge]} and enter a discharge of $4 m^3$ in the pop-up window, and check the \texttt{[Generate depth]} to generate an initial water elevation condition based on the Manning-Strickler formula.
You should see:
\begin{center}
\includegraphics[width=15cm]{img/ic.png}
\par\end{center}
You can alternately use \texttt{[Generate elevation]} to enter a constant elevation of $21 m$ (upstream and downstream) associated with a null discharge.
The goal is to create a lake and to let the solver drain it to find a suitable initial state.
In your next simulations, you can use the final timestep of the previous simulation as an initial condition.
To do that, click on \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/import.png} and find the results contained in a \textit{.BIN} file.
This file should be in the sub-directory \textit{\_PAMHYR\_/Hogneau/default-mage}.
Close the \textit{Initial conditions} window.
\section{Edit friction coefficients}
From the main window, click on \texttt{[Hydraulics] => [Edit friction]}.
You fist have to define sets of Strickler coefficients. Click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to open the \textit{Strickler} window. Here you can create couples of Strickler coefficients, the first one for the minor bed, the second one for the medium bed. Click on \textit{add} four times to create four new couple. Give them the folowing values:
We will now define the friction coefficients of the bottom of the river.
From the main window, click on \texttt{[Hydraulics] => [Edit friction]} or on the \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/friction.png"} shortcut.
You have to define sets of Strickler coefficients first.
Click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to open the \textit{Strickler} window.
Here you can create couples of Strickler coefficients, the first one for the minor bed, the second one for the medium bed.
Click on \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} four times to create four new couples.
Give them the folowing values:
\begin{center}
\includegraphics[width=15cm]{img/K.png}
\par\end{center}
Close the \textit{Strickler} window. On the \textit{Edit friction} window, add four lines with the button \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} to create four friction zones. Each zone is defined by a \textit{begin} and \textit{end} KP and a \textit{begin} and \textit{end} Strickler couple. The strickler coefficient couples inside a zone are interpolated from the \textit{begin} and \textit{end} couples. In our case, we will use constant coefficients per zone. Set the zones as follow:
You can use the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/sort_A-Z.png} button to sort the couples by alphabetical order.
Close the \textit{Strickler} window.
On the \textit{Edit friction} window, add four lines with the button \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} to create four friction zones.
Each zone is defined by a \textit{begin} and \textit{end} KP associated with a \textit{begin} and \textit{end} Strickler couple.
The strickler coefficient couples inside a zone are interpolated from the \textit{begin} and \textit{end} couples.
In our case, we will use uniform coefficients per zone.
Set the zones as follow:
\begin{center}
\includegraphics[width=15cm]{img/frictions.png}
@ -200,50 +265,53 @@ Close the \textit{Strickler} window. On the \textit{Edit friction} window, add f
The selected zone is highlighted in blue. Close the \textit{Edit friction} window.
\section{Model hydraulic structures}
Sometimes there can be cross-sections in which Shallow water equations can not be used to model the water flow. In that case, we have to define an other law to link the water elevation and the flow discharge. This is the case, for example, under bridges when the water elevation is too high, leading to a flow in charge. Pamhyr2 enables to define various hydraulic structures with laws that can be parametrized. In our case, a weir and two bridges have to be represented as hydraulic structures.
From the main window, click on \texttt{[Hydraulics] => [Hydraulic structures]} to open the hydraulic structures window. Click tree times on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} button to create three hydraulic structures. Each structure can have a name and must have a reach and a KP. Set them as follow:
Sometimes there can be cross-sections in which Shallow water equations can not be used to model the water flow.
In that case, we have to define an other law to link the water elevation and the flow discharge.
This is the case, for example, under bridges when the water elevation is too high, leading to a flow in charge.
Pamhyr2 enables to define various hydraulic structures with laws that can be parametrized.
In our case, two bridges have to be represented as hydraulic structures.
From the main window, click on \texttt{[Hydraulics] => [Hydraulic structures]} to open the hydraulic structures window.
Click two times on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} button to create two hydraulic structures.
Each structure can have a name and must have a reach and a KP.
Set them as follow:
\begin{center}
\includegraphics[width=15cm]{img/hs.png}
\par\end{center}
Select the downstream weir and click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to edit the laws of this structure. Hydraulic structures are composed of basic hydraulic structures. You can combine the laws of several basic hydraulic structures to setup your structure. For this weir, we only need a weir basic hydraulic structure. Click on \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} to add a new basic hydraulic structure, give it the \textit{weir} type and set it up as folow:
Select the RD101 bridge and click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to edit the laws of this structure.
Hydraulic structures are composed of basic hydraulic structures.
You can combine the laws of several basic hydraulic structures to setup your structure.
A bridge can be modeled as a combination of an orifice for the flow under the bridge and a weir for the flow over the bridge.
Create two basic hydraulic structures with the button \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} and set them as folow:
\begin{center}
\includegraphics[width=15cm]{img/seuil.png}
\par\end{center}
\includegraphics[width=15cm]{img/seuilRD101.png}
Go back to the \textit{hydraulic structures} window.
Select the RS101 bridge and click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to edit the laws of this structure. A bridge can be modeled as a combination of an orifice for the flow under the bridge and a weir for the flow over the bridge. Create two basic hydraulic structures and set them as folow:
\begin{center}
\includegraphics[width=15cm]{img/seuilRS101.png}
\includegraphics[width=15cm]{img/orificeRS101.png}
\includegraphics[width=15cm]{img/orificeRD101.png}
\par\end{center}
Go back to the \textit{hydraulic structures} window and aply the same procedure for the Thivencelle bridge:
\begin{center}
\includegraphics[width=15cm]{img/orificeThivencelle.png}
\includegraphics[width=15cm]{img/seuilThivencelle.png}
\includegraphics[width=15cm]{img/orificeThivencelle.png}
\par\end{center}
You can now close the \textit{hydraulic structures} windows.
If you open the \textit{geometry} window you can see the structure position in the longitudinal view.
\section{Solver parameters}
From the main window, click on \texttt{[Execute] => [Numerical parameters for solvers]}.
In the window \textit{solver parameters} select the \textit{Mage v8} tab. Set the solver parameters as follow:
In the window \textit{solver parameters} select the \textit{Mage v8} tab.
Set the minimul timestep to 0.1. and keep the default values for the other parameters.
We need a smaller minimum timester because the solver needs to reduce the timestep in order to converge during the steep increase of discharge at the begining of the flood.
\begin{center}
\includegraphics[width=15cm]{img/param.png}
\par\end{center}
% TODO precision
Close the \textit{solver parameters} window.
@ -251,17 +319,23 @@ Close the \textit{solver parameters} window.
From the main window, click on \texttt{[Execute] => [Run solver]}.
Select \textit{Defaut-Mage - (Mage8)} anc click on the \textit{Run} button.
It will open two windows: the \textit{Check list} window and the \textit{Solver log} window.
The \textit{Check list} window gives som hints about the validity of your model, and the \textit{Solver log} window displays the outputs of the solver.
From the \textit{Solver log} window you can re-run the computation, and from the textit{Solver log} window you can click on the \textit{Results} button to open the \textit{Results} window.
It will open the \textit{Solver log} window.
The \textit{Solver log} window displays the outputs of the solver.
From the \textit{Solver log} window you can re-run the computation with the button \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/run.png}, and you can click on the \textit{Results} button to open the \textit{Results} window.
\section{Visualize the results}
If you closed the \textit{Solver log} window, you can click on \texttt{[Results] => [Visualize last results]} from the main window to open the \textit{Results} window. The top lets panel let you select your reach, the bottom left panel lets you select a cross-section in that reach. the three plots on the right show the reach and the cross-section the same way than in the \textit{Geometry} window. You can use the bottom slider to visualize the water elevation at different timesteps.
If you closed the \textit{Solver log} window, you can click on \texttt{[Results] => [Visualize last results]} from the main window to open the \textit{Results} window.
The top left panel let you select your reach, the bottom left panel lets you select a cross-section in that reach.
the three plots on the right show the reach and the cross-section the same way than in the \textit{Geometry} window.
You can use the bottom slider to visualize the results at different timesteps.
The red crosses in the graphs corresponds to sections where the water level exceeds the limits of the geometry at least one time during the simulation.
This does not corresponds to water leaks, as the solver artificialy adds a virtual wall at both ends of the cross-sections geometry.
To visualize the flow discharge, switch to the \textit{Hydrograph} tab.
To create custom 2D plots, click on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} button on the top left of the window. Select the values you want on the $X$ and $Y$ axis and click on \textit{OK}.
To create custom 2D plots, click on the \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} button on the top left of the window.
Select the values you want on the $X$ and $Y$ axis and click on \texttt{[OK]}.
You can now see a new tab with the custom 2D plot in the right panel of the \textit{Results} window.
The button \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/export.png} allows you to export your results to a CSV file if you want to post-process them outside Pamhyr2.
\pagebreak{}
\end{document}