Compare commits
120 Commits
v1.1.0-rc1
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
a31e2127e7 | |
|
|
a29df8f904 | |
|
|
97ebf9324a | |
|
|
0112ad63d9 | |
|
|
bcbb440ad4 | |
|
|
7ef3184699 | |
|
|
5f6c823301 | |
|
|
bc4557e21f | |
|
|
f6e08f203c | |
|
|
5dcbc6b4e1 | |
|
|
ebe906fce0 | |
|
|
911a2bbbff | |
|
|
706a900c8e | |
|
|
da03f39425 | |
|
|
7d42c164fc | |
|
|
1b2f98494b | |
|
|
e7b63fe270 | |
|
|
80ae4c36ad | |
|
|
41cffd13e0 | |
|
|
9270dd0ff1 | |
|
|
ba8a50e0b9 | |
|
|
fce034419d | |
|
|
31fe765e51 | |
|
|
b582e133a1 | |
|
|
7c4c772f43 | |
|
|
5fc4e3903a | |
|
|
c07a863018 | |
|
|
243941db51 | |
|
|
d6c1316178 | |
|
|
f35048b89f | |
|
|
24d92b2ac0 | |
|
|
c702862bc4 | |
|
|
400f6be9e3 | |
|
|
5fc6951060 | |
|
|
5ba38d5cd6 | |
|
|
3e8132646d | |
|
|
5aef0bbf3c | |
|
|
bb3dadc0c7 | |
|
|
7bb176e7c7 | |
|
|
8c16e4ed58 | |
|
|
e9315d9be7 | |
|
|
46738cec6b | |
|
|
e576bb15f1 | |
|
|
26d18d26e9 | |
|
|
8bac416ab5 | |
|
|
e6aa840633 | |
|
|
4b976d3b5f | |
|
|
e3315c8f81 | |
|
|
6bcbd006f1 | |
|
|
c60a0938eb | |
|
|
4d026afb2c | |
|
|
4e888d9db0 | |
|
|
440996b636 | |
|
|
ed1a1a71ac | |
|
|
cbe3ad0084 | |
|
|
46935fde45 | |
|
|
ca8dc19c83 | |
|
|
e4a31b3497 | |
|
|
406dc2bdd4 | |
|
|
c325f61fce | |
|
|
d3729cfe77 | |
|
|
fa8f07b97e | |
|
|
52c153fa84 | |
|
|
21bd87f74b | |
|
|
4d08f3c271 | |
|
|
e44bbd5a3c | |
|
|
f827f6bf13 | |
|
|
4be68ba98d | |
|
|
e47edea63b | |
|
|
8daf89d1c4 | |
|
|
0fa3ca5fad | |
|
|
e3229c8183 | |
|
|
c8606cf445 | |
|
|
09029dc993 | |
|
|
0a97070b90 | |
|
|
4f57179a2e | |
|
|
d0d7d91ab7 | |
|
|
8497d151ab | |
|
|
8a98f2bbca | |
|
|
181aea2805 | |
|
|
6a762275b6 | |
|
|
a64430691c | |
|
|
3cd6d31731 | |
|
|
af30fde81a | |
|
|
589b8dcd23 | |
|
|
4e87135bf4 | |
|
|
f636236935 | |
|
|
c3d732b426 | |
|
|
9b6abadb5a | |
|
|
686b01c43a | |
|
|
04afbf2f84 | |
|
|
75f2796748 | |
|
|
45179bc542 | |
|
|
67729e94bf | |
|
|
c53e82a423 | |
|
|
02ccfa9ed7 | |
|
|
fc5de2a097 | |
|
|
0753c4e1b7 | |
|
|
d8c2634a66 | |
|
|
6f7a891a6d | |
|
|
e4224e6358 | |
|
|
aa8a9dccbf | |
|
|
1732e30e58 | |
|
|
9eedd1fff9 | |
|
|
ac6e8a3704 | |
|
|
c5f918c885 | |
|
|
230712c3ea | |
|
|
2e2f054a4f | |
|
|
8913a774ea | |
|
|
36c3785cde | |
|
|
f75a25d010 | |
|
|
5ed905df71 | |
|
|
ea4fa81cc4 | |
|
|
8862be991e | |
|
|
8aea55909e | |
|
|
1289967abb | |
|
|
41d1fb9d59 | |
|
|
8d9a196059 | |
|
|
9db90debeb | |
|
|
558085705f |
|
|
@ -29,7 +29,8 @@ stages:
|
|||
#############
|
||||
|
||||
variables:
|
||||
MAGE_8_VERSION: "v8.3.6"
|
||||
MAGE_8_VERSION: "permalink/latest"
|
||||
ADISTS_VERSION: "permalink/latest"
|
||||
|
||||
dl-mage8-doc:
|
||||
stage: downloads
|
||||
|
|
@ -40,7 +41,7 @@ dl-mage8-doc:
|
|||
script:
|
||||
- mkdir -p doc
|
||||
- cd doc
|
||||
- curl -L -o mage8.pdf https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
||||
- curl -L -o mage8.pdf https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/mage8.pdf
|
||||
|
|
@ -52,17 +53,13 @@ dl-mage8-linux:
|
|||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
script:
|
||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
||||
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_linux.tgz
|
||||
- mkdir -p mage8-linux
|
||||
- cd mage8-linux
|
||||
- tar xvf ../mage8.tgz
|
||||
artifacts:
|
||||
paths:
|
||||
- mage8-linux/mage
|
||||
- mage8-linux/mage_as7
|
||||
- mage8-linux/mage_extraire
|
||||
- mage8-linux/mailleurTT
|
||||
- mage8-linux/libbief.so
|
||||
|
||||
dl-mage8-windows:
|
||||
stage: downloads
|
||||
|
|
@ -71,17 +68,13 @@ dl-mage8-windows:
|
|||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||
script:
|
||||
- curl -L -o mage8.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
||||
- curl -L -o mage8.tgz https://forge.inrae.fr/river-hydraulics/mage/-/releases/$MAGE_8_VERSION/downloads/packages/mage_windows.tgz
|
||||
- mkdir -p mage8-windows
|
||||
- cd mage8-windows
|
||||
- tar xvf ../mage8.tgz
|
||||
artifacts:
|
||||
paths:
|
||||
- mage8-windows/mage.exe
|
||||
- mage8-windows/mage_as7.exe
|
||||
- mage8-windows/mage_extraire.exe
|
||||
- mage8-windows/mailleurTT.exe
|
||||
- mage8-windows/libbief.dll
|
||||
|
||||
dl-adists-linux:
|
||||
stage: downloads
|
||||
|
|
@ -92,7 +85,7 @@ dl-adists-linux:
|
|||
script:
|
||||
- mkdir -p adists-linux
|
||||
- cd adists-linux
|
||||
- curl -L -o adists https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/v1.0.1/downloads/executables/adists
|
||||
- curl -L -o adists https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists
|
||||
artifacts:
|
||||
paths:
|
||||
- adists-linux/adists
|
||||
|
|
@ -106,7 +99,7 @@ dl-adists-windows:
|
|||
script:
|
||||
- mkdir -p adists-windows
|
||||
- cd adists-windows
|
||||
- curl -L -o adists.exe https://gitlab.irstea.fr/jean-baptiste.faure/adists/-/releases/v1.0.1/downloads/executables/adists_win64.exe.exe
|
||||
- curl -L -o adists.exe https://forge.inrae.fr/river-hydraulics/adists/-/releases/$ADISTS_VERSION/downloads/executables/adists_win64.exe
|
||||
artifacts:
|
||||
paths:
|
||||
- adists-windows/adists.exe
|
||||
|
|
@ -205,13 +198,32 @@ build-td:
|
|||
- job: set-version
|
||||
artifacts: true
|
||||
script:
|
||||
- cd ./doc/users/Tuto1/
|
||||
- cd ./doc/users/TP_Hydraulique_Hogneau/
|
||||
- ./build.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/users/Tuto1/step-by-step.pdf
|
||||
- doc/users/Tuto1/pas-a-pas.pdf
|
||||
- doc/users/Tuto1/data/
|
||||
- doc/users/TP_Hydraulique_Hogneau/step-by-step.pdf
|
||||
- doc/users/TP_Hydraulique_Hogneau/pas-a-pas.pdf
|
||||
- doc/users/TP_Hydraulique_Hogneau/Tuto-2-fr.pdf
|
||||
- doc/users/TP_Hydraulique_Hogneau/data/
|
||||
allow_failure: true
|
||||
|
||||
build-td-2:
|
||||
stage: build
|
||||
tags:
|
||||
- linux
|
||||
needs:
|
||||
- job: set-version
|
||||
artifacts: true
|
||||
script:
|
||||
- cd ./doc/users/TP_AdisTS_Vieux_Rhone/
|
||||
- ./build.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/users/TP_AdisTS_Vieux_Rhone/pas-a-pas.pdf
|
||||
- doc/users/TP_AdisTS_Vieux_Rhone/data/
|
||||
- doc/users/TP_AdisTS_Vieux_Rhone/Sujet.pdf
|
||||
- doc/users/TP_AdisTS_Vieux_Rhone/Vieux_Rhone_TP_AdisTS.pamhyr
|
||||
allow_failure: true
|
||||
|
||||
build-developers-doc:
|
||||
|
|
@ -268,6 +280,8 @@ build-linux:
|
|||
# artifacts: true
|
||||
- job: build-td
|
||||
artifacts: true
|
||||
- job: build-td-2
|
||||
artifacts: true
|
||||
script:
|
||||
- mkdir -p linux
|
||||
- cd linux
|
||||
|
|
@ -327,16 +341,22 @@ build-linux:
|
|||
- cp -r ../doc/dev/images/* pamhyr/doc/images
|
||||
- cp -r ../doc/images/* pamhyr/doc/images
|
||||
# Copy Tuto
|
||||
- mkdir -p pamhyr/doc/Tuto1/
|
||||
- mkdir -p pamhyr/doc/Tuto1/data
|
||||
- cp ../doc/users/Tuto1/Hogneau_Engees2022.pdf pamhyr/doc/Tuto1/Hogneau_Engees2022.pdf
|
||||
- cp ../doc/users/Tuto1/step-by-step.pdf pamhyr/doc/Tuto1/Tuto1-en.pdf
|
||||
- cp ../doc/users/Tuto1/pas-a-pas.pdf pamhyr/doc/Tuto1/Tuto1-fr.pdf
|
||||
- cp ../doc/users/Tuto1/*.pamhyr pamhyr/doc/Tuto1/
|
||||
- cp ../doc/users/Tuto1/data/* pamhyr/doc/Tuto1/data/
|
||||
- mkdir -p pamhyr/doc/TP_Hydraulique_Hogneau/
|
||||
- mkdir -p pamhyr/doc/TP_Hydraulique_Hogneau/data
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/Hogneau_Engees2022.pdf pamhyr/doc/TP_Hydraulique_Hogneau/Hogneau_Engees2022.pdf
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/step-by-step.pdf pamhyr/doc/TP_Hydraulique_Hogneau/Tuto1-en.pdf
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/pas-a-pas.pdf pamhyr/doc/TP_Hydraulique_Hogneau/Tuto1-fr.pdf
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/Tuto-2-fr.pdf pamhyr/doc/TP_Hydraulique_Hogneau/Tuto2-fr.pdf
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/*.pamhyr pamhyr/doc/TP_Hydraulique_Hogneau/
|
||||
- cp ../doc/users/TP_Hydraulique_Hogneau/data/* pamhyr/doc/TP_Hydraulique_Hogneau/data/
|
||||
- mkdir -p pamhyr/doc/TP_AdisTS_Vieux_Rhone/
|
||||
- mkdir -p pamhyr/doc/TP_AdisTS_Vieux_Rhone/data
|
||||
- cp ../doc/users/TP_AdisTS_Vieux_Rhone/*.pdf pamhyr/doc/TP_AdisTS_Vieux_Rhone/
|
||||
- cp ../doc/users/TP_AdisTS_Vieux_Rhone/data/* pamhyr/doc/TP_AdisTS_Vieux_Rhone/data/
|
||||
- cp ../doc/users/TP_AdisTS_Vieux_Rhone/Vieux_Rhone_TP_AdisTS.pamhyr pamhyr/doc/TP_AdisTS_Vieux_Rhone/Vieux_Rhone_TP_AdisTS.pamhyr
|
||||
# Copy TP charriage
|
||||
- mkdir -p pamhyr/doc/TP_charriage/
|
||||
- cp ../doc/users/TP_charriage/* pamhyr/doc/TP_charriage
|
||||
- cp -r ../doc/users/TP_charriage/* pamhyr/doc/TP_charriage
|
||||
artifacts:
|
||||
paths:
|
||||
- linux/pamhyr
|
||||
|
|
@ -364,6 +384,8 @@ build-windows:
|
|||
# artifacts: true
|
||||
- job: build-td
|
||||
artifacts: true
|
||||
- job: build-td-2
|
||||
artifacts: true
|
||||
script:
|
||||
- mkdir windows
|
||||
- cd windows
|
||||
|
|
|
|||
|
|
@ -1375,7 +1375,7 @@ contribution.
|
|||
#+INCLUDE: "../../AUTHORS" src text
|
||||
|
||||
[fn:p2-gitlab] The {{{pamhyr2}}} Gitlab project page:
|
||||
https://gitlab.irstea.fr/theophile.terraz/pamhyr
|
||||
https://gitlab.com/pamhyr/pamhyr2
|
||||
[fn:inrae] The INRAE web site: https://www.inrae.fr/
|
||||
|
||||
** Translate
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ Create a new version of {{{pamhyr}}} called {{{pamhyr2}}}
|
|||
|
||||
** Contribution
|
||||
#+LaTeX: \begin{center}
|
||||
\faIcon{gitlab} https://gitlab.irstea.fr/theophile.terraz/pamhyr/
|
||||
\faIcon{gitlab} https://gitlab.com/pamhyr/pamhyr2/
|
||||
#+LaTeX: \end{center}
|
||||
|
||||
*** For users
|
||||
|
|
@ -462,7 +462,7 @@ Create a new version of {{{pamhyr}}} called {{{pamhyr2}}}
|
|||
# #+END_EXPORT
|
||||
|
||||
#+LaTeX: \begin{center}
|
||||
\faIcon{gitlab} https://gitlab.irstea.fr/theophile.terraz/pamhyr/
|
||||
\faIcon{gitlab} https://gitlab.com/pamhyr/pamhyr2/
|
||||
#+LaTeX: \end{center}
|
||||
|
||||
#+LaTeX: \begin{center}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
@article{camenen_simple_2007,
|
||||
title = {Simple and {General} {Formula} for the {Settling} {Velocity} of {Particles}},
|
||||
volume = {133},
|
||||
language = {en},
|
||||
number = {2},
|
||||
urldate = {2025-01-23},
|
||||
journal = {Journal of Hydraulic Engineering},
|
||||
author = {Camenen, Benoit},
|
||||
month = feb,
|
||||
year = {2007},
|
||||
pages = {229-233},
|
||||
}
|
||||
|
||||
@article{meyer-peter_formulas_1948,
|
||||
address = {Stockholm, Sweden},
|
||||
title = {Formulas for bed-load transport.},
|
||||
journal = {Report on Second Meeting of IAHR},
|
||||
author = {Meyer-Peter, E and Mueller, R},
|
||||
year = {1948},
|
||||
pages = {39-64},
|
||||
}
|
||||
|
||||
@article{elder_dispersion_1959,
|
||||
title = {The dispersion of marked fluid in turbulent shear flow},
|
||||
volume = {5},
|
||||
issn = {0022-1120, 1469-7645},
|
||||
language = {en},
|
||||
number = {04},
|
||||
urldate = {2025-01-23},
|
||||
journal = {Journal of Fluid Mechanics},
|
||||
author = {Elder, J. W.},
|
||||
month = may,
|
||||
year = {1959},
|
||||
pages = {544},
|
||||
}
|
||||
|
||||
@article{fischer_discussion_1975,
|
||||
title = {Discussion of Simple Method for Predicting Dispersion in Streams},
|
||||
volume = {101},
|
||||
issn = {0090-3914, 2690-2435},
|
||||
language = {en},
|
||||
number = {3},
|
||||
urldate = {2025-01-23},
|
||||
journal = {Journal of the Environmental Engineering Division},
|
||||
author = {Fischer, Hugo B},
|
||||
month = mar,
|
||||
year = {1975},
|
||||
pages = {453-455},
|
||||
}
|
||||
|
||||
@article{iwasa_predicting_1991,
|
||||
address = {Hong Kong},
|
||||
title = {Predicting longitudinal dispersion coefficient in open channel flows},
|
||||
journal = {roc. Int. Symp. of Environmental Hydraulics},
|
||||
author = {Iwasa, Y and Aya, S},
|
||||
year = {1991},
|
||||
pages = {505-510},
|
||||
}
|
||||
|
||||
@book{soulsby_dynamics_1997,
|
||||
address = {London},
|
||||
edition = {Thomas Telford},
|
||||
title = {Dynamics of {Marine} {Sands}: {A} {Manual} for {Practical} {Applications}},
|
||||
urldate = {2025-01-23},
|
||||
author = {Soulsby, Richard},
|
||||
year = {1997},
|
||||
}
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
|
||||
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
|
||||
%% Do not edit unless you really know what you are doing.
|
||||
\documentclass[12pt,french]{article}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[latin9]{inputenc}
|
||||
\usepackage{geometry}
|
||||
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage[frenchb]{babel}
|
||||
|
||||
\makeatletter
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
|
||||
\newcommand{\noun}[1]{\textsc{#1}}
|
||||
%% Because html converters don't know tabularnewline
|
||||
\providecommand{\tabularnewline}{\\}
|
||||
|
||||
\makeatother
|
||||
|
||||
\usepackage{babel}
|
||||
\addto\extrasfrench{%
|
||||
\providecommand{\og}{\leavevmode\flqq~}%
|
||||
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
TP AdisTS - Pamhyr2\\
|
||||
Version : Janvier 2025
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
\textbf{\LARGE Modélisation 1D du transport sédimentaire : } \\
|
||||
\textbf{\LARGE Cas du Vieux-Rhône de Miribel-Jonage}\\
|
||||
\textbf{\LARGE (Lyon, France)}
|
||||
|
||||
\par\end{center}{\LARGE \par}
|
||||
|
||||
~
|
||||
\begin{center}
|
||||
\includegraphics[width=17cm]{img/Garde.jpeg}
|
||||
\par\end{center}
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
{\large INRAE Lyon-Grenoble Auvergne-Rhône-Alpes}
|
||||
\par\end{center}{\large \par}
|
||||
|
||||
\begin{center}
|
||||
|
||||
RiverLy, Hydraulique des rivières
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
Auteur : & Dorian Hernandez & dorian.hernandez@inrae.fr\tabularnewline
|
||||
& Théophile Terraz & theophile.terraz@inrae.fr\tabularnewline
|
||||
|
||||
\end{tabular}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\begin{center}
|
||||
\tableofcontents{}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
% \section{Introduction}
|
||||
%
|
||||
% TODO
|
||||
%
|
||||
% \pagebreak{}
|
||||
|
||||
|
||||
\section{Contexte de l'étude - le colmatage du Vieux-Rhône}
|
||||
|
||||
Le champ de captage de Crépieux-Charmy est un site de pompage d'eau potable alimentant 97 \% de la ville de Lyon. Situé au nord-est de la ville, il est en contact hydraulique avec trois chenaux du Rhône. Le canal de Miribel au Nord, dont les débits varient entre 89 (débit réservé) et 2400 ~$m³/s$ (Crue extrême), le canal de Jonage au sud, imposant un débit quasi constant de 600 ~$m³/s$ pour alimenter la centrale de Cusset, et un Vieux-Rhône qui traverse le site. Les fortes variations hydrauliques le long de Miribel, ainsi que le débit constant le long de Jonage mènent à un dépôt général des sédiments fins et grossiers le long du Vieux-Rhône, avec la création d'un remous important causé par Jonage.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Intro.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Eau du grand Lyon, le gérant du champ de captage, souhaite identifier les zones de dépôts de sédiments fin le long du Vieux-Rhône, cause principale de colmatage, impactant les performances de pompage de l'eau dans les nappes.
|
||||
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Champ_captant.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Pour cela, une campagne expérimentale visant à identifier les zones colmatés du Vieux-Rhône a été réalisée et a mis en avant une hétérogénéité du site. Notamment, une forte zone de dépôts de grossier est présente en amont. Tandis qu'une présence plus importante de fines et sables dans la zone aval (zone de remous de Jonage) a été observée, ainsi qu'un colmatage plus important.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Grossier_sable.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
En parallèle, un modèle numérique hydraulique 1D a été élaboré sous Pamhyr2 afin d'analyser l'écoulement sur le site. Les résultats numériques mettent alors bien en avant le remous généré par Jonage, ainsi qu'une diminution de la vitesse de l'écoulement à partir du point kilométrique (PK) 1000, fin de la zone amont.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Simu.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
\section{Objectifs de l'étude}
|
||||
|
||||
Le modèle numérique 1D représente actuellement la partie hydraulique du système. L'objectif du TP est alors de mettre en donnée la partie sédimentaire (fines) du modèle, afin d'effectuer des calculs à l'aide de AdisTS , et in-fine, identifier les zones de dépôt et d'érosion des sédiments fins le long du Vieux-Rhône selon différents scénarios hydraulique. Les différentes étapes seront alors :
|
||||
|
||||
\begin{itemize}
|
||||
\item Mettre en données le modèle Pamhyr2 du Vieux-Rhône pour le solveur AdisTS.
|
||||
\item Lancer des calculs Mage - AdisTS pour différents scénarios hydrauliques.
|
||||
\item Interpréter et discuter les résultats obtenus (comportement hydro-sédimentaire du site, impacts des débits, impact d'une crue, limites du modèle, etc..)
|
||||
\end{itemize}
|
||||
|
||||
\section{Données fournies}
|
||||
|
||||
\textbf{Le modèle numérique du Vieux-Rhône}
|
||||
|
||||
Fichier \textit{Vieux\_Rhone\_TP\_AdisTS.pamhyr}.\\
|
||||
|
||||
\textbf{Les scénarios hydrauliques}
|
||||
|
||||
Quatre scénarios hydrauliques sont à analyser (voir les conditions initiales hydraulique) :
|
||||
|
||||
\begin{itemize}
|
||||
\item Le premier correspond à un débit constant de 25~$m³/s$
|
||||
\item Le deuxième consiste en une faible montée en débit puis à une redescente (25 - 50 - 25~$m³/s)$.
|
||||
\item Le troisième correspondant à une plus forte montée en débit (25 - 100 - 25~$m³/s)$.
|
||||
\item Le dernier correspond à une crue (25 - 600 - 25~$m3/s)$.\\
|
||||
\end{itemize}
|
||||
|
||||
\textbf{Propriétés des sédiments}
|
||||
|
||||
Nous considérerons 2 classes de sédiments de types sable naturel, correspondant à une classe de Fines (limon) de diamètre moyen 63 microns et une classe de Sable de 500 microns. Les deux classes auront une masse volumique de 2650~$kg/m³$, et une porosité de 0,45 pourra être choisie. Leurs concentrations constantes en amont (conditions aux limites amont) seront de 60 $mg/l$ pour les fines et 30 $mg/l$ pour les sables. Nous considérerons dans un premier temps qu'il n'y a aucun dépôt initial de ces deux classes de sédiments et que la concentration initiale en sédiments dans le bief est nulle.\\
|
||||
|
||||
\textbf{Documentation}
|
||||
|
||||
\begin{itemize}
|
||||
\item Un tutoriel guidé de mise en données : Pas-a-pas.pdf.
|
||||
\item Un guide utilisateur de AdisTS : adis-TS\_usage.pdf
|
||||
\item Un guide de conception de AdisTS : adis-TS\_conception.pdf
|
||||
\end{itemize}
|
||||
|
||||
\section{Bonus}
|
||||
|
||||
Ajouter une épaisseur initiale de sédiments \textit{Sables} au fond de 1 $cm$ et relancer un calcul avec le scénario 1.
|
||||
|
||||
|
||||
\pagebreak{}
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
pdflatex -no-shell-escape pas-a-pas.tex
|
||||
bibtex pas-a-pas.aux
|
||||
pdflatex -no-shell-escape pas-a-pas.tex
|
||||
pdflatex -no-shell-escape pas-a-pas.tex
|
||||
pdflatex -no-shell-escape Sujet.tex
|
||||
pdflatex -no-shell-escape Sujet.tex
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 684 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 109 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 160 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
|
@ -0,0 +1,291 @@
|
|||
|
||||
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
|
||||
%% Do not edit unless you really know what you are doing.
|
||||
\documentclass[12pt,french]{article}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[latin9]{inputenc}
|
||||
\usepackage{geometry}
|
||||
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage[frenchb]{babel}
|
||||
|
||||
\makeatletter
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
|
||||
\newcommand{\noun}[1]{\textsc{#1}}
|
||||
%% Because html converters don't know tabularnewline
|
||||
\providecommand{\tabularnewline}{\\}
|
||||
|
||||
\makeatother
|
||||
|
||||
\usepackage{babel}
|
||||
\addto\extrasfrench{%
|
||||
\providecommand{\og}{\leavevmode\flqq~}%
|
||||
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
Tutoriel Pas-à-pas AdisTS - Pamhyr2
|
||||
|
||||
Version : Janvier 2025
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
\textbf{\LARGE Modélisation 1D du transport sédimentaire : } \\
|
||||
\textbf{\LARGE Cas du Vieux-Rhône de Miribel-Jonage}\\
|
||||
\textbf{\LARGE (Lyon, France)}
|
||||
|
||||
\par\end{center}{\LARGE \par}
|
||||
|
||||
~
|
||||
\begin{center}
|
||||
\includegraphics[width=17cm]{img/Garde.jpeg}
|
||||
\par\end{center}
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
{\large INRAE Lyon-Grenoble Auvergne-Rhône-Alpes}
|
||||
\par\end{center}{\large \par}
|
||||
|
||||
\begin{center}
|
||||
|
||||
RiverLy, Hydraulique des rivières
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
Auteurs : & Dorian Hernandez & dorian.hernandez@inrae.fr\tabularnewline
|
||||
& Théophile Terraz & theophile.terraz@inrae.fr\tabularnewline
|
||||
|
||||
|
||||
\end{tabular}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\begin{center}
|
||||
\tableofcontents{}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
% \section{Introduction}
|
||||
%
|
||||
% TODO
|
||||
%
|
||||
% \pagebreak{}
|
||||
|
||||
|
||||
\section{Ouvrir l'étude}
|
||||
|
||||
Lancez Pamhyr2.
|
||||
|
||||
Cliquez sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/open.png} puis ouvrez le modèle Pamhyr2 \textit{Vieux\_Rhone\_TP\_AdisTS.pamhyr}.
|
||||
|
||||
Le modèle à un bief du Vieux-Rhône s'affiche sur la fenêtre graphique.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Open_model.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
|
||||
\section{Mise en donnée}
|
||||
|
||||
\subsection{Création des classes de sédiments}
|
||||
|
||||
Dans la fenêtre principale, cliquez sur \texttt{[AdisTS] => [Polluants]} pour créer des classes de sédiments.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Model_menu_Adists.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
La fenêtre \textit{Polluants - Vieux-Rhône} s'affiche. Elle va nous permettre de définir l'ensemble des caractéristiques (type de sédiment, taille moyenne, masse volumique,..) de nos classes de sédiments, ainsi que les conditions sédimentaires initiales et aux limites du modèle.
|
||||
|
||||
A l'aide du bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} inclure deux nouvelles classes de sédiments et les nommer \textit{Fines} et \textit{Sables}.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Polluants_fenetre.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Pensez à sauvegarder régulièrement l'étude, à l'aide du bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/save.png} de la fenêtre principale.
|
||||
|
||||
\subsection{Caractéristiques et conditions initiales des sédiments}
|
||||
|
||||
Pour pouvoir attribuer des caractéristiques et des conditions initiales à une classe de sédiments, il faut d'abord la sélectionner.
|
||||
|
||||
Cliquez sur la classe de sédiments \textit{Fines}, puis ouvrez la fenêtre \texttt{[Caractéristiques]}.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Pol_to_Caracteristique.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
La fenêtre d'édition de la classe de sédiments \textit{Fines} s'ouvre.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/caracteristique_fines_a_completer.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Celle-ci contient les informations nécessaire à la résolution des termes sources (taux d'érosion et de dépôt) de l'équation de transport-dispersion. Notamment pour le calcul de la vitesse de chute selon \cite{camenen_simple_2007} et la contrainte critique de mise en mouvement via l'approximation de \cite{soulsby_dynamics_1997}.
|
||||
|
||||
Complétez les valeurs manquantes du tableau selon les données de l'énoncé. Puis, fermez la fenêtre des caractéristiques.
|
||||
|
||||
Ouvrez à présent la fenêtre de \texttt{[Conditions initiales]} (toujours pour les \textit{Fines}).
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/CI.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Cette fenêtre contient deux espaces permettant de définir la concentration initiale de \textit{Fines} (dans "l'eau" du bief) et l'épaisseur de dépôt de fines au fond du bief. Dans le compartiment de gauche, on définit les valeurs par défaut, appliquées à l'ensemble du bief. Le compartiment de droite permet d'imposer des conditions initiales différentes en fonction des PKs du bief.
|
||||
|
||||
Nous considérerons une concentration initiale nulle en sédiments fins, ainsi qu'une épaisseur nulle au fond.\\
|
||||
\\
|
||||
Fermez la fenêtre de conditions initiales.\\
|
||||
\\
|
||||
Sélectionnez la classe de sédiments \textit{Sables} et répétez les étapes précédentes en considérant cette fois-ci les caractéristiques propres aux sables selon l'énoncé.
|
||||
|
||||
\subsection{Conditions aux limites}
|
||||
|
||||
Pour les conditions aux limites il n'est pas nécessaire de mettre en surbrillance les classes de sédiments.\\
|
||||
\\
|
||||
Ouvrez la fenêtre de \texttt{[Conditions aux limites]} et ajouter deux conditions aux limites de type concentration au n½ud amont du bief. Il y aura alors une condition aux limites pour chaque classe de sédiments.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/CL.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Éditez la condition aux limites \textit{Fines} en la mettant en surbrillance et en cliquant sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/edit.png}.\\
|
||||
Créez une condition aux limites de type concentration constante de 0.060 $kg/m³$ en insérant deux lignes \textit{Temps/Concentration} à l'aide du bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png}.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/CL_edit.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Procédez de la même façon pour la classe de sédiments \textit{Sables}, mais avec une concentration de 0.030 $kg/m³$.\\
|
||||
\\
|
||||
Fermez les fenêtres d'éditions des conditions aux limites et des polluants.
|
||||
|
||||
\subsection{Caractéristiques du fond fixe}
|
||||
|
||||
Dans la fenêtre principale, cliquez sur \texttt{[AdisTS] => [D90]}. Cette fenêtre permet de définir le diamètre des particules fixes au fond du canal, nécessaire pour le calcul du coefficient de Strickler à la manière de \cite{meyer-peter_formulas_1948}. De même que pour les conditions initiales des polluants, la fenêtre d'édition est divisée en deux parties afin d'introduire un paramètres par défaut et de laisser la possibilité d'appliquer des valeurs de $d_{90}$ variables le long du bief.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/D90.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Définissez 2 coefficients différents. Une valeur de 5 cm sur la partie amont (zone principale de dépôt de grossier) et 2 cm sur la partie avale.
|
||||
|
||||
\subsection{Coefficient de diffusion}
|
||||
|
||||
Le coefficient de diffusion $D_f$ comprend une part de diffusion moléculaire prise par défaut à $D_{mol}=10^{-6}$, à laquelle s'ajoutent les diffusions turbulentes et la dispersion sous forme d'un seul terme $D_{mix}$ défini selon les formules de \cite{fischer_discussion_1975}, \cite{elder_dispersion_1959} ou \cite{iwasa_predicting_1991}. Il est aussi possible d'utiliser une forme générique de $D_{mix}$ (voir doc utilisateur) ou encore d'imposer une valeur constante. Dans le cas tu TP nous choisirons Iwasa et Aya avec $\alpha=2$.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Diff.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
\section{Paramètres du solveur}
|
||||
|
||||
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Paramètres numériques des solveurs]}.
|
||||
Dans la fenêtre \textit{Paramètres du solveur}, sélectionnez l'onglet \texttt{[Adis-TS\_WC]}.
|
||||
|
||||
Ces paramètres pilotent le comportement du solveur numérique. On retrouve notamment les temps de début et de fin de la simulation. Le pas de temps maximal en secondes pour le calcul. Le paramètre d'implicitation du schéma numérique de Crank-Nicholson (0.5 comme valeur recommandée). Les temps d'écriture des fichiers .bin, .csv (pour l'export à la volée), et de l'affichage à l'écran. On retrouve aussi la possibilité d'appliquer une concentration initiale.
|
||||
|
||||
|
||||
Exemple de valeurs des paramètres :
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Execute_param.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Fermez la fenêtre \textit{Paramètres du solveur}.
|
||||
|
||||
\section{Lancer une simulation}
|
||||
|
||||
Avant de lancer AdisTS, il est nécessaire d'avoir une première solution hydraulique.
|
||||
|
||||
Vérifiez que les conditions aux limites amont et aval sélectionnées sont bien celles correspondantes à l'hydrogramme et au limnigramme du scénrio souhaité.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/CL_verif.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
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{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}, il est possible de réexécuter le calcul en cliquant sur l'icône \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/run.png}. Cliquez sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats} de Mage.
|
||||
|
||||
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Lancer AdisTS]}.
|
||||
Sélectionnez \textit{Defaut-AdisTS - (adistswc)} 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. Si le calcul s'est déroulé correctement, la fenêtre log devrait ressembler à celle-ci :
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/log.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
|
||||
Cliquez sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats} de AdisTS. Il est aussi possible de ré-ouvrir les résultats de Mage en cliquant sur le bouton \textit{Résultats Mage}.
|
||||
|
||||
\section{Visualisation et export de 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. Les résultats affichés sont ceux de AdisTS.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Results.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Le panneau supérieur gauche permet de sélectionner le bief, le panneau du milieu gauche permet de sélectionner une section dans ce bief et le panneau inférieur gauche permet de sélectionner la classe de sédiments dont on veut extraire des résultats.
|
||||
La fenêtre de droite possède 4 onglets. Chaque onglet présente des résultats en fonction du temps (un curseur en bas de la fenêtre permet de visualiser les résultats à différents pas de temps) :
|
||||
|
||||
\begin{itemize}
|
||||
\item Le premier onglet correspond aux données brutes de concentration dans l'eau et de masse déposée pour chaque classe de sédiments de l'étude.
|
||||
\item Le deuxième onglet est divisée en deux sous-onglets permettant de visualiser de deux façons différentes la concentration de la classe de sédiments sélectionnée : soit en fonction du PK du bief, soit en fonction du temps.
|
||||
\item De même, le troisième onglet est divisé en deux sous-onglets permettant de visualiser cette fois-ci la masse linéique de sédiments s'étant déposés.
|
||||
\item Enfin le dernier onglet présente l'épaisseur des sédiments déposés.
|
||||
\end{itemize}
|
||||
|
||||
Il est possible d'exporter les résultats au format CSV en cliquant sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/export.png} en haut à gauche de la fenêtre.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/Export_res_adis.jpeg}
|
||||
\par\end{center}
|
||||
|
||||
Répétez les étapes 4 et 5, selon différents scénarios hydrauliques.
|
||||
|
||||
\section{Bonus}
|
||||
|
||||
Ajoutez une épaisseur initiale de 1 cm de sédiments \textit{Sables} au fond et relancer un calcul avec le scénario 1.
|
||||
|
||||
|
||||
|
||||
\bibliographystyle{plainnat}
|
||||
\bibliography{Biblio.bib}
|
||||
|
||||
|
||||
\pagebreak{}
|
||||
\end{document}
|
||||
|
|
@ -0,0 +1,293 @@
|
|||
|
||||
%% LyX 2.0.2 created this file. For more info, see http://www.lyx.org/.
|
||||
%% Do not edit unless you really know what you are doing.
|
||||
\documentclass[12pt,french]{article}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{geometry}
|
||||
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=2cm}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hyperref}
|
||||
\usepackage[frenchb]{babel}
|
||||
|
||||
\makeatletter
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
|
||||
\newcommand{\noun}[1]{\textsc{#1}}
|
||||
\usepackage{amsthm}
|
||||
|
||||
\newtheorem{remark}{Q?}
|
||||
%% Because html converters don't know tabularnewline
|
||||
\providecommand{\tabularnewline}{\\}
|
||||
|
||||
\makeatother
|
||||
|
||||
\usepackage{babel}
|
||||
\addto\extrasfrench{%
|
||||
\providecommand{\og}{\leavevmode\flqq~}%
|
||||
\providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
Tutoriel pour Pamhyr2
|
||||
|
||||
- suite -
|
||||
|
||||
Janvier 2025
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
|
||||
\textbf{\LARGE Scénarii d'aménagement de la rivière } \\
|
||||
\textbf{\LARGE Hogneau (Nord, France) avec Pamhyr2}
|
||||
|
||||
\par\end{center}{\LARGE \par}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
{\large INRAE Lyon-Grenoble Auvergne-Rhône-Alpes}
|
||||
\par\end{center}{\large \par}
|
||||
|
||||
\begin{center}
|
||||
|
||||
RiverLy, Hydraulique des rivières
|
||||
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
~
|
||||
|
||||
\begin{center}
|
||||
\begin{tabular}{lll}
|
||||
Auteurs : & Céline Berni & celine.berni@inrae.fr\tabularnewline
|
||||
& Théophile TERRAZ & theophile.terraz@inrae.fr\tabularnewline
|
||||
|
||||
\end{tabular}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\begin{center}
|
||||
\tableofcontents{}
|
||||
\par\end{center}
|
||||
|
||||
~
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
% \section{Introduction}
|
||||
%
|
||||
% TODO
|
||||
%
|
||||
% \pagebreak{}
|
||||
|
||||
|
||||
\section*{Préambule}
|
||||
|
||||
Dans ce document, nous expliciterons les fonctionnalités de PamHyr utiles à la modélisation de scénarii d'aménagement de la rivière Hogneau comme décrit dans le document de TP.
|
||||
Il est utile au préalable d'avoir suivi le tutoriel pour la modélisation de la rivière Hogneau fourni avec le logiciel (Tuto1-fr.pdf).
|
||||
Suivre le tutoriel 1 vous permettra de construire le modèle avec le scénario de référence (la rivière avant aménagement).
|
||||
|
||||
Notez que l'outil PamHyr ne permet pas au stade actuel de comparer plusieurs scenarii.
|
||||
Vous devrez pour ce faire exporter les vos résultats à partir de la fenêtre \textit{Résultats} qui s'ouvre en cliquant sur \texttt{[Résultats] => [Visualiser les derniers résultats]} à partir de la fenêtre principale.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/export_resultats_commentee.png}
|
||||
%\includegraphics[width=12cm]{../../../src/View/ui/ressources/export_resultats2.png}
|
||||
\par\end{center}
|
||||
|
||||
Le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/export.png} vous permet d'exporter les résultats au format CSV pour une utilisation en dehors de Pamhyr2.
|
||||
|
||||
Deux options s'offrent à vous :
|
||||
\begin{itemize}
|
||||
\item Vous souhaitez avoir une vue d'ensemble du cours d'eau (et tracer une courbe de remous par exemple). Vous allez exporter une variable en un instant donné tout le long du cours d'eau. Il faut alors vous placer à un instant donné (à l'aide du curseur en bas à gauche) et exporter la grandeur de votre choix pour tous les points kilométriques de votre maillage. Dans la fenêtre d'export, vous devrez sélectionner \texttt{Point Kilométrique (m)} pour l'axe X, et la variable que vous souhaitez exporter pour l'axe Y.
|
||||
|
||||
Cocher \texttt{enveloppe} vous permettra d'exporter en plus les valeurs minimale et maximale au cours du temps pour la grandeur choisie.
|
||||
|
||||
Par exemple, vous choisissez d'exporter la cote du fond et la cote de l'eau et vous cochez \texttt{enveloppe}. Vous obtiendrez un tableau avec les colonnes suivantes :
|
||||
\begin{itemize}
|
||||
\item \texttt{Point Kilométrique (m)} : toutes les valeurs de PK le long de votre bief
|
||||
\item \texttt{Cote du fond (m)} : la cote du fond correspondante à chaque PK
|
||||
\item \texttt{Cote de l'eau (m)} : la cote de l'eau correspondante à chaque PK à l'instant sélectionné (voir figure ci-dessous)
|
||||
\item \texttt{Cote de l'eau min (m)} : la cote de l'eau minimale atteinte correspondante à chaque PK
|
||||
\item \texttt{Cote de l'eau max (m)} : la cote de l'eau maximale atteinte correspondante à chaque PK
|
||||
\end{itemize}
|
||||
ces deux dernières colonnes constituant l'enveloppe de la cote de l'eau.
|
||||
\item Vous souhaitez regarder l'évolution au cours du temps de ce qu'il se passe en un point précis du cours d'eau (regarder l'hydrogramme de crue à l'aval d'un aménagement par exemple). Vous devez alors vous placer au point kilométrique (PK) qui vous intéresse (le PK sélectionné est marqué en rouge sur la visualisation du profil en long ou sélectionné dans le tableau) et exporter la hauteur d'eau, le niveau d'eau, le débit ou autre en fonction du temps. Dans la fenêtre d'export, vous devrez sélectionner \texttt{Temps (s)} pour l'axe X.
|
||||
\end{itemize}
|
||||
|
||||
Ainsi dans l'exemple ci-dessus, les données exportées le seront au point kilométrique 34000\,m, à l'instant $t=1$ jour et 12h.
|
||||
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\section{Premier scénario d'aménagement : abaissement du seuil}
|
||||
|
||||
Parmi les 3 options d'aménagement évoquées par la collectivité locale, jouer sur le contrôle aval en abaissant le seuil qui marque la jonction avec le canal de Condé-Pommeroeul peut faire baisser le niveau à l’amont.
|
||||
|
||||
\begin{remark}
|
||||
Pourquoi jouer sur le contrôle aval peut-il avoir un effet sur le niveau d'eau en amont ?
|
||||
\end{remark}
|
||||
|
||||
Pour modifier la hauteur du seuil, dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Ouvrages hydrauliques]} pour ouvrir la fenêtre des ouvrages hydrauliques.
|
||||
Vous pouvez alors sélectionner le seuil Palplanche.
|
||||
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/ouvrage_seuilpalplanche.png}
|
||||
\par\end{center}
|
||||
|
||||
Sélectionnez le seuil aval (SeuilPalplanche) et cliquez sur \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} pour modifier les lois de cet ouvrage.
|
||||
Vous pouvez alors essayer de modifier la cote du seuil.
|
||||
Lancez le calcul en exécutant le programme pour plusieurs hauteurs de seuil (dont celle initiale de référence) avec chacune des trois crues proposées en condition amont.
|
||||
|
||||
\begin{remark}
|
||||
Exportez les données obtenues en fonction du PK pour 2 ou 3 hauteurs de seuil.
|
||||
Sur quelle distance le seuil aval influence-t-il la hauteur d'eau ?
|
||||
Est-ce suffisant pour limiter la hauteur d'eau au niveau du pont de l'A2 ($PK \approx 33000$\,m) ?
|
||||
\end{remark}
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\section{Second scénario d'aménagement : élargissement du lit moyen}
|
||||
|
||||
Ce scénario d'aménagement consiste à essayer d’augmenter le laminage en créant un lit moyen en rive droite entre les PKs 32 015 et 33 920\,m. Pour rappel, cette localisation est imposée pour des raisons de disponibilité des terrains et on ne peut pas envisager une largeur du lit moyen supérieure à 50 mètres.
|
||||
|
||||
\begin{remark}
|
||||
Pourquoi élargir le lit moyen peut-il avoir un effet sur le niveau d'eau durant la crue ?
|
||||
\end{remark}
|
||||
|
||||
Pour élargir le lit moyen, la géométrie doit être modifiée.
|
||||
Il est judicieux d'enregistrer votre étude sous un autre nom avant de procéder à ces modifications (cliquez sur \texttt{[Fichier] => [Sauvegarder sous]}).
|
||||
|
||||
Vous aurez un certain nombre de sections à modifier. Pour limiter leur nombre, le plus simple est de repartir de la géométrie initiale (avant maillage) avant de modifier les transects et de mailler à nouveau après les modifications.
|
||||
Vous pouvez supprimer les sections interpolées (notées interpol\textit{i}) en les sélectionnant dans la fenêtre \textit{Géométrie} et en appuyant sur le bouton \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/del.png}.
|
||||
|
||||
Cliquez sur \texttt{[Géométrie] => [Modifier la géométrie]} 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électionnez la section en travers que vous souhaitez modifier.
|
||||
Vous pouvez l'éditer en cliquant sur l'icône \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}.
|
||||
|
||||
S'ouvre alors la fenêtre suivante :
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/modif_profil_en_travers.png}
|
||||
\par\end{center}
|
||||
|
||||
En appuyant sur \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/add.png"} vous pourrez ajouter un point sur votre profil en travers que vous pourrez ensuite placer ou vous le souhaitez sur le profil grâce aux flèches \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/up.png"} ou \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/down.png"}.
|
||||
Dans le cas présent, afin d'élargir le lit moyen de 50\,m, vous pourrez ajouter un point juste après le point qui correspond à la rive droite (rd) légèrement plus haut et 50\,m plus à droite (en $Y=61.5$\,m et $Z=20.1$\,m par exemple).
|
||||
Il ne restera alors plus qu'à décaler tous les points suivants de 50\,m.
|
||||
|
||||
Vous devriez obtenir la géométrie suivante :
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/modif_profil_en_travers2.png}
|
||||
\par\end{center}
|
||||
|
||||
Vous pouvez appliquer cette méthode à l'ensemble des transects à élargir et lancer le calcul pour chacune des crues proposées avec ce nouvel aménagement.
|
||||
|
||||
\begin{remark}
|
||||
Exportez les résultats obtenus pour la hauteur d'eau en fonction du PK pour ce nouveau scénario.
|
||||
Quel est l'effet de cet aménagement sur la hauteur d'eau et sur quel secteur ?
|
||||
Exportez également le débit en fonction du temps en quelques sections choisies.
|
||||
Quel est l'effet de cet aménagement sur l'hydrogramme de crue ?
|
||||
Peut-on s'attendre à ce résultat compte tenu du volume qu'il est possible de stocker en lit moyen et du volume total de la crue ?
|
||||
\end{remark}
|
||||
|
||||
\pagebreak{}
|
||||
|
||||
\section{Troisième scénario d'aménagement : casier de stockage}
|
||||
|
||||
Ce troisième scénario consiste à faire baisser le débit dans la rivière en créant un déversement vers un casier de stockage en rive gauche juste en aval du pont de l'A2.
|
||||
La surface de stockage disponible a été estimée à 42 ha pour une altitude moyenne du terrain naturel de 18\,m.
|
||||
|
||||
\begin{remark}
|
||||
Quel volume d'eau ce réservoir peut-il stocker ?
|
||||
Comment se compare-t-il au volume de la crue ?
|
||||
Quel est alors l'effet attendu de cet ouvrage ?
|
||||
\end{remark}
|
||||
|
||||
Pour modéliser ce scénario, il est nécessaire de dévier une part de l'écoulement pour le diriger vers un casier.
|
||||
Il faut donc créer une difluence, soit modifier le réseau.
|
||||
De nouveau, il est préférable d'enregistrer l'étude sous un autre nom avant de procéder à ces modifications.
|
||||
|
||||
Cliquez sur \texttt{[Réseau] => [Modifier le réseau]} ou sur l'icône \includegraphics[width=0.5cm]{img/network.png} pour modifier la structure de votre rivière.
|
||||
Le réseau pour la configuration de référence ne comportait qu'un seul bief entre deux noeuds.
|
||||
Pour ajouter un casier, il faut ajouter un noeud pour la diffluence, un noeud en amont du casier et un noeud en aval du casier.
|
||||
Le casier ne peut en effet pas être en limite aval du modèle ni directement au niveau de la confluence.
|
||||
Pour ajouter un noeud, cliquez sur \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png} pour sélectionner l'outil ``d'addition'' et cliquez ensuite dans la fenêtre grise à l'endroit ou vous souhaitez ajouter un noeud.
|
||||
De la même façon vous pourrez avec cet outil ajouter un bief entre deux noeuds en cliquant successivement sur l'un puis sur l'autre.
|
||||
Vous pourrez alors créer un réseau tel que celui ci-dessous où DevLat est le noeud marquant la diffluence.
|
||||
\begin{center}
|
||||
\includegraphics[width=12cm]{img/reseau_casier.png}
|
||||
\par\end{center}
|
||||
|
||||
Pour chacun des nouveau biefs crées, il vous faudra créer ou adapter la géométrie.
|
||||
Deux exemples vous sont proposés ci-dessous pour les biefs amont et aval du casier.
|
||||
\begin{center}
|
||||
\includegraphics[width=10cm]{img/geom_am_casier.png}
|
||||
\includegraphics[width=10cm]{img/geom_av_casier.png}
|
||||
\par\end{center}
|
||||
Vous noterez la présence d'un ouvrage sur le bief amont afin de pouvoir contrôler à partir de quelle hauteur d'eau on souhaite commencer le remplissage du casier.
|
||||
|
||||
Pour le bief principal constitué des deux biefs Crespin->DevLat et DevLat->SeuilAval, l'un d'eux porte la géométrie complète tandis que la géométrie de l'autre n'est pas définie.
|
||||
Il vous faudra supprimer les sections dans l'un que vous implémenterez dans l'autre.
|
||||
L'outil d'import de géométrie pourra vous aider.
|
||||
Il faudra le cas échéant réimplémenter également les ouvrages.
|
||||
|
||||
Vous devrez ensuite implémenter le casier sur le noeud nommé casier. Cliquez sur \texttt{[Hydraulique] => [Casiers]}. Vous pouvez ajouter un casier en cliquant sur \includegraphics[width=0.5cm]{../../../src/View/ui/ressources/add.png}. Vous devrez ensuite configurer le casier en cliquant sur l'icône \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}. Pour chaque altitude, vous pouvez définir l'aire de stockage (en ha). Vous pourrez ainsi configurer votre casier de la façon suivante :
|
||||
\begin{center}
|
||||
\includegraphics[width=10cm]{img/Casier.png}
|
||||
\par\end{center}
|
||||
|
||||
Lancez le calcul pour chacune des crues proposées avec ce nouvel aménagement.
|
||||
|
||||
\begin{remark}
|
||||
Exportez les résultats obtenus pour la hauteur d'eau en fonction du PK pour ce nouveau scénario.
|
||||
Quel est l'effet de cet aménagement sur la hauteur d'eau et sur quel secteur ?
|
||||
Exportez également le débit en fonction du temps en quelques sections choisies.
|
||||
Quel est l'effet de cet aménagement sur l'hydrogramme de crue ?
|
||||
Comparer les crues centenale et décennale : comment l'ouvrage sur le bief amont impacte-t-il les hydrogrammes ?
|
||||
Vos résultats sont-ils cohérent avec vos premières estimations ?
|
||||
\end{remark}
|
||||
|
||||
\section{Conclusion}
|
||||
|
||||
\`A l'aide de la modélisation numérique du cours d'eau de l'Hogneau, vous avez pu comparer l'efficacité de 3 scenarii d'aménagement sur une crue historique, une crue centenale et une crue décennale.
|
||||
|
||||
\begin{remark}
|
||||
Quel aménagement jugez-vous le plus efficace ?
|
||||
Quels éléments vous ont apporté la modélisation ?
|
||||
Que proposeriez-vous à la collectivité locale ?
|
||||
\end{remark}
|
||||
|
||||
A travers cet exemple, avez pris en main l'outil PamHyr avec le code de calcul MAGE.
|
||||
|
||||
\pagebreak{}
|
||||
\end{document}
|
||||
|
|
@ -4,3 +4,5 @@ pdflatex -no-shell-escape step-by-step.tex
|
|||
pdflatex -no-shell-escape step-by-step.tex
|
||||
pdflatex -no-shell-escape pas-a-pas.tex
|
||||
pdflatex -no-shell-escape pas-a-pas.tex
|
||||
pdflatex -no-shell-escape Tuto-2-fr.tex
|
||||
pdflatex -no-shell-escape Tuto-2-fr.tex
|
||||
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
|
@ -101,7 +101,7 @@ Authors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
|
|||
|
||||
\section{Install Pamhyr2}
|
||||
|
||||
Pamhyr2 can be downloaded from \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
|
||||
Pamhyr2 can be downloaded from \url{https://gitlab.com/pamhyr/pamhyr2}.
|
||||
\begin{center}
|
||||
\includegraphics[width=15cm]{img/dl.png}
|
||||
\par\end{center}
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
# Exported from Pamhyr2
|
||||
0 1 0 37 0.000000 p1013
|
||||
0.0000 0.0000 14.0000
|
||||
0.0000 0.0134 12.9933
|
||||
0.0000 0.9213 12.5393
|
||||
0.0000 1.8292 12.0854
|
||||
0.0000 2.7370 11.6315
|
||||
0.0000 3.6449 11.1775
|
||||
0.0000 4.5528 10.7236
|
||||
0.0000 5.4607 10.2697
|
||||
0.0000 6.3685 9.8157
|
||||
0.0000 7.2764 9.3618
|
||||
0.0000 8.1843 8.9079
|
||||
0.0000 9.0921 8.4539
|
||||
0.0000 10.0000 8.0000 FD
|
||||
0.0000 10.8333 8.0000
|
||||
0.0000 11.6667 8.0000
|
||||
0.0000 12.5000 8.0000
|
||||
0.0000 13.3333 8.0000
|
||||
0.0000 14.1667 8.0000
|
||||
0.0000 15.0000 8.0000
|
||||
0.0000 15.8333 8.0000
|
||||
0.0000 16.6667 8.0000
|
||||
0.0000 17.5000 8.0000
|
||||
0.0000 18.3333 8.0000
|
||||
0.0000 19.1667 8.0000
|
||||
0.0000 20.0000 8.0000 FG
|
||||
0.0000 20.9079 8.4539
|
||||
0.0000 21.8157 8.9079
|
||||
0.0000 22.7236 9.3618
|
||||
0.0000 23.6315 9.8157
|
||||
0.0000 24.5393 10.2697
|
||||
0.0000 25.4472 10.7236
|
||||
0.0000 26.3551 11.1775
|
||||
0.0000 27.2630 11.6315
|
||||
0.0000 28.1708 12.0854
|
||||
0.0000 29.0787 12.5393
|
||||
0.0000 29.9866 12.9933
|
||||
0.0000 30.0000 14.0000
|
||||
999.9990 999.9990 999.9990
|
||||
1 2 0 37 350.000000 p1025
|
||||
350.0000 0.0000 13.6500
|
||||
350.0000 0.0134 12.6433
|
||||
350.0000 0.9213 12.1893
|
||||
350.0000 1.8292 11.7354
|
||||
350.0000 2.7370 11.2815
|
||||
350.0000 3.6449 10.8275
|
||||
350.0000 4.5528 10.3736
|
||||
350.0000 5.4607 9.9197
|
||||
350.0000 6.3685 9.4657
|
||||
350.0000 7.2764 9.0118
|
||||
350.0000 8.1843 8.5579
|
||||
350.0000 9.0921 8.1039
|
||||
350.0000 10.0000 7.6500 FD
|
||||
350.0000 10.8333 7.6500
|
||||
350.0000 11.6667 7.6500
|
||||
350.0000 12.5000 7.6500
|
||||
350.0000 13.3333 7.6500
|
||||
350.0000 14.1667 7.6500
|
||||
350.0000 15.0000 7.6500
|
||||
350.0000 15.8333 7.6500
|
||||
350.0000 16.6667 7.6500
|
||||
350.0000 17.5000 7.6500
|
||||
350.0000 18.3333 7.6500
|
||||
350.0000 19.1667 7.6500
|
||||
350.0000 20.0000 7.6500 FG
|
||||
350.0000 20.9079 8.1039
|
||||
350.0000 21.8157 8.5579
|
||||
350.0000 22.7236 9.0118
|
||||
350.0000 23.6315 9.4657
|
||||
350.0000 24.5393 9.9197
|
||||
350.0000 25.4472 10.3736
|
||||
350.0000 26.3551 10.8275
|
||||
350.0000 27.2630 11.2815
|
||||
350.0000 28.1708 11.7354
|
||||
350.0000 29.0787 12.1893
|
||||
350.0000 29.9866 12.6433
|
||||
350.0000 30.0000 13.6500
|
||||
999.9990 999.9990 999.9990
|
||||
2 3 0 37 370.000000 p1026
|
||||
370.0000 0.0000 13.6300
|
||||
370.0000 0.0134 12.6233
|
||||
370.0000 0.9213 12.1693
|
||||
370.0000 1.8292 11.7154
|
||||
370.0000 2.7370 11.2615
|
||||
370.0000 3.6449 10.8075
|
||||
370.0000 4.5528 10.3536
|
||||
370.0000 5.4607 9.8997
|
||||
370.0000 6.3685 9.4457
|
||||
370.0000 7.2764 8.9918
|
||||
370.0000 8.1843 8.5379
|
||||
370.0000 9.0921 8.0839
|
||||
370.0000 10.0000 7.6300 FD
|
||||
370.0000 11.2500 7.6300
|
||||
370.0000 12.5000 7.6300
|
||||
370.0000 13.7500 7.6300
|
||||
370.0000 15.0000 7.6300
|
||||
370.0000 16.2500 7.6300
|
||||
370.0000 17.5000 7.6300
|
||||
370.0000 18.7500 7.6300
|
||||
370.0000 20.0000 7.6300
|
||||
370.0000 21.2500 7.6300
|
||||
370.0000 22.5000 7.6300
|
||||
370.0000 23.7500 7.6300
|
||||
370.0000 25.0000 7.6300 FG
|
||||
370.0000 25.9079 8.0839
|
||||
370.0000 26.8157 8.5379
|
||||
370.0000 27.7236 8.9918
|
||||
370.0000 28.6315 9.4457
|
||||
370.0000 29.5393 9.8997
|
||||
370.0000 30.4472 10.3536
|
||||
370.0000 31.3551 10.8075
|
||||
370.0000 32.2630 11.2615
|
||||
370.0000 33.1708 11.7154
|
||||
370.0000 34.0787 12.1693
|
||||
370.0000 34.9866 12.6233
|
||||
370.0000 35.0000 13.6300
|
||||
999.9990 999.9990 999.9990
|
||||
3 4 0 37 630.000000 p1035
|
||||
630.0000 0.0000 13.3700
|
||||
630.0000 0.0134 12.3633
|
||||
630.0000 0.9213 11.9093
|
||||
630.0000 1.8292 11.4554
|
||||
630.0000 2.7370 11.0015
|
||||
630.0000 3.6449 10.5475
|
||||
630.0000 4.5528 10.0936
|
||||
630.0000 5.4607 9.6397
|
||||
630.0000 6.3685 9.1857
|
||||
630.0000 7.2764 8.7318
|
||||
630.0000 8.1843 8.2779
|
||||
630.0000 9.0921 7.8239
|
||||
630.0000 10.0000 7.3700 FD
|
||||
630.0000 11.2500 7.3700
|
||||
630.0000 12.5000 7.3700
|
||||
630.0000 13.7500 7.3700
|
||||
630.0000 15.0000 7.3700
|
||||
630.0000 16.2500 7.3700
|
||||
630.0000 17.5000 7.3700
|
||||
630.0000 18.7500 7.3700
|
||||
630.0000 20.0000 7.3700
|
||||
630.0000 21.2500 7.3700
|
||||
630.0000 22.5000 7.3700
|
||||
630.0000 23.7500 7.3700
|
||||
630.0000 25.0000 7.3700 FG
|
||||
630.0000 25.9079 7.8239
|
||||
630.0000 26.8157 8.2779
|
||||
630.0000 27.7236 8.7318
|
||||
630.0000 28.6315 9.1857
|
||||
630.0000 29.5393 9.6397
|
||||
630.0000 30.4472 10.0936
|
||||
630.0000 31.3551 10.5475
|
||||
630.0000 32.2630 11.0015
|
||||
630.0000 33.1708 11.4554
|
||||
630.0000 34.0787 11.9093
|
||||
630.0000 34.9866 12.3633
|
||||
630.0000 35.0000 13.3700
|
||||
999.9990 999.9990 999.9990
|
||||
4 5 0 37 650.000000 p1036
|
||||
650.0000 0.0000 13.3500
|
||||
650.0000 0.0134 12.3433
|
||||
650.0000 0.9213 11.8893
|
||||
650.0000 1.8292 11.4354
|
||||
650.0000 2.7370 10.9815
|
||||
650.0000 3.6449 10.5275
|
||||
650.0000 4.5528 10.0736
|
||||
650.0000 5.4607 9.6197
|
||||
650.0000 6.3685 9.1657
|
||||
650.0000 7.2764 8.7118
|
||||
650.0000 8.1843 8.2579
|
||||
650.0000 9.0921 7.8039
|
||||
650.0000 10.0000 7.3500 FD
|
||||
650.0000 10.8333 7.3500
|
||||
650.0000 11.6667 7.3500
|
||||
650.0000 12.5000 7.3500
|
||||
650.0000 13.3333 7.3500
|
||||
650.0000 14.1667 7.3500
|
||||
650.0000 15.0000 7.3500
|
||||
650.0000 15.8333 7.3500
|
||||
650.0000 16.6667 7.3500
|
||||
650.0000 17.5000 7.3500
|
||||
650.0000 18.3333 7.3500
|
||||
650.0000 19.1667 7.3500
|
||||
650.0000 20.0000 7.3500 FG
|
||||
650.0000 20.9079 7.8039
|
||||
650.0000 21.8157 8.2579
|
||||
650.0000 22.7236 8.7118
|
||||
650.0000 23.6315 9.1657
|
||||
650.0000 24.5393 9.6197
|
||||
650.0000 25.4472 10.0736
|
||||
650.0000 26.3551 10.5275
|
||||
650.0000 27.2630 10.9815
|
||||
650.0000 28.1708 11.4354
|
||||
650.0000 29.0787 11.8893
|
||||
650.0000 29.9866 12.3433
|
||||
650.0000 30.0000 13.3500
|
||||
999.9990 999.9990 999.9990
|
||||
5 6 0 37 1000.000000 p1048
|
||||
1000.0000 0.0000 13.0000
|
||||
1000.0000 0.0134 11.9933
|
||||
1000.0000 0.9213 11.5393
|
||||
1000.0000 1.8292 11.0854
|
||||
1000.0000 2.7370 10.6315
|
||||
1000.0000 3.6449 10.1775
|
||||
1000.0000 4.5528 9.7236
|
||||
1000.0000 5.4607 9.2697
|
||||
1000.0000 6.3685 8.8157
|
||||
1000.0000 7.2764 8.3618
|
||||
1000.0000 8.1843 7.9079
|
||||
1000.0000 9.0921 7.4539
|
||||
1000.0000 10.0000 7.0000 FD
|
||||
1000.0000 10.8333 7.0000
|
||||
1000.0000 11.6667 7.0000
|
||||
1000.0000 12.5000 7.0000
|
||||
1000.0000 13.3333 7.0000
|
||||
1000.0000 14.1667 7.0000
|
||||
1000.0000 15.0000 7.0000
|
||||
1000.0000 15.8333 7.0000
|
||||
1000.0000 16.6667 7.0000
|
||||
1000.0000 17.5000 7.0000
|
||||
1000.0000 18.3333 7.0000
|
||||
1000.0000 19.1667 7.0000
|
||||
1000.0000 20.0000 7.0000 FG
|
||||
1000.0000 20.9079 7.4539
|
||||
1000.0000 21.8157 7.9079
|
||||
1000.0000 22.7236 8.3618
|
||||
1000.0000 23.6315 8.8157
|
||||
1000.0000 24.5393 9.2697
|
||||
1000.0000 25.4472 9.7236
|
||||
1000.0000 26.3551 10.1775
|
||||
1000.0000 27.2630 10.6315
|
||||
1000.0000 28.1708 11.0854
|
||||
1000.0000 29.0787 11.5393
|
||||
1000.0000 29.9866 11.9933
|
||||
1000.0000 30.0000 13.0000
|
||||
999.9990 999.9990 999.9990
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
# Exported from Pamhyr2
|
||||
0 1 0 37 0.000000 p1210
|
||||
0.0000 0.0000 14.0000
|
||||
0.0000 0.0134 12.9933
|
||||
0.0000 0.9213 12.5393
|
||||
0.0000 1.8292 12.0854
|
||||
0.0000 2.7370 11.6315
|
||||
0.0000 3.6449 11.1775
|
||||
0.0000 4.5528 10.7236
|
||||
0.0000 5.4607 10.2697
|
||||
0.0000 6.3685 9.8157
|
||||
0.0000 7.2764 9.3618
|
||||
0.0000 8.1843 8.9079
|
||||
0.0000 9.0921 8.4539
|
||||
0.0000 10.0000 8.0000 FD
|
||||
0.0000 10.8333 8.0000
|
||||
0.0000 11.6667 8.0000
|
||||
0.0000 12.5000 8.0000
|
||||
0.0000 13.3333 8.0000
|
||||
0.0000 14.1667 8.0000
|
||||
0.0000 15.0000 8.0000
|
||||
0.0000 15.8333 8.0000
|
||||
0.0000 16.6667 8.0000
|
||||
0.0000 17.5000 8.0000
|
||||
0.0000 18.3333 8.0000
|
||||
0.0000 19.1667 8.0000
|
||||
0.0000 20.0000 8.0000 FG
|
||||
0.0000 20.9079 8.4539
|
||||
0.0000 21.8157 8.9079
|
||||
0.0000 22.7236 9.3618
|
||||
0.0000 23.6315 9.8157
|
||||
0.0000 24.5393 10.2697
|
||||
0.0000 25.4472 10.7236
|
||||
0.0000 26.3551 11.1775
|
||||
0.0000 27.2630 11.6315
|
||||
0.0000 28.1708 12.0854
|
||||
0.0000 29.0787 12.5393
|
||||
0.0000 29.9866 12.9933
|
||||
0.0000 30.0000 14.0000
|
||||
999.9990 999.9990 999.9990
|
||||
1 2 0 37 300.000000 p1225
|
||||
300.0000 0.0000 13.7000
|
||||
300.0000 0.0134 12.6933
|
||||
300.0000 0.9213 12.2393
|
||||
300.0000 1.8292 11.7854
|
||||
300.0000 2.7370 11.3315
|
||||
300.0000 3.6449 10.8775
|
||||
300.0000 4.5528 10.4236
|
||||
300.0000 5.4607 9.9697
|
||||
300.0000 6.3685 9.5157
|
||||
300.0000 7.2764 9.0618
|
||||
300.0000 8.1843 8.6079
|
||||
300.0000 9.0921 8.1539
|
||||
300.0000 10.0000 7.7000 FD
|
||||
300.0000 10.8333 7.7000
|
||||
300.0000 11.6667 7.7000
|
||||
300.0000 12.5000 7.7000
|
||||
300.0000 13.3333 7.7000
|
||||
300.0000 14.1667 7.7000
|
||||
300.0000 15.0000 7.7000
|
||||
300.0000 15.8333 7.7000
|
||||
300.0000 16.6667 7.7000
|
||||
300.0000 17.5000 7.7000
|
||||
300.0000 18.3333 7.7000
|
||||
300.0000 19.1667 7.7000
|
||||
300.0000 20.0000 7.7000 FG
|
||||
300.0000 20.9079 8.1539
|
||||
300.0000 21.8157 8.6079
|
||||
300.0000 22.7236 9.0618
|
||||
300.0000 23.6315 9.5157
|
||||
300.0000 24.5393 9.9697
|
||||
300.0000 25.4472 10.4236
|
||||
300.0000 26.3551 10.8775
|
||||
300.0000 27.2630 11.3315
|
||||
300.0000 28.1708 11.7854
|
||||
300.0000 29.0787 12.2393
|
||||
300.0000 29.9866 12.6933
|
||||
300.0000 30.0000 13.7000
|
||||
999.9990 999.9990 999.9990
|
||||
2 3 0 37 310.000000 p1226
|
||||
310.0000 0.0000 13.1900
|
||||
310.0000 0.0134 12.1833
|
||||
310.0000 0.9213 11.7293
|
||||
310.0000 1.8292 11.2754
|
||||
310.0000 2.7370 10.8215
|
||||
310.0000 3.6449 10.3675
|
||||
310.0000 4.5528 9.9136
|
||||
310.0000 5.4607 9.4597
|
||||
310.0000 6.3685 9.0057
|
||||
310.0000 7.2764 8.5518
|
||||
310.0000 8.1843 8.0979
|
||||
310.0000 9.0921 7.6439
|
||||
310.0000 10.0000 7.1900 FD
|
||||
310.0000 10.8333 7.1900
|
||||
310.0000 11.6667 7.1900
|
||||
310.0000 12.5000 7.1900
|
||||
310.0000 13.3333 7.1900
|
||||
310.0000 14.1667 7.1900
|
||||
310.0000 15.0000 7.1900
|
||||
310.0000 15.8333 7.1900
|
||||
310.0000 16.6667 7.1900
|
||||
310.0000 17.5000 7.1900
|
||||
310.0000 18.3333 7.1900
|
||||
310.0000 19.1667 7.1900
|
||||
310.0000 20.0000 7.1900 FG
|
||||
310.0000 20.9079 7.6439
|
||||
310.0000 21.8157 8.0979
|
||||
310.0000 22.7236 8.5518
|
||||
310.0000 23.6315 9.0057
|
||||
310.0000 24.5393 9.4597
|
||||
310.0000 25.4472 9.9136
|
||||
310.0000 26.3551 10.3675
|
||||
310.0000 27.2630 10.8215
|
||||
310.0000 28.1708 11.2754
|
||||
310.0000 29.0787 11.7293
|
||||
310.0000 29.9866 12.1833
|
||||
310.0000 30.0000 13.1900
|
||||
999.9990 999.9990 999.9990
|
||||
3 4 0 37 390.000000 p1230
|
||||
390.0000 0.0000 13.1900
|
||||
390.0000 0.0134 12.1833
|
||||
390.0000 0.9213 11.7293
|
||||
390.0000 1.8292 11.2754
|
||||
390.0000 2.7370 10.8215
|
||||
390.0000 3.6449 10.3675
|
||||
390.0000 4.5528 9.9136
|
||||
390.0000 5.4607 9.4597
|
||||
390.0000 6.3685 9.0057
|
||||
390.0000 7.2764 8.5518
|
||||
390.0000 8.1843 8.0979
|
||||
390.0000 9.0921 7.6439
|
||||
390.0000 10.0000 7.1900 FD
|
||||
390.0000 10.8333 7.1900
|
||||
390.0000 11.6667 7.1900
|
||||
390.0000 12.5000 7.1900
|
||||
390.0000 13.3333 7.1900
|
||||
390.0000 14.1667 7.1900
|
||||
390.0000 15.0000 7.1900
|
||||
390.0000 15.8333 7.1900
|
||||
390.0000 16.6667 7.1900
|
||||
390.0000 17.5000 7.1900
|
||||
390.0000 18.3333 7.1900
|
||||
390.0000 19.1667 7.1900
|
||||
390.0000 20.0000 7.1900 FG
|
||||
390.0000 20.9079 7.6439
|
||||
390.0000 21.8157 8.0979
|
||||
390.0000 22.7236 8.5518
|
||||
390.0000 23.6315 9.0057
|
||||
390.0000 24.5393 9.4597
|
||||
390.0000 25.4472 9.9136
|
||||
390.0000 26.3551 10.3675
|
||||
390.0000 27.2630 10.8215
|
||||
390.0000 28.1708 11.2754
|
||||
390.0000 29.0787 11.7293
|
||||
390.0000 29.9866 12.1833
|
||||
390.0000 30.0000 13.1900
|
||||
999.9990 999.9990 999.9990
|
||||
4 5 0 37 400.000000 p1231
|
||||
400.0000 0.0000 13.6000
|
||||
400.0000 0.0134 12.5933
|
||||
400.0000 0.9213 12.1393
|
||||
400.0000 1.8292 11.6854
|
||||
400.0000 2.7370 11.2315
|
||||
400.0000 3.6449 10.7775
|
||||
400.0000 4.5528 10.3236
|
||||
400.0000 5.4607 9.8697
|
||||
400.0000 6.3685 9.4157
|
||||
400.0000 7.2764 8.9618
|
||||
400.0000 8.1843 8.5079
|
||||
400.0000 9.0921 8.0539
|
||||
400.0000 10.0000 7.6000 FD
|
||||
400.0000 10.8333 7.6000
|
||||
400.0000 11.6667 7.6000
|
||||
400.0000 12.5000 7.6000
|
||||
400.0000 13.3333 7.6000
|
||||
400.0000 14.1667 7.6000
|
||||
400.0000 15.0000 7.6000
|
||||
400.0000 15.8333 7.6000
|
||||
400.0000 16.6667 7.6000
|
||||
400.0000 17.5000 7.6000
|
||||
400.0000 18.3333 7.6000
|
||||
400.0000 19.1667 7.6000
|
||||
400.0000 20.0000 7.6000 FG
|
||||
400.0000 20.9079 8.0539
|
||||
400.0000 21.8157 8.5079
|
||||
400.0000 22.7236 8.9618
|
||||
400.0000 23.6315 9.4157
|
||||
400.0000 24.5393 9.8697
|
||||
400.0000 25.4472 10.3236
|
||||
400.0000 26.3551 10.7775
|
||||
400.0000 27.2630 11.2315
|
||||
400.0000 28.1708 11.6854
|
||||
400.0000 29.0787 12.1393
|
||||
400.0000 29.9866 12.5933
|
||||
400.0000 30.0000 13.6000
|
||||
999.9990 999.9990 999.9990
|
||||
5 6 0 37 1000.000000 p1261
|
||||
1000.0000 0.0000 13.0000
|
||||
1000.0000 0.0134 11.9933
|
||||
1000.0000 0.9213 11.5393
|
||||
1000.0000 1.8292 11.0854
|
||||
1000.0000 2.7370 10.6315
|
||||
1000.0000 3.6449 10.1775
|
||||
1000.0000 4.5528 9.7236
|
||||
1000.0000 5.4607 9.2697
|
||||
1000.0000 6.3685 8.8157
|
||||
1000.0000 7.2764 8.3618
|
||||
1000.0000 8.1843 7.9079
|
||||
1000.0000 9.0921 7.4539
|
||||
1000.0000 10.0000 7.0000 FD
|
||||
1000.0000 10.8333 7.0000
|
||||
1000.0000 11.6667 7.0000
|
||||
1000.0000 12.5000 7.0000
|
||||
1000.0000 13.3333 7.0000
|
||||
1000.0000 14.1667 7.0000
|
||||
1000.0000 15.0000 7.0000
|
||||
1000.0000 15.8333 7.0000
|
||||
1000.0000 16.6667 7.0000
|
||||
1000.0000 17.5000 7.0000
|
||||
1000.0000 18.3333 7.0000
|
||||
1000.0000 19.1667 7.0000
|
||||
1000.0000 20.0000 7.0000 FG
|
||||
1000.0000 20.9079 7.4539
|
||||
1000.0000 21.8157 7.9079
|
||||
1000.0000 22.7236 8.3618
|
||||
1000.0000 23.6315 8.8157
|
||||
1000.0000 24.5393 9.2697
|
||||
1000.0000 25.4472 9.7236
|
||||
1000.0000 26.3551 10.1775
|
||||
1000.0000 27.2630 10.6315
|
||||
1000.0000 28.1708 11.0854
|
||||
1000.0000 29.0787 11.5393
|
||||
1000.0000 29.9866 11.9933
|
||||
1000.0000 30.0000 13.0000
|
||||
999.9990 999.9990 999.9990
|
||||
|
|
@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||
lxml>=4.9.3
|
||||
platformdirs>=4.2.0
|
||||
pyshp>=2.3.1
|
||||
rasterio==1.3.11
|
||||
#fortranformat==2.0.3
|
||||
|
|
|
|||
|
|
@ -68,14 +68,24 @@ copy /y ..\doc\dev\images\* pamhyr\doc\images
|
|||
copy /y ..\doc\images\* pamhyr\doc\images
|
||||
|
||||
rem Tuto
|
||||
mkdir pamhyr\doc\Tuto1\
|
||||
mkdir pamhyr\doc\Tuto1\data
|
||||
copy /y ..\doc\users\Tuto1\Hogneau_Engees2022.pdf pamhyr\doc\Tuto1\Hogneau_Engees2022.pdf
|
||||
copy /y ..\doc\users\Tuto1\step-by-step.pdf pamhyr\doc\Tuto1\Tuto1-en.pdf
|
||||
copy /y ..\doc\users\Tuto1\pas-a-pas.pdf pamhyr\doc\Tuto1\Tuto1-fr.pdf
|
||||
copy /y ..\doc\users\Tuto1\*.pamhyr pamhyr\doc\Tuto1\
|
||||
copy /y ..\doc\users\Tuto1\data\* pamhyr\doc\Tuto1\data\
|
||||
mkdir pamhyr\doc\TP_Hydraulique_Hogneau\
|
||||
mkdir pamhyr\doc\TP_Hydraulique_Hogneau\data
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\Hogneau_Engees2022.pdf pamhyr\doc\TP_Hydraulique_Hogneau\Hogneau_Engees2022.pdf
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\step-by-step.pdf pamhyr\doc\TP_Hydraulique_Hogneau\Tuto1-en.pdf
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\pas-a-pas.pdf pamhyr\doc\TP_Hydraulique_Hogneau\Tuto1-fr.pdf
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\Tuto-2-fr.pdf pamhyr\doc\TP_Hydraulique_Hogneau\Tuto2-fr.pdf
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\*.pamhyr pamhyr\doc\TP_Hydraulique_Hogneau\
|
||||
copy /y ..\doc\users\TP_Hydraulique_Hogneau\data\* pamhyr\doc\TP_Hydraulique_Hogneau\data\
|
||||
|
||||
rem TP charriage
|
||||
mkdir pamhyr\doc\TP_charriage
|
||||
copy /y ..\doc\users\TP_charriage\ pamhyr\doc\TP_charriage
|
||||
mkdir pamhyr\doc\TP_charriage\Donnees_TP_Pamhyr2_charriage
|
||||
copy /y ..\doc\users\TP_charriage\TP_Pamhyr2_charriage.pdf pamhyr\doc\TP_charriage\
|
||||
copy /y ..\doc\users\TP_charriage\Donnees_TP_Pamhyr2_charriage\* pamhyr\doc\TP_charriage\Donnees_TP_Pamhyr2_charriage\
|
||||
|
||||
rem TP AdisTS
|
||||
mkdir pamhyr\doc\TP_AdisTS_Vieux_Rhone\
|
||||
mkdir pamhyr\doc\TP_AdisTS_Vieux_Rhone\data
|
||||
copy /y ..\doc\users\TP_AdisTS_Vieux_Rhone\*.pdf pamhyr\doc\TP_AdisTS_Vieux_Rhone\
|
||||
copy /y ..\doc\users\TP_AdisTS_Vieux_Rhone\*.pamhyr pamhyr\doc\TP_AdisTS_Vieux_Rhone\
|
||||
copy /y ..\doc\users\TP_AdisTS_Vieux_Rhone\data\* pamhyr\doc\TP_AdisTS_Vieux_Rhone\data\
|
||||
|
|
|
|||
|
|
@ -12,3 +12,5 @@ shapely>=2.0.1
|
|||
lxml>=4.9.3
|
||||
platformdirs>=4.2.0
|
||||
pyshp>=2.3.1
|
||||
rasterio==1.3.11
|
||||
#fortranformat==2.0.3
|
||||
|
|
|
|||
|
|
@ -0,0 +1,331 @@
|
|||
# Internal.py -- Pamhyr
|
||||
# Copyright (C) 2023-2025 INRAE
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
from numpy import sign
|
||||
from copy import deepcopy
|
||||
|
||||
from tools import logger_color_red, logger_color_reset, logger_exception
|
||||
from Meshing.AMeshingTool import AMeshingTool
|
||||
|
||||
from Model.Geometry.ProfileXYZ import ProfileXYZ
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
class InternalMeshing(AMeshingTool):
|
||||
def __init__(self):
|
||||
super(InternalMeshing, self).__init__()
|
||||
|
||||
###########
|
||||
# Meshing #
|
||||
###########
|
||||
|
||||
def meshing(self, reach,
|
||||
step: float = 50,
|
||||
limites=[-1, -1],
|
||||
linear: bool = True):
|
||||
if reach is None or len(reach.profiles) == 0:
|
||||
return reach
|
||||
|
||||
if limites[0] > limites[1]:
|
||||
lim = limites[1]
|
||||
limites[1] = limites[0]
|
||||
limites[0] = lim
|
||||
elif limites[0] == limites[1]:
|
||||
return reach
|
||||
|
||||
self.st_to_m(reach, limites)
|
||||
self.interpolate_transversal_step(reach,
|
||||
limites,
|
||||
step)
|
||||
self.purge_aligned_points(reach)
|
||||
|
||||
return reach
|
||||
|
||||
def st_to_m(self, reach, limites):
|
||||
|
||||
gl = reach.compute_guidelines()
|
||||
profiles = reach.profiles[limites[0]:limites[1]+1]
|
||||
|
||||
print(profiles)
|
||||
|
||||
# we make sure that the lines are in the left-to-right order
|
||||
guide_list = [
|
||||
x.name
|
||||
for x in profiles[0].named_points()
|
||||
if x.name in gl[0]
|
||||
]
|
||||
|
||||
gl1 = [""] + guide_list
|
||||
gl2 = guide_list + [""]
|
||||
max_values = [0] * (len(guide_list) + 1)
|
||||
max_values_index = [0] * (len(guide_list) + 1)
|
||||
# we work between each couple of guidelines
|
||||
for j, p in enumerate(profiles):
|
||||
index1 = 0
|
||||
index2 = p.named_point_index(guide_list[0])
|
||||
if index2 - index1 > max_values[0]:
|
||||
max_values[0] = index2 - index1
|
||||
max_values_index[0] = j
|
||||
for i in range(len(guide_list) - 1):
|
||||
index1 = p.named_point_index(guide_list[i])
|
||||
index2 = p.named_point_index(guide_list[i+1])
|
||||
if index2 - index1 > max_values[i + 1]:
|
||||
max_values[i + 1] = index2 - index1
|
||||
max_values_index[i + 1] = j
|
||||
index1 = p.named_point_index(guide_list[-1])
|
||||
index2 = len(p) - 1
|
||||
if index2 - index1 > max_values[-1]:
|
||||
max_values[-1] = index2 - index1
|
||||
max_values_index[-1] = j
|
||||
|
||||
for i in range(len(max_values)):
|
||||
for isect in range(max_values_index[i], len(profiles)-1):
|
||||
self.compl_sect(profiles[isect],
|
||||
profiles[isect+1],
|
||||
gl1[i], gl2[i])
|
||||
for isect in reversed(range(0, max_values_index[i])):
|
||||
self.compl_sect(profiles[isect+1],
|
||||
profiles[isect],
|
||||
gl1[i], gl2[i])
|
||||
|
||||
def interpolate_transversal_step(self,
|
||||
reach,
|
||||
limites,
|
||||
step):
|
||||
# calcul number of intermediate profiles
|
||||
np = []
|
||||
for i in range(limites[0], limites[1]):
|
||||
np.append(int((reach.profiles[i+1].rk -
|
||||
reach.profiles[i].rk) / step) - 1)
|
||||
if np[-1] < 0:
|
||||
np[-1] = 0
|
||||
|
||||
d = [] # ratios
|
||||
p = [] # new profiles
|
||||
ptr = int(limites[0])
|
||||
for i in range(limites[1] - limites[0]):
|
||||
d = 1.0/float(np[i]+1)
|
||||
ptr0 = ptr
|
||||
for j in range(np[i]):
|
||||
p = reach.profiles[ptr0].copy()
|
||||
# RATIO entre les deux sections initiales
|
||||
dj = float(j+1)*d
|
||||
ptr += 1 # next profile, original
|
||||
for k in range(len(reach.profiles[ptr0].points)):
|
||||
p.points[k].x = reach.profiles[ptr0].points[k].x + \
|
||||
dj*(reach.profiles[ptr].points[k].x -
|
||||
reach.profiles[ptr0].points[k].x)
|
||||
p.points[k].y = reach.profiles[ptr0].points[k].y + \
|
||||
dj*(reach.profiles[ptr].points[k].y -
|
||||
reach.profiles[ptr0].points[k].y)
|
||||
p.points[k].z = reach.profiles[ptr0].points[k].z + \
|
||||
dj*(reach.profiles[ptr].points[k].z -
|
||||
reach.profiles[ptr0].points[k].z)
|
||||
p.rk = reach.profiles[ptr0].rk + \
|
||||
dj*(reach.profiles[ptr].rk -
|
||||
reach.profiles[ptr0].rk)
|
||||
p.name = f'interpol{p.rk}'
|
||||
reach.insert_profile(ptr, p)
|
||||
ptr += 1 # next profile, original
|
||||
|
||||
def compl_sect(self, sect1, sect2, tag1, tag2):
|
||||
# sect1: reference section
|
||||
# sect2: section to complete
|
||||
# start1 and 2: indices of the first point of the bed to complete
|
||||
# end = start + len
|
||||
# len1 and 2: number of intervals
|
||||
# len1: target len
|
||||
|
||||
if tag1 == '': # left end point
|
||||
start1 = 0
|
||||
start2 = 0
|
||||
else:
|
||||
start1 = sect1.named_point_index(tag1)
|
||||
start2 = sect2.named_point_index(tag1)
|
||||
|
||||
if tag2 == '': # right end point
|
||||
end1 = sect1.nb_points-1
|
||||
end2 = sect2.nb_points-1
|
||||
else:
|
||||
end1 = sect1.named_point_index(tag2)
|
||||
end2 = sect2.named_point_index(tag2)
|
||||
|
||||
len1 = end1 - start1
|
||||
len2 = end2 - start2
|
||||
|
||||
if len1 < len2:
|
||||
self.compl_sect(sect2, sect1, start2, start1,
|
||||
len2, len1, tag1, tag2)
|
||||
return
|
||||
elif len1 == len2:
|
||||
return
|
||||
|
||||
ltot1 = 0.0
|
||||
ltot2 = 0.0
|
||||
alpha = []
|
||||
beta = []
|
||||
# remove names
|
||||
sect2.points[start2].name = ''
|
||||
sect2.points[end2].name = ''
|
||||
for i in range(len1):
|
||||
ltot1 += sect1.point(start1+i).dist(sect1.point(start1+i+1))
|
||||
alpha.append(ltot1)
|
||||
alpha = list(map(lambda x: x/ltot1, alpha)) # target ratios
|
||||
for i in range(len2):
|
||||
ltot2 += sect2.point(start2+i).dist(sect2.point(start2+i+1))
|
||||
beta.append(ltot2)
|
||||
beta = list(map(lambda x: x/ltot2, beta)) # current ratios
|
||||
for i in range(len1 - len2):
|
||||
beta.append(1.0)
|
||||
beta.append(0.0) # beta[-1]
|
||||
if len2 < 1 or ltot2 < 0.0001:
|
||||
# unique point (copy len1 times)
|
||||
# we are at an edge of the profile
|
||||
for i in range(len1-len2):
|
||||
p = sect2.point(start2).copy()
|
||||
sect2.insert_point(start2, p)
|
||||
if tag1 == '': # left end point
|
||||
sect2.point(start2).name = ''
|
||||
if tag2 == '': # left end point
|
||||
sect2.point(start2+1).name = ''
|
||||
elif ltot1 < 0.0001:
|
||||
sect2.add_npoints(len1-len2)
|
||||
else: # regular case
|
||||
# loop on the points to insert
|
||||
for k in range(len1-len2):
|
||||
trouve = False
|
||||
for j0 in range(len2):
|
||||
if trouve:
|
||||
break
|
||||
undeplus = True
|
||||
for j1 in range(j0, len2):
|
||||
if undeplus:
|
||||
if beta[j1] <= alpha[j1]:
|
||||
undeplus = False
|
||||
break
|
||||
if undeplus:
|
||||
if j0 == len2:
|
||||
trouve = True
|
||||
else:
|
||||
j1 = j0+1
|
||||
if beta[j0]-alpha[j0] > alpha[j1]-beta[j0]:
|
||||
trouve = True
|
||||
|
||||
if trouve:
|
||||
len2 += 1
|
||||
for i in reversed(range(j0, len2)):
|
||||
beta[i+1] = beta[i]
|
||||
if (beta[j0] == beta[j0-1]):
|
||||
# rien
|
||||
pass
|
||||
else:
|
||||
ratio = (alpha[j0] - beta[j0-1]) \
|
||||
/ (beta[j0] - beta[j0-1])
|
||||
if ratio < 0.0:
|
||||
print(f"ratio négatif {ratio}")
|
||||
# on double le point a gauche
|
||||
p = sect2.point(start2+j0-1).copy()
|
||||
sect2.insert_point(start2+j0-1, p)
|
||||
sect2.point(start2+j0-1).name = ''
|
||||
beta[j0] = beta[j0-1]
|
||||
else:
|
||||
p = sect2.point(start2+j0).copy()
|
||||
sect2.insert_point(start2+j0, p)
|
||||
sect2.point(start2+j0+1).name = ''
|
||||
sect2.point(start2+j0+1).x = \
|
||||
(1.0-ratio) * sect2.point(start2+j0).x + \
|
||||
ratio * sect2.point(start2+j0+2).x
|
||||
sect2.point(start2+j0+1).y = \
|
||||
(1.0-ratio) * sect2.point(start2+j0).y + \
|
||||
ratio * sect2.point(start2+j0+2).y
|
||||
sect2.point(start2+j0+1).z = \
|
||||
(1.0-ratio) * sect2.point(start2+j0).z + \
|
||||
ratio * sect2.point(start2+j0+2).z
|
||||
beta[j0] = (1.-ratio)*beta[j0-1] \
|
||||
+ ratio*beta[j0+1]
|
||||
|
||||
if len1 > len2:
|
||||
for i in range(len1 - len2):
|
||||
p = sect2.point(start2+len2).copy()
|
||||
sect2.insert_point(start2+len2, p)
|
||||
sect2.point(start2+len2).name = ''
|
||||
sect2.point(start2).name = tag1
|
||||
sect2.point(start2+len2).name = tag2
|
||||
sect2.modified()
|
||||
|
||||
def update_rk(self, reach,
|
||||
step: float = 50,
|
||||
limites=[-1, -1],
|
||||
origin=0,
|
||||
directrices=['un', 'np'],
|
||||
lplan: bool = False,
|
||||
lm: int = 3,
|
||||
linear: bool = False,
|
||||
origin_value=0.0,
|
||||
orientation=0):
|
||||
if reach is None or len(reach.profiles) == 0:
|
||||
return reach
|
||||
|
||||
nprof = reach.number_profiles
|
||||
if origin >= nprof or origin < 0:
|
||||
logger.warning(
|
||||
f"Origin outside reach"
|
||||
)
|
||||
return reach
|
||||
|
||||
# orientation is the orintation of the bief:
|
||||
# 1: up -> downstream
|
||||
# 2: down -> upstream
|
||||
# else: keep current orientation
|
||||
if orientation == 1:
|
||||
sgn = 1.0
|
||||
elif orientation == 2:
|
||||
sgn = -1.0
|
||||
else:
|
||||
sgn = sign(reach.profiles[-1].rk - reach.profiles[0].rk)
|
||||
|
||||
reach.profiles[origin].rk = origin_value
|
||||
|
||||
if origin < nprof - 1:
|
||||
for i in range(origin+1, nprof):
|
||||
# 2D
|
||||
d1 = reach.profiles[i-1].named_point(
|
||||
directrices[0]
|
||||
).dist_2d(reach.profiles[i].named_point(directrices[0]))
|
||||
d2 = reach.profiles[i-1].named_point(
|
||||
directrices[1]
|
||||
).dist_2d(reach.profiles[i].named_point(directrices[1]))
|
||||
reach.profiles[i].rk = reach.profiles[i-1].rk \
|
||||
+ (sgn * (d1 + d2) / 2)
|
||||
if origin > 0:
|
||||
for i in reversed(range(0, origin)):
|
||||
# 2D
|
||||
d1 = reach.profiles[i+1].named_point(
|
||||
directrices[0]
|
||||
).dist_2d(reach.profiles[i].named_point(directrices[0]))
|
||||
d2 = reach.profiles[i+1].named_point(
|
||||
directrices[1]
|
||||
).dist_2d(reach.profiles[i].named_point(directrices[1]))
|
||||
reach.profiles[i].rk = reach.profiles[i+1].rk \
|
||||
- (sgn * (d1 + d2) / 2)
|
||||
|
||||
def purge_aligned_points(self, reach):
|
||||
for p in reach.profiles:
|
||||
p.purge_aligned_points()
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
import os
|
||||
import logging
|
||||
import tempfile
|
||||
from numpy import sign
|
||||
|
||||
from ctypes import (
|
||||
cdll,
|
||||
|
|
@ -410,7 +411,7 @@ class MeshingWithMageMailleurTT(AMeshingTool):
|
|||
str,
|
||||
[
|
||||
st_file, m_file,
|
||||
"update_rk", step,
|
||||
"update_kp", step,
|
||||
limites[0], limites[1],
|
||||
directrices[0], directrices[1],
|
||||
orientation, lm, linear, origin, origin_value
|
||||
|
|
|
|||
|
|
@ -222,3 +222,82 @@ class BoundaryConditionAdisTS(SQLSubModel):
|
|||
@property
|
||||
def data(self):
|
||||
return self._data.copy()
|
||||
|
||||
@property
|
||||
def _default_0(self):
|
||||
return self._types[0](0)
|
||||
|
||||
@property
|
||||
def _default_1(self):
|
||||
return self._types[1](0.0)
|
||||
|
||||
def new_from_data(self, header, data):
|
||||
new_0 = self._default_0
|
||||
new_1 = self._default_1
|
||||
|
||||
if len(header) != 0:
|
||||
for i in [0, 1]:
|
||||
for j in range(len(header)):
|
||||
if self._header[i] == header[j]:
|
||||
if i == 0:
|
||||
new_0 = self._types[i](data[j].replace(",", "."))
|
||||
else:
|
||||
new_1 = self._types[i](data[j].replace(",", "."))
|
||||
else:
|
||||
new_0 = self._types[0](data[0].replace(",", "."))
|
||||
new_1 = self._types[1](data[1].replace(",", "."))
|
||||
|
||||
return (new_0, new_1)
|
||||
|
||||
def add(self, index: int):
|
||||
value = (self._default_0, self._default_1)
|
||||
self._data.insert(index, value)
|
||||
self._status.modified()
|
||||
return value
|
||||
|
||||
def insert(self, index: int, value):
|
||||
self._data.insert(index, value)
|
||||
self._status.modified()
|
||||
|
||||
def delete_i(self, indexes):
|
||||
self._data = list(
|
||||
map(
|
||||
lambda e: e[1],
|
||||
filter(
|
||||
lambda e: e[0] not in indexes,
|
||||
enumerate(self.data)
|
||||
)
|
||||
)
|
||||
)
|
||||
self._status.modified()
|
||||
|
||||
def sort(self, _reverse=False, key=None):
|
||||
if key is None:
|
||||
self._data.sort(reverse=_reverse)
|
||||
else:
|
||||
self._data.sort(reverse=_reverse, key=key)
|
||||
self._status.modified()
|
||||
|
||||
def index(self, bc):
|
||||
self._data.index(bc)
|
||||
|
||||
def get_i(self, index):
|
||||
return self.data[index]
|
||||
|
||||
def get_range(self, _range):
|
||||
lst = []
|
||||
for r in _range:
|
||||
lst.append(r)
|
||||
return lst
|
||||
|
||||
def _set_i_c_v(self, index, column, value):
|
||||
v = list(self._data[index])
|
||||
v[column] = self._types[column](value)
|
||||
self._data[index] = tuple(v)
|
||||
self._status.modified()
|
||||
|
||||
def set_i_0(self, index: int, value):
|
||||
self._set_i_c_v(index, 0, value)
|
||||
|
||||
def set_i_1(self, index: int, value):
|
||||
self._set_i_c_v(index, 1, value)
|
||||
|
|
|
|||
|
|
@ -228,3 +228,25 @@ class PointXYZ(Point, SQLSubModel):
|
|||
c = PointXYZ.distance(p3, p1)
|
||||
s = (a + b + c) / 2
|
||||
return (s*(s-a) * (s-b)*(s-c)) ** 0.5
|
||||
|
||||
def dist_from_seg(self, p1, p2):
|
||||
a2 = pow(PointXYZ.distance(self, p1), 2)
|
||||
b2 = pow(PointXYZ.distance(self, p2), 2)
|
||||
c2 = pow(PointXYZ.distance(p1, p2), 2)
|
||||
if c2 < 0.00000001:
|
||||
# si les deux points sont confondus
|
||||
d = 0.0
|
||||
else:
|
||||
d = np.sqrt(abs(a2 - pow((c2 - b2 + a2) / (2*np.sqrt(c2)), 2)))
|
||||
|
||||
return d
|
||||
|
||||
def copy(self):
|
||||
p = PointXYZ(self.x,
|
||||
self.y,
|
||||
self.z,
|
||||
self.name,
|
||||
self._profile,
|
||||
self._status)
|
||||
p.sl = self.sl
|
||||
return p
|
||||
|
|
|
|||
|
|
@ -88,6 +88,14 @@ class Profile(object):
|
|||
def point(self, index):
|
||||
return self.points[index]
|
||||
|
||||
def named_point(self, name):
|
||||
return next((p for p in self.points if p.name == name), None)
|
||||
|
||||
def named_point_index(self, name):
|
||||
return next(
|
||||
(p for p in enumerate(self.points) if p[1].name == name), None
|
||||
)[0]
|
||||
|
||||
@property
|
||||
def reach(self):
|
||||
return self._reach
|
||||
|
|
@ -206,7 +214,7 @@ class Profile(object):
|
|||
"""Insert point at index.
|
||||
|
||||
Args:
|
||||
index: The index of new profile.
|
||||
index: The index of new point.
|
||||
point: The point.
|
||||
|
||||
Returns:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import logging
|
|||
import numpy as np
|
||||
from typing import List
|
||||
from functools import reduce
|
||||
from dataclasses import dataclass
|
||||
|
||||
from tools import timer
|
||||
from shapely import geometry
|
||||
|
|
@ -33,6 +34,13 @@ from Model.Geometry.Vector_1d import Vector1d
|
|||
logger = logging.getLogger()
|
||||
|
||||
|
||||
@dataclass
|
||||
class Tabulation:
|
||||
z: np.array([])
|
||||
A: np.array([])
|
||||
L: np.array([])
|
||||
|
||||
|
||||
class ProfileXYZ(Profile, SQLSubModel):
|
||||
_sub_classes = [
|
||||
PointXYZ,
|
||||
|
|
@ -70,6 +78,14 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
status=status,
|
||||
)
|
||||
|
||||
self.tab = Tabulation([], [], [])
|
||||
self.tab_up_to_date = False
|
||||
self.time_z = 0.0
|
||||
self.time_A = 0.0
|
||||
self.time_l = 0.0
|
||||
self._station = []
|
||||
self.station_up_to_date = False
|
||||
|
||||
@classmethod
|
||||
def _db_create(cls, execute):
|
||||
execute("""
|
||||
|
|
@ -151,8 +167,7 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
filter(
|
||||
lambda s: s.id == sl,
|
||||
data["sediment_layers_list"].sediment_layers
|
||||
)
|
||||
)
|
||||
), None)
|
||||
|
||||
data["profile"] = new
|
||||
new._points = PointXYZ._db_load(execute, data.copy())
|
||||
|
|
@ -305,6 +320,8 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
pt = PointXYZ(*point, profile=self, status=self._status)
|
||||
self.points.append(pt)
|
||||
self._status.modified()
|
||||
self.tab_up_to_date = False
|
||||
self.station_up_to_date = False
|
||||
|
||||
def get_point_i(self, index: int) -> PointXYZ:
|
||||
"""Get point at index.
|
||||
|
|
@ -366,6 +383,8 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
point_xyz = PointXYZ(0., 0., 0., profile=self, status=self._status)
|
||||
self.points.append(point_xyz)
|
||||
self._status.modified()
|
||||
self.tab_up_to_date = False
|
||||
self.station_up_to_date = False
|
||||
|
||||
def insert(self, index: int):
|
||||
"""Insert a new point at index.
|
||||
|
|
@ -379,6 +398,8 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
point = PointXYZ(0., 0., 0., profile=self, status=self._status)
|
||||
self.points.insert(index, point)
|
||||
self._status.modified()
|
||||
self.tab_up_to_date = False
|
||||
self.station_up_to_date = False
|
||||
return point
|
||||
|
||||
def filter_isnan(self, lst):
|
||||
|
|
@ -410,7 +431,7 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
|
||||
return abs(rg.dist(rd))
|
||||
|
||||
def wet_width(self, z):
|
||||
def compute_wet_width(self, z):
|
||||
start, end = self.get_all_water_limits_ac(z)
|
||||
|
||||
if len(start) == 0:
|
||||
|
|
@ -421,6 +442,17 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
length += abs(s - e)
|
||||
return length
|
||||
|
||||
def wet_width(self, z):
|
||||
if self.tab_up_to_date:
|
||||
if z > self.tab.z[-1]:
|
||||
return self.tab.L[-1]
|
||||
elif z < self.tab.z[0]:
|
||||
return 0.0
|
||||
else:
|
||||
return np.interp(z, self.tab.z, self.tab.L)
|
||||
else:
|
||||
return self.compute_wet_width(z)
|
||||
|
||||
def wet_perimeter(self, z):
|
||||
lines = self.wet_lines(z)
|
||||
|
||||
|
|
@ -432,17 +464,46 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
length += line.length
|
||||
return length
|
||||
|
||||
def wet_area(self, z):
|
||||
lines = self.wet_lines(z)
|
||||
|
||||
if lines is None:
|
||||
return 0
|
||||
|
||||
def compute_wet_area(self, z):
|
||||
area = 0.0
|
||||
for line in lines:
|
||||
if len(line.coords) > 2:
|
||||
poly = geometry.Polygon(line)
|
||||
area += poly.area
|
||||
if len(self.tab.L) > 0:
|
||||
if z < self.tab.z[0]:
|
||||
return 0.0
|
||||
i = np.searchsorted([z], self.tab.z, side='right')[0]
|
||||
for j in range(i-1):
|
||||
area += (self.tab.L[j] + self.tab.L[j+1]) * (
|
||||
self.tab.z[j+1] - self.tab.z[j]) / 2.0
|
||||
area += (self.tab.L[i-1] + self.wet_width(z))
|
||||
else:
|
||||
lines = self.wet_lines(z)
|
||||
|
||||
if lines is None:
|
||||
return 0.0
|
||||
for line in lines:
|
||||
if len(line.coords) > 2:
|
||||
poly = geometry.Polygon(line)
|
||||
area += poly.area
|
||||
return area
|
||||
|
||||
def wet_area(self, z):
|
||||
if self.tab_up_to_date:
|
||||
if z > self.tab.z[-1]:
|
||||
return self.tab.A[-1] + self.tab.L[-1] * (z - self.tab.z[-1])
|
||||
elif z < self.tab.z[0]:
|
||||
return 0.0
|
||||
else:
|
||||
return np.interp(z, self.tab.z, self.tab.A)
|
||||
else:
|
||||
lines = self.wet_lines(z)
|
||||
|
||||
if lines is None:
|
||||
return 0.0
|
||||
|
||||
area = 0.0
|
||||
for line in lines:
|
||||
if len(line.coords) > 2:
|
||||
poly = geometry.Polygon(line)
|
||||
area += poly.area
|
||||
return area
|
||||
|
||||
def wet_radius(self, z):
|
||||
|
|
@ -563,7 +624,7 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
return None
|
||||
|
||||
zz = list(map(lambda p: p.z, points))
|
||||
station = self._get_station(points)
|
||||
station = self.get_station()
|
||||
|
||||
start = []
|
||||
if points[0].z <= z:
|
||||
|
|
@ -651,6 +712,19 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
|
||||
return pt_left, pt_right
|
||||
|
||||
def compute_tabulation(self):
|
||||
sorted_points = sorted(self._points, key=lambda p: p.z)
|
||||
self.tab.z = np.array([p.z for p in sorted_points], np.float64)
|
||||
self.tab.L = np.zeros(len(self.tab.z), np.float64)
|
||||
self.tab.A = np.zeros(len(self.tab.z), np.float64)
|
||||
for i in range(1, len(self.tab.z)):
|
||||
self.tab.L[i] = self.compute_wet_width(self.tab.z[i])
|
||||
dx = (self.tab.L[i] + self.tab.L[i-1])/2
|
||||
dz = self.tab.z[i] - self.tab.z[i-1]
|
||||
self.tab.A[i] = self.tab.A[i-1] + dz * dx
|
||||
|
||||
self.tab_up_to_date = True
|
||||
|
||||
def get_station(self):
|
||||
"""Projection of the points of the profile on a plane.
|
||||
|
||||
|
|
@ -663,7 +737,12 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
if self.nb_points < 2:
|
||||
return [0.0]
|
||||
else:
|
||||
return self._get_station(self.points)
|
||||
if self.station_up_to_date:
|
||||
return self._station
|
||||
else:
|
||||
self._station = self._get_station(self.points)
|
||||
self.station_up_to_date = True
|
||||
return self._station
|
||||
|
||||
@timer
|
||||
def _get_station(self, points):
|
||||
|
|
@ -799,3 +878,50 @@ class ProfileXYZ(Profile, SQLSubModel):
|
|||
p.x = p.x + x
|
||||
p.y = p.y + y
|
||||
p.z = p.z + z
|
||||
|
||||
def modified(self):
|
||||
self.tab_up_to_date = False
|
||||
self.station_up_to_date = False
|
||||
|
||||
def add_npoints(self, npoints):
|
||||
# add npoints in a profile
|
||||
for k in range(npoints):
|
||||
disti = 0.0
|
||||
i = 1
|
||||
for j in range(len(self.points)-1):
|
||||
distj = self.point(j).dist(self.point(j+1))
|
||||
if distj > disti:
|
||||
disti = distj
|
||||
i = j
|
||||
self.insert_point(i, self.point(i).copy())
|
||||
self.point(i+1).name = ''
|
||||
self.point(i+1).x = 0.5 * self.point(i).x + 0.5 * self.point(i+2).x
|
||||
self.point(i+1).y = 0.5 * self.point(i).y + 0.5 * self.point(i+2).y
|
||||
self.point(i+1).z = 0.5 * self.point(i).z + 0.5 * self.point(i+2).z
|
||||
|
||||
def copy(self):
|
||||
p = ProfileXYZ(self.id,
|
||||
self.name,
|
||||
self.rk,
|
||||
self.reach,
|
||||
self.num,
|
||||
0,
|
||||
0, 0,
|
||||
self._status)
|
||||
for i, k in enumerate(self.points):
|
||||
p.insert_point(i, k.copy())
|
||||
|
||||
return p
|
||||
|
||||
def purge_aligned_points(self):
|
||||
|
||||
align = True
|
||||
while (align):
|
||||
align = False
|
||||
for i in range(1, self.number_points - 1):
|
||||
d = self.point(i).dist_from_seg(self.point(i-1),
|
||||
self.point(i+1))
|
||||
if d < 0.00001 and self.point(i).name == "":
|
||||
align = True
|
||||
self.delete_i([i])
|
||||
break
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ class TriangularWeir(BasicHS):
|
|||
self._data = [
|
||||
BHSValue("elevation", float, 1.0, status=status),
|
||||
BHSValue("loading_elevation", float, 9999.999, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.4, status=status),
|
||||
BHSValue("half-angle_tangent", float, 0.0, status=status),
|
||||
BHSValue("discharge_coefficient", float, 0.31, status=status),
|
||||
BHSValue("half-angle_tangent", float, 1.0, status=status),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,6 @@ class HydraulicStructure(SQLSubModel):
|
|||
return new
|
||||
|
||||
def _db_save(self, execute, data=None):
|
||||
print("save hs unit")
|
||||
execute(f"DELETE FROM hydraulic_structures WHERE id = {self.id}")
|
||||
|
||||
input_reach_id = -1
|
||||
|
|
|
|||
|
|
@ -382,11 +382,15 @@ class InitialConditions(SQLSubModel):
|
|||
self._data = []
|
||||
for profile in profiles:
|
||||
width = profile.wet_width(profile.z_min() + height)
|
||||
area = profile.wet_area(profile.z_min() + height)
|
||||
radius = profile.wet_radius(profile.z_min() + height)
|
||||
frictions = self._reach.frictions.frictions
|
||||
strickler = None
|
||||
for f in frictions:
|
||||
if f.contains_rk(profile.rk):
|
||||
strickler = f.get_friction(profile.rk)[0]
|
||||
if frictions is not None:
|
||||
if len(frictions) >= 1:
|
||||
for f in frictions:
|
||||
if f.contains_rk(profile.rk):
|
||||
strickler = f.get_friction(profile.rk)[0]
|
||||
if strickler is None:
|
||||
strickler = 25.0
|
||||
|
||||
|
|
@ -394,9 +398,12 @@ class InitialConditions(SQLSubModel):
|
|||
discharge = data_discharge[profile.rk]
|
||||
else:
|
||||
discharge = (
|
||||
((width * 0.8)
|
||||
* strickler
|
||||
* (height ** (5/3))
|
||||
# ((width * 0.8)
|
||||
# * strickler
|
||||
# * (height ** (5/3))
|
||||
# * (abs(incline) ** (0.5)))
|
||||
(area * strickler
|
||||
* (radius ** (2/3))
|
||||
* (abs(incline) ** (0.5)))
|
||||
)
|
||||
|
||||
|
|
@ -423,6 +430,8 @@ class InitialConditions(SQLSubModel):
|
|||
def generate_discharge(self, discharge: float, compute_height: bool):
|
||||
|
||||
profiles = self._reach.reach.profiles.copy()
|
||||
if profiles is None:
|
||||
return None
|
||||
profiles.reverse()
|
||||
|
||||
previous_elevation = -99999.99
|
||||
|
|
@ -443,20 +452,25 @@ class InitialConditions(SQLSubModel):
|
|||
width = profile.width_approximation()
|
||||
frictions = self._reach.frictions.frictions
|
||||
strickler = None
|
||||
for f in frictions:
|
||||
if f.contains_rk(profile.rk):
|
||||
strickler = f.get_friction(profile.rk)[0]
|
||||
if frictions is not None:
|
||||
if len(frictions) >= 1:
|
||||
for f in frictions:
|
||||
if f.contains_rk(profile.rk):
|
||||
strickler = f.get_friction(profile.rk)[0]
|
||||
if strickler is None:
|
||||
strickler = 25.0
|
||||
|
||||
if not compute_height:
|
||||
height = data_height[profile.rk]
|
||||
else:
|
||||
height = (
|
||||
discharge
|
||||
/
|
||||
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
||||
) ** (0.6)
|
||||
if abs(incline) <= 0:
|
||||
height = 0.0
|
||||
else:
|
||||
height = (
|
||||
discharge
|
||||
/
|
||||
((width * 0.8) * strickler * (abs(incline) ** (0.5)))
|
||||
) ** (0.6)
|
||||
|
||||
elevation = max(
|
||||
profile.z_min() + height,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,10 @@ class Pollutants(SQLSubModel):
|
|||
else:
|
||||
self.id = id
|
||||
|
||||
self._name = str(name)
|
||||
if name is None or name == "":
|
||||
self.name = f"pol{self.id}"
|
||||
else:
|
||||
self._name = str(name)
|
||||
self._enabled = True
|
||||
|
||||
self._data = []
|
||||
|
|
@ -128,7 +131,7 @@ class Pollutants(SQLSubModel):
|
|||
|
||||
if table is not None:
|
||||
for t in table:
|
||||
new_data = t[1:]
|
||||
new_data = t[1:-1]
|
||||
|
||||
new_pollutant._data.append(new_data)
|
||||
|
||||
|
|
@ -177,5 +180,16 @@ class Pollutants(SQLSubModel):
|
|||
def is_define(self):
|
||||
return len(self._data) != 0
|
||||
|
||||
def new_from_data(self, data):
|
||||
|
||||
try:
|
||||
new = [int(data[0])]
|
||||
new += [float(d) for d in data[1:]]
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
new = None
|
||||
|
||||
return new
|
||||
|
||||
def __len__(self):
|
||||
return len(self._data)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ class Results(object):
|
|||
def set(self, key, value):
|
||||
self._meta_data[key] = value
|
||||
|
||||
@property
|
||||
def is_valid(self):
|
||||
return ("timestamps" in self._meta_data)
|
||||
|
||||
def get(self, key):
|
||||
return self._meta_data[key]
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
import logging
|
||||
import numpy as np
|
||||
import os
|
||||
import glob
|
||||
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
|
|
@ -41,11 +40,13 @@ class Results(object):
|
|||
# Keep results creation date
|
||||
"creation_date": datetime.now(),
|
||||
}
|
||||
repertory_results = os.path.join(repertory, "resultats")
|
||||
self._pollutants_list = [
|
||||
el.split("/")[-1][0:-4]
|
||||
for el in glob.glob(repertory_results + "/*.bin")
|
||||
]
|
||||
filelist = [f for f in os.listdir(self._repertory)
|
||||
if os.path.isfile(os.path.join(self._repertory, f))
|
||||
]
|
||||
self._pollutants_list = [f[0:-4] for f in filelist if f[-4:] == ".bin"]
|
||||
self._pollutants_list.insert(0, self._pollutants_list.pop(
|
||||
self._pollutants_list.index("total_sediment"))
|
||||
)
|
||||
|
||||
self._phys_var_list = ["C", "G", "M", "D", "L", "N", "R"]
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,10 @@ class Profile(object):
|
|||
)
|
||||
|
||||
def get_ts_key(self, timestamp, key):
|
||||
return self._data[timestamp][key]
|
||||
if timestamp in self._data:
|
||||
if key in self._data[timestamp]:
|
||||
return self._data[timestamp][key]
|
||||
return None
|
||||
|
||||
def has_sediment(self):
|
||||
return any(map(lambda ts: "sl" in self._data[ts], self._data))
|
||||
|
|
@ -74,6 +77,12 @@ class Reach(object):
|
|||
)
|
||||
)
|
||||
|
||||
self._profile_mask = list(
|
||||
map(
|
||||
lambda p: p.name[0:8] != 'interpol', self._profiles
|
||||
)
|
||||
)
|
||||
|
||||
def __len__(self):
|
||||
return len(self._profiles)
|
||||
|
||||
|
|
@ -89,6 +98,10 @@ class Reach(object):
|
|||
def profiles(self):
|
||||
return self._profiles.copy()
|
||||
|
||||
@property
|
||||
def profile_mask(self):
|
||||
return self._profile_mask
|
||||
|
||||
def profile(self, id):
|
||||
return self._profiles[id]
|
||||
|
||||
|
|
|
|||