Compare commits
No files matched your search
@@ -19,6 +19,8 @@ tmp
|
|||||||
*.pdf
|
*.pdf
|
||||||
*.odt
|
*.odt
|
||||||
|
|
||||||
|
!doc/**/*.pdf
|
||||||
|
|
||||||
doc/dev/images/auto_*
|
doc/dev/images/auto_*
|
||||||
doc/dev/documentation.*
|
doc/dev/documentation.*
|
||||||
!doc/dev/*.org
|
!doc/dev/*.org
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# .gitlab-ci.yml -- Pamhyr gitlab-ci
|
# .gitlab-ci.yml -- Pamhyr gitlab-ci
|
||||||
# Copyright (C) 2023 INRAE
|
# Copyright (C) 2023-2024 INRAE
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,45 +20,68 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- package
|
- package
|
||||||
|
- hash
|
||||||
|
- antivirus
|
||||||
- release
|
- release
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# DOWNLOADS #
|
# DOWNLOADS #
|
||||||
#############
|
#############
|
||||||
|
|
||||||
dl-mage-linux:
|
variables:
|
||||||
stage: downloads
|
MAGE_8_VERSION: "v8.3.6"
|
||||||
tags:
|
|
||||||
- linux
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
|
||||||
script:
|
|
||||||
- curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/Test6/downloads/packages/mage_linux.tgz
|
|
||||||
- mkdir -p mage-linux
|
|
||||||
- cd mage-linux
|
|
||||||
- tar xvf ../mage.tgz
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- mage-linux/mage
|
|
||||||
- mage-linux/mage_extraire
|
|
||||||
- mage-linux/mailleurPF
|
|
||||||
|
|
||||||
dl-mage-windows:
|
dl-mage8-doc:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
script:
|
script:
|
||||||
- curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/Test6/downloads/packages/mage_windows.tgz
|
- mkdir -p doc
|
||||||
- mkdir -p mage-windows
|
- cd doc
|
||||||
- cd mage-windows
|
- curl -L -o mage8.pdf https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/$MAGE_8_VERSION/downloads/documents/Mage-8_Documentation.pdf
|
||||||
- tar xvf ../mage.tgz
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- mage-windows/mage.exe
|
- doc/mage8.pdf
|
||||||
- mage-windows/mage_extraire.exe
|
|
||||||
- mage-windows/mailleurPF.exe
|
dl-mage8-linux:
|
||||||
|
stage: downloads
|
||||||
|
tags:
|
||||||
|
- 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
|
||||||
|
- 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
|
||||||
|
tags:
|
||||||
|
- 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_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
|
||||||
|
|
||||||
#############
|
#############
|
||||||
# CONFIGURE #
|
# CONFIGURE #
|
||||||
@@ -122,14 +145,31 @@ test-pep8:
|
|||||||
- pip3 install -r ./requirements.txt
|
- pip3 install -r ./requirements.txt
|
||||||
- pip3 install -U -r ./requirements.txt
|
- pip3 install -U -r ./requirements.txt
|
||||||
- pip3 install pycodestyle
|
- pip3 install pycodestyle
|
||||||
- pycodestyle ./src
|
- pycodestyle --exclude="*_to_*.py" ./src
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# BUILD #
|
# BUILD #
|
||||||
#########
|
#########
|
||||||
|
|
||||||
build-users-doc:
|
# build-users-doc:
|
||||||
|
# stage: build
|
||||||
|
# tags:
|
||||||
|
# - linux
|
||||||
|
# needs:
|
||||||
|
# - job: set-version
|
||||||
|
# artifacts: true
|
||||||
|
# script:
|
||||||
|
# - cd ./doc/users/
|
||||||
|
# - ./build.sh
|
||||||
|
# artifacts:
|
||||||
|
# paths:
|
||||||
|
# - doc/users/documentation.pdf
|
||||||
|
# - doc/users/documentation.html
|
||||||
|
# - doc/users/images/
|
||||||
|
# allow_failure: true
|
||||||
|
|
||||||
|
build-td:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
@@ -137,13 +177,13 @@ build-users-doc:
|
|||||||
- job: set-version
|
- job: set-version
|
||||||
artifacts: true
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- cd ./doc/users/
|
- cd ./doc/users/Tuto1/
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- doc/users/documentation.pdf
|
- doc/users/Tuto1/step-by-step.pdf
|
||||||
- doc/users/documentation.html
|
- doc/users/Tuto1/pas-a-pas.pdf
|
||||||
- doc/users/images/
|
- doc/users/Tuto1/data/
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
build-developers-doc:
|
build-developers-doc:
|
||||||
@@ -184,7 +224,9 @@ build-linux:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
needs:
|
needs:
|
||||||
- job: dl-mage-linux
|
- job: dl-mage8-linux
|
||||||
|
artifacts: true
|
||||||
|
- job: dl-mage8-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: set-version
|
- job: set-version
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@@ -192,7 +234,9 @@ build-linux:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
- job: build-developers-doc
|
- job: build-developers-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: build-users-doc
|
# - job: build-users-doc
|
||||||
|
# artifacts: true
|
||||||
|
- job: build-td
|
||||||
artifacts: true
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- mkdir -p linux
|
- mkdir -p linux
|
||||||
@@ -207,28 +251,32 @@ build-linux:
|
|||||||
- pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py
|
- pyinstaller -y --paths linux-venv/lib/python3.8/site-packages ../src/pamhyr.py
|
||||||
# Create directory
|
# Create directory
|
||||||
- mkdir -p pamhyr
|
- mkdir -p pamhyr
|
||||||
- mkdir -p pamhyr/pamhyr
|
- mkdir -p pamhyr/_internal
|
||||||
- mkdir -p pamhyr/pamhyr/_internal
|
|
||||||
# Copy Pamhyr info
|
# Copy Pamhyr info
|
||||||
- cp -v ../VERSION pamhyr/pamhyr/_internal/
|
- cp -v ../VERSION pamhyr/_internal/
|
||||||
- cp -v ../AUTHORS pamhyr/pamhyr/_internal/
|
- cp -v ../AUTHORS pamhyr/_internal/
|
||||||
- cp -v ../LICENSE pamhyr/pamhyr/_internal/
|
- cp -v ../LICENSE pamhyr/_internal/
|
||||||
- cp -v ../src/motd.txt pamhyr/pamhyr/_internal/
|
- cp -v ../src/motd.txt pamhyr/_internal/
|
||||||
# Copy mage
|
# Copy mage
|
||||||
- mkdir -p pamhyr/mage
|
- mkdir -p pamhyr/mage8
|
||||||
- cp -v ../mage-linux/* pamhyr/mage/
|
- cp -v ../mage8-linux/* pamhyr/mage8/
|
||||||
# Copy Pamhyr
|
# Copy Pamhyr
|
||||||
- cp -r dist/pamhyr pamhyr/
|
- cp -r dist/pamhyr/* pamhyr/
|
||||||
|
# Pamhyr script to force x11
|
||||||
|
- echo '#!/usr/bin/env bash' > pamhyr/pamhyr-x11
|
||||||
|
- echo "" >> pamhyr/pamhyr-x11
|
||||||
|
- echo "GDK_BACKEND=x11 ./pamhyr $@" >> pamhyr/pamhyr-x11
|
||||||
|
- chmod +x pamhyr/pamhyr-x11
|
||||||
# Copy Pamhyr resources
|
# Copy Pamhyr resources
|
||||||
- mkdir -p pamhyr/pamhyr/_internal/View
|
- mkdir -p pamhyr/_internal/View
|
||||||
- mkdir -p pamhyr/pamhyr/_internal/View/ui
|
- mkdir -p pamhyr/_internal/View/ui
|
||||||
- mkdir -p pamhyr/pamhyr/_internal/View/ui/Widgets
|
- mkdir -p pamhyr/_internal/View/ui/Widgets
|
||||||
- cp -r ../src/View/ui/*.ui pamhyr/pamhyr/_internal/View/ui/
|
- cp -r ../src/View/ui/*.ui pamhyr/_internal/View/ui/
|
||||||
- cp -r ../src/View/ui/ressources/ pamhyr/pamhyr/_internal/View/ui
|
- cp -r ../src/View/ui/ressources/ pamhyr/_internal/View/ui
|
||||||
- cp -r ../src/View/ui/Widgets/*.ui pamhyr/pamhyr/_internal/View/ui/Widgets
|
- cp -r ../src/View/ui/Widgets/*.ui pamhyr/_internal/View/ui/Widgets
|
||||||
# Copy lang
|
# Copy lang
|
||||||
- mkdir -p pamhyr/pamhyr/_internal/lang
|
- mkdir -p pamhyr/_internal/lang
|
||||||
- cp -r ../src/lang/*.qm pamhyr/pamhyr/_internal/lang
|
- cp -r ../src/lang/*.qm pamhyr/_internal/lang
|
||||||
# Copy tests cases
|
# Copy tests cases
|
||||||
- mkdir -p pamhyr/tests_cases/
|
- mkdir -p pamhyr/tests_cases/
|
||||||
- mkdir -p pamhyr/tests_cases/Saar
|
- mkdir -p pamhyr/tests_cases/Saar
|
||||||
@@ -237,17 +285,25 @@ build-linux:
|
|||||||
- mkdir -p pamhyr/doc/
|
- mkdir -p pamhyr/doc/
|
||||||
- mkdir -p pamhyr/doc/images/
|
- mkdir -p pamhyr/doc/images/
|
||||||
- mkdir -p pamhyr/doc/html/
|
- mkdir -p pamhyr/doc/html/
|
||||||
- cp ../doc/users/documentation.pdf pamhyr/doc/Pamhyr2-users.pdf
|
# - cp ../doc/users/documentation.pdf pamhyr/doc/Pamhyr2-users.pdf
|
||||||
- cp ../doc/users/documentation.html pamhyr/doc/Pamhyr2-users.html
|
# - cp ../doc/users/documentation.html pamhyr/doc/Pamhyr2-users.html
|
||||||
|
- cp ../doc/mage8.pdf pamhyr/doc/mage8.pdf
|
||||||
- cp ../doc/dev/documentation.pdf pamhyr/doc/Pamhyr2-dev.pdf
|
- cp ../doc/dev/documentation.pdf pamhyr/doc/Pamhyr2-dev.pdf
|
||||||
- cp ../doc/dev/documentation.html pamhyr/doc/Pamhyr2-dev.html
|
- cp ../doc/dev/documentation.html pamhyr/doc/Pamhyr2-dev.html
|
||||||
#- cp ../doc/users/images/* pamhyr/doc/images
|
#- cp ../doc/users/images/* pamhyr/doc/images
|
||||||
- cp ../doc/dev/images/* pamhyr/doc/images
|
- cp -r ../doc/dev/images/* pamhyr/doc/images
|
||||||
- cp ../doc/images/* pamhyr/doc/images
|
- cp -r ../doc/images/* pamhyr/doc/images
|
||||||
# Create running script
|
# Copy Tuto
|
||||||
- echo "#!/bin/sh" > pamhyr/Pamhyr2
|
- mkdir -p pamhyr/doc/Tuto1/
|
||||||
- echo "./pamhyr/pamhyr $@" >> pamhyr/Pamhyr2
|
- mkdir -p pamhyr/doc/Tuto1/data
|
||||||
- chmod u+x pamhyr/Pamhyr2
|
- 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/
|
||||||
|
# Copy TP charriage
|
||||||
|
- mkdir -p pamhyr/doc/TP_charriage/
|
||||||
|
- cp ../doc/users/TP_charriage/* pamhyr/doc/TP_charriage
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- linux/pamhyr
|
- linux/pamhyr
|
||||||
@@ -259,7 +315,9 @@ build-windows:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
needs:
|
needs:
|
||||||
- job: dl-mage-windows
|
- job: dl-mage8-windows
|
||||||
|
artifacts: true
|
||||||
|
- job: dl-mage8-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: set-version
|
- job: set-version
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@@ -267,16 +325,20 @@ build-windows:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
- job: build-developers-doc
|
- job: build-developers-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: build-users-doc
|
# - job: build-users-doc
|
||||||
|
# artifacts: true
|
||||||
|
- job: build-td
|
||||||
artifacts: true
|
artifacts: true
|
||||||
script:
|
script:
|
||||||
- mkdir windows
|
- mkdir windows
|
||||||
- cd windows
|
- cd windows
|
||||||
# Setup env
|
# Setup env
|
||||||
|
- python -m pip install -U pip
|
||||||
- python -m pip install -r ..\requirements.txt
|
- python -m pip install -r ..\requirements.txt
|
||||||
- python -m pip install -U -r ..\requirements.txt
|
- python -m pip install -U -r ..\requirements.txt
|
||||||
# Run Pyinstaller
|
# Run Pyinstaller
|
||||||
- pyinstaller -y ..\src\pamhyr.py
|
# - pyinstaller --noconsole -y ..\src\pamhyr.py
|
||||||
|
- pyinstaller -i ../src/View/ui/ressources/icon.ico --hide-console hide-early -y ..\src\pamhyr.py
|
||||||
# Create directory
|
# Create directory
|
||||||
- mkdir pamhyr
|
- mkdir pamhyr
|
||||||
- dir
|
- dir
|
||||||
@@ -346,6 +408,111 @@ windows-package-exe:
|
|||||||
- copy ..\packages\pamhyr.nsi pamhyr.nsi
|
- copy ..\packages\pamhyr.nsi pamhyr.nsi
|
||||||
- .\make-windows-exe.bat
|
- .\make-windows-exe.bat
|
||||||
|
|
||||||
|
########
|
||||||
|
# HASH #
|
||||||
|
########
|
||||||
|
|
||||||
|
linux-build-hash:
|
||||||
|
stage: hash
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
- linux
|
||||||
|
needs:
|
||||||
|
- job: build-linux
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- cd linux
|
||||||
|
- sha256sum -b pamhyr/pamhyr > pamhyr/pamhyr.sha256
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- linux/pamhyr/pamhyr.sha256
|
||||||
|
|
||||||
|
windows-build-hash:
|
||||||
|
stage: hash
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
- linux
|
||||||
|
needs:
|
||||||
|
- job: build-windows
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- cd windows
|
||||||
|
- sha256sum -b pamhyr/pamhyr.exe > pamhyr/pamhyr.exe.sha256
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- windows/pamhyr/pamhyr.exe.sha256
|
||||||
|
|
||||||
|
pkg-hash:
|
||||||
|
stage: hash
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
- linux
|
||||||
|
needs:
|
||||||
|
- job: linux-package-tar
|
||||||
|
artifacts: true
|
||||||
|
- job: windows-package-zip
|
||||||
|
artifacts: true
|
||||||
|
- job: windows-package-exe
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- cd windows
|
||||||
|
- sha256sum -b pamhyr-windows.exe > pamhyr-windows.exe.sha256
|
||||||
|
- sha256sum -b pamhyr-windows.zip > pamhyr-windows.zip.sha256
|
||||||
|
- cd ..
|
||||||
|
- cd linux
|
||||||
|
- sha256sum -b pamhyr-gnulinux.tar.xz > pamhyr-gnulinux.tar.xz.sha256
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- windows/pamhyr-windows.exe.sha256
|
||||||
|
- windows/pamhyr-windows.zip.sha256
|
||||||
|
- linux/pamhyr-gnulinux.tar.xz.sha256
|
||||||
|
|
||||||
|
#############
|
||||||
|
# ANTIVIRUS #
|
||||||
|
#############
|
||||||
|
|
||||||
|
build-check-clamav:
|
||||||
|
stage: antivirus
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
- linux
|
||||||
|
needs:
|
||||||
|
- job: build-linux
|
||||||
|
artifacts: true
|
||||||
|
- job: build-windows
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- cd packages
|
||||||
|
- ./clamav-scan.sh builds
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
pkg-check-clamav:
|
||||||
|
stage: antivirus
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
- linux
|
||||||
|
needs:
|
||||||
|
- job: linux-package-tar
|
||||||
|
artifacts: true
|
||||||
|
- job: windows-package-zip
|
||||||
|
artifacts: true
|
||||||
|
- job: windows-package-exe
|
||||||
|
artifacts: true
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_TAG
|
||||||
|
script:
|
||||||
|
- cd packages
|
||||||
|
- ./clamav-scan.sh packages
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# RELEASE #
|
# RELEASE #
|
||||||
###########
|
###########
|
||||||
@@ -362,10 +529,12 @@ tag-release:
|
|||||||
artifacts: true
|
artifacts: true
|
||||||
- job: windows-package-exe
|
- job: windows-package-exe
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: build-users-doc
|
# - job: build-users-doc
|
||||||
artifacts: true
|
# artifacts: true
|
||||||
- job: build-developers-doc
|
- job: build-developers-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
|
- job: pkg-hash
|
||||||
|
artifacts: true
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_TAG
|
- if: $CI_COMMIT_TAG
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -373,33 +542,44 @@ tag-release:
|
|||||||
- linux/pamhyr-gnulinux.tar.xz
|
- linux/pamhyr-gnulinux.tar.xz
|
||||||
- windows/pamhyr-windows.zip
|
- windows/pamhyr-windows.zip
|
||||||
- windows/pamhyr-windows.exe
|
- windows/pamhyr-windows.exe
|
||||||
|
- linux/pamhyr-gnulinux.tar.xz.sha256
|
||||||
|
- windows/pamhyr-windows.zip.sha256
|
||||||
|
- windows/pamhyr-windows.exe.sha256
|
||||||
- doc/dev/documentation.pdf
|
- doc/dev/documentation.pdf
|
||||||
- doc/users/documentation.pdf
|
# - doc/users/documentation.pdf
|
||||||
script:
|
script:
|
||||||
- cd packages
|
- cd packages
|
||||||
release:
|
release:
|
||||||
name: '$CI_COMMIT_TAG'
|
name: '$CI_COMMIT_TAG'
|
||||||
description: 'Automatic release from tag $CI_COMMIT_TAG'
|
description: '$CI_COMMIT_TAG_MESSAGE'
|
||||||
tag_name: '$CI_COMMIT_TAG'
|
tag_name: '$CI_COMMIT_TAG'
|
||||||
ref: '$CI_COMMIT_SHA'
|
ref: '$CI_COMMIT_SHA'
|
||||||
assets:
|
assets:
|
||||||
links:
|
links:
|
||||||
|
- name: 'GNU/Linux CHECKSUM SHA256 (tar.xz)'
|
||||||
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/linux/pamhyr-gnulinux.tar.xz.sha256'
|
||||||
|
filepath: '/linux/pamhyr-gnulinux.tar.xz.sha256'
|
||||||
|
link_type: 'package'
|
||||||
- name: 'GNU/Linux (tar.xz)'
|
- name: 'GNU/Linux (tar.xz)'
|
||||||
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/linux/pamhyr-gnulinux.tar.xz'
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/linux/pamhyr-gnulinux.tar.xz'
|
||||||
filepath: '/linux/pamhyr-gnulinux.tar.xz'
|
filepath: '/linux/pamhyr-gnulinux.tar.xz'
|
||||||
link_type: 'package'
|
link_type: 'package'
|
||||||
|
- name: 'Windows CHECKSUM SHA256 (exe)'
|
||||||
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.exe.sha256'
|
||||||
|
filepath: '/windows/pamhyr-windows.exe.sha256'
|
||||||
|
link_type: 'package'
|
||||||
- name: 'Windows (exe)'
|
- name: 'Windows (exe)'
|
||||||
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.exe'
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.exe'
|
||||||
filepath: '/windows/pamhyr-windows.exe'
|
filepath: '/windows/pamhyr-windows.exe'
|
||||||
link_type: 'package'
|
link_type: 'package'
|
||||||
|
- name: 'Windows CHECKSUM SHA256 (zip)'
|
||||||
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.zip.sha256'
|
||||||
|
filepath: '/windows/pamhyr-windows.zip.sha256'
|
||||||
|
link_type: 'package'
|
||||||
- name: 'Windows (zip)'
|
- name: 'Windows (zip)'
|
||||||
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.zip'
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/windows/pamhyr-windows.zip'
|
||||||
filepath: '/windows/pamhyr-windows.zip'
|
filepath: '/windows/pamhyr-windows.zip'
|
||||||
link_type: 'package'
|
link_type: 'package'
|
||||||
- name: 'User documentations (pdf)'
|
|
||||||
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/doc/users/documentation.pdf'
|
|
||||||
filepath: '/doc/users/documentation.pdf'
|
|
||||||
link_type: 'other'
|
|
||||||
- name: 'Dev documentations (pdf)'
|
- name: 'Dev documentations (pdf)'
|
||||||
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/doc/dev/documentation.pdf'
|
url: '${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/raw/doc/dev/documentation.pdf'
|
||||||
filepath: '/doc/dev/documentation.pdf'
|
filepath: '/doc/dev/documentation.pdf'
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
Sylvain COULIBALY, INRAE, 2020 - 2022
|
Sylvain COULIBALY, INRAE, 2020 - 2022
|
||||||
Théophile TERRAZ, INRAE, 2022 - 2023
|
Théophile TERRAZ, INRAE, 2022 - 2024
|
||||||
Pierre-Antoine ROUBY, INRAE, 2023
|
Pierre-Antoine ROUBY, INRAE, 2023 - 2024
|
||||||
@@ -10,35 +10,40 @@ modelling of rivers.
|
|||||||
+ Define boundary conditions
|
+ Define boundary conditions
|
||||||
+ Define lateral contribution
|
+ Define lateral contribution
|
||||||
+ Edit river friction
|
+ Edit river friction
|
||||||
|
+ Add reservoirs
|
||||||
|
+ Add hydraulic structures
|
||||||
+ Generate initial conditions
|
+ Generate initial conditions
|
||||||
+ Edit river sedimentary layers
|
+ Edit river sedimentary layers
|
||||||
+ Save the study in a unique file
|
+ Save the study in a unique file
|
||||||
+ Run Mage 8 on a study and visualize results
|
+ Run Mage 8 on a study and visualize results
|
||||||
|
|
||||||
|
Let see the
|
||||||
|
[documentation](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home)
|
||||||
|
for more details.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
### GNU/Linux
|
### GNU/Linux
|
||||||
|
|
||||||
Downloads [last
|
[See documentation](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/en/Install%20on%20GNULinux)
|
||||||
realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest)
|
|
||||||
GNU/Linux binary archive.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
tar xf pamhyr-gnulinux-amd64.tar.xz
|
|
||||||
cd pamhyr
|
|
||||||
./pamhyr
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
Downloads [last
|
[See documentation](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home/en/Install%20on%20Windows)
|
||||||
realease](https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/permalink/latest)
|
|
||||||
Windows installer.
|
|
||||||
|
|
||||||
### From source code
|
### From source code
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Get source code
|
# Get mage
|
||||||
|
mkdir mage
|
||||||
|
cd mage
|
||||||
|
|
||||||
|
curl -L -o mage.tgz https://gitlab.irstea.fr/jean-baptiste.faure/mage/-/releases/v8.3.2/downloads/packages/mage_linux.tgz
|
||||||
|
tar xf mage.tgz
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Get Pamhyr2 source code
|
||||||
git clone https://gitlab.irstea.fr/theophile.terraz/pamhyr/
|
git clone https://gitlab.irstea.fr/theophile.terraz/pamhyr/
|
||||||
cd pamhyr
|
cd pamhyr
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# documentation.org -- Pamhyr developers documentation
|
# documentation.org -- Pamhyr developers documentation
|
||||||
# Copyright (C) 2023 INRAE
|
# Copyright (C) 2023-2024 INRAE
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -369,6 +369,7 @@ of Bar (Listing [[sql-bar]] and [[sql-foo]]).
|
|||||||
CREATE TABLE bar (
|
CREATE TABLE bar (
|
||||||
id INTEGER NOT NULL PRIMARY KEY,
|
id INTEGER NOT NULL PRIMARY KEY,
|
||||||
x INTEGER NOT NULL,
|
x INTEGER NOT NULL,
|
||||||
|
y INTEGER NOT NULL,
|
||||||
foo_id INTEGER NOT NULL,
|
foo_id INTEGER NOT NULL,
|
||||||
FOREIGN KEY(foo_id) REFERENCES foo(id),
|
FOREIGN KEY(foo_id) REFERENCES foo(id),
|
||||||
)""")
|
)""")
|
||||||
@@ -455,6 +456,15 @@ of Bar (Listing [[sql-bar]] and [[sql-foo]]).
|
|||||||
bar._sql_save(execute, data=data)
|
bar._sql_save(execute, data=data)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Let see the results database scheme for Pamhyr2 at version v0.0.7 in
|
||||||
|
Figure [[sql_schema]].
|
||||||
|
|
||||||
|
#+NAME: sql_schema
|
||||||
|
#+ATTR_LATEX: :width 16cm
|
||||||
|
#+CAPTION: SQLite database scheme at Pamhyr2 version v0.0.7 (generate with [[https://gitlab.com/Screwtapello/sqlite-schema-diagram]])
|
||||||
|
[[./images/schema_v0.0.7.png]]
|
||||||
|
|
||||||
|
|
||||||
[fn:sqlite] The SQLite web site: https://www.sqlite.org/index.html
|
[fn:sqlite] The SQLite web site: https://www.sqlite.org/index.html
|
||||||
(last access 2023-09-20)
|
(last access 2023-09-20)
|
||||||
|
|
||||||
@@ -538,44 +548,44 @@ generic value from optional parameters, for examples:
|
|||||||
#+NAME: window
|
#+NAME: window
|
||||||
#+CAPTION: Example of Pamhyr2 window
|
#+CAPTION: Example of Pamhyr2 window
|
||||||
#+begin_src python :python python3 :results output :noweb yes
|
#+begin_src python :python python3 :results output :noweb yes
|
||||||
from View.Tools.PamhyrWindow import PamhyrWindow
|
from View.Tools.PamhyrWindow import PamhyrWindow
|
||||||
from View.My.Translate import MyTranslate
|
from View.My.Translate import MyTranslate
|
||||||
from View.My.Table import MyTableModel
|
from View.My.Table import MyTableModel
|
||||||
|
|
||||||
class MyWindow(PamhyrWindow):
|
class MyWindow(PamhyrWindow):
|
||||||
_pamhyr_ui = "MyUI"
|
_pamhyr_ui = "MyUI"
|
||||||
_pamhyr_name = "My window"
|
_pamhyr_name = "My window"
|
||||||
|
|
||||||
def __init__(self, my_data=None,
|
def __init__(self, study=None, config=None,
|
||||||
study=None, config=None,
|
my_data=None,
|
||||||
parent=None):
|
parent=None):
|
||||||
self._my_data = my_data
|
self._my_data = my_data
|
||||||
|
|
||||||
super(MyWindow, self).__init__(
|
super(MyWindow, self).__init__(
|
||||||
# Window title
|
# Window title
|
||||||
title = self._pamhyr_name + " - " + study.name,
|
title = self._pamhyr_name + " - " + study.name,
|
||||||
# Window standard data
|
# Window standard data
|
||||||
study = study, config = config,
|
study = study, config = config,
|
||||||
trad = MyTranslate(),
|
trad = MyTranslate(),
|
||||||
parent = parent,
|
parent = parent,
|
||||||
# Activate undo/redo and copy/paste shortcut
|
# Activate undo/redo and copy/paste shortcut
|
||||||
options = ["undo", "copy"]
|
options = ["undo", "copy"]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Add custom data to hash window computation
|
# Add custom data to hash window computation
|
||||||
self._hash_data.append(self._my_data)
|
self._hash_data.append(self._my_data)
|
||||||
|
|
||||||
# Setup custom window components
|
# Setup custom window components
|
||||||
self.setup_table()
|
self.setup_table()
|
||||||
self.setup_connections()
|
self.setup_connections()
|
||||||
|
|
||||||
def setup_table(self):
|
def setup_table(self):
|
||||||
# Init table(s)...
|
# Init table(s)...
|
||||||
|
|
||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
# Init action connection(s)...
|
# Init action connection(s)...
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Typically we called method =setup_*=, the method to initialize some
|
Typically we called method =setup_*=, the method to initialize some
|
||||||
@@ -636,7 +646,7 @@ class AddNodeCommand(QUndoCommand):
|
|||||||
self._node = node
|
self._node = node
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._graph.remove_node(self._node.name)
|
self._graph.remove_node(self._node)
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._graph.insert_node(self._node)
|
self._graph.insert_node(self._node)
|
||||||
@@ -661,11 +671,13 @@ creation, this stack is accessible at =self._undo_stack=.
|
|||||||
|
|
||||||
*** Plot
|
*** Plot
|
||||||
|
|
||||||
To define a new plot you can create a class who inherit to APlot. The
|
To define a new plot you can create a class who inherit to
|
||||||
creator need threee argument:
|
PamhyrPlot. The creator need at leaste five argument:
|
||||||
- A =canvas= of type =MplCanvas=
|
- A =canvas= of type =MplCanvas=
|
||||||
|
- A (optional) =trad= of type =PamhyrTranslate=
|
||||||
- A =data= used in =draw= and =update= to create and update the plot
|
- A =data= used in =draw= and =update= to create and update the plot
|
||||||
- A optional =toolbar= of type =PamhyrToolbar=
|
- A optional =toolbar= of type =PamhyrToolbar=
|
||||||
|
- A =parent= window
|
||||||
This class must implement two method =draw= and =update=, the first
|
This class must implement two method =draw= and =update=, the first
|
||||||
method to draw the plot from scratch, the second to update the plot if
|
method to draw the plot from scratch, the second to update the plot if
|
||||||
data has changed.
|
data has changed.
|
||||||
@@ -673,19 +685,36 @@ data has changed.
|
|||||||
#+begin_src python :python python3 :results output :noweb yes
|
#+begin_src python :python python3 :results output :noweb yes
|
||||||
from View.Tools.PamhyrPlot import PamhyrPlot
|
from View.Tools.PamhyrPlot import PamhyrPlot
|
||||||
|
|
||||||
class MyPlot(APlot):
|
class MyPlot(PamhyrPlot):
|
||||||
def __init__(self, canvas=None, data=None, toolbar=None):
|
def __init__(self, canvas=None, trad=None, toolbar=None
|
||||||
|
data=None, parent=None):
|
||||||
super(MyPlot, self).__init__(
|
super(MyPlot, self).__init__(
|
||||||
canvas=canvas,
|
canvas=canvas,
|
||||||
|
trad=trad,
|
||||||
data=data,
|
data=data,
|
||||||
toolbar=toolbar
|
toolbar=toolbar,
|
||||||
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.label_x = self._trad["x"]
|
||||||
|
self.label_y = self._trad["y"]
|
||||||
|
|
||||||
|
# Optional configuration
|
||||||
|
self._isometric_axis = False
|
||||||
|
|
||||||
|
self._auto_relim_update = True
|
||||||
|
self._autoscale_update = True
|
||||||
|
|
||||||
def draw(self):
|
def draw(self):
|
||||||
# Draw function code...
|
# Draw function code...
|
||||||
|
|
||||||
def update(self, ind = None):
|
def update(self):
|
||||||
# Update function code...
|
# Update function code...
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
# Clear plot values...
|
||||||
|
|
||||||
|
# ...
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Solver
|
** Solver
|
||||||
@@ -745,7 +774,7 @@ execute a code on distant computer, for example, over ssh.
|
|||||||
style=dashed;
|
style=dashed;
|
||||||
subgraph cluster021 {
|
subgraph cluster021 {
|
||||||
label="Solver Classes";
|
label="Solver Classes";
|
||||||
classSolverM7[label="Mage7", fillcolor=6];
|
//classSolverM7[label="Mage7", fillcolor=6];
|
||||||
classSolverM8[label="Mage8", fillcolor=6];
|
classSolverM8[label="Mage8", fillcolor=6];
|
||||||
classSolverR[label="RubarBE", fillcolor=6];
|
classSolverR[label="RubarBE", fillcolor=6];
|
||||||
}
|
}
|
||||||
@@ -828,7 +857,7 @@ solver and get results:
|
|||||||
- (2.1) The solver read the input file(s)
|
- (2.1) The solver read the input file(s)
|
||||||
- (2.2) The solver compute results and write it to solver output
|
- (2.2) The solver compute results and write it to solver output
|
||||||
file(s)
|
file(s)
|
||||||
- (3) Pamhyr2 create a Reuslts
|
- (3) Pamhyr2 create a =Results= object
|
||||||
- (3.1) The Pamhyr2 solver class read solver output file(s) and
|
- (3.1) The Pamhyr2 solver class read solver output file(s) and
|
||||||
complete Results with readed data
|
complete Results with readed data
|
||||||
|
|
||||||
@@ -958,8 +987,16 @@ different methods:
|
|||||||
|
|
||||||
** Unit tests
|
** Unit tests
|
||||||
|
|
||||||
The unit tests is actually not implemented in Pamhyr2, it is a *work
|
A very small part of Pamhyr2 has unit test. This part is limited to the Model.
|
||||||
in progress*.
|
|
||||||
|
#+begin_src shell
|
||||||
|
python3 -m venv test
|
||||||
|
. test test/bin/activate
|
||||||
|
pip3 install -U -r ./full-requirements.txt
|
||||||
|
|
||||||
|
cd src/
|
||||||
|
python3 -Walways -m unittest discovert -v -t .
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** The debug mode
|
** The debug mode
|
||||||
|
|
||||||
@@ -970,14 +1007,14 @@ line:
|
|||||||
./Pamhyr2 debug
|
./Pamhyr2 debug
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
This mode add some log and add two action in main window menu:
|
This mode add some log and add two action in main window menu: "About
|
||||||
"About/Debug" open a window with Python Repl in current Python
|
> Debug" open a window with Python Repl in current Python
|
||||||
environement, and "About/Debug SQLite" who open the application
|
environement, and "About > Debug SQLite" who open the application
|
||||||
SQLiteBrowser (if installed) on current Study to explore the study
|
SQLiteBrowser (if installed) on current Study to explore the study
|
||||||
data base file.
|
data base file.
|
||||||
|
|
||||||
#+NAME: debug-repl
|
#+NAME: debug-repl
|
||||||
#+ATTR_LATEX: :width 12cm
|
#+ATTR_LATEX: :width 14cm
|
||||||
#+CAPTION: Pamhyr2 debug Python REPL
|
#+CAPTION: Pamhyr2 debug Python REPL
|
||||||
[[./images/python-debug-repl.png]]
|
[[./images/python-debug-repl.png]]
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
@@ -11,7 +11,8 @@
|
|||||||
\usepackage[absolute]{textpos}
|
\usepackage[absolute]{textpos}
|
||||||
\usepackage{titlesec}
|
\usepackage{titlesec}
|
||||||
\usepackage{amssymb}
|
\usepackage{amssymb}
|
||||||
\usepackage{tcolorbox}
|
\usepackage[minted,xparse,breakable]{tcolorbox}
|
||||||
|
\usepackage{pmboxdraw}
|
||||||
|
|
||||||
\usepackage{enumitem}
|
\usepackage{enumitem}
|
||||||
\setlist[enumerate]{itemsep=-0.5em}
|
\setlist[enumerate]{itemsep=-0.5em}
|
||||||
@@ -140,7 +141,7 @@
|
|||||||
\setminted[llvm]{breaklines,fontsize=\footnotesize,encoding=utf8}
|
\setminted[llvm]{breaklines,fontsize=\footnotesize,encoding=utf8}
|
||||||
|
|
||||||
%% Add box arrond of minted
|
%% Add box arrond of minted
|
||||||
\BeforeBeginEnvironment{minted}{\begin{tcolorbox}[boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}%
|
\BeforeBeginEnvironment{minted}{\begin{tcolorbox}[breakable, boxsep=0pt, left=0.1cm, right=0.1cm, arc=0pt, boxrule=0.5pt, colback=white]}%
|
||||||
\AfterEndEnvironment{minted}{\end{tcolorbox}}%
|
\AfterEndEnvironment{minted}{\end{tcolorbox}}%
|
||||||
|
|
||||||
\makeatletter
|
\makeatletter
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,4 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
pdflatex -no-shell-escape step-by-step.tex
|
||||||
|
pdflatex -no-shell-escape pas-a-pas.tex
|
||||||
@@ -65,7 +65,8 @@
|
|||||||
31874.0000 14.5000 22.1900
|
31874.0000 14.5000 22.1900
|
||||||
31874.0000 17.6000 22.9900
|
31874.0000 17.6000 22.9900
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
7 0 0 7 31875.0000 PontRD101m
|
7 0 0 9 31875.0000 PontRD101m
|
||||||
|
31875.0000 0.5400 23.0000
|
||||||
31875.0000 0.5400 21.8900
|
31875.0000 0.5400 21.8900
|
||||||
31875.0000 2.5000 19.6900 rg
|
31875.0000 2.5000 19.6900 rg
|
||||||
31875.0000 2.5000 18.6900
|
31875.0000 2.5000 18.6900
|
||||||
@@ -73,8 +74,10 @@
|
|||||||
31875.0000 10.7000 18.9900
|
31875.0000 10.7000 18.9900
|
||||||
31875.0000 10.7000 19.9900 rd
|
31875.0000 10.7000 19.9900 rd
|
||||||
31875.0000 13.8900 21.8900
|
31875.0000 13.8900 21.8900
|
||||||
|
31875.0000 13.8900 23.0000
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
8 0 0 7 31885.0000 PontRD101v
|
8 0 0 9 31885.0000 PontRD101v
|
||||||
|
31885.0000 0.5400 23.0000
|
||||||
31885.0000 0.5400 21.8900
|
31885.0000 0.5400 21.8900
|
||||||
31885.0000 2.5000 19.6900 rg
|
31885.0000 2.5000 19.6900 rg
|
||||||
31885.0000 2.5000 18.6900
|
31885.0000 2.5000 18.6900
|
||||||
@@ -82,6 +85,7 @@
|
|||||||
31885.0000 10.7000 18.9900
|
31885.0000 10.7000 18.9900
|
||||||
31885.0000 10.7000 19.9900 rd
|
31885.0000 10.7000 19.9900 rd
|
||||||
31885.0000 13.8900 21.8900
|
31885.0000 13.8900 21.8900
|
||||||
|
31885.0000 13.8900 23.0000
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
9 0 0 9 31886.0000
|
9 0 0 9 31886.0000
|
||||||
31886.0000 0.0000 22.9900
|
31886.0000 0.0000 22.9900
|
||||||
@@ -303,7 +307,8 @@
|
|||||||
34334.0000 14.0000 18.1000 rd
|
34334.0000 14.0000 18.1000 rd
|
||||||
34334.0000 16.1000 21.1300
|
34334.0000 16.1000 21.1300
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
26 0 0 7 34335.0000 PontmThivencelle
|
26 0 0 9 34335.0000 PontmThivencelle
|
||||||
|
34335.0000 2.9000 22.0000
|
||||||
34335.0000 2.9000 20.7400
|
34335.0000 2.9000 20.7400
|
||||||
34335.0000 2.9000 18.2900 rg
|
34335.0000 2.9000 18.2900 rg
|
||||||
34335.0000 6.4000 17.7900
|
34335.0000 6.4000 17.7900
|
||||||
@@ -311,8 +316,10 @@
|
|||||||
34335.0000 12.8000 17.2600
|
34335.0000 12.8000 17.2600
|
||||||
34335.0000 12.8000 18.3100 rd
|
34335.0000 12.8000 18.3100 rd
|
||||||
34335.0000 12.8000 20.7400
|
34335.0000 12.8000 20.7400
|
||||||
|
34335.0000 12.8000 22.0000
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
27 0 0 7 34343.0000 PontvThivencelle
|
27 0 0 9 34343.0000 PontvThivencelle
|
||||||
|
34343.0000 2.9000 22.0000
|
||||||
34343.0000 2.9000 20.7400
|
34343.0000 2.9000 20.7400
|
||||||
34343.0000 2.9000 18.2900 rg
|
34343.0000 2.9000 18.2900 rg
|
||||||
34343.0000 6.4000 17.7900
|
34343.0000 6.4000 17.7900
|
||||||
@@ -320,6 +327,7 @@
|
|||||||
34343.0000 12.8000 17.2600
|
34343.0000 12.8000 17.2600
|
||||||
34343.0000 12.8000 18.2900 rd
|
34343.0000 12.8000 18.2900 rd
|
||||||
34343.0000 12.8000 20.7400
|
34343.0000 12.8000 20.7400
|
||||||
|
34343.0000 12.8000 22.0000
|
||||||
999.9990 999.9990 999.9990
|
999.9990 999.9990 999.9990
|
||||||
28 0 0 10 34345.0000 avalPontThivencell
|
28 0 0 10 34345.0000 avalPontThivencell
|
||||||
34345.0000 0.0000 21.3600
|
34345.0000 0.0000 21.3600
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 115 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,299 @@
|
|||||||
|
%% 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}
|
||||||
|
|
||||||
|
\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 pour Pamhyr2
|
||||||
|
|
||||||
|
Janvier 2024
|
||||||
|
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
~
|
||||||
|
|
||||||
|
~
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
|
||||||
|
\textbf{\LARGE Modélisation 1D 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}
|
||||||
|
Autors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
|
||||||
|
& Théophile TERRAZ & theophile.terraz@inrae.fr\tabularnewline
|
||||||
|
& Lionel Pénard & lionel.penard@inrae.fr\tabularnewline
|
||||||
|
|
||||||
|
\end{tabular}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
~
|
||||||
|
|
||||||
|
\pagebreak{}
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\tableofcontents{}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
~
|
||||||
|
|
||||||
|
\pagebreak{}
|
||||||
|
|
||||||
|
% \section{Introduction}
|
||||||
|
%
|
||||||
|
% TODO
|
||||||
|
%
|
||||||
|
% \pagebreak{}
|
||||||
|
|
||||||
|
|
||||||
|
\section{Installer Pamhyr2}
|
||||||
|
|
||||||
|
Pamhyr2 peut être téléchargé ici : \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/dl.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Utilisez le bouton de téléchargement GNU Linux ou Windows en fonction de votre système. Sous Windows, lancez le programme d'installation. Sous Linux, décompressez l'archive et lancez Pamhyr2.
|
||||||
|
|
||||||
|
|
||||||
|
\section{Créer une première étude}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Fichier] => [Nouvelle étude]} pour créer une nouvelle étude. Choisissez un nom, par exemple Hogneau, et validez
|
||||||
|
|
||||||
|
Cliquez sur \texttt{[Réseau] => [Editer le réseau]} pour créer les biefs de votre rivière. Dans cette fenêtre, vous devez définir un graphe orienté qui représente les biefs de votre réseau fluvial : les arêtes sont les biefs et les n½uds sont soit des conditions limites amont, soit des conditions limites aval, soit des jonctions entre biefs.
|
||||||
|
Appuyez sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour entrer dans le mode \textit{Ajout}. Créez deux n½uds en cliquant dans la zone grise de la fenêtre, et créez un lien en cliquant à nouveau sur chaque n½ud. Appuyez à nouveau sur \includegraphics[width=0.5cm]{img/gtk_add.png} pour quitter le mode \textit{Ajout}. Vous avez créé votre premier bief, avec un n½ud amont et un n½ud aval. Dans la partie inférieure de la fenêtre \textit{Editer le réseau hydrographique}, vous pouvez renommer les n½uds et les biefs. Comme le bief que vous avez créé est automatiquement sélectionné, toutes les étapes suivantes s'appliqueront à ce bief. La fenêtre doit se présenter comme suit :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/network.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Fermer la fenêtre \textit{Editer le réseau}.
|
||||||
|
|
||||||
|
|
||||||
|
\section{Editer la géometrie de la rivière}
|
||||||
|
|
||||||
|
Cliquez sur \texttt{[Géometrie] => [Editer la géometrie]} pour définir la géométrie du bief sélectionné. Cliquez sur le bouton \texttt{[Importer]} et sélectionnez le fichier \texttt{Data/Bief\_1.st}. Vous devriez voir :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/Geo.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Le panneau de gauche contient une liste de toutes les sections en travers avec leur nom et leur abscisse longitudinale (PK). Dans le graphique en haut à gauche, vous pouvez voir la vue de dessus de la rivière, dans le panneau en haut à droite, la coupe longitudinale de la rivière et dans le graphique en bas, vous pouvez voir la section en travers sélectionnée (bleu) ainsi que la suivante (pointillés violets) et la précédente (pointillés noirs). Vous pouvez vous déplacer dans la liste des sections en cliquant dans le tableau ou à l'aide de l'ascenseur situé entre le tableau et les graphiques.
|
||||||
|
|
||||||
|
Vous pouvez éditer la section en travers sélectionnée en cliquant sur l'icône \includegraphics[width=0.5cm]{"img/edit.png"}.
|
||||||
|
|
||||||
|
Sélectionnez la section en travers nommée \textit{PontRD101m} et ouvrez la fenêtre d'édition. Vous devriez voir :
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/editsect.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Sur le panneau de gauche se trouve la liste de tous les points de la section, avec leurs coordonnées, leur nom et leur abscisse transversale. La coordonnée Z du point le plus haut est inscrite en bleu et celle du point le plus bas en rouge. Les points peuvent avoir un nom. Si un point portant le même nom existe dans toutes les sections d'un bief, il forme une ligne longitudinale (ou ligne directrice). Par exemple, nous avons ici \textit{rg} et \textit{rd} qui représentent la rive gauche et la rive droite du lit mineur.
|
||||||
|
|
||||||
|
Sur le graphique figure une projection de la section en travers. Vous pouvez utiliser \texttt{[ctrl + clic]} pour sélectionner un point dans le tracé et \texttt{[maj + clic]} pour sélectionner une ligne d'eau et visualiser des données géométriques utiles. Vous pouvez fermer la fenêtre d'édition de la section en travers et la fenêtre d'édition de la géométrie.
|
||||||
|
|
||||||
|
\section{Editer les conditions aux limites}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions aux limites et apports ponctuels]} :
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/boundary.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Utilisez le bouton \textit{ajouter} en haut à gauche de la fenêtre pour ajouter une condition limite pour le liquide.
|
||||||
|
Sur la nouvelle ligne, on peut cliquer pour sélectionner la ligne entière, et double-cliquer pour sélectionner la cellule.
|
||||||
|
Sélectionnez la cellule \textit{Type} pour donner un nom à la condition limite. Ici, nous définirons le débit mesuré lors de la crue de février 2002. Vous pouvez nommer cette condition limite "crue2002".
|
||||||
|
Sélectionner la cellule \textit{Type} et utiliser la combo box pour mettre une loi Q(t).
|
||||||
|
Sélectionnez la cellule \textit{Noeud} et attribuez cette condition au noeud amont.
|
||||||
|
Les noms des noeuds sont rappelés dans le réseau du panneau de droite.
|
||||||
|
Sélectionnez maintenant la ligne entière et cliquez sur le bouton d'édition \includegraphics[width=0.5cm]{"img/edit.png"}. Vous avez ouvert la fenêtre \textit{Éditer les conditions aux limites}.
|
||||||
|
Dans un éditeur de texte, ouvrez le fichier \texttt{Données/Fevrier\_2002.txt}. Copiez le contenu du fichier (par exemple avec \textit{ctrl+a} puis \textit{ctrl+c}) et collez-le dans le panneau gauche de la fenêtre \textit{Éditer les conditions aux limites} avec \textit{ctrl+v}. Vous pouvez maintenant voir la courbe de débit :
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/fev2002.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Fermer cette fenêtre. Revenir sur la fenêtre \textit{Conditions aux limites}. Ajouter une nouvelle ligne, lui donner un nom, lui donner le type \textit{Z(T)} et l'associer au noeud aval du réseau. Ouvrez la fenêtre \textit{Éditer les conditions aux limites} (\includegraphics[width=0.5cm]{"img/edit.png"}). Ajoutez deux lignes. Dans la première, entrez le temps : 0.00.00 et Z : 15.000.
|
||||||
|
Dans la seconde, saisissez le temps : 1.00.00 et Z : 15.000. Cela crée une côte constante de l'eau en aval. Pour le calcul, Mage extrapolera continuellement l'élévation de l'eau.
|
||||||
|
Vous pouvez fermer les fenêtres \textit{Éditer les conditions aux limites} et \textit{Conditions aux limites}.
|
||||||
|
|
||||||
|
\section{Créer les conditions initiales}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Conditions initiales]}.
|
||||||
|
Si vous ne connaissez pas les conditions initiales de la côte de l'eau et du débit de la rivière, vous pouvez utiliser les boutons \texttt{[Générer une hauteur minimale]} ou \texttt{[Générer un débit constant]} pour laisser Pamhyr2 estimer une condition initiale à l'aide de la formule de Manning-Strickler.
|
||||||
|
Cliquez sur \texttt{[Générer à partir du débit]} et saisissez un débit de $4 m^3$ dans la fenêtre contextuelle pour générer une condition initiale de hauteur d'eau basée sur la formule de Manning-Strickler et un débit uniforme de $4 m^3$. Vous devriez voir :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/ic.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Fermer la fenêtre \textit{Conditions initiales}
|
||||||
|
|
||||||
|
|
||||||
|
\section{Editer les coefficients de frottement}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Editer les frottements]}.
|
||||||
|
Vous devez d'abord définir des jeux de coefficients de Strickler. Cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour ouvrir la fenêtre \textit{Strickler}. Vous pouvez y créer des couples de coefficients de Strickler, le premier pour le lit mineur, le second pour le lit moyen. Cliquez quatre fois sur \textit{add} pour créer quatre nouveaux couples. Donnez-leur les valeurs suivantes :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/K.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Fermez la fenêtre \textit{Strickler}. Dans la fenêtre \textit{Editer les frottements}, ajoutez quatre lignes avec le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour créer quatre zones de frottement. Chaque zone est définie par un PK \textit{début} et de \textit{fin} PK et un couple \textit{begin} et \textit{end} couple de Strickler. Les couples de coefficients de Strickler à l'intérieur d'une zone sont interpolés à partir des couples \textit{begin} et \textit{end}. Dans notre cas, nous utiliserons des coefficients constants par zone. Définissez les zones comme suit :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/frictions.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
La zone sélectionnée est surlignée en bleu. Fermez la fenêtre \textit{Editer les frottements}.
|
||||||
|
|
||||||
|
|
||||||
|
\section{Modélisation des ouvrages hydrauliques}
|
||||||
|
|
||||||
|
Parfois, il peut y avoir des sections en travers dans lesquelles les équations de Saint-Venant ne peuvent pas être utilisées pour modéliser l'écoulement de l'eau. Dans ce cas, nous devons définir une autre loi pour relier la côte de l'eau et le débit. C'est le cas, par exemple, au niveau des ponts lorsque la hauteur d'eau est trop élevée, ce qui entraîne un écoulement en charge. Pamhyr2 permet de définir différents ouvrages hydrauliques avec des lois paramétrables. Dans notre cas, on doit représenter un seuil et deux ponts comme ouvrages hydrauliques.
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Hydraulique] => [Ouvrages hydrauliques]} pour ouvrir la fenêtre des ouvrages hydrauliques. Cliquez trois fois sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} pour créer trois ouvrages hydrauliques. Chaque structure peut avoir un nom et doit avoir une portée et un PK. Définissez-les comme suit :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/hs.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Sélectionnez le seuil aval et cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour modifier les lois de cette ouvrage. Les ouvrages hydrauliques sont composés d'ouvrages hydrauliques élémentaires. Vous pouvez combiner les lois de plusieurs ouvrages hydrauliques élémentaires pour créer votre ouvrage. Pour ce seuil, nous n'avons besoin que d'un ouvrage hydraulique élémentaire de type déversoir. Cliquez sur \includegraphics[width=0.5cm]{img/gtk_add.png} pour ajouter un nouvel ouvrage hydraulique élémentaire, donnez-lui le type \textit{seuil} et configurez-le comme suit :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/seuil.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Retournez à la fenêtre \textit{Ouvrages hydrauliques}.
|
||||||
|
|
||||||
|
Sélectionnez le pont RS101 et cliquez sur \includegraphics[width=0.5cm]{"img/edit.png"} pour éditer les lois de cet ouvrage. Un pont peut être modélisé comme une combinaison d'un orifice pour l'écoulement sous le pont et d'un déversoir pour l'écoulement au-dessus du pont. Créez deux ouvrages hydrauliques élémentaires et définissez-les comme suit :
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/seuilRS101.png}
|
||||||
|
|
||||||
|
\includegraphics[width=15cm]{img/orificeRS101.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Revenez à la fenêtre \textit{Ouvrages hydrauliques} et appliquez la même procédure pour le pont de Thivencelle :
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/orificeThivencelle.png}
|
||||||
|
|
||||||
|
\includegraphics[width=15cm]{img/seuilThivencelle.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Vous pouvez maintenant fermer les fenêtres \textit{Ouvrages hydrauliques}.
|
||||||
|
|
||||||
|
\section{Paramètres du solveur}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Parameters numériques des solveurs]}.
|
||||||
|
Dans la fenêtre \textit{Paramètres du solveur}, sélectionnez l'onglet \textit{Mage v8}. Réglez les paramètres du solveur comme suit :
|
||||||
|
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/param.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
|
||||||
|
Fermer la fenêtre \textit{Paramètres du solveur}.
|
||||||
|
|
||||||
|
\section{Lancer la simulation}
|
||||||
|
|
||||||
|
Dans la fenêtre principale, cliquez sur \texttt{[Exécuter] => [Lancer le solveur]}.
|
||||||
|
Sélectionnez \textit{Defaut-Mage - (Mage8)} et cliquez sur le bouton \textit{Exécuter}.
|
||||||
|
Deux fenêtres s'ouvrent : la fenêtre \textit{check list} et la fenêtre \textit{Log du solveur}.
|
||||||
|
La fenêtre \textit{Check list} donne quelques indications sur la validité de votre modèle, et la fenêtre \textit{Log du solveur} affiche les résultats du solveur.
|
||||||
|
À partir de la fenêtre \textit{Log du solveur}, vous pouvez réexécuter le calcul, et vous pouvez cliquer sur le bouton \textit{Résultats} pour ouvrir la fenêtre \textit{Résultats}.
|
||||||
|
|
||||||
|
\section{Visualiser les résultats}
|
||||||
|
|
||||||
|
il est aussi possible d'ouvrir la fenêtre \textit{Résultats} si vous avez fermé la fenêtre \textit{Log du solveur}, en cliquant sur \texttt{[Résultats] => [Visualiser les derniers résultats]} à partir de la fenêtre principale. Le panneau supérieur vous permet de sélectionner le bief, le panneau inférieur gauche vous permet de sélectionner une section en travers dans ce bief. Les trois diagrammes sur la droite montrent le bief et la section en travers de la même manière que dans la fenêtre \textit{Géométrie}. Vous pouvez utiliser le curseur du bas pour visualiser la côte de l'eau à différents pas de temps.
|
||||||
|
Pour visualiser le débit, passez à l'onglet \textit{Hydrogramme}.
|
||||||
|
Pour créer des tracés 2D personnalisés, cliquez sur le bouton \includegraphics[width=0.5cm]{img/gtk_add.png} en haut à gauche de la fenêtre. Sélectionnez les valeurs que vous voulez sur les axes $X$ et $Y$ et cliquez sur \textit{OK}.
|
||||||
|
Vous pouvez maintenant voir un nouvel onglet avec le tracé 2D personnalisé dans le panneau droit de la fenêtre \textit{Results}.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\pagebreak{}
|
||||||
|
\end{document}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\includegraphics[width=5cm]{Logo-INRAE_Transparent.png}
|
\includegraphics[width=5cm]{img/Logo-INRAE_Transparent.png}
|
||||||
|
|
||||||
~
|
~
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ using Pamhyr2
|
|||||||
\par\end{center}{\large \par}
|
\par\end{center}{\large \par}
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
Riverly, river hydraulics
|
RiverLy, river hydraulics
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
~
|
~
|
||||||
@@ -75,8 +75,9 @@ Riverly, river hydraulics
|
|||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\begin{tabular}{lll}
|
\begin{tabular}{lll}
|
||||||
Autors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
|
Authors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
|
||||||
& Théophile TERRAZ & theophile.terraz@inrae.fr\tabularnewline
|
& Théophile Terraz & theophile.terraz@inrae.fr\tabularnewline
|
||||||
|
& Lionel Pénard & lionel.penard@inrae.fr\tabularnewline
|
||||||
\end{tabular}
|
\end{tabular}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
@@ -92,17 +93,17 @@ Autors : & Pierre-Antoine Rouby & pierre-antoine.rouby@inrae.fr\tabularnewline
|
|||||||
|
|
||||||
\pagebreak{}
|
\pagebreak{}
|
||||||
|
|
||||||
\section{Introduction}
|
% \section{Introduction}
|
||||||
|
%
|
||||||
TODO
|
% TODO
|
||||||
|
%
|
||||||
\pagebreak{}
|
% \pagebreak{}
|
||||||
|
|
||||||
\section{Install Pamhyr2}
|
\section{Install Pamhyr2}
|
||||||
|
|
||||||
Pamhyr2 can be downloaded from \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
|
Pamhyr2 can be downloaded from \url{https://gitlab.irstea.fr/theophile.terraz/pamhyr}.
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{dl.png}
|
\includegraphics[width=15cm]{img/dl.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Use the GNU Linux or the Windows download button depending on your system. On windows, launch the installer. On Linux, unpack the archive and launch Pamhyr2.
|
Use the GNU Linux or the Windows download button depending on your system. On windows, launch the installer. On Linux, unpack the archive and launch Pamhyr2.
|
||||||
@@ -113,10 +114,10 @@ Use the GNU Linux or the Windows download button depending on your system. On wi
|
|||||||
On the main windows, click on \texttt{[Files] => [New Study]} to create a new study.
|
On the main windows, click on \texttt{[Files] => [New Study]} to create a new study.
|
||||||
|
|
||||||
Click on \texttt{[River Network] => [Edit River Network]} to create the reaches of your river. In this window, you must define an oriented graph that represents the reaches of your river network: the edges are the reaches and the nodes are either upstream boundary conditions, downstream boundary conditions or junctions.
|
Click on \texttt{[River Network] => [Edit River Network]} to create the reaches of your river. In this window, you must define an oriented graph that represents the reaches of your river network: the edges are the reaches and the nodes are either upstream boundary conditions, downstream boundary conditions or junctions.
|
||||||
Press the \includegraphics[width=0.5cm]{gtk_add.png} to enter the \textit{add} mode. Create two nodes by clicking in the grey zone of the window, and create a link by clicking again on each node. press \includegraphics[width=0.5cm]{gtk_add.png} again to exit the \textit{add} mode. You created your first reach, with an upstream node and a downstream node. In the lower part of the \textit{Edit River Network} window you can rename the nodes and the reaches. As the reach you created is automaticaly selected, all the next steps will apply to this reach. The window should look like that:
|
Press the \includegraphics[width=0.5cm]{img/gtk_add.png} to enter the \textit{add} mode. Create two nodes by clicking in the grey zone of the window, and create a link by clicking again on each node. press \includegraphics[width=0.5cm]{img/gtk_add.png} again to exit the \textit{add} mode. You created your first reach, with an upstream node and a downstream node. In the lower part of the \textit{Edit River Network} window you can rename the nodes and the reaches. As the reach you created is automaticaly selected, all the next steps will apply to this reach. The window should look like that:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{network.png}
|
\includegraphics[width=15cm]{img/network.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Close the \textit{Edit River Network} window.
|
Close the \textit{Edit River Network} window.
|
||||||
@@ -127,29 +128,29 @@ Close the \textit{Edit River Network} window.
|
|||||||
Click on \texttt{[Geometry] => [Edit Geometry]} to define the geometry of the selected bief. Click on the \texttt{[Import]} button and select the file \texttt{Data/Bief\_1.st}. You should see:
|
Click on \texttt{[Geometry] => [Edit Geometry]} to define the geometry of the selected bief. Click on the \texttt{[Import]} button and select the file \texttt{Data/Bief\_1.st}. You should see:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{Geo.png}
|
\includegraphics[width=15cm]{img/Geo.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
On the left panel is a list of all the cross sections with their name and longitudinal abscisa. In the top left plot you can see the top view of the river, on the top right panel the longitudinal cross-section of the river and in the bottom plot you can see the selected cross-section (blue) along with the next one (dashed purple) and previous one (dashed black). You can move in the section list using the slider at the very right of the window.
|
On the left panel is a list of all the cross sections with their name and longitudinal abscisa. In the top left plot you can see the top view of the river, on the top right panel the longitudinal cross-section of the river and in the bottom plot you can see the selected cross-section (blue) along with the next one (dashed purple) and previous one (dashed black). You can move in the section list using the slider at the very right of the window.
|
||||||
|
|
||||||
You can edit the selected cross section by clicking on the \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} icon.
|
You can edit the selected cross section by clicking on the \includegraphics[width=0.5cm]{"img/edit.png"} icon.
|
||||||
|
|
||||||
select the cross section named \textit{PontRD101m} and open the edition window. You should see:
|
select the cross section named \textit{PontRD101m} and open the edition window. You should see:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{editsect.png}
|
\includegraphics[width=15cm]{img/editsect.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
On the left panel is the list of all the points of the section, with their coordinates, their name and their transversal absisa. The Z coordinate of the highest point is written in blue and the lowest in red. Points can have a name. If a point with the same name exists in every section in a reach, it forms a longitudinal line. For example, here we have \textit{rg} and \textit{rd} which represent the left bank and the right bank of the main chanel.
|
On the left panel is the list of all the points of the section, with their coordinates, their name and their transversal absisa. The Z coordinate of the highest point is written in blue and the lowest in red. Points can have a name. If a point with the same name exists in every section in a reach, it forms a longitudinal line. For example, here we have \textit{rg} and \textit{rd} which represent the left bank and the right bank of the main chanel.
|
||||||
|
|
||||||
On the plot is a projection of the cross section. You can use \texttt{[ctrl + click]} to select a point in the plot. For now we don't have to change anything. You can close the cross section edition window and the geometry edition window.
|
On the plot is a projection of the cross section. You can use \texttt{[ctrl + click]} to select a point in the plot and \texttt{[shift + click]} to select a water line and visualize usefull geometric data. You can close the cross section edition window and the geometry edition window.
|
||||||
|
|
||||||
\section{Edit the boundary conditions}
|
\section{Edit the boundary conditions}
|
||||||
|
|
||||||
From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and punctual contributions]}.You should see:
|
From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and punctual contributions]}.You should see:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{boundary.png}
|
\includegraphics[width=15cm]{img/boundary.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Use the \textit{add} button on the top left of the window to add a liquid boundary condition.
|
Use the \textit{add} button on the top left of the window to add a liquid boundary condition.
|
||||||
@@ -158,24 +159,25 @@ From the main window, click on \texttt{[Hydraulics] => [Boundary conditions and
|
|||||||
Select the \textit{Type} cell and use the combo box to put a Q(t) law.
|
Select the \textit{Type} cell and use the combo box to put a Q(t) law.
|
||||||
Select the \textit{Node} cell and atribute this condition to the upstream node.
|
Select the \textit{Node} cell and atribute this condition to the upstream node.
|
||||||
Names of the nodes are recalled in network in the right panel.
|
Names of the nodes are recalled in network in the right panel.
|
||||||
Now select the whole line and click on the edit button \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}. You opened the \textit{Edit Boundary Conditions} window.
|
Now select the whole line and click on the edit button \includegraphics[width=0.5cm]{"img/edit.png"}. You opened the \textit{Edit Boundary Conditions} window.
|
||||||
On a text editor, open the \texttt{Data/Fevrier\_2002.txt} file. Copy the content of the file (for example with \textit{ctrl+a ctrl+c}) and paste it in the left panel of the \textit{Edit Boundary Conditions} window with \textit{ctrl+v}. You can now see the flow discharge curve:
|
On a text editor, open the \texttt{Data/Fevrier\_2002.txt} file. Copy the content of the file (for example with \textit{ctrl+a ctrl+c}) and paste it in the left panel of the \textit{Edit Boundary Conditions} window with \textit{ctrl+v}. You can now see the flow discharge curve:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{fev2002.png}
|
\includegraphics[width=15cm]{img/fev2002.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Close this window. Go back on the \textit{Boundary Conditions} window. Add a new line, give it a name, give it the textit{Z(T)} type and associate it to the downstream node of the network. Open the \textit{Edit Boundary Conditions} window (\includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"}). Add two lines. In the first one, enter time: 0.00.00 and Z: 15.000.
|
Close this window. Go back on the \textit{Boundary Conditions} window. Add a new line, give it a name, give it the textit{Z(T)} type and associate it to the downstream node of the network. Open the \textit{Edit Boundary Conditions} window (\includegraphics[width=0.5cm]{"img/edit.png"}). Add two lines. In the first one, enter time: 0.00.00 and Z: 15.000.
|
||||||
On the second one, time: 1.00.00 and Z: 15.000. It creates a constant downstream water elevation. For the computaion, Mage will extrapolate continuously the water elevation, that's why we only need to define one hour.
|
On the second one, time: 1.00.00 and Z: 15.000. It creates a constant downstream water elevation. For the computaion, Mage will extrapolate continuously the water elevation, that's why we only need to define one hour.
|
||||||
You can close the the \textit{Edit Boundary Conditions} and the \textit{Boundary Conditions} window.
|
You can close the the \textit{Edit Boundary Conditions} and the \textit{Boundary Conditions} window.
|
||||||
|
|
||||||
\section{Create initial conditions}
|
\section{Create initial conditions}
|
||||||
|
|
||||||
From the main window, click on \texttt{[Hydraulics] => [Initial conditions]}.
|
From the main window, click on \texttt{[Hydraulics] => [Initial conditions]}.
|
||||||
Click on \texttt{Generate minimal height} and enter a height of 2 meters in the pop-up window to generate an initial water height condition that verify the folowing conditions: a water height of at least 2 meters and a decreasing water surface elevation from upstream to downstream. You should see:
|
If you don't know the initial conditions in water elevation and flow discharge of the river, you can use \texttt{[Generate minimal height]} or \texttt{[Generate from discharge]} buttons to let Pamhyr2 estimate an initial condition using the Manning-Strickler formula.
|
||||||
|
Click on \texttt{[Generate from discharge]} and enter a discharge of $4 m^3$ in the pop-up window to generate an initial water height condition based on the Manning-Strickler formula and a uniform discharge of $4 m^3$. You should see:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{ic.png}
|
\includegraphics[width=15cm]{img/ic.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Close the \textit{Initial conditions} window.
|
Close the \textit{Initial conditions} window.
|
||||||
@@ -184,18 +186,83 @@ Close the \textit{Initial conditions} window.
|
|||||||
\section{Edit friction coefficients}
|
\section{Edit friction coefficients}
|
||||||
|
|
||||||
From the main window, click on \texttt{[Hydraulics] => [Edit friction]}.
|
From the main window, click on \texttt{[Hydraulics] => [Edit friction]}.
|
||||||
You fist have to define sets of Strickler coefficients. Click on \includegraphics[width=0.5cm]{"../../../src/View/ui/ressources/edit.png"} to open the \textit{Strickler} window. Here you can create couples of Strickler coefficients, the first one for the minor bed, the second one for the medium bed. Click on \textit{add} four times to create four new couple. Give them the folowing values:
|
You fist have to define sets of Strickler coefficients. Click on \includegraphics[width=0.5cm]{"img/edit.png"} to open the \textit{Strickler} window. Here you can create couples of Strickler coefficients, the first one for the minor bed, the second one for the medium bed. Click on \textit{add} four times to create four new couple. Give them the folowing values:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{K.png}
|
\includegraphics[width=15cm]{img/K.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
Close the \textit{Strickler} window. On the \textit{Edit friction} window, add four lines with the button \includegraphics[width=0.5cm]{gtk_add.png} to create fous friction zones. Each zone is defined by a \textit{begin} and \textit{end} PK and a \textit{begin} and \textit{end} Strickler couple. The strickler coefficient couples inside a zone are interpolated from the \textit{begin} and \textit{end} couples. In our case, we will use constant coefficients per zone. Set the zones as follow:
|
Close the \textit{Strickler} window. On the \textit{Edit friction} window, add four lines with the button \includegraphics[width=0.5cm]{img/gtk_add.png} to create four friction zones. Each zone is defined by a \textit{begin} and \textit{end} KP and a \textit{begin} and \textit{end} Strickler couple. The strickler coefficient couples inside a zone are interpolated from the \textit{begin} and \textit{end} couples. In our case, we will use constant coefficients per zone. Set the zones as follow:
|
||||||
|
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\includegraphics[width=15cm]{frictions.png}
|
\includegraphics[width=15cm]{img/frictions.png}
|
||||||
\par\end{center}
|
\par\end{center}
|
||||||
|
|
||||||
|
The selected zone is highlighted in blue. Close the \textit{Edit friction} window.
|
||||||
|
|
||||||
|
|
||||||
|
\section{Model hydraulic structures}
|
||||||
|
|
||||||
|
Sometimes there can be cross-sections in which Shallow water equations can not be used to model the water flow. In that case, we have to define an other law to link the water elevation and the flow discharge. This is the case, for example, under bridges when the water elevation is too high, leading to a flow in charge. Pamhyr2 enables to define various hydraulic structures with laws that can be parametrized. In our case, a weir and two bridges have to be represented as hydraulic structures.
|
||||||
|
From the main window, click on \texttt{[Hydraulics] => [Hydraulic structures]} to open the hydraulic structures window. Click tree times on the \includegraphics[width=0.5cm]{img/gtk_add.png} button to create three hydraulic structures. Each structure can have a name and must have a reach and a KP. Set them as follow:
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/hs.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
Select the downstream weir and click on \includegraphics[width=0.5cm]{"img/edit.png"} to edit the laws of this structure. Hydraulic structures are composed of basic hydraulic structures. You can combine the laws of several basic hydraulic structures to setup your structure. For this weir, we only need a weir basic hydraulic structure. Click on \includegraphics[width=0.5cm]{img/gtk_add.png} to add a new basic hydraulic structure, give it the \textit{weir} type and set it up as folow:
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/seuil.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
Go back to the \textit{hydraulic structures} window.
|
||||||
|
|
||||||
|
Select the RS101 bridge and click on \includegraphics[width=0.5cm]{"img/edit.png"} to edit the laws of this structure. A bridge can be modeled as a combination of an orifice for the flow under the bridge and a weir for the flow over the bridge. Create two basic hydraulic structures and set them as folow:
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/seuilRS101.png}
|
||||||
|
|
||||||
|
\includegraphics[width=15cm]{img/orificeRS101.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
Go back to the \textit{hydraulic structures} window and aply the same procedure for the Thivencelle bridge:
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/orificeThivencelle.png}
|
||||||
|
|
||||||
|
\includegraphics[width=15cm]{img/seuilThivencelle.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
You can now close the \textit{hydraulic structures} windows.
|
||||||
|
|
||||||
|
\section{Solver parameters}
|
||||||
|
|
||||||
|
From the main window, click on \texttt{[Execute] => [Numerical parameters for solvers]}.
|
||||||
|
In the window \textit{solver parameters} select the \textit{Mage v8} tab. Set the solver parameters as follow:
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\includegraphics[width=15cm]{img/param.png}
|
||||||
|
\par\end{center}
|
||||||
|
|
||||||
|
Close the \textit{solver parameters} window.
|
||||||
|
|
||||||
|
\section{Run the simulation}
|
||||||
|
|
||||||
|
From the main window, click on \texttt{[Execute] => [Run solver]}.
|
||||||
|
Select \textit{Defaut-Mage - (Mage8)} anc click on the \textit{Run} button.
|
||||||
|
It will open two windows: the \textit{Check list} window and the \textit{Solver log} window.
|
||||||
|
The \textit{Check list} window gives som hints about the validity of your model, and the \textit{Solver log} window displays the outputs of the solver.
|
||||||
|
From the \textit{Solver log} window you can re-run the computation, and from the textit{Solver log} window you can click on the \textit{Results} button to open the \textit{Results} window.
|
||||||
|
|
||||||
|
\section{Visualize the results}
|
||||||
|
|
||||||
|
If you closed the \textit{Solver log} window, you can click on \texttt{[Results] => [Visualize last results]} from the main window to open the \textit{Results} window. The top lets panel let you select your reach, the bottom left panel lets you select a cross-section in that reach. the three plots on the right show the reach and the cross-section the same way than in the \textit{Geometry} window. You can use the bottom slider to visualize the water elevation at different timesteps.
|
||||||
|
To visualize the flow discharge, switch to the \textit{Hydrograph} tab.
|
||||||
|
To create custom 2D plots, click on the \includegraphics[width=0.5cm]{img/gtk_add.png} button on the top left of the window. Select the values you want on the $X$ and $Y$ axis and click on \textit{OK}.
|
||||||
|
You can now see a new tab with the custom 2D plot in the right panel of the \textit{Results} window.
|
||||||
|
|
||||||
|
|
||||||
\pagebreak{}
|
\pagebreak{}
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
@@ -4,9 +4,11 @@ PyQt5-sip==12.12.2
|
|||||||
PyQtWebEngine==5.15.6
|
PyQtWebEngine==5.15.6
|
||||||
QScintilla>=2.14.1
|
QScintilla>=2.14.1
|
||||||
pyqtgraph>=0.12.1
|
pyqtgraph>=0.12.1
|
||||||
matplotlib>=3.4.1
|
matplotlib>=3.7.1
|
||||||
numpy>=1.24.2
|
numpy>=1.24.2
|
||||||
colorama>=0.4.3
|
colorama>=0.4.3
|
||||||
pyinstaller>=5.11.0
|
pyinstaller>=5.11.0
|
||||||
shapely>=2.0.1
|
shapely>=2.0.1
|
||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
|
platformdirs>=4.2.0
|
||||||
|
pyshp>=2.3.1
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
set +x
|
||||||
|
|
||||||
|
OPTS="-r -a -i"
|
||||||
|
|
||||||
|
if [ "$1" == "builds" ]; then
|
||||||
|
FILES="../windows/ ../linux/"
|
||||||
|
else
|
||||||
|
FILES="../windows/pamhyr-windows.exe ../windows/pamhyr-windows.zip ../linux/pamhyr-gnulinux.tar.xz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
clamscan $OPTS $FILES | tee clamav.log
|
||||||
|
|
||||||
|
RES=$(cat clamav.log | grep "Infected files: 0")
|
||||||
|
if [ -z "$RES" ]; then
|
||||||
|
echo "Infected files"
|
||||||
|
exit -1
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
start cmd /c pamhyr.exe debug
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
./pamhyr debug
|
||||||
@@ -16,33 +16,35 @@ rem along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
@ECHO ON
|
@ECHO ON
|
||||||
|
|
||||||
mkdir pamhyr\pamhyr\_internal
|
mkdir pamhyr\_internal
|
||||||
xcopy /s /e /y dist\pamhyr pamhyr\pamhyr
|
xcopy /s /e /y dist\pamhyr pamhyr
|
||||||
|
|
||||||
rem Copy data
|
rem Copy data
|
||||||
mkdir pamhyr\pamhyr\_internal\lang
|
mkdir pamhyr\_internal\lang
|
||||||
mkdir pamhyr\pamhyr\_internal\View\ui\ressources
|
mkdir pamhyr\_internal\View\ui\ressources
|
||||||
mkdir pamhyr\pamhyr\_internal\View\ui\Widgets
|
mkdir pamhyr\_internal\View\ui\Widgets
|
||||||
|
|
||||||
rem UI
|
rem UI
|
||||||
copy /y ..\src\View\ui\ressources\ pamhyr\pamhyr\_internal\View\ui\ressources
|
copy /y ..\src\View\ui\ressources\ pamhyr\_internal\View\ui\ressources
|
||||||
copy /y ..\src\View\ui\Widgets\*.ui pamhyr\pamhyr\_internal\View\ui\Widgets
|
copy /y ..\src\View\ui\Widgets\*.ui pamhyr\_internal\View\ui\Widgets
|
||||||
copy /y ..\src\View\ui\*.ui pamhyr\pamhyr\_internal\View\ui\
|
copy /y ..\src\View\ui\*.ui pamhyr\_internal\View\ui\
|
||||||
|
|
||||||
rem Lang
|
rem Lang
|
||||||
copy /y ..\src\lang\*.qm pamhyr\pamhyr\_internal\lang\
|
copy /y ..\src\lang\*.qm pamhyr\_internal\lang\
|
||||||
|
|
||||||
rem Information
|
rem Information
|
||||||
copy /y ..\VERSION pamhyr\pamhyr\_internal
|
copy /y ..\VERSION pamhyr\_internal
|
||||||
copy /y ..\AUTHORS pamhyr\pamhyr\_internal
|
copy /y ..\AUTHORS pamhyr\_internal
|
||||||
copy /y ..\LICENSE pamhyr\pamhyr\_internal
|
copy /y ..\LICENSE pamhyr\_internal
|
||||||
copy /y ..\src\motd.txt pamhyr\pamhyr\_internal
|
copy /y ..\src\motd.txt pamhyr\_internal
|
||||||
|
|
||||||
rem MAGE
|
rem MAGE
|
||||||
mkdir pamhyr\mage
|
mkdir pamhyr\mage8
|
||||||
copy /y ..\mage-windows\mage.exe pamhyr\mage\
|
copy /y ..\mage8-windows\mage.exe pamhyr\mage8\
|
||||||
copy /y ..\mage-windows\mage_extraire.exe pamhyr\mage\
|
copy /y ..\mage8-windows\mage_as7.exe pamhyr\mage8\
|
||||||
copy /y ..\mage-windows\mailleurPF.exe pamhyr\mage\
|
copy /y ..\mage8-windows\mage_extraire.exe pamhyr\mage8\
|
||||||
|
copy /y ..\mage8-windows\mailleurTT.exe pamhyr\mage8\
|
||||||
|
copy /y ..\mage8-windows\libbief.dll pamhyr\mage8\
|
||||||
|
|
||||||
rem Copy tests_cases
|
rem Copy tests_cases
|
||||||
mkdir pamhyr\tests_cases
|
mkdir pamhyr\tests_cases
|
||||||
@@ -52,10 +54,24 @@ copy /y ..\tests_cases\Saar\Saar.pamhyr pamhyr\tests_cases\Saar\
|
|||||||
rem Documentations
|
rem Documentations
|
||||||
mkdir pamhyr\doc
|
mkdir pamhyr\doc
|
||||||
mkdir pamhyr\doc\images
|
mkdir pamhyr\doc\images
|
||||||
copy /y ..\doc\users\documentation.pdf pamhyr\doc\Pamhyr2-users.pdf
|
rem copy /y ..\doc\users\documentation.pdf pamhyr\doc\Pamhyr2-users.pdf
|
||||||
copy /y ..\doc\dev\documentation.pdf pamhyr\doc\Pamhyr2-dev.pdf
|
copy /y ..\doc\dev\documentation.pdf pamhyr\doc\Pamhyr2-dev.pdf
|
||||||
copy /y ..\doc\users\documentation.html pamhyr\doc\Pamhyr2-users.html
|
copy /y ..\doc\mage8.pdf pamhyr\doc\mage8.pdf
|
||||||
|
rem copy /y ..\doc\users\documentation.html pamhyr\doc\Pamhyr2-users.html
|
||||||
copy /y ..\doc\dev\documentation.html pamhyr\doc\Pamhyr2-dev.html
|
copy /y ..\doc\dev\documentation.html pamhyr\doc\Pamhyr2-dev.html
|
||||||
copy /y ..\doc\users\images\* pamhyr\doc\images
|
copy /y ..\doc\users\images\* pamhyr\doc\images
|
||||||
copy /y ..\doc\dev\images\* pamhyr\doc\images
|
copy /y ..\doc\dev\images\* pamhyr\doc\images
|
||||||
copy /y ..\doc\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\
|
||||||
|
|
||||||
|
rem TP charriage
|
||||||
|
mkdir pamhyr\doc\TP_charriage
|
||||||
|
copy /y ..\doc\users\TP_charriage\ pamhyr\doc\TP_charriage
|
||||||
@@ -3,9 +3,10 @@
|
|||||||
!define LIC_NAME "LICENSE"
|
!define LIC_NAME "LICENSE"
|
||||||
!define APP_NAME "PAMHYR"
|
!define APP_NAME "PAMHYR"
|
||||||
|
|
||||||
|
Icon "pamhyr\_internal\View\ui\ressources\icon.ico"
|
||||||
Name "Pamhyr2"
|
Name "Pamhyr2"
|
||||||
OutFile "pamhyr-windows.exe"
|
OutFile "pamhyr-windows.exe"
|
||||||
LicenseData "pamhyr\pamhyr\_internal\LICENSE"
|
LicenseData "pamhyr\_internal\LICENSE"
|
||||||
LicenseText "I Agree"
|
LicenseText "I Agree"
|
||||||
|
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
@@ -41,12 +42,12 @@ SectionEnd
|
|||||||
Section "Start Menu Shortcuts"
|
Section "Start Menu Shortcuts"
|
||||||
CreateDirectory "$SMPROGRAMS\Pamhyr2"
|
CreateDirectory "$SMPROGRAMS\Pamhyr2"
|
||||||
CreateShortcut "$SMPROGRAMS\Pamhyr2\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
CreateShortcut "$SMPROGRAMS\Pamhyr2\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
CreateShortcut "$SMPROGRAMS\Pamhyr2\Pamhyr2.lnk" "$INSTDIR\pamhyr\pamhyr.exe"
|
CreateShortcut "$SMPROGRAMS\Pamhyr2\Pamhyr2.lnk" "$INSTDIR\pamhyr.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Desktop Shortcuts"
|
Section "Desktop Shortcuts"
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
CreateShortcut "$desktop\Pamhyr2.lnk" "$instdir\pamhyr\pamhyr.exe"
|
CreateShortcut "$desktop\Pamhyr2.lnk" "$instdir\pamhyr.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ PyQt5-sip==12.12.2
|
|||||||
#PyQtWebEngine==5.15.6
|
#PyQtWebEngine==5.15.6
|
||||||
QScintilla>=2.14.1
|
QScintilla>=2.14.1
|
||||||
pyqtgraph>=0.12.1
|
pyqtgraph>=0.12.1
|
||||||
matplotlib>=3.4.1
|
matplotlib>=3.7.1
|
||||||
numpy>=1.24.2
|
numpy>=1.24.2
|
||||||
colorama>=0.4.3
|
colorama>=0.4.3
|
||||||
pyinstaller>=5.11.0
|
pyinstaller>=5.11.0
|
||||||
shapely>=2.0.1
|
shapely>=2.0.1
|
||||||
lxml>=4.9.3
|
lxml>=4.9.3
|
||||||
|
platformdirs>=4.2.0
|
||||||
|
pyshp>=2.3.1
|
||||||