diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ccd95cd869bde1b5354d7762b0f0ff996370d7e8..af628beb20ce721ffc5427dc169bd9201ad789d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,7 @@ test: expire_in: 10 min paths: - dist/ + - build script: # -baseref option is used by npm to set the npm_config_basehref environment variable # used in package.json diff --git a/CHANGELOG.md b/CHANGELOG.md index d8da44a7af79528ce1578304d2b6bf3eaad27714..a991b34132919c9c09b514fc5dca8489c9f32381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ * Clean npm dependencies ([jalhyd#356](https://forgemia.inra.fr/cassiopee/jalhyd/-/issues/356)) * CI: automatically publish jalhyd package on NPM ([jalhyd#359](https://forgemia.inra.fr/cassiopee/jalhyd/-/issues/359)) -### 4\.17.1 - 2023-11-20 +### 4.17.1 - 2023-11-20 #### Correction de bogues @@ -48,7 +48,7 @@ * CI: change cache strategy for node modules ([jalhyd#358](https://forgemia.inra.fr/cassiopee/jalhyd/-/issues/358), [nghyd#630](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/630)) -### 4\.17.0 - 2023-05-30 +### 4.17.0 - 2023-05-30 #### Nouvelles fonctionnalités @@ -111,13 +111,13 @@ * Tests E2E: Vérifier la cohérence entre le json de description des calculettes et le flag visible des paramètres ([nghyd#550](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/550)) * Thème Angular Material personnalisé : avertissements dart-sass à la compilation ([nghyd#414](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/414)) -### 4\.16.3 - 2023-01-11 +### 4.16.3 - 2023-01-11 #### Correction de bogues * Lechapt et Calmon : erreur de sélection de matériau ([jalhyd#337](https://forgemia.inra.fr/cassiopee/jalhyd/-/issues/337), [nghyd#589](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/589)) -### 4\.16.1 - 2022-11-16 +### 4.16.1 - 2022-11-16 #### Correction de bogues @@ -129,7 +129,7 @@ * Rajouter François Grand comme auteur de la documentation PDF ([nghyd#573](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/573)) * Ajouter les références pour les schémas des lois d'ouvrages ([nghyd#575](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/575)) -### 4\.16.0 - 2022-10-12 (Anguilla anguilla) +### 4.16.0 - 2022-10-12 (Anguilla anguilla) #### Nouvelles fonctionnalités @@ -173,7 +173,7 @@ * Mise à jour de Chartjs ([nghyd#554](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/554)) * MAJ vers PrimeNG 10 ([nghyd#481](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/481)) -### 4\.15.1 - 2022-07-04 +### 4.15.1 - 2022-07-04 #### Nouvelles fonctionnalités @@ -212,7 +212,7 @@ * Path error in stable deployment version on the dev server [nghyd#540](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/540) -### 4\.15.0 - 2022-05-04 (Salmo trutta) +### 4.15.0 - 2022-05-04 (Salmo trutta) #### Nouvelles fonctionnalités @@ -251,7 +251,7 @@ * CI : les jobs build en schedule de master et devel plantent ([nghyd#527](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/527)) * CI : affiner la gestion du cache ([nghyd#526](https://forgemia.inra.fr/cassiopee/nghyd/-/issues/526)) -### 4\.14.2 - 2021-03-25 +### 4.14.2 - 2021-03-25 #### Nouvelles fonctionnalités @@ -266,7 +266,7 @@ * Macrorugo : Documentation de Cd0 avec schéma ([nghyd#492](https://forgemia.inra.fr/cassiopee/nghyd/issues/492)) -### 4\.14.1 - 2021-02-17 +### 4.14.1 - 2021-02-17 #### Nouvelles fonctionnalités @@ -276,7 +276,7 @@ * Vérificateur de passe: message erroné pour les passes à macro-rugosités submergées ([jalhyd#292](https://forgemia.inra.fr/cassiopee/jalhyd/issues/292)) -### 4\.14.0 - 2021-02-16 (Scomber scombrus) +### 4.14.0 - 2021-02-16 (Scomber scombrus) #### Nouvelles fonctionnalités @@ -299,7 +299,7 @@ * MacroRugo: erreur de formule de correction de Cd dans la documentation ([nghyd#488](https://forgemia.inra.fr/cassiopee/nghyd/issues/488)) * Documentation du module de calcul de la cote amont / aval d'un bief ([nghyd#490](https://forgemia.inra.fr/cassiopee/nghyd/issues/490)) -### 4\.13.1 - 2020-10-02 +### 4.13.1 - 2020-10-02 #### Correction de bogues @@ -307,7 +307,7 @@ * PreBarrage: erreur de calcul sur Z2 > Z1 initiale ([jalhyd#280](https://forgemia.inra.fr/cassiopee/jalhyd/issues/280)) * Prebarrage : avec Chrome (et electron) le schéma est mal rendu ([nghyd#482](https://forgemia.inra.fr/cassiopee/nghyd/issues/482)) -### 4\.13.0 - 2020-09-24 (Michel Larinier) +### 4.13.0 - 2020-09-24 (Michel Larinier) #### Nouvelles fonctionnalités @@ -328,7 +328,7 @@ * Aide du Jet / de la pente : mentionner l'inversion de la pente pour le module Jet ([nghyd#475](https://forgemia.inra.fr/cassiopee/nghyd/issues/475)) * Ajouter à l'accueil de la documentation un chapitre "contact, bugs, remarques…" ([nghyd#472](https://forgemia.inra.fr/cassiopee/nghyd/issues/472)) -### 4\.12.1 - 2020-09-15 +### 4.12.1 - 2020-09-15 #### Correction de bogues @@ -342,7 +342,7 @@ * Lechapt-Calmon : documentation du coefficient de pertes de charges singulières ([nghyd#338](https://forgemia.inra.fr/cassiopee/nghyd/issues/338)) -### 4\.12.0 - 2020-09-09 (Les critères de Francis Blanche − ils peuvent le faire !) +### 4.12.0 - 2020-09-09 (Les critères de Francis Blanche - ils peuvent le faire !) #### Nouvelles fonctionnalités @@ -380,7 +380,7 @@ * Electron 10 * Mathjax 3 ([nghyd#416](https://forgemia.inra.fr/cassiopee/nghyd/issues/416)) -### 4\.11.1 - 2020-08-11 +### 4.11.1 - 2020-08-11 #### Nouvelles fonctionnalités @@ -397,7 +397,7 @@ * Mise à jour de la documentation de la loi de Cunge ([nghyd#441](https://forgemia.inra.fr/cassiopee/nghyd/issues/441)) -### 4\.11.0 - 2020-07-28 (Puisque tu PAR) +### 4.11.0 - 2020-07-28 (Puisque tu PAR) #### Nouvelles fonctionnalités @@ -419,7 +419,7 @@ * Passes à ralentisseurs ([nghyd#398](https://forgemia.inra.fr/cassiopee/nghyd/issues/398)) -### 4\.10.6 - 2020-07-21 +### 4.10.6 - 2020-07-21 #### Nouvelles fonctionnalités @@ -435,7 +435,7 @@ * Erreur dans l'équation de Cunge * Corrections mineures sur Vanne Dénoyée -### 4\.10.5 - 2020-06-30 +### 4.10.5 - 2020-06-30 #### Nouvelles fonctionnalités @@ -462,7 +462,7 @@ * Documentation de la loi Cunge80 ([nghyd#403](https://forgemia.inra.fr/cassiopee/nghyd/issues/403)) * Documentation des grilles: il manque la définition des variables ([nghyd#401](https://forgemia.inra.fr/cassiopee/nghyd/issues/401)) -### 4\.10.4 - 2020-04-17 +### 4.10.4 - 2020-04-17 #### Nouvelles fonctionnalités @@ -486,7 +486,7 @@ * Fusionner "Section paramétrée" et "Variables hydrauliques" ([nghyd#390](https://forgemia.inra.fr/cassiopee/nghyd/issues/390)) * Sections : documentation du champ Hauteur de berge -### 4\.10.3 - 2020-03-12 +### 4.10.3 - 2020-03-12 #### Nouvelles fonctionnalités @@ -510,7 +510,7 @@ * Section Paramétrée : tableau de résultats fixes en plusieurs exemplaires lors de l'utilisation avec le Solveur ([nghyd#377](https://forgemia.inra.fr/cassiopee/nghyd/issues/377)) * Bief : calcul des sections amont et aval ([nghyd#376](https://forgemia.inra.fr/cassiopee/nghyd/issues/376)) -### 4\.10.2 - 2020-02-25 +### 4.10.2 - 2020-02-25 #### Correction de bogues @@ -520,13 +520,13 @@ * Documentation : ajout de liens vers la page de téléchargement -### 4\.10.1 - 2020-02-25 +### 4.10.1 - 2020-02-25 #### Correction de bogues * Electron : erreur de détection de mise à jour (comparaison chaînes semver) -### 4\.10.0 - 2020-02-24 (Langue Hilare Neuve) +### 4.10.0 - 2020-02-24 (Langue Hilare Neuve) #### Nouvelles fonctionnalités @@ -556,7 +556,7 @@ * Typescript 3.7 ([jalhyd#197](https://forgemia.inra.fr/cassiopee/jalhyd/issues/197)) * mise à jour de toutes les dépendances jalhyd/nghyd sauf Mermaid (provoque un bug) et Mathjax (adaptations importantes nécessaires) -### 4\.9.0 - 2020-01-15 (On Fusionne Bien) +### 4.9.0 - 2020-01-15 (On Fusionne Bien) #### Nouvelles fonctionnalités @@ -578,7 +578,7 @@ * Jasmine 3.5 * Karma 4.4 -### 4\.8.1 - 2019-12-20 +### 4.8.1 - 2019-12-20 #### Nouvelles fonctionnalités @@ -612,7 +612,7 @@ * Grille: Pas d'invalidation des résultats sur le choix du profil des barreaux ([nghyd#335](https://forgemia.inra.fr/cassiopee/nghyd/issues/335)) * MacroRugoCompound: radier incliné - changer la répartition des cellules ([jalhyd#173](https://forgemia.inra.fr/cassiopee/jalhyd/issues/173)) -### 4\.8.0 - 2019-11-26 (Affine et forte à la fois, par amour du remous) +### 4.8.0 - 2019-11-26 (Affine et forte à la fois, par amour du remous) #### Nouvelles fonctionnalités @@ -632,7 +632,7 @@ * Remous : en fluvial uniquement avec forte pente, les abscisses sont fausses ([nghyd#328](https://forgemia.inra.fr/cassiopee/nghyd/issues/328)) * Calcul en chaîne : ERR inopiné dans le tableau de résultats fixes ([nghyd#329](https://forgemia.inra.fr/cassiopee/nghyd/issues/329)) -### 4\.7.0 - 2019-10-29 (AGB - Agence Grolandaise pour la Biodiversité) +### 4.7.0 - 2019-10-29 (AGB - Agence Grolandaise pour la Biodiversité) #### Nouvelles fonctionnalités @@ -654,7 +654,7 @@ * chartjs-plugin-zoom 0.7.4 -### 4\.6.1 - 2019-10-15 +### 4.6.1 - 2019-10-15 #### Nouvelles fonctionnalités @@ -665,7 +665,7 @@ * chartjs-plugin-zoom 0.7.4 -### 4\.6.0 - 2019-10-14 (Bluefish délavé) +### 4.6.0 - 2019-10-14 (Bluefish délavé) #### Nouvelles fonctionnalités @@ -703,7 +703,7 @@ * ngx-markdown 8.2.1 * electron 6.0.10 -### 4\.5.0 - 2019-09-09 (Fish ramps that rock!) +### 4.5.0 - 2019-09-09 (Fish ramps that rock!) #### Nouvelles fonctionnalités @@ -726,7 +726,7 @@ * Passe à bassins: il manque l'édition de la cote de radier de la cloison aval ([nghyd#277](https://forgemia.inra.fr/cassiopee/nghyd/issues/277)) * Résultats fixés: l'unité des paramètres calculés n'est pas affichée ([nghyd#274](https://forgemia.inra.fr/cassiopee/nghyd/issues/274)) -### 4\.4.2 - 2019-08-06 +### 4.4.2 - 2019-08-06 #### Nouvelles fonctionnalités @@ -749,7 +749,7 @@ * Graphiques : ne pas représenter les données de type ENUM ([nghyd#260](https://forgemia.inra.fr/cassiopee/nghyd/issues/260)) * Remous : l'itérateur d'abscisses est en retard sur le dessin du graphe ([nghyd#267](https://forgemia.inra.fr/cassiopee/nghyd/issues/267)) -### 4\.4.1 - 2019-07-30 +### 4.4.1 - 2019-07-30 #### Nouvelles fonctionnalités @@ -780,7 +780,7 @@ * Angular 8.1.2 -### 4\.4.0 - 2019-07-16 (Basse à Sapins) +### 4.4.0 - 2019-07-16 (Basse à Sapins) #### Nouvelles fonctionnalités @@ -814,7 +814,7 @@ * Nettoyage de code * Limitation de la précision numérique à différents endroits -### 4\.3.0 - 2019-04-12 (Éditions LLL) +### 4.3.0 - 2019-04-12 (Éditions LLL) #### Nouvelles fonctionnalités @@ -835,7 +835,7 @@ * Mise à jour intempestive des paramètres calculés dans le formulaire de saisie * Précision d'affichage des données dans les infobulles -### 4\.2.0 - 2019-03-11 +### 4.2.0 - 2019-03-11 #### Nouvelles fonctionnalités @@ -864,7 +864,7 @@ * conservation du type de graphe lorsqu'on change de module * ajout de tests exhaustifs sur le calcul des paramètres et le clonage des modules -### 4\.1.0 - 2019-02-20 +### 4.1.0 - 2019-02-20 #### Nouvelles fonctionnalités @@ -903,4 +903,4 @@ * suppression de MDBootstrap * suppression de FontAwesome -### 4\.0.0 - 2018-07-23 \ No newline at end of file +### 4.0.0 - 2018-07-23 \ No newline at end of file diff --git a/docs/en/calculators/hyd_en_charge/lechapt-calmon.md b/docs/en/calculators/hyd_en_charge/lechapt-calmon.md index ba97396cb5fa2362d01c04983159eab37b4bbd6d..43c88ff2deca9c4b98baf679cb642f26543e3f86 100644 --- a/docs/en/calculators/hyd_en_charge/lechapt-calmon.md +++ b/docs/en/calculators/hyd_en_charge/lechapt-calmon.md @@ -44,16 +44,3 @@ The correlation table of the coefficients is as follows: | Hydraulically smooth pipe - 0.25 ≤ D ≤ 1 | 0.00 | 0.971 | 1.81 | 4.81 | Table: Materials and coefficients used in the Lechapt and Calmon formula - -## Singular head loss - -$$ J_S = K_S \frac{V^2}{2g}$$ - -With: - -- \(K_S\) : singular head loss coefficient -- \(V\) : water speed in the pipe (\(V = 4 Q / \pi / D^2\)) - -## Darcy's head loss coefficient - -$$ f_D = \frac{2g J D}{l_T V^2} diff --git a/docs/en/calculators/pab/pab.md b/docs/en/calculators/pab/pab.md index 10fc6c48202adb0401242a2baa4e2e0e2379f104..39205ef5aa2c48a6ef4f52e35335a4554e27caf0 100644 --- a/docs/en/calculators/pab/pab.md +++ b/docs/en/calculators/pab/pab.md @@ -77,7 +77,9 @@ During the calculation, if the calculated crest elevation is less than *minZDV* ## Calculation results -The results are presented in the form of a summary table of hydraulic calculations for all basins and walls. It contains all the data calculated by the modules [Cross walls](cloisons.md) and [Power dissipation](volume.md). +The results are presented in the form of a summary table of hydraulic +calculations for all basins and walls. It contains all the data calculated +by the modules [Cross walls](cloisons.md) and [Power dissipation](volume.md). Two graphs are present: @@ -89,5 +91,4 @@ If several results are available due to the variation of one or two hydraulic pa ## Example session An example illustrating the conception of a fish ladder can be directly loaded -at the address: -https://cassiopee.g-eau.fr/#/loadsession/app%2Fexamples%2Fpab-complete-chain.json +through this [link](https://cassiopee.g-eau.fr/#/loadsession/app%2Fexamples%2Fpab-complete-chain.json). diff --git a/docs/en/calculators/pam/macrorugo_remous.md b/docs/en/calculators/pam/macrorugo_remous.md index 7d260dbd971dadf3eda65b7953a910c96ae45450..acfd62227f647e252ff3df74fbe630116769e9cf 100644 --- a/docs/en/calculators/pam/macrorugo_remous.md +++ b/docs/en/calculators/pam/macrorugo_remous.md @@ -15,7 +15,7 @@ calculation - The space step used to discretise the curve calculation. N.B. : As the backwater curve can only be calculated for one set of -parameters, the [simple rock-ramp fishpass] module (macrorugo.md) +parameters, the [simple rock-ramp fishpass](macrorugo.md) module cannot contain [varied parameters](../../general/principe_fonctionnement.md). The theoretical calculation carried out in the macro-roughness channel diff --git a/docs/en/calculators/pam/macrorugo_theorie.md b/docs/en/calculators/pam/macrorugo_theorie.md index ba7b9845e9639c7ccd4696f78fe2a6670efff8d3..5ea81ee43250a3a1b91c4b9f521f6acde67a5066 100644 --- a/docs/en/calculators/pam/macrorugo_theorie.md +++ b/docs/en/calculators/pam/macrorugo_theorie.md @@ -146,7 +146,7 @@ For the cylindrical form of the blocks, \(\sigma\) is equal to \(\pi / 4\) and f ### Ratio between the average speed downstream of a block and the maximum speed *r* -The values of (\r\) depends on the block shapes (Cassan et al., 2014[^2] et Tran et al. 2016 [^3]): +The values of \(r\) depends on the block shapes (Cassan et al., 2014[^2] et Tran et al. 2016 [^3]): - round : \(r_Q=1.1\) - "rounded face" shape : \(r=1.2\) @@ -240,4 +240,4 @@ $$C_f = \frac{2}{(5.1 \mathrm{log} (h/k_s)+6)^2}$$ [^4]: Larinier, Michel, Courret, D., Gomes, P., 2006. Guide technique pour la conception des passes à poissons “naturelles,†Rapport GHAPPE RA. Compagnie Nationale du Rhône / Agence de l’Eau Adour Garonne. http://dx.doi.org/10.13140/RG.2.1.1834.8562 -[^5]: Rice C. E., Kadavy K. C., et Robinson K. M., 1998. Roughness of Loose Rock Riprap on Steep Slopes. Journal of Hydraulic Engineering 124, 179‑85. https://doi.org/10.1061/(ASCE)0733-9429(1998)124:2(179) +[^5]: Rice C. E., Kadavy K. C., et Robinson K. M., 1998. Roughness of Loose Rock Riprap on Steep Slopes. Journal of Hydraulic Engineering 124, 179-85. https://doi.org/10.1061/(ASCE)0733-9429(1998)124:2(179) diff --git a/docs/en/calculators/structures/cem_88_d.md b/docs/en/calculators/structures/cem_88_d.md index 1937778a3153a840970ab855fbb14a7fa645bcb2..84de84900dc111f10000437fbbf25d59249b49d3 100644 --- a/docs/en/calculators/structures/cem_88_d.md +++ b/docs/en/calculators/structures/cem_88_d.md @@ -12,7 +12,7 @@ Classical formulation of the free flow weir (\(\mu_F \simeq 0.4\)). ## Weir - submerged flow (\(h_1 < W\) and \(h_2 \geq \frac{2}{3} h_1\)) -\(Q = \mu_S L \sqrt{2g} (h_1-h_2)^{1/2} h_2\) +$$Q = \mu_S L \sqrt{2g} (h_1-h_2)^{1/2} h_2$$ Classical formulation of the submerged weir. @@ -51,8 +51,7 @@ There are two formulations depending on whether the orifice is partially submerg ### Totally submerged flow (\(h_1 \geq W\) and \(\frac{2}{3} h_1 + \frac{W}{3} < h_2\)) -\(Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} \left[ h_2 - (h_2 - W) \right] -\Rightarrow Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} W\) +$$Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} \left[ h_2 - (h_2 - W) \right] \Rightarrow Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} W$$ Classical formulation of submerged orifices, with \(\mu' = \mu_S\). diff --git a/docs/en/calculators/structures/fente_noyee.md b/docs/en/calculators/structures/fente_noyee.md index b7a3fac759ee81fd2ca78d53618edebf6fa1f645..4aed854eac6ff9ce2604ba5771911fc71594d1fe 100644 --- a/docs/en/calculators/structures/fente_noyee.md +++ b/docs/en/calculators/structures/fente_noyee.md @@ -44,6 +44,6 @@ Ballu A., Pineau G., Calluaud D., David L. (2015). Experimental study of the inf Ballu A. (2017). Étude numérique et expérimentale de l’écoulement turbulent au sein des passes à poissons à fentes verticales. Analyse de l’écoulement tridimensionnel et instationnaire. *Thèse de l’Université de Poitiers*, 223p. -Ballu A., Calluaud D., Pineau G., david L. (2017). Experimental study of the influence of macro‑roughnesses on vertical slot fishway flows. *La Houille Blanche*, 2: 9-14. +Ballu A., Calluaud D., Pineau G., david L. (2017). Experimental study of the influence of macro-roughnesses on vertical slot fishway flows. *La Houille Blanche*, 2: 9-14. -Wang R.W., David L., Larinier M. (2010). Contribution of experimental fluid mechanics to the design of vertical slot ï¬sh passes. *Knowledge and Management of Aquatic Ecosystems*, 396(2). +Wang R.W., David L., Larinier M. (2010). Contribution of experimental fluid mechanics to the design of vertical slot ï¬sh passes. *Knowledge and Management of Aquatic Ecosystems*, 396(2). diff --git a/docs/en/calculators/structures/kivi.md b/docs/en/calculators/structures/kivi.md index 5e18dea5931dbdf8cd285fe66a4d2118d6fdcfc8..5e32fc83e9923819471306ebf4dea7777cc679e5 100644 --- a/docs/en/calculators/structures/kivi.md +++ b/docs/en/calculators/structures/kivi.md @@ -39,6 +39,7 @@ Villemonte proposes the following formula: $$K = \frac{Q_{submerged}}{Q_{free}} = \left [ 1- \left ( \frac{h2}{h1} \right)^n \right]^{0.385}$$ With: + - \(h_1\) the upstream water level above the weir crest - \(h_2\) the downstream water level above the weir crest - \(n\) the exponent in free flow relationships (rectangular=1.5, triangular=2.5, parabolic=2) diff --git a/docs/en/calculators/structures/liste.md b/docs/en/calculators/structures/liste.md index 427be1e3f328a61fdd0ac4c0200be987db8a770f..59ee1a21f8f11e4184ebb894651bcca8bf3df1e3 100644 --- a/docs/en/calculators/structures/liste.md +++ b/docs/en/calculators/structures/liste.md @@ -5,7 +5,7 @@ | Weir | Rectangular | Sharp-crested weir (notch) | Free | [Poleni](./seuil_denoye.md) | 0.4 | Parallel structures, free flow weir stage-discharge laws | | | | Sharp-crested weir (slot) | Submerged | [Rajaratnam](./seuil_noye.md) | 0.9 | Parallel structures | | | | Sharp-crested weir (slot) | Submerged | [Larinier slot](./fente_noyee.md) | to be defined by designer | Parallel structures, cross walls, downwall | -| | | Sharp-crested weir (notch) | Submerged / free | [Kindsvater-Carter & Villemonte](./kivi.md) | ⺠= 0.4; ß = 0.001 | Parallel structures | +| | | Sharp-crested weir (notch) | Submerged / free | [Kindsvater-Carter & Villemonte](./kivi.md) | α = 0.4; ß = 0.001 | Parallel structures | | | | Sharp-crested weir (notch) | Submerged / free | [Villemonte](./villemonte_1947.md) | 0.4 | Parallel structures, cross walls, downwall | | | | Sharp-crested regulated weir (notch) | Submerged / free | [Villemonte](./villemonte_1947.md) | 0.4 | Downwall | | | | Sharp-crested regulated weir (slot) | Submerged | [Larinier slot](./fente_noyee.md) | To be defined by designer | Downwall | @@ -22,20 +22,22 @@ Table: Stage-discharge equations list -## Sharp-crested or broad-crested weir ? +## Sharp-crested or broad-crested weir? Extract from CETMEF, 2005. Note on weirs : synthesis of flow laws at the right of weirs and spillways. Centre d'Études Techniques Maritimes Et Fluviales, Compiègne. -> The type of weir is related to the flow at the right of the structure. -> -> Indeed, the more the breadth of the crest of the weir is negligible compared to the upstream water height above it, the more the weir appears transparent to the flow and thus the sharper the crest of the weir appears. +> The type of weir is related to the flow at the right of the structure. +> +> Indeed, the more the breadth of the crest of the weir is negligible compared to the upstream water height above it, the more the weir appears transparent to the flow and thus the sharper the crest of the weir appears. +> +> On the other hand, the closer the upstream water line is to the weir crest, the greater the width of the weir appears in relation to the breadth of the water flowing over it and therefore the broader the weir crest appears. +> A weir in a river thus belongs to one of the three following categories: > -> On the other hand, the closer the upstream water line is to the weir crest, the greater the width of the weir appears in relation to the breadth of the water flowing over it and therefore the broader the weir crest appears. -> A weir in a river thus belongs to one of the three following categories: > - sharp-crested weir > - broad-crested weir -> - weir with undefined crest +> - weir with undefined crest > > In order to determine the type of weir studied, the following conditions must be verified: +> > - if $C < \frac{H_1}{2}$, then the threshold is sharp-crested; > - if $C > \frac{2H_1}{3}$, then the threshold is broad-crested. diff --git a/docs/en/index.md b/docs/en/index.md index 1fb2aeaebb2da5d5823f02518674d807e8758603..0134dcbe13847933665ae6959758373c4bbc51be 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -19,7 +19,7 @@ Offline versions are available for the Windows, Linux, macOS, Android platforms. ## Documentation -Download [documentation in PDF format](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_doc_en.pdf) +Download [documentation in PDF format](../pdf/cassiopee_doc_en.pdf) Download [illustrated quick start guide (in french) in PDF format](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf) diff --git a/docs/fr/calculators/pab/pab.md b/docs/fr/calculators/pab/pab.md index b1f99c72d0ae5ca4ce597f5038a4fb1145878f5c..0a4833e0aa2bc53a75e63f8c09f436e088ee9e62 100644 --- a/docs/fr/calculators/pab/pab.md +++ b/docs/fr/calculators/pab/pab.md @@ -88,5 +88,5 @@ Si plusieurs résultats sont disponibles du fait de la variation d'un ou deux pa ## Session exemple -Un exemple de conception de passe à bassins peut être directement chargée à l'adresse : -https://cassiopee.g-eau.fr/#/loadsession/app%2Fexamples%2Fpab-complete-chain.json +Un exemple de conception de passe à bassins peut être directement chargée via ce +[lien](https://cassiopee.g-eau.fr/#/loadsession/app%2Fexamples%2Fpab-complete-chain.json). diff --git a/docs/fr/calculators/pab/prebarrage.md b/docs/fr/calculators/pab/prebarrage.md index d56604d6f46bcf2aa5c4d9a5cb208f906d24a1ab..291eb4cf0029c461a0d555a5f74a88f4a82ad4d1 100644 --- a/docs/fr/calculators/pab/prebarrage.md +++ b/docs/fr/calculators/pab/prebarrage.md @@ -41,4 +41,4 @@ Si le calcul produit une série de résultats, une liste déroulante permet de c La première partie de l'écran montre un synoptique du pré-barrage avec les débits et les chutes au niveau des cloisons, la puissance moyenne dissipée et la profondeur moyenne au niveau des bassins, et le débit et les cotes de l'eau aux conditions limites amont et aval. Pour afficher les résultats chiffrés au niveau des bassins, l'utilisateur doit cliquer sur un des ces éléments sur le schéma. Pour afficher les résultats chiffrés au niveau d'une cloison, cliquer sur la cloison correspondante sur le schéma. -Un bouton "Exporter tous les résultats" permet de récupérer un tableau au format Excel comprenant les résultats des conditions limites, des bassins et des cloisons pour toute la série de calcul. \ No newline at end of file +Un bouton "Exporter tous les résultats" permet de récupérer un tableau au format Excel comprenant les résultats des conditions limites, des bassins et des cloisons pour toute la série de calcul. diff --git a/docs/fr/calculators/pam/macrorugo_theorie.md b/docs/fr/calculators/pam/macrorugo_theorie.md index 4af8407882cfc6d6962b08ef66e4665f45080694..de028e450c2c590157363a56416e01f09b557bdf 100644 --- a/docs/fr/calculators/pam/macrorugo_theorie.md +++ b/docs/fr/calculators/pam/macrorugo_theorie.md @@ -237,4 +237,4 @@ $$C_f = \frac{2}{(5.1 \mathrm{log} (h/k_s)+6)^2}$$ [^4]: Larinier, Michel, Courret, D., Gomes, P., 2006. Guide technique pour la conception des passes à poissons “naturelles,†Rapport GHAPPE RA. Compagnie Nationale du Rhône / Agence de l’Eau Adour Garonne. http://dx.doi.org/10.13140/RG.2.1.1834.8562 -[^5]: Rice C. E., Kadavy K. C., et Robinson K. M., 1998. Roughness of Loose Rock Riprap on Steep Slopes. Journal of Hydraulic Engineering 124, 179‑85. https://doi.org/10.1061/(ASCE)0733-9429(1998)124:2(179) +[^5]: Rice C. E., Kadavy K. C., et Robinson K. M., 1998. Roughness of Loose Rock Riprap on Steep Slopes. Journal of Hydraulic Engineering 124, 179-85. https://doi.org/10.1061/(ASCE)0733-9429(1998)124:2(179) diff --git a/docs/fr/calculators/structures/cem_88_d.md b/docs/fr/calculators/structures/cem_88_d.md index 9d5d6fdf414d9415a4c142bc7db5bd964b937c60..8f40ee2921e07a252aadc85990b135bb2859658f 100644 --- a/docs/fr/calculators/structures/cem_88_d.md +++ b/docs/fr/calculators/structures/cem_88_d.md @@ -12,7 +12,7 @@ Formulation classique du déversoir dénoyé (\(\mu_F \simeq 0.4\)). ## Déversoir - régime noyé (\(h_1 < W\) et \(h_2 \geq \frac{2}{3} h_1\)) -\(Q = \mu_S L \sqrt{2g} (h_1-h_2)^{1/2} h_2\) +$$Q = \mu_S L \sqrt{2g} (h_1-h_2)^{1/2} h_2$$ Formulation classique du déversoir noyé. @@ -51,8 +51,7 @@ Il existe deux formulations suivant que l’on est partiellement noyé ou totale ### Régime totalement noyé (\(h_1 \geq W\) et \(\frac{2}{3} h_1 + \frac{W}{3} < h_2\)) -\(Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} \left[ h_2 - (h_2 - W) \right] -\Rightarrow Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} W\) +$$Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} \left[ h_2 - (h_2 - W) \right] \Rightarrow Q = \mu' L \sqrt{2g} (h_1-h_2)^{1/2} W$$ Formulation classique des orifices noyés, avec \(\mu' = \mu_S\). diff --git a/docs/fr/calculators/structures/fente_noyee.md b/docs/fr/calculators/structures/fente_noyee.md index b31bdfb8ccdfa6c104a2416ae0a91780abd51c87..846a6aea6f81c7d578579edd2702568d872fca4c 100644 --- a/docs/fr/calculators/structures/fente_noyee.md +++ b/docs/fr/calculators/structures/fente_noyee.md @@ -44,6 +44,6 @@ Ballu A., Pineau G., Calluaud D., David L. (2015). Experimental study of the inf Ballu A. (2017). Étude numérique et expérimentale de l’écoulement turbulent au sein des passes à poissons à fentes verticales. Analyse de l’écoulement tridimensionnel et instationnaire. *Thèse de l’Université de Poitiers*, 223p. -Ballu A., Calluaud D., Pineau G., david L. (2017). Experimental study of the influence of macro‑roughnesses on vertical slot fishway flows. *La Houille Blanche*, 2: 9-14. +Ballu A., Calluaud D., Pineau G., david L. (2017). Experimental study of the influence of macro-roughnesses on vertical slot fishway flows. *La Houille Blanche*, 2: 9-14. -Wang R.W., David L., Larinier M. (2010). Contribution of experimental fluid mechanics to the design of vertical slot ï¬sh passes. *Knowledge and Management of Aquatic Ecosystems*, 396(2). +Wang R.W., David L., Larinier M. (2010). Contribution of experimental fluid mechanics to the design of vertical slot ï¬sh passes. *Knowledge and Management of Aquatic Ecosystems*, 396(2). diff --git a/docs/fr/calculators/structures/kivi.md b/docs/fr/calculators/structures/kivi.md index 362200179bc0f22d60fe3c60836d45c1528dd302..4c190a36d0539ce2bf5a05a33ec9ad3d1c77594d 100644 --- a/docs/fr/calculators/structures/kivi.md +++ b/docs/fr/calculators/structures/kivi.md @@ -36,9 +36,10 @@ Pour une cote de l'eau aval supérieure à la cote de la crête du déversoir, l Villemonte propose la formule suivante : -$$K = \frac{Q_{noyé}}{Q_{dénoyé}} = \left [ 1- \left ( \frac{h2}{h1} \right)^n \right]^{0.385}$$ +$$K = \frac{Q_{noy\acute{e}}}{Q_{d\acute{e}noy\acute{e}}} = \left [ 1- \left ( \frac{h2}{h1} \right)^n \right]^{0.385}$$ Avec : + - \(h_1\)la hauteur d'eau amont au dessus de la crête du déversoir - \(h_2\)la hauteur d'eau aval au dessus de la crête du déversoir - \(n\)l'exposant dans les relations d'écoulement dénoyé (rectangulaire=1.5, triangulaire=2.5, parabolique=2) diff --git a/docs/fr/calculators/structures/liste.md b/docs/fr/calculators/structures/liste.md index c0c942d4d3b6577940c90e158bbcce3767ab8cf3..29f05d56bbc78be5ed740f678f68d67b3ef4bc1a 100644 --- a/docs/fr/calculators/structures/liste.md +++ b/docs/fr/calculators/structures/liste.md @@ -5,7 +5,7 @@ | Seuil déversant à surface libre | Rectangulaire | Seuil mince (échancrure) | Dénoyé | [Poleni](./seuil_denoye.md) | 0,4 | Lois d'ouvrages, lois déversoirs dénoyés | | | | Seuil mince (fente) | Noyé | [Rajaratnam](./seuil_noye.md) | 0,9 | Lois d'ouvrages | | | | Seuil mince (fente) | Noyé | [Fente Larinier](./fente_noyee.md) | à définir par projeteur | Lois d'ouvrages, cloisons, cloison aval | -| | | Seuil mince (échancrure) | Noyé / dénoyé | [Kindsvater-Carter & Villemonte](./kivi.md) | ⺠= 0.4 ; ß = 0.001 | Lois d'ouvrages | +| | | Seuil mince (échancrure) | Noyé / dénoyé | [Kindsvater-Carter & Villemonte](./kivi.md) | α = 0.4 ; ß = 0.001 | Lois d'ouvrages | | | | Seuil mince (échancrure) | Noyé / dénoyé | [Villemonte](./villemonte_1947.md) | 0,4 | Lois d'ouvrages, cloisons, cloison aval | | | | Seuil mince régulé (échancrure) | Noyé / dénoyé | [Villemonte](./villemonte_1947.md) | 0,4 | Cloison aval | | | | Seuil mince régulé (fente) | Noyé | [Fente Larinier](./fente_noyee.md) | à définir par projeteur | Cloison aval | @@ -18,7 +18,7 @@ | Vannes / orifices en charge | Rectangulaire | Vanne de fond | Dénoyé | [Vanne de fond dénoyée (Bernoulli)](./vanne_denoyee.md) | 0,6 | Lois d'ouvrages | | | Rectangulaire | Vanne de fond | Noyé | [Vanne de fond noyée](./vanne_noyee.md) | 0,8 | Lois d'ouvrages | | | Indéfini | Orifice | Dénoyé | [Orifice dénoyé (Bernoulli)](./orifice_denoye.md) | 0,7 | Lois d'ouvrages | -| | Indéfini | Orifice | Noyé | [Orifice noyé (Bernoulli)](./orifice_noye.md) | 0,7 | Lois d'ouvrages, cloisons, cloison aval +| | Indéfini | Orifice | Noyé | [Orifice noyé (Bernoulli)](./orifice_noye.md) | 0,7 | Lois d'ouvrages, cloisons, cloison aval Table: Liste des équations d'ouvrages @@ -26,16 +26,18 @@ Table: Liste des équations d'ouvrages Extrait de CETMEF, 2005. Notice sur les déversoirs : synthèse des lois d’écoulement au droit des seuils et déversoirs. Centre d’Études Techniques Maritimes Et Fluviales, Compiègne. -> Le type de seuil est relatif à l’écoulement au droit de l’ouvrage. -> -> En effet, plus l’épaisseur de la crête du seuil est négligeable devant la hauteur d’eau amont au-dessus de celui-ci, plus le seuil paraît transparent vis-à -vis de l’écoulement et donc plus la crête du seuil paraît mince. +> Le type de seuil est relatif à l’écoulement au droit de l’ouvrage. +> +> En effet, plus l’épaisseur de la crête du seuil est négligeable devant la hauteur d’eau amont au-dessus de celui-ci, plus le seuil paraît transparent vis-à -vis de l’écoulement et donc plus la crête du seuil paraît mince. +> +> A l’inverse, plus la ligne d’eau amont se rapproche de la crête du seuil, plus la largeur du seuil paraît grande vis-à -vis de l’épaisseur de la lame d’eau qui y transite et donc plus la crête du seuil paraît épaisse. +> Un déversoir en rivière appartient ainsi à l’une des trois catégories suivantes : > -> A l’inverse, plus la ligne d’eau amont se rapproche de la crête du seuil, plus la largeur du seuil paraît grande vis-à -vis de l’épaisseur de la lame d’eau qui y transite et donc plus la crête du seuil paraît épaisse. -> Un déversoir en rivière appartient ainsi à l’une des trois catégories suivantes : > - seuil à crête mince > - seuil à crête épaisse -> - seuil à crête non définie +> - seuil à crête non définie > > Afin de déterminer le type de seuil étudié, les conditions suivantes doivent être vérifiées : +> > - si $C < \frac{H_1}{2}$, alors le seuil est à crête mince ; -> - si $C > \frac{2H_1}{3}$, alors le seuil est à crête épaisse. \ No newline at end of file +> - si $C > \frac{2H_1}{3}$, alors le seuil est à crête épaisse. diff --git a/docs/fr/calculators/structures/villemonte_1947.md b/docs/fr/calculators/structures/villemonte_1947.md index e6831d4811028487958ea94bb4675e7d26c04036..6c5f1ac142fc534f27bcc1561aaed1ff58ba6f07 100644 --- a/docs/fr/calculators/structures/villemonte_1947.md +++ b/docs/fr/calculators/structures/villemonte_1947.md @@ -12,12 +12,12 @@ Pour une cote de l'eau aval supérieure à la cote de la crête du déversoir, l Villemonte propose la formule suivante : -$$K = \frac{Q_{noyé}}{Q_{dénoyé}} = \left [ 1- \left ( \frac{h2}{h1} \right)^n \right]^{0.385}$$ +$$K = \frac{Q_{noy\acute{e}}}{Q_{d\acute{e}noy\acute{e}}} = \left [ 1- \left ( \frac{h2}{h1} \right)^n \right]^{0.385}$$ Avec : - - \(h_1\) la hauteur d'eau amont au dessus de la crête du déversoir - - \(h_2\) la hauteur d'eau aval au dessus de la crête du déversoir - - \(n\) l'exposant dans les relations d'écoulement dénoyé (rectangulaire=1.5, triangulaire=2.5, parabolique=2) + - \(h_1\), la hauteur d'eau amont au dessus de la crête du déversoir + - \(h_2\), la hauteur d'eau aval au dessus de la crête du déversoir + - \(n\), l'exposant dans les relations d'écoulement dénoyé (rectangulaire=1.5, triangulaire=2.5, parabolique=2) [^Villemonte1947]: Villemonte, J.R., 1947. Submerged weir discharge studies. Engineering news record 866, 54–57. diff --git a/docs/fr/index.md b/docs/fr/index.md index a2718ab7dcdca8009b575cf9579baf3ff2af116b..db2484f52f1ede16d81822c908565211965ceb54 100644 --- a/docs/fr/index.md +++ b/docs/fr/index.md @@ -19,7 +19,7 @@ Des versions hors-ligne sont installables sur les plateformes Windows, Linux, ma ## Documentation -Télécharger [la documentation au format PDF](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_doc_fr.pdf) +Télécharger [la documentation au format PDF](../pdf/cassiopee_doc_fr.pdf) Télécharger [le guide de prise en main illustrée au format PDF](https://cassiopee.g-eau.fr/assets/docs/pdf/cassiopee_notice_illustree_fr.pdf) diff --git a/docs/latex/cassiopee_doc_en.tex b/docs/latex/cassiopee_doc_en.tex index 5403656ecc88611ebe4afbce1bea5c62943ea3ad..57ad984e46254d094365198cfb0db445d0013846 100644 --- a/docs/latex/cassiopee_doc_en.tex +++ b/docs/latex/cassiopee_doc_en.tex @@ -42,50 +42,19 @@ \newcommand{\website}{\url{www.g-eau.fr}\\\url{www.inrae.fr}} -% ******************* FOR PANDOC V2+ ************************* - -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\newenvironment{Shaded}{}{} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} -\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\BuiltInTok}[1]{#1} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}} -\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}} -\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} -\newcommand{\ExtensionTok}[1]{#1} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}} -\newcommand{\ImportTok}[1]{#1} -\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} -\newcommand{\NormalTok}[1]{#1} -\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}} -\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}} -\newcommand{\RegionMarkerTok}[1]{#1} -\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} -\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -% https://github.com/jgm/pandoc-templates/blob/bc7a16b590122a2dc99d1f17f222b72152acc1e7/default.latex#L310 -\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +%******************************************************************************* +% Preamble common for all languages +%******************************************************************************* +\input{cassiopee_preamble.tex} %******************************************************************************* +% Preamble specific for this language +%******************************************************************************* + +%******************************************************************************* +% Begin the document +%******************************************************************************* \begin{document} %Supprime les veuves et orphelines \widowpenalty=10000 @@ -103,7 +72,6 @@ \cleardoublepage \tableofcontents - %******************************************************************************* % Contenu de la documentation en anglais, généré par pandoc via mkdocs2pdf.py %******************************************************************************* diff --git a/docs/latex/cassiopee_doc_fr.tex b/docs/latex/cassiopee_doc_fr.tex index 49e0bed8f5c5c727731eaa5f0c4d31d69d7ac761..3004415c4f9afe39dd0f32098634fd0029ea9ba4 100644 --- a/docs/latex/cassiopee_doc_fr.tex +++ b/docs/latex/cassiopee_doc_fr.tex @@ -42,50 +42,20 @@ \newcommand{\website}{\url{www.g-eau.fr}\\\url{www.inrae.fr}} -% ******************* FOR PANDOC V2+ ************************* - -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\newenvironment{Shaded}{}{} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} -\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\BuiltInTok}[1]{#1} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}} -\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}} -\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} -\newcommand{\ExtensionTok}[1]{#1} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}} -\newcommand{\ImportTok}[1]{#1} -\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} -\newcommand{\NormalTok}[1]{#1} -\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}} -\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}} -\newcommand{\RegionMarkerTok}[1]{#1} -\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} -\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} -\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} -% https://github.com/jgm/pandoc-templates/blob/bc7a16b590122a2dc99d1f17f222b72152acc1e7/default.latex#L310 -\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +%******************************************************************************* +% Preamble common for all languages +%******************************************************************************* +\input{cassiopee_preamble.tex} + +%******************************************************************************* +% Preamble specific for this language %******************************************************************************* + +%******************************************************************************* +% Begin the document +%******************************************************************************* \begin{document} %Supprime les veuves et orphelines \widowpenalty=10000 @@ -103,7 +73,6 @@ \cleardoublepage \tableofcontents - %******************************************************************************* % Contenu de la documentation en français, généré par pandoc via mkdocs2pdf.py %******************************************************************************* diff --git a/docs/latex/cassiopee_preamble.tex b/docs/latex/cassiopee_preamble.tex new file mode 100644 index 0000000000000000000000000000000000000000..ca5487a12c6f5b23a148677d6321825b735e7b18 --- /dev/null +++ b/docs/latex/cassiopee_preamble.tex @@ -0,0 +1,65 @@ +% ******************* FOR PANDOC V2+ ************************* + +\usepackage{fancyvrb} +\newcommand{\VerbBar}{|} +\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} +% Add ',fontsize=\small' for more characters per line +\newenvironment{Shaded}{}{} +\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} +\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} +\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}} +\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} +\newcommand{\BuiltInTok}[1]{#1} +\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} +\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}} +\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} +\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}} +\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} +\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}} +\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} +\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}} +\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}} +\newcommand{\ExtensionTok}[1]{#1} +\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}} +\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}} +\newcommand{\ImportTok}[1]{#1} +\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} +\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}} +\newcommand{\NormalTok}[1]{#1} +\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}} +\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}} +\newcommand{\RegionMarkerTok}[1]{#1} +\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} +\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}} +\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} +\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}} +\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}} +% https://github.com/jgm/pandoc-templates/blob/bc7a16b590122a2dc99d1f17f222b72152acc1e7/default.latex#L310 +\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} + +%******************************************************************************* + +% degree also in math mode https://tex.stackexchange.com/a/84471 +\usepackage{gensymb} +\DeclareUnicodeCharacter{00B0}{\degree} +% Other unicode characters +\usepackage{newunicodechar} +\newunicodechar{α}{\ensuremath{\alpha}} +\newunicodechar{α}{\ensuremath{\alpha}} +\newunicodechar{β}{\ensuremath{\beta}} +\newunicodechar{μ}{\ensuremath{\mu}} +\newunicodechar{σ}{\ensuremath{\sigma}} +\newunicodechar{Δ}{\ensuremath{\Delta}} +\newunicodechar{☰}{\ensuremath{\equiv}} +\newunicodechar{≈}{\ensuremath{\approx}} +\newunicodechar{ϵ}{\ensuremath{\in}} +\newunicodechar{↵}{\ensuremath{\hookleftarrow}} +\newunicodechar{≤}{\ensuremath{\leq}} + +\titleformat{\paragraph} + [block] + {\bfseries\sffamily\raggedright} + {\theparagraph}{0.5em}{} diff --git a/mkdocs/mkdocs-en.yml b/docs/mkdocs-en.yml similarity index 100% rename from mkdocs/mkdocs-en.yml rename to docs/mkdocs-en.yml diff --git a/mkdocs/mkdocs-fr.yml b/docs/mkdocs-fr.yml similarity index 100% rename from mkdocs/mkdocs-fr.yml rename to docs/mkdocs-fr.yml diff --git a/scripts/mkdocs2pdf.py b/scripts/mkdocs2pdf.py index 54012b0e52776cb76b049aa1868cd7c97c0f2456..e734e76010af5fbd78d4797b7e2a1267a496f9e5 100644 --- a/scripts/mkdocs2pdf.py +++ b/scripts/mkdocs2pdf.py @@ -21,7 +21,7 @@ import re import shutil # verbose output -verbose = False +verbose = True baseDir = os.getcwd() buildDir = os.path.join(baseDir, 'build') @@ -82,7 +82,7 @@ def shiftMdHeaders(mdContent, level): if len(item) > 0 : if item[0] == "#": lMd[i] = ("#" * level) + item - return "\n".join(lMd) + return "\n".join(lMd) + "\n" # Browses MkDocs configuration file and merges .md files def exploreAndMerge(docs_dir, nav, output = '', level = 0): @@ -100,11 +100,13 @@ def exploreAndMerge(docs_dir, nav, output = '', level = 0): # Triple "../" because file will be compiled from pdf_build/latex_models path = os.path.join(baseDir, os.path.dirname(filepath)) s = f.read() + "\n" + if s[-2] != "\n\n": + s += "\n" # Modification of image and links paths s = re.sub(r'(\!\[.+\]\()(.+)(\))', r'\1'+path+r'/\2\3', s) s = re.sub(r'(\\\()(.+?)(\\\))', r'$\2$', s) s = shiftMdHeaders(s, level) - output += "\n" + s + output += s elif type(d) is dict: level += 1 @@ -141,7 +143,7 @@ def convertMdToTex(filePath): # adjust images max width/height l = l.replace('\\includegraphics', '\\includegraphics[max size={\\textwidth}{0.9\\textheight}]') # force figures placement - l = l.replace('\\begin{figure}', '\\begin{figure}[h!]') + l = l.replace('\\begin{figure}', '\\begin{figure}[ht!]') # make som subsubsections invisible (for CHANGELOG) l = re.sub(r'(\\subsubsection)({[0-9]+.[0-9]+.[0-9]+)', r'\1*\2', l) ls[i] = l @@ -160,7 +162,7 @@ def getLatexModel(): os.chdir(os.path.dirname(os.getcwd())) else: runCommand('git clone {} {}'.format(latexModelRepository, latexModelDir)) - # back to original working drectory + # back to original working directory os.chdir(baseDir) # Inject generated merged documentation and necessary resources (template, logos…) @@ -174,9 +176,8 @@ def injectContentIntoModel(mergedDocFilenameTex, lang): os.chdir(modelDir) relPathToMergedTexDoc = os.path.join('..', mergedDocFilenameTex) createLink(relPathToMergedTexDoc) - latexTemplate = filenamePrefix + lang + '.tex' - relPathToLatexTemplate = os.path.join(latexSourceDir, latexTemplate) - createLink(relPathToLatexTemplate) + createLink(os.path.join(latexSourceDir, filenamePrefix + lang + '.tex')) + createLink(os.path.join(latexSourceDir, "cassiopee_preamble.tex")) createLink(os.path.join(latexSourceDir, 'logo_pole.png')) createLink('{}/schema_rugosite_fond.png'.format(os.path.join(baseDir, 'docs', lang, 'calculators', 'pam'))) createLink('{}/bloc_cylindre.png'.format(os.path.join(baseDir, 'docs', lang, 'calculators', 'pam'))) @@ -197,11 +198,11 @@ def buildPDF(lang): # copy Cassiopée version LateX file cvt = os.path.join(buildDir, 'cassiopee_version.tex') shutil.copy(cvt, modelDir) - + cmdline = 'latexmk -f -pdf -interaction=nonstopmode' if verbose: - os.system('latexmk -f -xelatex -interaction=nonstopmode {0} > {0}.latexmk.log'.format(sourceTexFile)) + os.system('{0} {1} > {1}.latexmk.log'.format(cmdline, sourceTexFile)) else: - os.system('latexmk -f -xelatex -interaction=nonstopmode {} > /dev/null 2>&1'.format(sourceTexFile)) + os.system('{} {} > /dev/null 2>&1'.format(cmdline, sourceTexFile)) # copy generated PDF to release directory shutil.copy(outputPdfFile, outputDir) @@ -211,13 +212,8 @@ def buildPDF(lang): # Creates the PDF documentation file for the given language def buildDocForLang(lang): - # Prepare temporary build directory - createEmptyDir(pdfBuildDir) - # Prepare output directory - createDir(outputDir) - # Read config - yamlPath = 'mkdocs/mkdocs-' + lang + '.yml' + yamlPath = 'docs/mkdocs-' + lang + '.yml' dMkdocsYaml = readConfig(yamlPath) # Create string with merged MarkDown @@ -226,27 +222,33 @@ def buildDocForLang(lang): mergedDocFilename = mergedDocFilenamePrefix + lang mergedDocOutputPath = os.path.join(pdfBuildDir, mergedDocFilename) # remove internal links @TODO convert them to hyperref ? - s = re.sub(r'\[([^/]+)\]\([^ ]+\.md\)', r'\1', s) + s = re.sub(r'\[([^/\^]+?)\]\([^ ]+?\.md\)', r'\1', s, flags=re.MULTILINE) with open('{}.md'.format(mergedDocOutputPath), 'w') as f: f.writelines(s) # Convert to tex format convertMdToTex(mergedDocOutputPath) - # Get INRAE report LaTeX model and inject merged content inside - getLatexModel() + # Inject merged content inside Latex model injectContentIntoModel(mergedDocFilename + '.tex', lang) # Build PDF from LaTeX source buildPDF(lang) - # Clean build dir - if not verbose: shutil.rmtree(pdfBuildDir) - #raise RuntimeError() - if __name__ == '__main__': + # Prepare temporary build directory + createEmptyDir(pdfBuildDir) + # Prepare output directory + createDir(outputDir) + + # Get INRAE report LaTeX model + getLatexModel() + for l in ['fr', 'en']: print('building PDF doc for language "{}"'.format(l)) buildDocForLang(l) + + # Clean build dir + if not verbose: shutil.rmtree(pdfBuildDir) diff --git a/scripts/prepare_mkdocs.sh b/scripts/prepare_mkdocs.sh index af53d10dcba3d84c8ab5c753c75b72cd513fd3da..8cf1a93ca9ab96014b089cf4e41698218b23c15a 100644 --- a/scripts/prepare_mkdocs.sh +++ b/scripts/prepare_mkdocs.sh @@ -13,7 +13,7 @@ function prepareMkdocs # - add Cassiopée version # - modify path to input files # - modify path to output files - cat mkdocs/mkdocs-$lang.yml \ + cat docs/mkdocs-$lang.yml \ | sed "/^site_name:/ s/$/ v$VER/" \ | sed "/^docs_dir:/ s/docs_dir: /docs_dir: ..\//" \ | sed "/^site_dir:/ s/site_dir: /site_dir: ..\//" > $BUILD_DIR/mkdocs-$1.yml