diff --git a/.gitignore b/.gitignore index 9db7bcb2daa200451dbd416c233dadc72f407641..e77be365d7ca3ca776cc2ad2ab07e63233fe4b66 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,13 @@ /src/assets/docs-* /compodoc-fr /docs-fr_pdf +/docs-en_pdf /release # dependencies /node_modules /docs-fr/javascripts/mathjax +/docs-en/javascripts/mathjax /src/date_revision.ts # IDEs and editors diff --git a/docs-en/CHANGELOG.md b/docs-en/CHANGELOG.md new file mode 120000 index 0000000000000000000000000000000000000000..04c99a55caae5d51f17666f554c2c8cea0aadfc0 --- /dev/null +++ b/docs-en/CHANGELOG.md @@ -0,0 +1 @@ +../CHANGELOG.md \ No newline at end of file diff --git a/docs-en/calculators/devalaison/grille-inclinee-b.jpg b/docs-en/calculators/devalaison/grille-inclinee-b.jpg new file mode 100644 index 0000000000000000000000000000000000000000..db4b9d279fc6de44eab1be4b04a162ba4f112ecb Binary files /dev/null and b/docs-en/calculators/devalaison/grille-inclinee-b.jpg differ diff --git a/docs-en/calculators/devalaison/grille-inclinee.jpg b/docs-en/calculators/devalaison/grille-inclinee.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f1f59274c8f7aed224462b1b9748a8d0db4bc65c Binary files /dev/null and b/docs-en/calculators/devalaison/grille-inclinee.jpg differ diff --git a/docs-en/calculators/devalaison/grille-orientee.jpg b/docs-en/calculators/devalaison/grille-orientee.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1331115737598a0bdd6d2e1ad9d8e471ff6b9f4a Binary files /dev/null and b/docs-en/calculators/devalaison/grille-orientee.jpg differ diff --git a/docs-en/calculators/devalaison/grille.md b/docs-en/calculators/devalaison/grille.md new file mode 100644 index 0000000000000000000000000000000000000000..42621aec85368c0445d77ed9fbb289a4fffb5c43 --- /dev/null +++ b/docs-en/calculators/devalaison/grille.md @@ -0,0 +1,186 @@ +# Calculation of the head loss on a water intake grid + +<div style="position: relative"><a id="grille-conventionnelle" style="position: absolute; top: -60px;"></a></div> +## Conventional grid + +Conventional grid planes: perpendicular to the flow and slightly inclined to the horizontal + +### Formula + +Use of the F1 formula of Raynal et al (2012) to calculate the head losses. + +$$\xi = K_F * K_O * K_\beta = a * \left ( \frac{O}{1-O} \right )^{1.6} * \left ( 1 - \cos{\beta} \right )^{0.39}$$ + + +<div style="position: relative"><a id="grille-orientee" style="position: absolute; top: -60px;"></a></div> +## Oriented grid + +Flow-oriented and near-vertical grid planes. + + + +*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. <https://doi.org/10.13140/RG.2.1.2359.1449>.* + +### Formula + +Use of the F2 formula of Raynal et al (2012) to calculate the head losses. + +$$\xi = K_F * K_O * K_\alpha = a * \left ( \frac{O}{1-O} \right )^{1.6} * \left ( 1 + c * \left ( \frac{90 - \alpha}{90} \right )^{2.35} * \left ( \frac{1 - O}{O} \right )^{3} \right )$$ + + +<div style="position: relative"><a id="grille-inclinee" style="position: absolute; top: -60px;"></a></div> +## Inclined grid + +Grid planes perpendicular to the flow, and inclined with respect to the horizontal + + + + + +*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. <https://doi.org/10.13140/RG.2.1.2359.1449>.* + +### Formula + +Use of the F3 formula of Raynal et al (2012) to calculate the head losses. + +$$\xi = K_{F, b} * K_b * K_\beta + K_{Fent} * K_{entH} = a * \left ( \frac{O_b}{1-O_b} \right )^{1.65} * \left ( \sin \beta \right )^{2} + c * \left ( \frac{O_{entH}}{1-O_{entH}} \right )^{0.77}$$ + + + +## Parameters + +<div style="position: relative"><a id="cote-du-sommet-immerge-du-plan-de-grille" style="position: absolute; top: -60px;"></a></div> +### Elevation of the immersed vertex of the grid plane + +May be different from the water level if the top of the grid plane is drowned. + +<div style="position: relative"><a id="largeur-de-la-section" style="position: absolute; top: -60px;"></a></div> +### Section width + +#### Conventional or inclined grid + +Must also correspond to the width of the grid plane. + +<div style="position: relative"><a id="vitesse-dapproche-moyenne-pour-le-debit-maximum-turbine-en-soustrayant-la-partie-superieure-eventuellement-obturee" style="position: absolute; top: -60px;"></a></div> +### Average approach speed for the maximum turbinated flow, subtracting the upper part, if any, blocked + +"Maximum" value of the approach speed taken into account in the calculation of the head loss in a safety approach. + +<div style="position: relative"><a id="inclinaison-par-rapport-a-lhorizontale" style="position: absolute; top: -60px;"></a></div> +### Inclination with respect to the horizontal + +#### Conventional grid + +Scope of the formula: 45 ≤ β ≤ 90° + +#### Oriented grid + +Vertical grid planes (β = 90°). + +The slight inclination of the grid planes (β≈ 75/80°), often set up for screening purposes, can be neglected. + +#### inclined grid + +Scope of the formula: 15° ≤ β ≤ 90° +Recommended for fish guidance: β ≤ 26° + +<div style="position: relative"><a id="orientation-par-rapport-a-la-direction-de-lecoulement" style="position: absolute; top: -60px;"></a></div> +### Orientation with respect to the direction of flow + +#### Conventional grid + +Grid planes perpendicular to the flow (α = 90°) + +#### Oriented grid + +Scope of the formula: 30° ≤ α ≤ 90° + +Recommended for fish guidance: α ≤ 45° + +#### inclined grid + +Grid planes perpendicular to the flow (α = 90°) + +<div style="position: relative"><a id="vitesse-normale-moyenne-pour-le-debit-maximum-turbine" style="position: absolute; top: -60px;"></a></div> +### Average normal speed for maximum turbinated flow rate + +#### Conventional grid + +Recommended to avoid plating fish on the grid plane (physical barrier) or their premature passage through (behavioural barrier): VN ≤ 0.5 m/s. + +#### Oriented or inclined grid + +Recommended to avoid plating fish on the grid plane (physical barrier) or their premature passage through (behavioural barrier): VN ≤ 0.5 m/s. + +Above the average value calculated here, it is essential to refer to the recommendations derived from the experimental characterization of the actual velocity values. + +<div style="position: relative"><a id="rapport-de-forme-des-barreaux" style="position: absolute; top: -60px;"></a></div> +### Bar shape ratio + +#### Oriented grid + +Validity range of the formula: ratio b / p close to 0.125 + +<div style="position: relative"><a id="rapport-espacementepaisseur-des-barreaux" style="position: absolute; top: -60px;"></a></div> +### Ratio of spacing / bar thickness + +#### Oriented grid + +Scope of validity of the formula: 1 ≤ e / b ≤ 3 + +<div style="position: relative"><a id="obstruction-globale-du-plan-de-grille-barreaux-entretoises-elements-de-supports-longitudinaux-et-transversaux-retenue" style="position: absolute; top: -60px;"></a></div> +### Overall obstruction of the grid plane (bars + spacers + longitudinal and transverse support elements) retained + +To be determined from the grid plans. + +#### Conventional grid + +Scope of validity of the formula: 0.2 ≤ O ≤ 0.60 + +#### Oriented grid + +Scope of the formula: 0.35 ≤ O ≤ 0.60 + +#### inclined grid + +Obstruction due to the bars and longitudinal support elements retained \(O_b\). To be determined from the grid plans. + +Scope of validity of the formula: 0.28 ≤ Ob ≤ 0.53 + +<div style="position: relative"><a id="profil-des-barreaux" style="position: absolute; top: -60px;"></a></div> +### Bar profile + + + +*Raynal, Sylvain. « Étude expérimentale et numérique des grilles ichtyocompatibles ». Sciences et ingénierie en matériaux, mécanique, énergétique et aéronautique - SIMMEA, 2013.* + +#### Conventional grid + +The shape coefficient of the bars \(a\) is 2.89 for the rectangular profile (PR) and 1.70 for the hydrodynamic profile (PH). + +#### Oriented grid + +The shape coefficient of the bars is 2.89 for the rectangular profile (PR) and 1.70 for the hydrodynamic profile (PH). + +The shape coefficient of the bars \(c\) is 1.69 for the rectangular profile (PR) and 2.78 for the hydrodynamic profile (PH). + +#### inclined grid + +The shape coefficient of the bars \(a\) is 3.85 for the rectangular profile (PR) and 2.10 for the hydrodynamic profile (PH). + +<div style="position: relative"><a id="obstruction-effective-due-aux-entretoises-et-elements-de-support-transversaux-rapportee-a-la-section-decoulement" style="position: absolute; top: -60px;"></a></div> +### Effective obstruction due to spacers and transverse support elements in relation to the flow cross-section + +#### inclined grid + +To be determined from the grid plans. +Scope of the formula: OentH ≤ 0.28 + +<div style="position: relative"><a id="coefficient-de-forme-moyen-des-entretoises-et-elements-transversaux-ponderes-selon-leurs-parts-respectives" style="position: absolute; top: -60px;"></a></div> +### Average shape coefficient of spacers and transverse elements, weighted according to their respective shares + +#### inclined grid + +To be determined from the grid plans. + +For example, 1.79 for cylindrical spacers, 2.42 for rectangular spacers, and around 4 for square beams and IPNs. diff --git a/docs-en/calculators/devalaison/jet.md b/docs-en/calculators/devalaison/jet.md new file mode 100644 index 0000000000000000000000000000000000000000..3d92df282506569744a6ef1f315c4db47ca3ea13 --- /dev/null +++ b/docs-en/calculators/devalaison/jet.md @@ -0,0 +1,35 @@ +# Jet impact + +The downstream fish evacuation outlet ends with a device that empties into the plant's tailrace. This module calculates the position and velocity at the point of impact of the free fall or water vein on the surface of the tailrace water taking into account the initial angle and velocity of the jet and the drop height. + +Excerpt from Courret, Dominique, and Michel Larinier. Guide for the design of ichthyocompatible water intakes for small hydroelectric power plants, 2008. https://doi.org/10.13140/RG.2.1.2359.1449, p.24: + +> Speeds in the structure and at the point of impact in the tailrace must remain below about 10 m/s, with some organizations even recommending that they not exceed 7-8 m/s (ASCE 1995). (...) The head between the outlet and the water body must not exceed a dozen metres to avoid any risk of injury to fish on impact, whatever their size and mode of fall (free fall or fall in the water vein) (Larinier and Travade 2002). The discharge must also be made in an area of sufficient depth to avoid any risk of injury from mechanical shock. Odeh and Orvis (1998) recommend a minimum depth of about a quarter of the fall, with a minimum of about 1 m. + +## Formula + +With \(g\): gravity acceleration = 9.81 m.s-2 + +### Fall height + +$$H = 0.5 * g * \frac{D^{2}}{\cos \alpha^{2} * V_0^{2}} - \tan \alpha * D$$ + +### Impact abscissa (horizontal distance covered) + +$$D = \frac{V_0}{g * \cos \alpha} \left ( V_0 * \sin \alpha + \sqrt{ \left ( V_0 * \sin \alpha \right )^{2} + 2 * g * H } \right )$$ + +### Flight time + +$$t = \frac{D}{V_0 \cos \alpha} $$ + +### Horizontal speed at impact + +$$V_x = V_0 \cos \alpha$$ + +### Vertical speed at impact + +$$V_z = V_0 \sin \alpha - t * g$$ + +### Speed at impact + +$$V_t = \sqrt{ \V_x^{2} + V_z^{2} }$$ diff --git a/docs-en/calculators/devalaison/profil-barreaux.png b/docs-en/calculators/devalaison/profil-barreaux.png new file mode 100644 index 0000000000000000000000000000000000000000..72997920579b1c8ade95e16e2f52ba36d71cca5c Binary files /dev/null and b/docs-en/calculators/devalaison/profil-barreaux.png differ diff --git a/docs-en/calculators/hsl/courbe_remous.md b/docs-en/calculators/hsl/courbe_remous.md new file mode 100644 index 0000000000000000000000000000000000000000..044e75d2708f21fb4fcec9a18a26e5c6167372c4 --- /dev/null +++ b/docs-en/calculators/hsl/courbe_remous.md @@ -0,0 +1,42 @@ +# Backwater curve + +The calculation of the backwater curve involves the following differential equation: + + + +$$\frac{dy}{dx}=\frac{I_f - J(h)}{1-F^2(h)}$$ + +where \(I_f\) is the slope of a canal, \(J\) the formula giving us the local pressure drop (depending on the water level), \(y\) here refers to the height of water. + +Thus, for a rectangular channel of width \(b\) and a Strickler coefficient \(K\): + +$$J=\frac{Q^2 (b+2y)^{4/3}}{K^2 b^{10/3}y^{10/3}}$$ + +and + +$$F^2=\frac{Q^2}{gb^2y^3}$$ + +The integration of the equation can be done by one of the following methods: [Runge-Kutta 4](../../methodes_numeriques/rk4.md), [Explicit Euler](../../methodes_numeriques/euler_explicite.md), [trapezes integration](../../methodes_numeriques/integration_trapezes.md). + +Depending on the flow regime, the calculation can be carried out: + + * from downstream to upstream for the river regime with definition of a downstream boundary condition. + * from upstream to downstream for torrential regime with definition of an upstream boundary condition + +If we take the example of a rectangular channel, [the proposed scilab code example for solving an ordinary differential equation](../../methodes_numeriques/euler_explicite.md) is amended as follows: + +```scilab + b=0.3; + K=50; + If=0.005; + Q=0.01; + function z=DQ(y);z=Q-K*(b*y)^(5/3)/(b+2*y)^(2/3)*sqrt(If); endfunction + yn=fsolve(0.5,DQ); + tmax=0; + t0=10; + dt=-0.5; + function z=f(y,t);z=(If-Q^2*(b+2*y)^(4/3)/(K^2*(b*y)^(10/3)))/(1-Q^2/(9.81*b^2*y^3)); endfunction + y0=0.12; +``` + +which gives us the normal depth, and the water line. Depending on the numerical method used, we can have large errors in the case of an F2 backwater curve (downstream condition below normal height), because the waterline slopes are much steeper, and therefore much more prone to errors related to linear interpolation. We can therefore deduce that on the one hand the choice of the resolution method is important, and on the other hand it is essential to take a critical look at the solutions (with an interpretation of the processes we are trying to model). diff --git a/docs-en/calculators/hsl/pente.md b/docs-en/calculators/hsl/pente.md new file mode 100644 index 0000000000000000000000000000000000000000..7c3815983f472139530856fc02d46bbbec90df27 --- /dev/null +++ b/docs-en/calculators/hsl/pente.md @@ -0,0 +1,12 @@ +# Slope + +This tools allows to calculate the missing value of the four quantities: + +- upstream elevation (\(Z_1\)) in m; +- downstream elevation (\(Z_2\)) in m; +- length (\(L\)) in m; +- slope (\(I\)) in m/m; + +## Formula + +$$I = \frac{(Z_1 - Z_2)}{L}$$ diff --git a/docs-en/calculators/hsl/regime_uniforme.md b/docs-en/calculators/hsl/regime_uniforme.md new file mode 100644 index 0000000000000000000000000000000000000000..3b5d5ac00da9120addc13f50cd11520d9834c955 --- /dev/null +++ b/docs-en/calculators/hsl/regime_uniforme.md @@ -0,0 +1,37 @@ +# Uniform flow + + +The uniform flow is characterized by a water height called the normal height. The normal height is reached when the water line is parallel to the bottom, the load is then itself parallel to the water line and thus the head loss is equal to the slope of the bottom: +\(I_f = J\) + +With: + +- \(I_f\): bottom slope in m/m +- \(J\): head loss in m/m + +The head loss {J} is calculated here using Manning-Strickler's formula: + +$$J=\frac{U^2}{K^{2}R^{4/3}}=\frac{Q^2}{S^2K^{2}R^{4/3}}$$ + +With: + +- \(K\): Strickler coefficient in m<sup>1/3</sup>/s + +In uniform flow, we obtain the formula: + +$$Q=KR^{2/3}S\sqrt{I_f}$$ + +Based on the which, flow \(Q\), slope \(I_f\) and Strickler calculation \(K\) can be calculated analytically. + +To calculate normal height \(h_n\) , one can solve \(f(h_n)=Q-KR^{2/3}S\sqrt{I_f}=0\) + +using Newton's method: + +$$h_{k+1} = h_k - \frac{f(h_k)}{f'(h_k)}$$ + + with: + +- \(f(h_k) = Q-KR^{2/3}S\sqrt{I_f}\) +- \(f'(h_k) = -K \sqrt{I_f}(\frac{2}{3}R'R^{-1/3}S+R^{2/3}S')\) + +To calculate the geometrical parameters of the section, the calculation module uses the flow calculation equation and solves the problem by dichotomy. diff --git a/docs-en/calculators/hsl/section_circulaire.png b/docs-en/calculators/hsl/section_circulaire.png new file mode 100644 index 0000000000000000000000000000000000000000..d8bcdf872bc400b6d3adb4bd92cae18fd02325fb Binary files /dev/null and b/docs-en/calculators/hsl/section_circulaire.png differ diff --git a/docs-en/calculators/hsl/section_parametree.md b/docs-en/calculators/hsl/section_parametree.md new file mode 100644 index 0000000000000000000000000000000000000000..f1189bcf7142cfc884133f474d22857cb34dbce1 --- /dev/null +++ b/docs-en/calculators/hsl/section_parametree.md @@ -0,0 +1,138 @@ +# Parametric section + +This module calculates the hydraulic quantities associated to: + +- a section with a defined geometrical shape ([See section types managed by Cassiopée](types_sections.md)) +- a draft \(y\) in m +- a flow \(Q\) in m<sup>3</sup>/s +- a bottom slope \(I_f\) in m/m +- a roughness expressed with the Strickler's coefficient \(K\) in m<sup>1/3</sup>/s + +The calculated hydraulic quantities are: + +- Width at mirror (m) +- Wet perimeter (m) +- Hydraulic surface (m<sup>2</sup>) +- Hydraulic radius (m) +- Average speed (m/s) +- Specific head (m) +- Head loss (m) +- Linear variation of specific energy (m/m) +- Normal depth (m) +- Froude number +- Critical depth (m) +- Critical head (m) +- Corresponding depth (m) +- Impulsion (kgâ‹…mâ‹…s<sup>-1</sup>) +- Conjugate depth +- Tractive force (Pa) + +## Width at mirror, wet perimeter and surface + +[See the dedicated page for the parameters specific to each type of section](types_sections.md) + +### Rectangular section + +- Width at mirror : \(B=L\) +- Surface : \(S=L.y\) +- Perimeter : \(P=L+2y\) + +### Trapezoidal section + +- Width at mirror : \(B=L+2..m.y\) +- Surface : \(S=(L+m.y)y\) +- Perimeter : \(P=L+2y\sqrt{1+m^2}\) + +### Circular section + +- Width at mirror : \(B=D\sin\theta\) +- Surface : \(S=\frac{D^2}{4} \left(\theta - \sin\theta.\cos\theta \right)\) +- Perimeter : \(P=D.\theta\) + +### Parabolic section + +- Width at mirror : \(B=\frac{B_b}{y_b^k}y^k\) +- Surface : \(S=\frac{B_b}{y_b^k}\frac{y^{k+1}}{k+1}\) +- Perimeter : \(P=2\sum _{i=1}^{n}\sqrt{\frac{1}{n^2}+\frac{1}{4}\left( B\left(\frac{i.y}{n}\right)-B\left(\frac{(i-1).y}{n}\right) \right)^2}\) for \(n\) large enough + +## Hydraulic radius (m) + +$$R = S / P$$ + +## Average speed (m/s) + +$$U = Q /S$$ + +## Specific head (m) + +$$H(y) = y + \frac{U^2}{2g}$$ + +## Head loss (m/m) + +Cassiopée uses Manning Strickler formula: + +$$J=\frac{U^2}{K^{2}R^{4/3}}=\frac{Q^2}{S^2K^{2}R^{4/3}}$$ + +## Linear variation of specific energy (m/m) + +$$\Delta E_s = I_f - J$$ + +## Normal depth (m) + +[See the uniform flow calculation.](regime_uniforme.md) + +## Froude number + +The Froude number expresses the ratio between the mean fluid velocity and the surface wave velocity. \(c\). + +$$ c = \sqrt{\frac{gS}{B}}$$ + +$$ Fr = \frac{U}{c} = \sqrt{\frac{Q^2B}{gS^3}}$$ + +## Critical head (m) + +The critical height is reached when the average velocity of the fluid is equal to the velocity of the waves on the water surface. + +The critical height is therefore reached when the Froude number \(Fr=1\). + +For any section, the critical height is calculated as follows \(y_c\) by solving \(f(y_c)=Fr^2-1=0\) + +We use Newton's method by posing \(y_{k+1} = y_k - \frac{f(y_k)}{f'(y_k)}\) with : +- \(f(y_k) = \frac{Q^2 B}{g S^3} - 1\) +- \(f'(y_k) = \frac{Q^2}{g} \frac{B'.S - 3 B S'}{S^4}\) + +## Critical head (m) + +This is the head calculated for a draft equal to the critical depth. \(H_c = H(y_c)\). + +## Corresponing depth (m) + +For a fluvial (respectively torrential draft) \(y\), corresponding depth is the torrential (respectively fluvial) draft for the which \(H(y) = H(y_{cor})\). + +## Hydraulic impulsion (kgâ‹…mâ‹…s<sup>-1</sup>) + +The impulsion \(I\) is the sum of the amount of movement and the resultant of the pressure force in a section: + +$$I=\rho Q U + \rho g S y_g$$ + +With : + +- \(\rho\) : the density of water (kg/m<sup>3</sup>) +- \(y_g\) : the distance from the centre of gravity of the section to the free surface (m) + +The distance from the centre of gravity of the section to the free surface \(y_g\) can be found from the formula : + +$$S.y_g = \int_{0}^{y} (y-z)B(z)dz$$ + +With \(y\) the depth and \(B(z)\) the width at mirror for a draft \(z\) + +Formulas of \(S.y_g\) for the different section shapes are : + +- rectangular section: \(S.y_g = \frac{L.y^2}{2}\) +- trapezoidal section: \(S.y_g = \left (\frac{L}{2} + \frac{m.y}{3} \right )y^2\) +- circular section: \(S.y_g = \frac{D^3}{8}\left (\sin\theta - \frac{\sin^3\theta}{3} - \theta \cos\theta \right )\) +- parabolic section: \(S.y_g=\frac{B_b.y^{k+2}}{y_b^k(k+1)(k+2)}\) + +## Tractive force (Pa) + +$$ \tau_0 = \rho g R J $$ diff --git a/docs-en/calculators/hsl/section_rectangulaire.png b/docs-en/calculators/hsl/section_rectangulaire.png new file mode 100644 index 0000000000000000000000000000000000000000..cddad05cf09703ef1900432e5fab66afa283e408 Binary files /dev/null and b/docs-en/calculators/hsl/section_rectangulaire.png differ diff --git a/docs-en/calculators/hsl/section_trapezoidale.png b/docs-en/calculators/hsl/section_trapezoidale.png new file mode 100644 index 0000000000000000000000000000000000000000..4689e1d8f185dcc12b3270bfe127048a2fc92772 Binary files /dev/null and b/docs-en/calculators/hsl/section_trapezoidale.png differ diff --git a/docs-en/calculators/hsl/strickler.md b/docs-en/calculators/hsl/strickler.md new file mode 100644 index 0000000000000000000000000000000000000000..222842624eccaed7141e4ba41182fb2ab82fa6ff --- /dev/null +++ b/docs-en/calculators/hsl/strickler.md @@ -0,0 +1,966 @@ +# Manning-Strickler's formula + +## Definition + +Manning-Strickler formula is written as follows: + +$$V = K_s R_h^{2/3} i^{1/2}$$ + +with: + +- \(V\) la vitesse moyenne de la section transversale en m/s +- \(K_s\) Strickler's coefficient +- \(R_h\) Hydraulic radius in m +- \(i\) slope en m/m + +The Strickler coefficient \(K_s\) varies from 20 (rough stone and rough surface) to 80 (smooth concrete and cast iron). + +## Chow's table (1959) + +<table> +<thead> +<tr> +<th></th> +<th colspan="3">Strickler coefficient KS</th> +<th colspan="3">Manning coefficient n</th> +</tr> +</thead> +<tbody> +<tr> +<td>Type of channel and description</td> +<td>Minimum</td> +<td>Normal</td> +<td>Maximum</td> +<td>Minimum</td> +<td>Normal</td> +<td>Maximum</td> +</tr> +<tr> +<td colspan="7">Natural streams - minor streams (top width at floodstage < 30 m / 100 ft) +</td> +</tr> +<tr> +<td>1. Main channels</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  a. clean, straight, full stage, no rifts or deep pools +</td> +<td>40</td> +<td>33</td> +<td>30</td> +<td>0,025</td> +<td>0,03</td> +<td>0,033</td> +</tr> +<tr> +<td>  b. same as above, but more stones and weeds +</td> +<td>33</td> +<td>29</td> +<td>25</td> +<td>0,03</td> +<td>0,035</td> +<td>0,04</td> +</tr> +<tr> +<td> c. clean, winding, some pools and shoals +</td> +<td>30</td> +<td>25</td> +<td>22</td> +<td>0,033</td> +<td>0,04</td> +<td>0,045</td> +</tr> +<tr> +<td>  d. same as above, but some weeds and stones +</td> +<td>29</td> +<td>22</td> +<td>20</td> +<td>0,035</td> +<td>0,045</td> +<td>0,05</td> +</tr> +<tr> +<td>  e. same as above, lower stages, more ineffective slopes and sections +</td> +<td>25</td> +<td>21</td> +<td>18</td> +<td>0,04</td> +<td>0,048</td> +<td>0,055</td> +</tr> +<tr> +<td>  f. same as "d" with more stones +</td> +<td>22</td> +<td>20</td> +<td>17</td> +<td>0,045</td> +<td>0,05</td> +<td>0,06</td> +</tr> +<tr> +<td>  g. sluggish reaches, weedy, deep pools +</td> +<td>20</td> +<td>14</td> +<td>13</td> +<td>0,05</td> +<td>0,07</td> +<td>0,08</td> +</tr> +<tr> +<td>  h. very weedy reaches, deep pools, or floodways  with heavy stand of timber and underbrush</td> +<td>13</td> +<td>10</td> +<td>7</td> +<td>0,075</td> +<td>0,1</td> +<td>0,15</td> +</tr> +<tr> +<td colspan="7">2. Mountain streams, no vegetation in channel, banks usually steep, trees and brush along banks submerged at high stages </td> +</tr> +<tr> +<td>  a. bottom: gravels, cobbles, and few boulders +</td> +<td>33</td> +<td>25</td> +<td>20</td> +<td>0,03</td> +<td>0,04</td> +<td>0,05</td> +</tr> +<tr> +<td>  b. bottom: cobbles with large boulders +</td> +<td>25</td> +<td>20</td> +<td>14</td> +<td>0,04</td> +<td>0,05</td> +<td>0,07</td> +</tr> +<tr> +<td colspan="7">3. Floodplains +</td> +</tr> +<tr> +<td>  a. Pasture, no brush +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>1. short grass</td> +<td>40</td> +<td>33</td> +<td>29</td> +<td>0,025</td> +<td>0,03</td> +<td>0,035</td> +</tr> +<tr> +<td>2. high grass</td> +<td>33</td> +<td>29</td> +<td>20</td> +<td>0,03</td> +<td>0,035</td> +<td>0,05</td> +</tr> +<tr> +<td>b. Cultivated areas</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td> 1. no crop +</td> +<td>50</td> +<td>33</td> +<td>25</td> +<td>0,02</td> +<td>0,03</td> +<td>0,04</td> +</tr> +<tr> +<td>  2. mature row crops +</td> +<td>40</td> +<td>29</td> +<td>22</td> +<td>0,025</td> +<td>0,035</td> +<td>0,045</td> +</tr> +<tr> +<td>  3. mature field crops +</td> +<td>33</td> +<td>25</td> +<td>20</td> +<td>0,03</td> +<td>0,04</td> +<td>0,05</td> +</tr> +<tr> +<td>c. Brush</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. scattered brush, heavy weeds +</td> +<td>29</td> +<td>20</td> +<td>14</td> +<td>0,035</td> +<td>0,05</td> +<td>0,07</td> +</tr> +<tr> +<td>  2. light brush and trees, in winter +</td> +<td>29</td> +<td>20</td> +<td>17</td> +<td>0,035</td> +<td>0,05</td> +<td>0,06</td> +</tr> +<tr> +<td>  3. light brush and trees, in summer +</td> +<td>25</td> +<td>17</td> +<td>13</td> +<td>0,04</td> +<td>0,06</td> +<td>0,08</td> +</tr> +<tr> +<td>  4. medium to dense brush, in winter +</td> +<td>22</td> +<td>14</td> +<td>9</td> +<td>0,045</td> +<td>0,07</td> +<td>0,11</td> +</tr> +<tr> +<td>  5. medium to dense brush, in summer +</td> +<td>14</td> +<td>10</td> +<td>6</td> +<td>0,07</td> +<td>0,1</td> +<td>0,16</td> +</tr> +<tr> +<td>    d. Trees +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. dense willows, summer, straight +</td> +<td>9</td> +<td>7</td> +<td>5</td> +<td>0,11</td> +<td>0,15</td> +<td>0,2</td> +</tr> +<tr> +<td>  2. cleared land with tree stumps, no sprouts +</td> +<td>33</td> +<td>25</td> +<td>20</td> +<td>0,03</td> +<td>0,04</td> +<td>0,05</td> +</tr> +<tr> +<td>  3. same as above, but with heavy growth of sprouts +</td> +<td>20</td> +<td>17</td> +<td>13</td> +<td>0,05</td> +<td>0,06</td> +<td>0,08</td> +</tr> +<tr> +<td>  4. heavy stand of timber, a few down trees, little undergrowth, flood stage below branches </td> +<td>20</td> +<td>21</td> +<td>22</td> +<td>0,08</td> +<td>0,1</td> +<td>0,12</td> +</tr> +<tr> +<td>  5. same as 4. with flood stage reaching  branches +</td> +<td>10</td> +<td>8</td> +<td>6</td> +<td>0,1</td> +<td>0,12</td> +<td>0,16</td> +</tr> +<tr> +<td colspan="7">4. Excavated or Dredged Channels +</td> +</tr> +<tr> +<td>a. Earth, straight, and uniform +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>1. clean, recently completed</td> +<td>63</td> +<td>56</td> +<td>50</td> +<td>0,016</td> +<td>0,018</td> +<td>0,02</td> +</tr> +<tr> +<td> 2. clean, after weathering +</td> +<td>56</td> +<td>45</td> +<td>40</td> +<td>0,018</td> +<td>0,022</td> +<td>0,025</td> +</tr> +<tr> +<td>3. gravel, uniform section, clean</td> +<td>45</td> +<td>40</td> +<td>33</td> +<td>0,022</td> +<td>0,025</td> +<td>0,03</td> +</tr> +<tr> +<td> 4. with short grass, few weeds +</td> +<td>45</td> +<td>37</td> +<td>30</td> +<td>0,022</td> +<td>0,027</td> +<td>0,033</td> +</tr> +<tr> +<td>b. Earth winding and sluggish +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>1. no vegetation</td> +<td>43</td> +<td>40</td> +<td>33</td> +<td>0,023</td> +<td>0,025</td> +<td>0,03</td> +</tr> +<tr> +<td> 2. grass, some weeds +</td> +<td>40</td> +<td>33</td> +<td>30</td> +<td>0,025</td> +<td>0,03</td> +<td>0,033</td> +</tr> +<tr> +<td> 3. dense weeds or aquatic plants in deep channels +</td> +<td>33</td> +<td>29</td> +<td>25</td> +<td>0,03</td> +<td>0,035</td> +<td>0,04</td> +</tr> +<tr> +<td> 4. earth bottom and rubble sides +</td> +<td>36</td> +<td>33</td> +<td>29</td> +<td>0,028</td> +<td>0,03</td> +<td>0,035</td> +</tr> +<tr> +<td> 5. stony bottom and weedy banks +</td> +<td>40</td> +<td>29</td> +<td>25</td> +<td>0,025</td> +<td>0,035</td> +<td>0,04</td> +</tr> +<tr> +<td> 6. cobble bottom and clean sides +</td> +<td>33</td> +<td>25</td> +<td>20</td> +<td>0,03</td> +<td>0,04</td> +<td>0,05</td> +</tr> +<tr> +<td>c. Dragline-excavated or dredged +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>1. no vegetation</td> +<td>40</td> +<td>36</td> +<td>30</td> +<td>0,025</td> +<td>0,028</td> +<td>0,033</td> +</tr> +<tr> +<td> 2. light brush on banks +</td> +<td>29</td> +<td>20</td> +<td>17</td> +<td>0,035</td> +<td>0,05</td> +<td>0,06</td> +</tr> +<tr> +<td>d. Rock cuts +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>1. smooth and uniform</td> +<td>40</td> +<td>29</td> +<td>25</td> +<td>0,025</td> +<td>0,035</td> +<td>0,04</td> +</tr> +<tr> +<td> 2. jagged and irregular +</td> +<td>29</td> +<td>25</td> +<td>20</td> +<td>0,035</td> +<td>0,04</td> +<td>0,05</td> +</tr> +<tr> +<td>e. Channels not maintained, weeds and brush uncut +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. dense weeds, high as flow depth +</td> +<td>20</td> +<td>13</td> +<td>8</td> +<td>0,05</td> +<td>0,08</td> +<td>0,12</td> +</tr> +<tr> +<td>  2. clean bottom, brush on sides +</td> +<td>25</td> +<td>20</td> +<td>13</td> +<td>0,04</td> +<td>0,05</td> +<td>0,08</td> +</tr> +<tr> +<td>  3. same as above, highest stage of flow +</td> +<td>22</td> +<td>14</td> +<td>9</td> +<td>0,045</td> +<td>0,07</td> +<td>0,11</td> +</tr> +<tr> +<td>  4. dense brush, high stage +</td> +<td>13</td> +<td>10</td> +<td>7</td> +<td>0,08</td> +<td>0,1</td> +<td>0,14</td> +</tr> +<tr> +<td colspan="7">5. Lined or Constructed Channels +</td> +</tr> +<tr> +<td>a. Cement +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td> 1.  neat surface +</td> +<td>100</td> +<td>91</td> +<td>77</td> +<td>0,01</td> +<td>0,011</td> +<td>0,013</td> +</tr> +<tr> +<td> 2. mortar +</td> +<td>91</td> +<td>77</td> +<td>67</td> +<td>0,011</td> +<td>0,013</td> +<td>0,015</td> +</tr> +<tr> +<td>b. Wood +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td> 1. planed, untreated +</td> +<td>100</td> +<td>83</td> +<td>71</td> +<td>0,01</td> +<td>0,012</td> +<td>0,014</td> +</tr> +<tr> +<td> 2.  planed, creosoted +</td> +<td>91</td> +<td>83</td> +<td>67</td> +<td>0,011</td> +<td>0,012</td> +<td>0,015</td> +</tr> +<tr> +<td> 3. unplaned +</td> +<td>91</td> +<td>77</td> +<td>67</td> +<td>0,011</td> +<td>0,013</td> +<td>0,015</td> +</tr> +<tr> +<td> 4. plank with battens +</td> +<td>83</td> +<td>67</td> +<td>56</td> +<td>0,012</td> +<td>0,015</td> +<td>0,018</td> +</tr> +<tr> +<td> 5. lined with roofing paper +</td> +<td>100</td> +<td>71</td> +<td>59</td> +<td>0,01</td> +<td>0,014</td> +<td>0,017</td> +</tr> +<tr> +<td>c. Concrete +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td> 1. trowel finish +</td> +<td>91</td> +<td>77</td> +<td>67</td> +<td>0,011</td> +<td>0,013</td> +<td>0,015</td> +</tr> +<tr> +<td>  2. float finish +</td> +<td>77</td> +<td>67</td> +<td>63</td> +<td>0,013</td> +<td>0,015</td> +<td>0,016</td> +</tr> +<tr> +<td>  3. finished, with gravel on bottom +</td> +<td>67</td> +<td>59</td> +<td>50</td> +<td>0,015</td> +<td>0,017</td> +<td>0,02</td> +</tr> +<tr> +<td>  4. unfinished +</td> +<td>71</td> +<td>59</td> +<td>50</td> +<td>0,014</td> +<td>0,017</td> +<td>0,02</td> +</tr> +<tr> +<td>  5. gunite, good section +</td> +<td>63</td> +<td>53</td> +<td>43</td> +<td>0,016</td> +<td>0,019</td> +<td>0,023</td> +</tr> +<tr> +<td>  6. gunite, wavy section +</td> +<td>56</td> +<td>45</td> +<td>40</td> +<td>0,018</td> +<td>0,022</td> +<td>0,025</td> +</tr> +<tr> +<td>  7. on good excavated rock +</td> +<td>59</td> +<td>50</td> +<td></td> +<td>0,017</td> +<td>0,02</td> +<td></td> +</tr> +<tr> +<td>  8. on irregular excavated rock +</td> +<td>45</td> +<td>37</td> +<td></td> +<td>0,022</td> +<td>0,027</td> +<td></td> +</tr> +<tr> +<td>d. Concrete bottom float finish with sides of: +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. dressed stone in mortar +</td> +<td>67</td> +<td>59</td> +<td>50</td> +<td>0,015</td> +<td>0,017</td> +<td>0,02</td> +</tr> +<tr> +<td>  2. random stone in mortar +</td> +<td>59</td> +<td>50</td> +<td>42</td> +<td>0,017</td> +<td>0,02</td> +<td>0,024</td> +</tr> +<tr> +<td>  3. cement rubble masonry, plastered +</td> +<td>63</td> +<td>50</td> +<td>42</td> +<td>0,016</td> +<td>0,02</td> +<td>0,024</td> +</tr> +<tr> +<td>  4. cement rubble masonry +</td> +<td>50</td> +<td>40</td> +<td>33</td> +<td>0,02</td> +<td>0,025</td> +<td>0,03</td> +</tr> +<tr> +<td>  5. dry rubble or riprap +</td> +<td>50</td> +<td>33</td> +<td>29</td> +<td>0,02</td> +<td>0,03</td> +<td>0,035</td> +</tr> +<tr> +<td>e. Gravel bottom with sides of: +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. formed concrete +</td> +<td>59</td> +<td>50</td> +<td>40</td> +<td>0,017</td> +<td>0,02</td> +<td>0,025</td> +</tr> +<tr> +<td>  2. random stone mortar +</td> +<td>50</td> +<td>43</td> +<td>38</td> +<td>0,02</td> +<td>0,023</td> +<td>0,026</td> +</tr> +<tr> +<td>  3. dry rubble or riprap +</td> +<td>43</td> +<td>30</td> +<td>28</td> +<td>0,023</td> +<td>0,033</td> +<td>0,036</td> +</tr> +<tr> +<td>f. Brick +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. glazed +</td> +<td>91</td> +<td>77</td> +<td>67</td> +<td>0,011</td> +<td>0,013</td> +<td>0,015</td> +</tr> +<tr> +<td>  2. in cement mortar +</td> +<td>83</td> +<td>67</td> +<td>56</td> +<td>0,012</td> +<td>0,015</td> +<td>0,018</td> +</tr> +<tr> +<td>g. Masonry +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. cemented rubble +</td> +<td>59</td> +<td>40</td> +<td>33</td> +<td>0,017</td> +<td>0,025</td> +<td>0,03</td> +</tr> +<tr> +<td>  2. dry rubble +</td> +<td>43</td> +<td>31</td> +<td>29</td> +<td>0,023</td> +<td>0,032</td> +<td>0,035</td> +</tr> +<tr> +<td>h. Dressed ashlar/stone paving +</td> +<td>77</td> +<td>67</td> +<td>59</td> +<td>0,013</td> +<td>0,015</td> +<td>0,017</td> +</tr> +<tr> +<td>i. Asphalt +</td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +<td></td> +</tr> +<tr> +<td>  1. smooth +</td> +<td>77</td> +<td>77</td> +<td></td> +<td>0,013</td> +<td>0,013</td> +<td></td> +</tr> +<tr> +<td>  2. rough +</td> +<td>63</td> +<td>63</td> +<td></td> +<td>0,016</td> +<td>0,016</td> +<td></td> +</tr> +<tr> +<td>j. Vegetal lining +</td> +<td>33</td> +<td></td> +<td>2</td> +<td>0,03</td> +<td></td> +<td>0,5</td> +</tr> +</tbody> +</table> \ No newline at end of file diff --git a/docs-en/calculators/hsl/types_sections.md b/docs-en/calculators/hsl/types_sections.md new file mode 100644 index 0000000000000000000000000000000000000000..6a46167d126a2826f2fae1fdf67acfc84fd5aadd --- /dev/null +++ b/docs-en/calculators/hsl/types_sections.md @@ -0,0 +1,50 @@ +# Section types + +<div style="position: relative"><a id="section-rectangulaire" style="position: absolute; top: -60px;"></a></div> +## Rectangular section + + + +The rectangular section is characterized by the following parameters: + + * width at bottom \(L\) (in m) + +<div style="position: relative"><a id="section-circulaire" style="position: absolute; top: -60px;"></a></div> +## Circular section + + + +The circular section is characterized by the following parameters: + + * the pipe diameter \(D\) (in m) + * the angle \(\theta\) between the pipe bottom and the junction point between water surface and pipe (in Rad) + + \(\theta = \arccos\left(1-\frac{y}{D/2}\right)\) + + \(\theta' = \frac{2}{D\sqrt{1-\left(1-\frac{2y}{D}\right)^2}}\) + +<div style="position: relative"><a id="section-trapezoidale" style="position: absolute; top: -60px;"></a></div> +## Trapezoidal section + + + +The trapezoidal section is characterized by the following parameters: + + * width at bottom \(L\) (in m) + * bank slope (inclination to the vertical: widening between the top and bottom of the slope divided by the depth.) \(m\) (in m/m) + +<div style="position: relative"><a id="section-parabolique" style="position: absolute; top: -60px;"></a></div> +## Parabolic section + +The parabolic section is characterized by a mirror width that can be expressed in the form: + +\(B = \Lambda.y^k\). + +With \(k\): coefficient between 0 and 1. \(k=0.5\) corresponds to the true parabolic form. + +\(\Lambda\) can be calculated by giving: + + * \(y_b\): bank height (in m) + * \(B_b\): embankment width (in m) + +We then have: \(\Lambda = \frac{B_b}{y_b^k}\) diff --git a/docs-en/calculators/hsl/var_hydrauliques.md b/docs-en/calculators/hsl/var_hydrauliques.md new file mode 100644 index 0000000000000000000000000000000000000000..842611a42bebaef039a791f0b9f392637a142f29 --- /dev/null +++ b/docs-en/calculators/hsl/var_hydrauliques.md @@ -0,0 +1,196 @@ +# Hydraulic variables + +<div style="position: relative"><a id="largeur-au-miroir-b" style="position: absolute; top: -60px;"></a></div> +## Width at mirror B + +#### Rectangular section +\(B=L\) + +\(B'=\dfrac{dB}{dy}=0\) + +#### Circular section +\(B=D\sin\theta\) + +\(B'=\dfrac{dB}{dy}=D.\theta'\cos\theta\) + +#### Trapezoidal section +\(B=L+2..m.y\) + +\(B'=\dfrac{dB}{dy}=2.L.m\) + +#### Parabolic section +\(B=\dfrac{B_b}{y_b^k}y^k\) + +\(B'=\dfrac{dB}{dy}=\dfrac{B_b.k}{y_b^k}y^{k-1}\) + +<div style="position: relative"><a id="perimetre-mouille-p" style="position: absolute; top: -60px;"></a></div> +## Wet perimeter P + +#### Rectangular section +\(P=L+2y\) + +\(P'=\dfrac{dP}{dy}=2\) + +#### Circular section +\(P=D.\theta\) + +\(P'=\dfrac{dP}{dy}=D.\theta'\) + +#### Trapezoidal section +\(P=L+2y\sqrt{1+m^2}\) + +\(P'=\dfrac{dP}{dy}=2\sqrt{1+m^2}\) + +#### Parabolic section +\(P=2\sum _{i=1}^{n}\sqrt{\dfrac{1}{n^2}+\dfrac{1}{4}\left( B\left(\dfrac{i.y}{n}\right)-B\left(\dfrac{(i-1).y}{n}\right) \right)^2}\) for n large enough + +\(P'=\dfrac{dP}{dy}=2\sqrt{1+\left(\dfrac{B'}{2} \right )^2}\) + +<div style="position: relative"><a id="surface-mouillee-s" style="position: absolute; top: -60px;"></a></div> +## Wet surface S + +#### Rectangular section +\(S=L.y\) + +\(S'=\dfrac{dS}{dy}=B\) + +#### Circular section +\(S=\dfrac{D^2}{4} \left(\theta - \sin\theta.\cos\theta \right)\) + +\(S'=\dfrac{dS}{dy}=B\) + +#### Trapezoidal section +\(S=(L+m.y)y\) + +\(S'=\dfrac{dS}{dy}=B\) + +#### Parabolic section +\(S=\dfrac{B_b}{y_b^k}\dfrac{y^{k+1}}{k+1}\) + +\(S'=\dfrac{dS}{dy}=B\) + +<div style="position: relative"><a id="rayon-hydraulique-r" style="position: absolute; top: -60px;"></a></div> +## Rayon hydraulique R + +\(\dfrac{S}{P}\) + +<div style="position: relative"><a id="froude-fr" style="position: absolute; top: -60px;"></a></div> +## Froude Fr + +\(Fr=\dfrac{U}{c}=\sqrt{\dfrac{Q^2 B}{g S^3}}\) + +<div style="position: relative"><a id="vitesse-moyenne-v" style="position: absolute; top: -60px;"></a></div> +## Average speed V + +\(V=\dfrac{Q}{S}\) + +<div style="position: relative"><a id="tirant-deau-normal-yn" style="position: absolute; top: -60px;"></a></div> +## Normal depth Yn + +The normal depth is reached when the water line is parallel to the bottom, the load is then itself parallel to the water line and therefore the head loss is equal to the slope of the bottom: \(If=J\) + +With: + + * \(I_f\): the slope of the bottom (en m/m) + * \(J\): the head loss (en m/m ) + +To calculate the normal depth \(Y_n\), one may solve + +\(f(Y_n)=Q-KR^{2/3}S\sqrt{I_f}=0\) + +using Newton's method: + +\(h_{k+1} = h_k - \dfrac{f(h_k)}{f'(h_k)}\) + +with: + + * \(f(h_k) = Q-KR^{2/3}S\sqrt{I_f}\) + * \(f'(h_k) = -K \sqrt{I_f}(\dfrac{2}{3}R'R^{-1/3}S+R^{2/3}S')\) + + +<div style="position: relative"><a id="tirant-deau-critique-yc" style="position: absolute; top: -60px;"></a></div> +## Critical depth Yc + +Critical depth is reached when Froude number \(Fr=1\). + +\(f(Y_c)=Fr^2-1=0\) + +We use Newton's method, posing + +\(h_{k+1} = h_k - \dfrac{f(h_k)}{f'(h_k)}\) + +with: + + * \(f(h_k) = \dfrac{Q^2 B}{g S^3} - 1\) + * \(f'(h_k) = \dfrac{Q^2}{g} \dfrac{B'.S - 3 B S'}{S^4}\) + +<div style="position: relative"><a id="tirant-deau-correspondant-ycor" style="position: absolute; top: -60px;"></a></div> +## Corresponding depth Ycor + +<div style="position: relative"><a id="tirant-deau-conjugue-ycon" style="position: absolute; top: -60px;"></a></div> +## Conjugate depth Ycon + +<div style="position: relative"><a id="charge-specifique-hs" style="position: absolute; top: -60px;"></a></div> +## Specific head Hs + +\(H_s = \dfrac{V^{2}}{2g}\) + +<div style="position: relative"><div style="position: relative"><a id="charge-critique-hsc" style="position: absolute; top: -100px;" style="position: absolute; top: -60px;"></a></div></div> +## Critical head Hsc + +\(H_{sc} = Y_c + \dfrac{V(Y_c)^{2}}{2g}\) + +<div style="position: relative"><a id="perte-de-charge-j" style="position: absolute; top: -60px;"></a></div> +## Head loss J + +Head loss \(J\) is calculating using Manning-Strickler formula: + +\(J=\dfrac{U^2}{K^{2}R^{4/3}}=\dfrac{Q^2}{S^2K^{2}R^{4/3}}\) + + +With \(K\) ths Strickler coefficient (in \(m^{1/3}/s\)) + +<div style="position: relative"><a id="variation-lineaire-de-lenergie-specifique-i-j" style="position: absolute; top: -60px;"></a></div> +## Linear variation of specific energy I-J + +<div style="position: relative"><a id="impulsion-imp" style="position: absolute; top: -60px;"></a></div> +## Impulsion Imp + +It is the sum of the amount of movement and the resultant of the pressure force in a section: + +\(I=\rho Q U + \rho g S \overline{h}\) + +With: + + * \(I\): the impulsion (kg.m.s-2) + * \(\rho\): the density of water (kg/m3) + * \(Q\): the flow (m3.s-1) + * \(V\): the average fluid velocity in the section (m.s-1) + * \(g\): the gravity constant (m.s-2) + * \(S\): the wet surface (m2) + * \(\overline{h}\): the distance from the centre of gravity of the section to the free surface (m) + +The distance from the centre of gravity of the section to the free surface \(\overline{h}\) can be traced back using the formula: + +\(S.\overline{h} = \int_{0}^{y} (y-z)B(z)dz\) + +With \(y\) the depth and \(B(z)\) the width at mirror, for a draft \(z\) + +#### Rectangular section + +\(S.h = \dfrac{L.y^2}{2}\) + +#### Circular section + +\(S.h = \dfrac{D^3}{8}\left (\sin\theta - \dfrac{\sin^3\theta}{3} - \theta \cos\theta \right )\) + +#### Trapezoidal section + +\(S.h = \left (\dfrac{L}{2} + \dfrac{m.y}{3} \right )y^2\) + +#### Parabolic section + +\(S.h=\dfrac{B_b.y^{k+2}}{y_b^k(k+1)(k+2)}\) + +<div style="position: relative"><a id="force-tractrice-tau0" style="position: absolute; top: -60px;"></a></div> +## Tractive force Tau0 diff --git a/docs-en/calculators/hyd_en_charge/cond_distri.md b/docs-en/calculators/hyd_en_charge/cond_distri.md new file mode 100644 index 0000000000000000000000000000000000000000..3d6e22fb66a23f3587695280322650c25d8c8c6a --- /dev/null +++ b/docs-en/calculators/hyd_en_charge/cond_distri.md @@ -0,0 +1,59 @@ +# Distributor pipe + +Analytical relationship for the direct calculation of pressure drops in pipes distributing a flow rate in a homogeneous manner based on the Blasius formula. + +## Assumptions + + + +We assume a pipe length \(L\), inner diameter \(D\), with a flow rate at the top \(Q\). We calculate the pressure drop between the two ends of the pipe. In a constant flow section \(q\), the friction coefficient is evaluated with the Blasius formula, valid for moderate Reynolds numbers for smooth walls: + +$$\lambda \simeq a Re^{-0.25}$$ + +## Analytical development + +We're recording the position from the downstream end of the pipe. The flow rate is supposed to vary linearly with \(x\), and is then written: + +$$q(x)=Q x/L$$ + +Let's note \(S=\pi D^2/4\) the inner surface of the pipe. +The pressure drop is obtained by integrating the Darcy-Weisbach relationship: + +$$\Delta H=\int_{x=0}^{L} a Re^{-0.25} \frac{u^2(x)}{2gD}dx$$ + +Note the kinematic viscosity. We then replace \(Re\) with \(u D/\nu\), which gives + +$$\Delta H=\int_{x=0}^{L} a u(x)^{-0.25}D^{-0.25}\nu ^{0.25} \frac{u^2(x)}{2gD}dx$$ + +By rearranging, we get: + +$$\Delta H=\int_{x=0}^{L} a \nu ^{0.25} \frac{u^{1.75}(x)}{2gD^{1.25}}dx$$ + +Let's use the flow equation to show the flow ($u(x)=q(x)/S$): + +$$\Delta H=\int_{x=0}^{L} a \nu ^{0.25} \frac{(Qx/(LS))^{1.75}}{2gD^{1.25}}dx$$ + +then the diameter: + +$$\Delta H=\int_{x=0}^{L} a \nu ^{0.25} \frac{(4Qx/(L\pi D^2))^{1.75}}{2gD^{1.25}}dx$$ +We rearrange to get + +$$\Delta H=a \nu ^{0.25} \frac{(4/\pi)^{1.75}Q^{1.75}}{2g D^{4.75}} \int_{x=0}^{L} (x/L)^{1.75}dx$$ + +By integrating, we obtain + +$$\Delta H=a \nu ^{0.25} \frac{(4/\pi)^{1.75}Q^{1.75}}{2g D^{4.75}}\frac{L}{2.75}$$ + +$$\Delta H=a \nu ^{0.25} \frac{4^{1.75}}{5.5g \pi^{1.75}}{Q^{1.75}L}{D^{4.75}}$$ + +## Digital application + +For water at 20°C: \(\nu\simeq 10^{-6}\) m<sup>2</sup>/s, which gives + +$$Delta H=0.323\ 10^{-3}\frac{Q^{1.75}}{D^{4.75}}L$$ + +with \(\Delta H\) in meters. + +For water at 50°C, \(\nu\simeq 0.556 10^{-6}\) m<sup>2</sup>/s, which means that the pressure drop is reduced by about 14%, or + +$$Delta H= 0.28\ 10^{-3}\frac{Q^{1.75}}{D^{4.75}}L$$ diff --git a/docs-en/calculators/hyd_en_charge/cond_distri.png b/docs-en/calculators/hyd_en_charge/cond_distri.png new file mode 100644 index 0000000000000000000000000000000000000000..c51ea33cdb8ace1dd99fe574ecdb70aaaac01f0a Binary files /dev/null and b/docs-en/calculators/hyd_en_charge/cond_distri.png differ diff --git a/docs-en/calculators/hyd_en_charge/lechapt-calmon.md b/docs-en/calculators/hyd_en_charge/lechapt-calmon.md new file mode 100644 index 0000000000000000000000000000000000000000..35ed86198ba7266e574bd50212296c5a96b8ac38 --- /dev/null +++ b/docs-en/calculators/hyd_en_charge/lechapt-calmon.md @@ -0,0 +1,33 @@ +# Lechapt and Calmon + +Loss of charge in a circular pipe: Lechapt and Calmon abacus + +Lechapt and Calmon formula is based on adjustements of [Cyril Frank Colebrook formula](https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation): + +$$J=L.Q^M.D^{-N}$$ + +With: + +- \(J\): loss of charge in mm/m or m/km; +- \(Q\): flow in L/s; +- \(D\): pipe diameter in m; +- \(L\), \(M\) and \(N\) coefficients depending on roughness {ϵ}. + +The error made with respect to the Colebrook formula is less than 3% for speeds between 0.4 and 2 m/s. + +The correlation table of the coefficients is as follows: + + +| Matériau | ϵ (mm) | \(L\) | \(M\) | \(N\) | +|----------|-------------:|----:|----:|-----:| +| Uncoated cast iron or steel - Coarse concrete (corrosive water) | 2 | 1.863 | 2 | 5.33 | +| Uncoated cast iron or steel - Coarse concrete (low corrosive water) | 1 | 1.601 | 1.975 | 5.25 | +| Cast iron or steel with cement coating | 0.5 | 1.40 | 1.96 | 5.19 | +| Cast iron or steel bitumen coating - centrifuged concrete | 0.25 | 1.16 | 1.93 | 5.11 | +| Rolled steel - smooth concrete | 0.1 | 1.10 | 1.89 | 5.01 | +| Cast iron or steel centrifugal coating | 0.05 | 1.049 | 1.86 | 4.93 | +| PVC - polyethylene | 0.025 | 1.01 | 1.84 | 4.88 | +| Hydraulically smooth pipe - 0.05 ≤ D ≤ 0.2 | 0.00 | 0.916 | 1.78 | 4.78 | +| 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 diff --git a/docs-en/calculators/pab/chute.md b/docs-en/calculators/pab/chute.md new file mode 100644 index 0000000000000000000000000000000000000000..18aba38162bbdb1ebffe199a4d2187da6a206dfd --- /dev/null +++ b/docs-en/calculators/pab/chute.md @@ -0,0 +1,11 @@ +# Fish ladders: Fall + +This tool is an aid for the pre-dimensioning of a fish ladder: it allows to calculate the missing value of the three quantities: + +- the upstream dimension (\(Z_1\)) in m; +- the downstream dimension (\(Z_2\)) in m; +- the fall (\(\Delta H\)) in m; + +## Formula + +$$\Delta H = Z_1 - Z_2$$ diff --git a/docs-en/calculators/pab/cloisons.md b/docs-en/calculators/pab/cloisons.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1bf7f527a0011cdc3baccaf78b0d83702a24c9 --- /dev/null +++ b/docs-en/calculators/pab/cloisons.md @@ -0,0 +1,43 @@ +# Cross walls + +This tool, which is similar to the [Parallel Structures](../structures/lois_ouvrages.md) tool, is an aid to the hydraulic pre-dimensioning of a fish pass: it +is most often used for the dimensioning of notches, slots, orifices, etc. +characterizing the walls of a pass as well as for the setting in altitude of the notches, +slots and apron of the upstream basin of a pass. + +It allows to calculate the missing value of the 7 values characterizing the fall, the surface +of the submerged orifice, the width of the slot, the load on the slot, the width of the notch, +the load on the notch and the flow rate. + +Mandatory data to be provided are the dimensions of the basins (width and length) and the +average draught in metres. These data associated with the fall between basins allow us to calculate [the power dissipation](volume.md). + +Once the module is calculated, the tool proposes to create a basin pass from this cross wall by specifying the upstream water elevation, the number of falls in the pass and the downstream water elevation. + +## Hydraulic structures that can be part of the cross wall + +The tool allows you to place one or more structures in parallel among the following types of structures: + +### Submerged orifice + + + +*Excerpt from Larinier, M., Travade, F., Porcher, J.-P., Gosset, C., 1992. Fish passage: expertise and design of crossing structures. CSP. (page 94)*. + +The submerged orifice equation is described on [the submerged orifice formula page](../structures/orifice_noye.md). + +### Submerged Slot + + + +*Excerpt from Larinier, M., Travade, F., Porcher, J.-P., Gosset, C., 1992. Fish passage: expertise and design of crossing structures. CSP. (page 94)*. + +The submerged slot equation is described on [the sumberged slot formula page](../structures/fente_noyee.md). + +### Notch + + + +*Excerpt from Larinier, M., Travade, F., Porcher, J.-P., Gosset, C., 1992. Fish passage: expertise and design of crossing structures. CSP. (page 94)*. + +The equation used for the notch is [that of Kindsvater-Carter and Villemonte](../structures/kivi.md). diff --git a/docs-en/calculators/pab/dimensions.md b/docs-en/calculators/pab/dimensions.md new file mode 100644 index 0000000000000000000000000000000000000000..cc14f780b14640fe9707a93860169a5ac6b96a16 --- /dev/null +++ b/docs-en/calculators/pab/dimensions.md @@ -0,0 +1,13 @@ +# Fish ladders: Dimensions + +This tool is an aid for dimensioning the basins of a pass: it allows to +calculate the missing value of the four quantities: + +- the volume of water (\(V\)) in m<sup>3</sup>; +- the mean draught \((Y_{mean}\)) in m; +- the length of the basin (\(L\)) in m; +- the width of the basin (\(B\)) in m. + +The calculation is carried out by applying the formula: + +$$V = Y_{mean} \times L \times B$$ diff --git a/docs-en/calculators/pab/nombre.md b/docs-en/calculators/pab/nombre.md new file mode 100644 index 0000000000000000000000000000000000000000..84130b4b260fb4510b25f8a9f78d9732aadcae58 --- /dev/null +++ b/docs-en/calculators/pab/nombre.md @@ -0,0 +1,13 @@ +# Fish ladders: Number of falls + +This tool is an aid for the pre-dimensioning of a fish ladder: it allows to calculate the missing value of the three quantities: + +- the total fall (\(\Delta H_T\)) in m; +- the fall between basins (\(\Delta H\)) in m; +- the number of falls (\(N\)); + +as well as the residual fall (\(\Delta H_R\)) in m. + +## Formula + +$$\Delta H_T = \left ( \Delta H * N \right ) + \Delta H_R $$ diff --git a/docs-en/calculators/pab/pab.md b/docs-en/calculators/pab/pab.md new file mode 100644 index 0000000000000000000000000000000000000000..59af590c4a722629b3954fe5a56862c5041eb7a2 --- /dev/null +++ b/docs-en/calculators/pab/pab.md @@ -0,0 +1,87 @@ +# Fish ladder + +## General presentation + +This module calculates the water line of a fish ladder with successive basins. Two calculation possibilities are offered: calculation of the inflow into the channel from the upstream and downstream water levels, calculation of the upstream water level from the inflow into the channel and the downstream water level. + +The creation of a channel can be done from scratch or from a wall model created with the [Cross walls tool](cloisons.md). + +Input parameters are divided into two steps: + +- The hydraulic parameters which include the boundary conditions (water level upstream and downstream of the fish ladder) and the inflow into the fish ladder. +- The parameters of the basins, which include the geometry of the basins and the parameters of the hydraulic structures constituting the walls. + +It is possible to vary one or two hydraulic parameters so as to obtain a series of results for several boundary conditions or flows. + +## Input of the pass geometry + +The geometry table has a line for each basin and a final line to describe the downstream wall. For each basin, the parameters present are + +- length of the basin (m) +- basin width (m) +- attraction flow (m<sup>3</sup>/s) +- Mid-basin invert rating (m) +- Upstream invert elevation (m) + +To these are added the parameters of the structures of the upstream wall of each basin. + +### Modification of the pass structure + +The structure of the pass, i.e. the number of basins or the number of structures in a wall can be changed using the toolbar at the top right of the table: + + + +This bar is activated when you select: + +- a basin (which includes its upstream wall) or the downstream wall by clicking on the first column of a row +- a structure by clicking on an uneditable cell of a structure in a wall +- all structures in a column of the table by clicking on the header of the column to be selected + +It is also possible to expand an existing selection by pressing the [Ctrl] key to add a new item to the selection, or by pressing the [Shift] key to expand the selection between two rows or two columns. + +Depending on the elements selected in the table, the toolbar indicates whether the proposed actions will apply to the selected basins or structures. + +The toolbar consists of the following buttons: + +1. Number of basins or structures to be added or duplicated +1. Add *n* basins or *n* structures with *n* the number indicated on the first button. +1. Duplicate *n* basins or *n* structures with *n* the number indicated on the first button. +1. Delete selected basins or structures +1. 1. Move the selected pools (or structures) upwards (or to the left). +1. 1. Move the selected basins (or structures) downwards (or to the right). + +### Advanced modification of the pass geometry + +The selection of basins or structures gives access to a button "Modify values" which allows to modify a parameter among all the variables of the selected cells in the geometry table. + +For this variable to be modified, one can: + +- define a fixed value; +- apply a delta; +- calculate an interpolation between the basin selected upstream and downstream. + +### The downstream wall + +The downstream wall, in addition to the laws of structures available on the walls, allows the use of a "lift gate" in the form of two laws: + +- Regulated notch (Villemonte 1957); +- Regulated submerged slot (Larinier 1992). + +The lift gate is a structure where the crest of the weir is regulated to maintain a setpoint waterfall between the last basin and the downstream water level. In addition to the conventional parameters of the flow laws, it includes: + +- a *DH* setpoint waterfall (m) +- a minimum crest elevation *minZDV* (m); +- a maximum crest elevation *maxZDV* (m); + +During the calculation, if the calculated crest elevation is less than *minZDV* (resp. greater than *maxZDV*), the value is locked at *minZDV* (resp. *maxZDV*) and a warning appears in the calculation log. + +## 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). + +Two graphs are present: + +- A profile along the channel with the apron elevation of the basins and the water elevation in each basin. +- A general graph allowing the selection of any parameter from the result table in abscissa and ordinate. + +If several results are available due to the variation of one or two hydraulic parameters of the pass, all calculated water lines are displayed in the long profile, and a drop-down list allows to select the result to be displayed in the generalist table and graph. diff --git a/docs-en/calculators/pab/pab_barre_outils_edition.png b/docs-en/calculators/pab/pab_barre_outils_edition.png new file mode 100644 index 0000000000000000000000000000000000000000..045a87d79cae58e34a98ab5a6ec4394e7cf67a14 Binary files /dev/null and b/docs-en/calculators/pab/pab_barre_outils_edition.png differ diff --git a/docs-en/calculators/pab/volume.md b/docs-en/calculators/pab/volume.md new file mode 100644 index 0000000000000000000000000000000000000000..d530ab6e3503de6ba22fdd73672cae9fb010b099 --- /dev/null +++ b/docs-en/calculators/pab/volume.md @@ -0,0 +1,17 @@ +# Fish ladders: Power dissipation + +This tool is an aid for the pre-dimensioning of a fish ladder: it allows to calculate the missing value of the four quantities: + +- the fall between the basins (\(\Delta H\)) in m; +- the flow rate (\(Q\)) in m<sup>3</sup>/s; +- the volume of the basins (\(V\)) in m<sup>3</sup>; +- the power density (\(P_v\)) in W/m<sup>3</sup>. + +The formula for calculating the power dissipation is then: + +$$P_v = \frac{\rho \mathrm{g} Q \Delta H}{V}$$ + +with: + +- \(\rho\): the density of water; +- \(\mathrm{g}\): the acceleration of the Earth's gravity = 9.81 m.s<sup>-2</sup> diff --git a/docs-en/calculators/pam/concentration.md b/docs-en/calculators/pam/concentration.md new file mode 100644 index 0000000000000000000000000000000000000000..372c6b12d923c48e9535c4c775c6b6b063cd5e0f --- /dev/null +++ b/docs-en/calculators/pam/concentration.md @@ -0,0 +1,20 @@ +# Blocks concentration + +This module makes it possible to calculate the concentration of uniformly distributed blocks in a rock-ramp fish pass. + +It allows to calculate one of the following values: + +- The width of the pass (m) ; +- The number of blocks ; +- The diameter of the blocks (m) ; +- The concentration of the blocks \(C\). + +## Formula + +The formula is detailed in the [rock-ramp fish pass](./macrorugo.md) documentation. + +## Harmonization + +When calculating the number of blocks, if it is not an integer, upward and downward harmonized numbers of blocks are given along with corresponding concentration values. + +Tolerance is of the order of a centimetre. diff --git a/docs-en/calculators/pam/macrorugo.md b/docs-en/calculators/pam/macrorugo.md new file mode 100644 index 0000000000000000000000000000000000000000..bcd90f51ea3c4ba419f4cd6fe6b2b5766eec04ee --- /dev/null +++ b/docs-en/calculators/pam/macrorugo.md @@ -0,0 +1,31 @@ +# Rock-ramp fishpasses + +The rock-ramp fishpass calculation module makes it possible to calculate the characteristics of a rock-ramp pass made up of uniformly distributed blocks with equal transverse \(ax\) and longitudinal \(ay\) spacings. + + + +*Excerpt from Larinier et al., 2006[^1]* + +[^1]: Larinier, Michel, Courret, D., Gomes, P., 2006. Technical guide for the design of "natural" fish passes, GHAPPE RA Report. Compagnie Nationale du Rhône / Adour Garonne Water Agency. http://dx.doi.org/10.13140/RG.2.1.1834.8562 + + +The tool allows you to calculate one of the following values: + +- The width of the pass (m); +- The slope of the pass (m); +- The flow rate (m<sup>3</sup>/s); +- The depth \(h\) (m); +- The concentration of the blocks. + +It requires the following values to be entered: + +- The upstream bottom coordinate (m); +- The length of the pass (m); +- The background roughness (m); +- The width of the blocks \(D\) facing the flow (m); +- The useful height of the blocks \(k\) (m); +- The shape parameter of the blocks (1 for round, 2 for square) + +The spacing between the blocks is then calculated with the following formula: + +$$ax = ay = \frac{D}{\sqrt{C}}$$ diff --git a/docs-en/calculators/pam/macrorugo_complexe.md b/docs-en/calculators/pam/macrorugo_complexe.md new file mode 100644 index 0000000000000000000000000000000000000000..53976e7ed83cbb0860b15b1c27c648abbf060993 --- /dev/null +++ b/docs-en/calculators/pam/macrorugo_complexe.md @@ -0,0 +1,16 @@ +# Compound rock-ramp fishpasses + +This calculation module allows to calculate the flow passing through a rock-ramp pass called "complex" because it has an inclined apron or multiple aprons. + +## General characteristics + +The parameters to be entered are the same as for [the so-called "simple" macro-roughness pass](macrorugo.md). Concerning the apron of the pass two choices are offered: + +- Multiple aprons: it is possible to create, duplicate, delete, change the order of as many aprons as necessary. For each apron, the parameters to be entered are: the width of the apron and the dimension of the apron upstream of the pass. +- The inclined apron: in addition to the width of the apron, the right and left sides of the apron must be entered upstream of the pass. + +The calculated data are the same as for [the so-called "simple" macro-roughness pass](macrorugo.md). The results display the different data for each apron and the graph allows you to view this data for each apron (transverse profile). In the event that at least one of the calculation parameters varies, the results are available individually via a drop-down list. + +## Inclined apron case + +The calculation of an inclined apron pass consists in discretizing the pass into several horizontal aprons. The width of the created aprons is fixed at the distance between two blocks with an adjustment of the uppest apron to obtain the total width of the pass. It is possible to edit the created aprons by selecting "Multiple aprons" after performing a calculation with an inclined apron. diff --git a/docs-en/calculators/pam/macrorugo_theorie.md b/docs-en/calculators/pam/macrorugo_theorie.md new file mode 100644 index 0000000000000000000000000000000000000000..7ec96462ba5e55df91f77cf5ec3960f71b15339e --- /dev/null +++ b/docs-en/calculators/pam/macrorugo_theorie.md @@ -0,0 +1,182 @@ +# Calculation of the flow rate of a rock-ramp pass + +The calculation of the flow rate of a rock-ramp pass corresponds to the implementation of the algorithm and the equations present in +*Cassan L, Laurens P. 2016. Design of emergent and submerged rock-ramp fish passes. Knowl. Manag. Aquat. Ecosyst. 417, 45, <https://doi.org/10.1051/kmae/2016032>*. + +## General calculation principle + +There are three possibilities: + +- the submerged case when \(h \ge 1.1 \times k\) +- the emergent case when \(h \le k\) +- the quasi-emergent case when \(k < h < 1.1 \times k\) + +In the quasi-emergent case, the calculation of the flow corresponds to a transition between emergent and submerged case formulas: + +$$Q = a \times Q_{submerge} + (1 - a) \times Q_{emergent}$$ + +with \(a = \dfrac{h / k - 1}{1.1 - 1}\) + +## Submerged case + +The calculation is done by integrating the velocity profile in and above the macro-roughnesses. +The calculated velocities are the temporal and spatial averages per plane parallel to the bottom. + +In macro-roughnesses, velocities are obtained by double averaging the Navier-Stokes equations in uniform regime with a mixing length model for turbulence. + +Above the macro-roughnesses, the classical turbulent boundary layer analysis is maintained. +The velocity profile is continuous at the top of the macro-roughnesses and is dependent on the boundary conditions set by the hydraulics: + +- velocity at the bottom (without turbulence) in m/s: + +$$u_0 = \sqrt{2 g S D (1 - \sigma C)/(C_d C)}$$ + +- total shear stress at the top of the roughnesses in m/s: + +$$u_* = \sqrt{gS(h-k)}$$ + +The average bed velocity is given by integrating the flows between and above the blocks: + +$$\bar{u} = \frac{Q_{inf} + Q_{sup}}{h}$$ + +with respectively \(Q_{inf}\) and \(Q_{sup}\) the unit flows for the part in the canopy and the part above the canopy. + +### Calculation of the unit flow rate *Q<sub>inf</sub>* in the canopy + +The flow in the canopy is obtained by integrating the velocity profile (Eq. 9, Cassan et al., 2016): + +$$Q_{inf} = \int_{0}^1 u(\tilde{z}) d \tilde{z}$$ + +with + +$$u(\tilde{z}) = u_0 \sqrt{\beta \left( \frac{h}{k} -1 \right) \frac{\sinh(\beta \tilde{z})}{\cosh(\beta)} + 1}$$ + +with + +$$\beta = \sqrt{(k / \alpha_t)(C_d C k / D)/(1 - \sigma C)}$$ + +with \(\sigma = 1\) for \(C_{d0} = 2\) (square blocks), \(\sigma = \pi/4\) otherwise (circular blocks) + +and \(\alpha_t\) obtained by solving the following equation: + +$$\alpha_t u(1) - l_0 u_* = 0$$ + +with + +$$l_0 = \min \left( s, 0.15 k \right)$$ + +with + +$$s = D \left( \frac{1}{\sqrt{C}} - 1 \right)$$ + +### Calculation of the unit flow *Q<sub>sup</sub>* above the canopy + +$$Q_{sup} = \int_k^h u(z) dz$$ + +with (Eq. 12, Cassan et al., 2016) + +$$u(z) = \frac{u_*}{\kappa} \ln \left( \frac{z - d}{z_0} \right)$$ + +with (Eq. 14, Cassan et al., 2016) + +$$z_0 = (k - d) \exp \left( {\frac{-\kappa u_k}{u_*}} \right)$$ + +and (Eq. 13, Cassan et al., 2016) + +$$ d = k - \frac{\alpha_t u_k}{\kappa u_*}$$ + +which gives + +$$Q_{sup} = \frac{u_*}{\kappa} \left( (h - d) \left( \ln \left( \frac{h-d}{z_0} \right) - 1\right) - \left( (k - d) \left( \ln \left( \frac{k-d}{z_0} \right) - 1 \right) \right) \right)$$ + +## Emerging case + +The calculation of the flow rate is done by successive iterations which consist in finding the flow rate value allowing to obtain the equality between the flow velocity \(V\) and the average velocity of the bed given by the equilibrium of the friction forces (bottom + drag) with gravity: + +$$u_0 = \sqrt{\frac{2 g S D (1 - \sigma C)}{C_d C (1 + N)}}$$ + +with + +$$C_d = C_{d0} (1 + 0.4 / h_*^2) f_F(F)$$ + +$$N = \frac{\alpha C_f}{C_d C h_*}$$ + +with + +$$\alpha = 1 - (a_y / a_x \times C)$$ + +## Formulas used + +### Throughput speed *V* + +$$V = \frac{Q}{B \times h}$$ + +### Average speed between blocks *V<sub>g</sub>* + +$$V_g = \frac{V}{1 - \sqrt{(a_x/a_y)C}}$$ + +### Froude *F* + +$$F = \frac{V_g}{\sqrt{gh}}$$ + +### Froude-related drag coefficient correction function *f<sub>F</sub>(F)* + +If \(F < 1.3\) (Eq. 5, Cassan et al., 2016) + +$$f_F(F) = \mathrm{min} \left( \frac{0.4 C_{d0} + 0.7}{1- (F^2 / 4)}, \frac{1}{F^{\frac{2}{3}}} \right)^2$$ + +else + +$$f_F(F) = F^{\frac{-4}{3}}$$ + +(The distinction is only numerical because \(1- (F^2 / 4)\) is not defined for \(F > 2\)) + +### Coefficient of friction of the bed *C<inf>f</inf>* + +If \(k_s < 10^{-6} \mathrm{m}\) then we use Blasius' formula + +$$C_f = 0.3164 / 4 * Re^{-0.25}$$ + +with + +$$Re = u_0 \times h / \nu$$ + +Else (Eq. 3, Cassan et al., 2016 d'après Rice et al., 1998) + +$$C_f = \frac{2}{(5.1 \mathrm{log} (h/k_s)+6)^2}$$ + + +## Notations + +- \(\alpha\): ratio of the area affected by the bed friction to \(a_x \times a_y\) +- \(\alpha_t\): length scale of turbulence in the block layer (m) +- \(\beta\): ratio between drag stress and turbulence stress +- \(\kappa\): Von Karman constant = 0.41 +- \(\sigma\): ratio between the block area in the plane X,y et \(D^2\) +- \(a_x\): cell width (perpendicular to the flow) (m) +- \(a_y\): length of a cell (parallel to the flow) (m) +- \(B\): pass width (m) +- \(C\): blocks concentration +- \(C_d\): drag coefficient of a block under current flow conditions +- \(C_{d0}\): drag coefficient of a block considering an infinitely high block with \(F \ll 1\) +- \(C_f)\): bed friction coefficient +- \(d\): displacement in the zero plane of the logarithmic profile (m) +- \(D\): width of the block facing the flow (m) +- \(F\): Froude number based on \(h\) and \(V_g\) +- \(g\): acceleration of gravity = 9.81 m.s<sup>-2</sup> +- \(h\): average depth (m) +- \(h_*\): dimensionless depth (\(h / D\)) +- \(k\): useful block height (m) +- \(k_s\): roughness height (m) +- \(l_0\): length scale of turbulence at the top of the blocks (m) +- \(N\): ratio between bed friction and drag force +- \(Q\): flow (m<sup>3</sup>/s) +- \(S\): pass slope (m/m) +- \(u_0\): average bed speed (m/s) +- \(u_*\): shear velocity (m/s) +- \(V\): flow velocity (m/s) +- \(V_g\): velocity between blocks (m/s) +- \(s\): minimum distance between blocks (m) +- \(z\): vertical position (m) +- \(z_0\): hydraulic roughness (m) +- \(\tilde{z}\): dimensionless stand \(\tilde{z} = z / k\) diff --git a/docs-en/calculators/pam/pam_schema_enrochement_regulier.png b/docs-en/calculators/pam/pam_schema_enrochement_regulier.png new file mode 100755 index 0000000000000000000000000000000000000000..f037457aeb9acc9c30baac076d85201f94b771a3 Binary files /dev/null and b/docs-en/calculators/pam/pam_schema_enrochement_regulier.png differ diff --git a/docs-en/calculators/structures/cem_88_d.md b/docs-en/calculators/structures/cem_88_d.md new file mode 100644 index 0000000000000000000000000000000000000000..1937778a3153a840970ab855fbb14a7fa645bcb2 --- /dev/null +++ b/docs-en/calculators/structures/cem_88_d.md @@ -0,0 +1,71 @@ +# CEM88(D) : Weir / Orifice (important sill) + + + +## Weir - free flow +(\(h_1 < W and h_2 \leq \frac{2}{3} h_1\)) + +\(Q = \mu_F L \sqrt{2g} h_1^{3/2}\) + +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\) + +Classical formulation of the submerged weir. + +The switch from submerged to free flow occurs for \(h_2 = \frac{2}{3} h_1\), we then have: + +\(\mu_S = \frac{3 \sqrt{3}}{2} \mu_F\) for \(\mu_F = 0.4 \Rightarrow \mu_S = 1.04\) + +An equivalent free flow coefficient can be calculated: + +\(\mu_{F} = \frac{Q}{L \sqrt{2g} h_{1}^{3/2}}\) + +which makes it possible to evaluate the degree of flooding of the threshold by comparing it to the free coefficient \(\mu_F\) introduces. Indeed, the master coefficient of the structure introduced is that of the free weir. (\(\mu_F\) close to \(0.4\)). + +## Orifice - free flow +(\(h_1 \geq W\) and \(h_2 \leq \frac{2}{3} h_1\)) + +We take a formulation like: + +\(Q = \mu L \sqrt{2g} \left( h_1^{3/2} - (h_1 - W)^{3/2} \right)\) + +This modeling applies well to large rectangular orifices. + +Continuity to free surface operation is ensured when: + +\(\frac{h1}{W} = 1\), we then have \(\mu = \mu_F\). + +## Orifice - submerged flow + +There are two formulations depending on whether the orifice is partially submerged or totally submerged. + +### Partially submerged flow +(\(h_1 \geq W\) and \(\frac{2}{3} h_1 < h_2 < \frac{2}{3} h_1 + \frac{W}{3}\)) + +\(Q = \mu_F L \sqrt{2g} \left[ \frac{3\sqrt{3}}{2} \left( \left( h_1 - h_2 \right)^{1/2} h_2 \right) - \left(h_1 - W \right)^{3/2} \right]\) + +### 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\) + +Classical formulation of submerged orifices, with \(\mu' = \mu_S\). + +Orifice weir operation is represented by the equations above and Figure 19. Regardless of the type of flow under load, an equivalent free flow coefficient is calculated corresponding to the conventional free orifice formulation: + +\(C_F = \frac{Q}{L \sqrt{2g} W (h_1 - 0.5 W)^{1/2}}\) + + + + * (12) : Weir - free flow + * (15) : Orifice - partially submerged + * (13) : Weir - submerged + * (16) : Orifice - totally submerged + * (14) : Orifice - free flow + +Figure 19. Weir - Orifice diff --git a/docs-en/calculators/structures/cem_88_d_graphique.jpg b/docs-en/calculators/structures/cem_88_d_graphique.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8f6314b62464c15acf0dfc16a03926aacac1c4a8 Binary files /dev/null and b/docs-en/calculators/structures/cem_88_d_graphique.jpg differ diff --git a/docs-en/calculators/structures/cem_88_d_schema.jpg b/docs-en/calculators/structures/cem_88_d_schema.jpg new file mode 100644 index 0000000000000000000000000000000000000000..818d5dc4cad7ad331e2441bd9253a47ad0e789fc Binary files /dev/null and b/docs-en/calculators/structures/cem_88_d_schema.jpg differ diff --git a/docs-en/calculators/structures/cem_88_v.md b/docs-en/calculators/structures/cem_88_v.md new file mode 100644 index 0000000000000000000000000000000000000000..7565eea7e2eb57cb5bbdbdd808d45a3448c2b184 --- /dev/null +++ b/docs-en/calculators/structures/cem_88_v.md @@ -0,0 +1,81 @@ +# CEM88(D) : Weir / Orifice (low sill) + + + +## Weir - free flow + +\(Q=\mu_f L \sqrt{2g} h_1^{3/2}\) + +## Weir - submerged flow + +\(Q=k_F \mu_F L \sqrt{2g} h_1^{3/2}\) + +\(k_F\) flow reduction coefficient in submerged flow. The flow reduction coefficient is a function of \(\frac{h_2}{h_1}\) and the value \({\alpha}\) of this ratio when switching from submerged flow to free flow. Flooding is achieved when \(\frac{h_2}{h_1} > \alpha\). Variation law of \(k_F\) was ajusted to experimental results (\(\alpha= 0.75\)). + +Let's put \(x = \sqrt{1-\frac{h_2}{h_1}}\): + + * If \(x > 0.2 : k_F = 1 - \left(1 - \frac{x}{\sqrt{1-\alpha}}\right)^\beta\) + * If \(x \leq 0.2 : k_F = 5x \left(1 - \left(1 - \frac{0.2}{\sqrt{1-\alpha}} \right)^\beta \right)\) + +With \(\beta = -2\alpha + 2.6\), an equivalent free flow coefficient is calculated as above. + +## Undershot gate - free flow + +\(Q = L \sqrt{2g} \left(\mu h_1^{3/2} - \mu_1 (h_1 - W)^{3/2} \right)\) + +Experimentally, the flow coefficient of a valve is found to increase with \(\frac{h_1}{W}\). A law of variation of\(\mu\) was adjusted, in the form of: + +\(\mu = \mu_0 - \frac{0.08}{\frac{h_1}{W}}\) with : \(\mu_0 \simeq 0.4\) + +so \(\mu_1 = \mu_0 - \frac{0.08}{\frac{h_1}{W}-1}\) + +To ensure continuity with the free surface for \(\frac{h1}{W} = 1\), \(\mu_F = \mu_0 - 0.08\) then has to be \(\mu_F = 0.32\) for \(\mu_0 = 0.4\) + + +## Undershot gate - submerged flow + +### Partially submerged flow + +\(Q = L \sqrt{2g} \left[k_F \mu h_1^{3/2} - \mu_1 \left(h_1 - W \right)^{3/2} \right]\) + +\(k_F\) being the same as for free surface. + +The switching from submerged flow to free flow was adjusted to experimental results, we then have a law like: + +\(\alpha = 1 - 0.14 \frac{h_2}{W}\) + +\(0.4 \leq \alpha \leq0.75\) + +In order to ensure continuity with free surface operation, the free surface sumbmerged-free switch must therefore be for \(\alpha = 0.75\) instead of \(2/3\) in the orifice weir formulation. + +### Totally submerged flow + +\(Q = L \sqrt{2g} \left(k_F \mu h_1^{3/2} - k_{F1} \mu_1 \left(h_1 - W \right)^{3/2} \right)\) + +Formulation of \(k_{F1}\) is the same as the one of \(k_{F}\) replacing \(h_2\) with \(h_2-W\) (and \(h_1\) with \(h_1-W\)) for the calculation of coefficient \(x\) and of \({\alpha}\) (and therefore of \(k_{F1}\)). + +Switching to totally submerged occurs for: + +\(h_2 > \alpha_1 h_1 + (1 - \alpha_1) W\) + +with : \(\alpha_1 = 1 - 0.14 \frac{h_2 - W}{W}\) + +\((\alpha_1 = \alpha (h_2-W))\) + +Weir gate operation is represented by the above equations and Figure 20. Regardless of the type of flow under load, an equivalent free flow coefficient is calculated corresponding to a conventional free flow gate design: + +\(C_F = \frac{Q}{L\sqrt{2g} W \sqrt{h_1}}\) + +The default master coefficient for the device is a coefficient of \(C_G\) usually close to \(0.6\). We then transform it into \(\mu_0 = \frac{2}{3} C_G\), which allows to calculate \(\mu\) and \(\mu_1\) of the equation of the free flow gate. + +Note: it is possible to obtain \(C_F \neq C_G\), even under free flow conditions, as long as the discharge coefficient increases with the ratio \(\frac{h_1}{W}\). + + + + * (12) : Weir - free flow + * (19) : Orifice - partially submerged + * (17) : Weir - submerged + * (20) : Orifice - totally submerged + * (18) : Orifice - free flow + +Figure 20. Weir - orifice diff --git a/docs-en/calculators/structures/cem_88_v_graphique.jpg b/docs-en/calculators/structures/cem_88_v_graphique.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d038726397b25a9f67b4a942fd3912d71bbb0c08 Binary files /dev/null and b/docs-en/calculators/structures/cem_88_v_graphique.jpg differ diff --git a/docs-en/calculators/structures/cem_88_v_schema.jpg b/docs-en/calculators/structures/cem_88_v_schema.jpg new file mode 100644 index 0000000000000000000000000000000000000000..818d5dc4cad7ad331e2441bd9253a47ad0e789fc Binary files /dev/null and b/docs-en/calculators/structures/cem_88_v_schema.jpg differ diff --git a/docs-en/calculators/structures/cunge_80.md b/docs-en/calculators/structures/cunge_80.md new file mode 100644 index 0000000000000000000000000000000000000000..90abf8eefbd66bb030c361d9d2df246c01d43d67 --- /dev/null +++ b/docs-en/calculators/structures/cunge_80.md @@ -0,0 +1,7 @@ +# Cunge 80 + +This flow law corresponds to the equations described by Cunge in his book [1], or in more detail in an article by Mahmood and Yevjevich [2]. This law takes into account the different flow conditions: drowned, dewatered, free surface and loaded as well as the equations [Cemagref 1988](cem_88_d.md), but there is no continuity between free surface and loaded flow conditions. This can lead to computational problems in the vicinity of this transition. + +*[1] Cunge, Holly, Verwey, 1980, "Practical aspects of computational river hydraulics", Pitman, p. 169 for weirs and p. 266 for gates*. + +*[2] Mahmood K., Yevjevich V., 1975, "Unsteady flow in open channels, Volume 1 and 2", Water resources publications, Fort Collins, USA, 923 p*. diff --git a/docs-en/calculators/structures/dever.md b/docs-en/calculators/structures/dever.md new file mode 100644 index 0000000000000000000000000000000000000000..af3ca94508515123f514fcaa6a86f0b16798e349 --- /dev/null +++ b/docs-en/calculators/structures/dever.md @@ -0,0 +1,30 @@ +# Free flow weir stage-discharge laws + +This calculation module is similar to that of the [Parallel structures](lois_ouvrages.md), except that it simulates only free flows and refine by using the upstream approach speed. + +It can be used to calculate the relationship between water level upstream of a weir and flow. It is +most often used to assess the upstream-flow rating relationship at a weir or structure +evacuator of a development. The facility may have several distinct discharge levels and +Rectangular (with horizontal discharge side), triangular, semi-triangular weirs or +truncated triangles. + +The classical use consists in entering the extreme levels (min/max) of the upstream water level and the calculation step +for which flow estimates are desired. + +The upstream characteristics (upstream width and bed elevation) make it possible to estimate the approach speed and upstream kinetic energy, expressed in metres, and to calculate total flow from the total head at a non-negligible approach speed. + +$$ V = \frac{Q}{L \times (Z_1 - Z_{lit})} $$ + +with \(V\) the approach speed, \(Q\) the flow, \(Z_1\) the upstream water elevation, \(Z{lit}\) the upstream river bed elevation. + +$$ E_c = \frac{V^2}{2g} $$ + +with \(E_c\) the upstream cinetic energy in metres, and \(g\) the acceleration of gravity (9.81 m.s<sup>-2</sup>). + +Head \(H\) used for flow calculation then is: + +$$ H = Z_1 + E_c $$ + +The difficulty of the calculation lies in the fact that the flow rate to be calculated is involved in the calculation of the head. This problem is solved with the fixed point algorithm where the flow rate calculation is repeated several times by updating the head at each iteration until the calculation converges to the final value of the flow rate. + +The approach speed correction coefficient \(Cv\) is then calculated by relating the flow rate obtained with the head \(H\) to the flow rate calculation with the upstream dimension \(Z_1\). diff --git a/docs-en/calculators/structures/dever_triang.md b/docs-en/calculators/structures/dever_triang.md new file mode 100644 index 0000000000000000000000000000000000000000..3a96d0860611107f2a8807356098d5e4e2ed9980 --- /dev/null +++ b/docs-en/calculators/structures/dever_triang.md @@ -0,0 +1,17 @@ +# Triangular weir formula + +T1 caracterized by: + +* \(C_d\): discharge coefficient +* \(\alpha\): half angle at the apex of the triangle +* \(Z_d\): elevation of the tip of the triangle + +## Formula + +$$Q = C_d * tg \frac{\alpha}{2} \left ( Z_{am} - Z_d \right )^{2.5}$$ + +Thin wall weir: \(C_d\) = 1.37 + +Thick weir without contraction (rounded \(r > 0.1 * h1\)): \(C_d\) = 1.27 + +Triangular profile weir: (1/2 upstream, 1/2 or 1/5 downstream): \(C_d\) = 1.68 and 1.56 diff --git a/docs-en/calculators/structures/dever_triang_tronque.md b/docs-en/calculators/structures/dever_triang_tronque.md new file mode 100644 index 0000000000000000000000000000000000000000..d7aa9ab988e61faabb26a2836de62ee3c72a86f6 --- /dev/null +++ b/docs-en/calculators/structures/dever_triang_tronque.md @@ -0,0 +1,24 @@ +# Truncated triangular weir formula + +TT1 caracterized by: + +* \(C_d\): discharge coefficient +* \(Z_d\): triangle's lower overflow elevation +* \(Z_t\): triangle's higher overflow elevation +* \(B/2\): half-opening of the triangle + +## Formula + +### for \(Z_{am} \leq Z_t\) + +$$Q = C_d \frac{B}{2 (Z_t - Z_d)} \left ( Z_{am} - Z_d \right )^{2.5}$$ + +### for \(Z_{am} > Z_t\) + +$$Q = C_d \frac{B}{2 (Z_t - Z_d)} \left ( \left ( Z_{am} - Z_d \right )^{2.5} - \left ( Z_{am} - Z_t \right )^{2.5} \right )$$ + +Thin wall weir: \(C_d\) = 1.37 + +Thick weir without contraction (rounded \(r > 0.1 * h1\)): \(C_d\) = 1.27 + +Triangular profile weir: (1/2 upstream, 1/2 or 1/5 downstream): \(C_d\) = 1.68 and 1.56 diff --git a/docs-en/calculators/structures/echancrure_schema.png b/docs-en/calculators/structures/echancrure_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..0c59f6160d1038653faf70c63b24b020df0d75c0 Binary files /dev/null and b/docs-en/calculators/structures/echancrure_schema.png differ diff --git a/docs-en/calculators/structures/fente_noyee.md b/docs-en/calculators/structures/fente_noyee.md new file mode 100644 index 0000000000000000000000000000000000000000..f03a00ac199a8a7169d93a4555842c60e04d66db --- /dev/null +++ b/docs-en/calculators/structures/fente_noyee.md @@ -0,0 +1,17 @@ +# Submerged slot formula + + + +*Excerpt from Larinier, M., Travade, F., Porcher, J.-P., Gosset, C., 1992. Passes à poissons : expertise et conception des ouvrages de franchissement. CSP. (page 94)* + +Larinier (1992) suggests the following equation: + +$$Q = \mu b H_1\sqrt{2g \Delta H}$$ + +With: + +* *b* the slot width in m +* *H<sub>1</sub>* the head on the slot m +* *μ* the discharge coefficient (equal to 0.65 by default). + +The discharge coefficient *μ* may vary from 0.65 for a sharp-edged slot to more than 0.85 when the slot profile is rounded. \ No newline at end of file diff --git a/docs-en/calculators/structures/fente_noyee_schema.png b/docs-en/calculators/structures/fente_noyee_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..66af5027ef1c910321ab5195f2c821a505563937 Binary files /dev/null and b/docs-en/calculators/structures/fente_noyee_schema.png differ diff --git a/docs-en/calculators/structures/kivi.md b/docs-en/calculators/structures/kivi.md new file mode 100644 index 0000000000000000000000000000000000000000..83c9f3c485e9041893a64df4c7c6c2fb84b989c2 --- /dev/null +++ b/docs-en/calculators/structures/kivi.md @@ -0,0 +1,41 @@ +# Kindsvater-Carter and Villemonte formula + +The calculation module allows hydraulic calculations to be carried out for several structures in parallel. + +## Kindsvater-Carter formula (1957) + + + +Figure 12: perspective view of a rectangular weir with lateral contraction. + +Kindsvater-Carter formula corresponds to the classic weir formula: + +$$Q = \mu L \sqrt{2g}h_1^{1.5}$$ + +With: + +- \(\mu\) the discharge coefficient \(\mu = \alpha + \beta h_1/p\) +- \(L\) the width of the weir +- \(h_1\) the water level above the weir crest +- \(p\) the sill or weir crest height + +The coefficients \(\alpha\) and \(\beta\) depend on the ratio between the width of the weir (\(L\)) and the width of the basin (\(B\)). Their values are given in the abacuses below (Excerpt from Larinier, M., Porcher, J.-P., 1986. Programmes de calcul sur HP86 : hydraulique et passes à poissons): + + + +## Submerged flow: Villemonte formula (1947) + + + +For a downstream water elevation higher than the elevation of the weir crest, the flow is submerged and a flooding coefficient is applied to the flow coefficient. + +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/kivi_abaques_alpha_beta.png b/docs-en/calculators/structures/kivi_abaques_alpha_beta.png new file mode 100644 index 0000000000000000000000000000000000000000..b879a8239a2459f6690df574bdd72abc2a7ce964 Binary files /dev/null and b/docs-en/calculators/structures/kivi_abaques_alpha_beta.png differ diff --git a/docs-en/calculators/structures/kivi_schema_seuil.png b/docs-en/calculators/structures/kivi_schema_seuil.png new file mode 100644 index 0000000000000000000000000000000000000000..0b2021dc04030b3766a37d528bdc7ff90a001806 Binary files /dev/null and b/docs-en/calculators/structures/kivi_schema_seuil.png differ diff --git a/docs-en/calculators/structures/kivi_villemonte_schema_seuil_noye.png b/docs-en/calculators/structures/kivi_villemonte_schema_seuil_noye.png new file mode 100644 index 0000000000000000000000000000000000000000..57d36908d5b6b175fac691db71d5740e568590e5 Binary files /dev/null and b/docs-en/calculators/structures/kivi_villemonte_schema_seuil_noye.png differ diff --git a/docs-en/calculators/structures/liste.md b/docs-en/calculators/structures/liste.md new file mode 100644 index 0000000000000000000000000000000000000000..1ef7626b65aeaa8e26651d20c3596f907818dacb --- /dev/null +++ b/docs-en/calculators/structures/liste.md @@ -0,0 +1,20 @@ +# Stage-discharge equations list + +| Equation | Default discharge coefficient | Available in | +|---|---|---| +| [Weir / orifice Cemagref 88](./cem_88_d.md) | 0.4 | Parallel Structures | +| [Weir / undershot gate Cemagref 88](./cem_88_v.md) | 0.6 | Parallel Structures | +| [Cunge 80](./cunge_80.md) | 0.6 | Parallel Structures | +| [Free flow gate](./vanne_denoyee.md) | 0.6 | Parallel Structures | +| [Submerged gate](./vanne_noyee.md) | 0.6 | Parallel Structures | +| [Free flow weir](./seuil_denoye.md) | 0.4 | Parallel Structures, Free flow weir stage-discharge laws | +| [Submerged weir](./seuil_noye.md) | 0.9 | Parallel Structures | +| [Submerged slot (Larinier 1992)](./fente_noyee.md) | 0.75 | Parallel Structures, Cross walls, Downwall | +| [Kindsvater-Carter and Villemonte](./kivi.md) | α=0.4, β=0.001 | Parallel Structures | +| [Triangular weir (Villemonte)](./dever_triang.md) | 1.36 | Parallel Structures, Free flow weir stage-discharge laws, Cross walls, Downwall | +| [Truncated triangular weir (Villemonte)](./dever_triang_tronque.md) | 1.36 | Parallel Structures, Free flow weir stage-discharge laws, Cross walls, Downwall | +| [Submerged orifice](./orifice_noye.md) | 0.7 | Parallel Structures, Cross walls, Downwall | +| [Free orifice](./orifice_denoye.md) | 0.7 | Parallel Structures | +| [Villemonte 1947](./villemonte_1947.md) | 0.4 | Parallel Structures, Cross walls, Downwall | +| [Regulated notch (Villemonte 1957)](../pab/pab.md#the-downstream-partition) | 0.4 | Downwall | +| [Regulated submerged slot (Larinier 1992)](../pab/pab.md#the-downstream-partition) | 0.75 | Downwall | \ No newline at end of file diff --git a/docs-en/calculators/structures/lois_ouvrages.md b/docs-en/calculators/structures/lois_ouvrages.md new file mode 100644 index 0000000000000000000000000000000000000000..1d6246c0bd9ddfd0e2592d4fe9a8eb41f6e62b1c --- /dev/null +++ b/docs-en/calculators/structures/lois_ouvrages.md @@ -0,0 +1,34 @@ +# Parallel structures + +## Description of the calculation module + +This calculation module allows to simulate the hydraulic operation of valves and thresholds placed in parallel. All the flow laws present in Cassiopée are grouped in this module, which makes it possible in particular to easily compare the flow laws between them. + +This module allows to calculate any missing parameter among them: + +- Boundary conditions (water level upstream and downstream of the structures); +- The flow through the structures; +- Parameters of the structures (crest elevation, width, flow coefficient...). + +The module calculates the requested parameter and displays for each structure present: + +- The flow passing through the structure; +- The type of flow: under load (flow pinched under a gate), or free surface; +- The speed: flooded, partially flooded or dewatered; +- The type of jet for free surface flows: surface or submerged. + +<div style="position: relative"><a id="type-de-jet" style="position: absolute; top: -60px;"></a></div> +## Jet type + +For the definition of the type of jet (plunging or surface), see: Larinier, M., 1992. Successive basin transitions, pre-dams and artificial rivers. Bulletin Français de la Pêche et de la Pisciculture 45-72. <https://doi.org/10.1051/kmae:1992005>. + + + +*Excerpt from Larinier, M., 1992. Passages to successive basins, pre-dams and artificial rivers. Bulletin Français de la Pêche et de la Pisciculture 45-72. <https://doi.org/10.1051/kmae:1992005>* + +The definition used in Cassiopée is as follows: + +- if \(DH \geq 0.5 H1\) then the jet is plunging; +- if \(DH < 0.5 H1\) then the jet is surface. + +With \(H1\), the upstream head over the weir and \(DH\) the head drop across the weir. diff --git a/docs-en/calculators/structures/orifice_denoye.md b/docs-en/calculators/structures/orifice_denoye.md new file mode 100644 index 0000000000000000000000000000000000000000..d9fa887625a7fa0f73f7265d687b5a26611e149b --- /dev/null +++ b/docs-en/calculators/structures/orifice_denoye.md @@ -0,0 +1,21 @@ +# Free orifice formula + + + +*Excerpt from CARLIER, M. (1972). Hydraulique générale et appliquée. OCLC : 421635236. Paris : Eyrolles* + +The general formula for a free orifice or nozzle is as follows (CARLIER, 1972): + +$$Q = C_d S \sqrt{2g H}$$ + +With: + +* \(Q\) the flow in m<sup>3</sup>/s; +* \(C_d\) the discharge coefficient; +* \(S\) the orifice surface in m<sup>2</sup>; +* \(g\) the acceleration of gravity 9.81 m/s<sup>2</sup> +* \(H\) The water level measured from the surface of the water to the centre of the orifice in meters. + +The area \(S\) to be considered is the smallest cross-sectional area of the orifice or nozzle (Figure 5.12c). +The discharge coefficient \(C_d\) varies depending on the type of orifice or nozzle. Figure 5.12 +shows the most common shapes and discharge coefficients (Source: CARLIER, 1972). diff --git a/docs-en/calculators/structures/orifice_denoye_schema.png b/docs-en/calculators/structures/orifice_denoye_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..0b01084c56804731a7be2aa8f057bc0893ec439e Binary files /dev/null and b/docs-en/calculators/structures/orifice_denoye_schema.png differ diff --git a/docs-en/calculators/structures/orifice_noye.md b/docs-en/calculators/structures/orifice_noye.md new file mode 100644 index 0000000000000000000000000000000000000000..ba1613ea7e05386df6a10e643de36aeddfba4ea4 --- /dev/null +++ b/docs-en/calculators/structures/orifice_noye.md @@ -0,0 +1,16 @@ +# Submerged orifice formula + + + +*Excerpt from Larinier, M., Travade, F., Porcher, J.-P., Gosset, C., 1992. Passes à poissons : expertise et conception des ouvrages de franchissement. CSP. (page 94)* + +The equation corresponds roughly to that of the calculation module for the submerged rectangular gate with the difference that the area of the orifice is given directly rather than by the ratio of width to height: + +$$Q = \mu S \sqrt{2g \Delta H}$$ + +With: + +* *Q* the flow in m<sup>3</sup>/s; +* *μ* the discharge coefficient (equal to 0.7 by default); +* *S* the orifice surface in m<sup>2</sup>; +* *ΔH* the head loss *H<sub>1</sub> - H<sub>2</sub>* in m(named "Fall" in Cassiopée). diff --git a/docs-en/calculators/structures/orifice_noye_schema.png b/docs-en/calculators/structures/orifice_noye_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..0c736b6cb07771451422ad1aa4d444a7bf45190e Binary files /dev/null and b/docs-en/calculators/structures/orifice_noye_schema.png differ diff --git a/docs-en/calculators/structures/seuil_denoye.md b/docs-en/calculators/structures/seuil_denoye.md new file mode 100644 index 0000000000000000000000000000000000000000..395b1d86ce85f9a448fd73887b60cb8a1ccc698c --- /dev/null +++ b/docs-en/calculators/structures/seuil_denoye.md @@ -0,0 +1,21 @@ +# Free weir formula + +The formula is derived from the original formula of Poleni (1717). + +In a free flow, the flow rate depends only on the upstream water level \(h_{amont}\): + +$$Q = Cd \sqrt{2g} L h_{amont}^{3/2}$$ + +With: + +* *Q* the flow in m<sup>3</sup>/s +* *C<sub>d</sub>* the discharge coefficient +* \(g\) the acceleration of gravity 9.81 m/s<sup>2</sup> +* *L* the width of the weir in m +* *h<sub>amont</sub>* the upstream water level above the crest of the weir in m + +A flow coefficient value \(C_d = 0.4\) is generally a good approximation for a rectangular weir. For more complex weir shapes (trapezoidal, circular...) or to take into account the characteristics of the longitudinal profile (thin-crested weir, thick-crested weir), one can refer to the CETMEF weir leaflet (CETMEF, 2005). + +*[CETMEF (2005). Notice sur les déversoirs : synthèse des lois d’écoulement au droit des +seuils et déversoirs. Compiègne : Centre d’Études Techniques Maritimes Et Fluviales. +89 p.](http://www.side.developpement-durable.gouv.fr/EXPLOITATION/DEFAULT/doc/IFD/IFD_REFDOC_0513410/notice-sur-les-deversoirs-synthese-des-lois-d-ecoulement-au-droit-des-seuils-et-deversoirs)* diff --git a/docs-en/calculators/structures/seuil_noye.md b/docs-en/calculators/structures/seuil_noye.md new file mode 100644 index 0000000000000000000000000000000000000000..7aebe9cf51186b5663e2e962b2970ce3568e5bed --- /dev/null +++ b/docs-en/calculators/structures/seuil_noye.md @@ -0,0 +1,18 @@ +# Submerged weir formula + + + +*Excerpt from: Rajaratnam, N., Muralidhar, D., 1969. Flow below deeply submerged rectangular weirs. Journal of Hydraulic Research 7, 355–374.* + +In submerged flow, the flow rate depends on the upstream water level \(h_{amont}\) and the downstream water level \(h_{aval}\): + +$$Q = Cd \sqrt{2g} Lh_{aval} \sqrt{h_{amont}-h_{aval}}$$ + +With: + +* *L* the weir width in m +* *h<sub>amont</sub>* the upstream head on the weir in m +* *h<sub>aval</sub>* the downstream head on the weir in m +* *C<sub>d</sub>* the discharge coefficient (equal to 0.9 by default). + +This formula is not recommended for flooding below 80%. diff --git a/docs-en/calculators/structures/seuil_noye_schema.png b/docs-en/calculators/structures/seuil_noye_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..c3f8596a9b658a8a5ea95281a05f8be09c4046d3 Binary files /dev/null and b/docs-en/calculators/structures/seuil_noye_schema.png differ diff --git a/docs-en/calculators/structures/type_de_jet.png b/docs-en/calculators/structures/type_de_jet.png new file mode 100644 index 0000000000000000000000000000000000000000..99c8964b4c76fbaec0d62f445c763f34d9d988a9 Binary files /dev/null and b/docs-en/calculators/structures/type_de_jet.png differ diff --git a/docs-en/calculators/structures/vanne_denoyee.md b/docs-en/calculators/structures/vanne_denoyee.md new file mode 100644 index 0000000000000000000000000000000000000000..7a46b6129af620520a80397fa02f01e963c00a96 --- /dev/null +++ b/docs-en/calculators/structures/vanne_denoyee.md @@ -0,0 +1,24 @@ +# Free flow gate + + + +*Excerpt from Baume, J.-P., Belaud, G., Vion, P.-Y., 2013. Hydraulique pour le génie rural, Formations de Master, Mastère Spécialisé, Ingénieur agronome. UMR G-EAU, Irstea, SupAgro Montpellier.* + +\(W\) is the gate opening, \(h_{am}\) the upstream water level and \(L\) the date width. +The dewatered valve equation is derived from Bernoulli's load conservation relationship between the upstream side of the valve and the contracted section. + +The height \(h_2\) corresponds to the contracted section and is equal to \(C_c W\) where \(C_c\) is the contraction coefficient. The dewatered valve equation is often expressed as a function of a flow coefficient in the form of: + +\(Q = C_d L W \sqrt{2g} \sqrt{h_{am}}\) + +So we have the relationship between \(C_d\) and \(C_d\) : + +\(C_d = \frac{C_c}{\sqrt{1 + C_c W / h_{am}}}\) + +Numerous experiments were conducted to evaluate \(C_d\), which varies little around 0.6. As a first approximation, for a low \(W / h_{am}\) (undershot gate, most frequent case), \(C_d\) is close to \(C_c\) and can be chosen equal to 0.6. + +Generally speaking, if we note \(LW\) the flow section of the gate, we have: + +\(Q = C_d LW \sqrt{2g}\sqrt{h_{am}}) + +Discharge coefficients \(C_d\) are given by abacuses, which can be found in specialized books if necessary. They range from 0.5 to 0.6 for a vertical gate, from 0.6 to 0.7 for a radial gate, up to 0.8 for a gate inclined with respect to the vertical. diff --git a/docs-en/calculators/structures/vanne_denoyee_schema.png b/docs-en/calculators/structures/vanne_denoyee_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..1868e850d243f507d159827d895587b7c9c554df Binary files /dev/null and b/docs-en/calculators/structures/vanne_denoyee_schema.png differ diff --git a/docs-en/calculators/structures/vanne_noyee.md b/docs-en/calculators/structures/vanne_noyee.md new file mode 100644 index 0000000000000000000000000000000000000000..016210530346e4e160fbda402406f2307199dd36 --- /dev/null +++ b/docs-en/calculators/structures/vanne_noyee.md @@ -0,0 +1,11 @@ +# Submerged gate + + + +*Excerpt from Baume, J.-P., Belaud, G., Vion, P.-Y., 2013. Hydraulique pour le génie rural, Formations de Master, Mastère Spécialisé, Ingénieur agronome. UMR G-EAU, Irstea, SupAgro Montpellier.* + +## Submerged gate equation + +\(Q = C'_d LW \sqrt{2g}\sqrt{h_{am} - h_{av}}\) + +Coefficient \(C'_d\) is around 0.8. diff --git a/docs-en/calculators/structures/vanne_noyee_schema.png b/docs-en/calculators/structures/vanne_noyee_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..29427f1e7b74d104f0063fdfd787c3ef90fc4d21 Binary files /dev/null and b/docs-en/calculators/structures/vanne_noyee_schema.png differ diff --git a/docs-en/calculators/structures/villemonte_1947.md b/docs-en/calculators/structures/villemonte_1947.md new file mode 100644 index 0000000000000000000000000000000000000000..64052001bff0d91b11c44f4a6f4a983f73f601b0 --- /dev/null +++ b/docs-en/calculators/structures/villemonte_1947.md @@ -0,0 +1,19 @@ +# Villemonte 1947 + +The "Villemonte (1947)" equation uses the equation of the [Free weir](seuil_denoye.md) to which the flooding coefficient proposed by Villemonte applies (see explanations below). This flooding coefficient is also used for the triangular and truncated triangular weir formulas. + + + +For a downstream water elevation higher than the crest elevation of the weir, the flow is flooded and a flooding coefficient is applied to the flow coefficient. + +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 crest of the weir +- \(h_2\) the downstream water level above the crest of the weir +- \(n\) the exponent in free flow relationships (rectangular=1.5, triangular=2.5, parabolic=2) + + *Villemonte, J.R., 1947. Submerged weir discharge studies. Engineering news record 866, 54–57.* + \ No newline at end of file diff --git a/docs-en/general/parametres_application.md b/docs-en/general/parametres_application.md new file mode 100644 index 0000000000000000000000000000000000000000..64883eb4d0c7253b44b25124d271cfe50ce1c557 --- /dev/null +++ b/docs-en/general/parametres_application.md @@ -0,0 +1,13 @@ +# Application parameters + +Accessible from the left side menu, the application parameters that can be modified by the user are as follows: + +- Number of displayed decimals: Number of displayed decimals for the calculation results. For numbers close to zero displayed in scientific notation, this option sets the number of significant digits displayed; +- Computation accuracy: Precision used for the convergence of numerical calculations ([Brent's method](https://en.wikipedia.org/wiki/Brent%27s_method) or [Newton's method](https://en.wikipedia.org/wiki/Newton's_method)); +- Solver iteration limit: Maximum iteration number of the numerical calculation; +- Enable on-screen notifications: allows notifications to be displayed during certain operations (warning when loading a session, calculation invalidation...); +- Enable keyboard shortcuts: allows the use of keyboard shortcuts (See [list of available shortcuts](raccourcis_clavier.md)); +- Create new calculators with empty fields (no default values): if unchecked, module parameters are pre-filled with default values; +- Language: defines the language of the software interfaces in French or English. + +The save button at the top of the window allows you to save the user's preferences in your browser for future use. The "Reset" button restores the application's default settings. diff --git a/docs-en/general/principe_fonctionnement.md b/docs-en/general/principe_fonctionnement.md new file mode 100644 index 0000000000000000000000000000000000000000..eb3c183e6069189d49ae6abf2a191a8253f51324 --- /dev/null +++ b/docs-en/general/principe_fonctionnement.md @@ -0,0 +1,67 @@ +# Principle of operation of a calculation module + +Each Cassiopée calculation module allows you to calculate a parameter of your choice from those in one or more equations. + +## Open a new calculation module + + + +The list of modules is available when the application is launched. After opening a new calculation module, this list is available via the "+" button located in the upper banner or via the "☰" menu and then the "New calculation module" link located in the menu. + +The list of open modules appears in the upper banner and allows you to navigate between open modules. + +## How are the choices made to perform a calculation or a series of calculations ? + +The module is presented as a series of parameters involved in solving the equation of the calculation module. + + + +For each of them, the user can choose to: + +- Set the parameter's value ("FIXED" button); +- Vary the parameter to perform a series of calculations ("VARIATED" button); +- Choose the parameter that will be calculated ("CALCULATE" button). + +The interface is designed so that one and only one parameter is chosen for the calculation. Parameters that cannot be calculated do not have a "CALCULATE" button. + +## How to vary a parameter to perform a series of calculations + +A series of calculations can be triggered between a minimum value and a maximum value for a given step: + + + +Or for a list of defined values: + + + +Importing a values list is done either by typing or copy/pasting it in the "Values list" field, or by importing a text file. The decimal separator is configurable. Any character outside the numeric characters, the letter "E" and the decimal separator will be considered as separator between the values. Therefore, the separator could be comma, semicolon, space, tabulation, new line... + +The window title contains the corresponding number of occurrences. Clicking on the graphic logo at the right of the window title displays a chart of the parameter variations. + +In case several parameters vary and they do not have the same number of occurrences, it is necessary to define a strategy to extend the shortest lists to fit the list of the parameter with the most occurrences. Two strategies are available: repeat the last value or reuse the values in the list since the first occurrence. + +## How to launch a calculation or a series of calculations + +Press the [Enter] key or click on the "Calculate" button at the bottom of the page. + +## Calculation results + +For fixed parameters, the results panel displays the fixed parameters and the calculated parameter as well as any additional results. + + + +For one or more varying parameters, the results panel displays: + +- an evolution graph on the which you can choose the parameter to use on the x-axis and y-axis; +- a table containing the parameters set; +- a table showing the parameters that vary and the calculated parameter as well as the values of any additional results. + + + +The tables and charts are provided with different functionalities: + +- a download button to retrieve the table content in XLSX format; +- a download button to retrieve the chart in PNG format; +- a button to display the table or chart in full screen. + +The charts are zoomed in by making a mouse selection on some area. The button with the curved left-pointing arrow resets the zoom to its original position displaying all available values. diff --git a/docs-en/general/principe_fonctionnement_bandeau_superieur.png b/docs-en/general/principe_fonctionnement_bandeau_superieur.png new file mode 100644 index 0000000000000000000000000000000000000000..66632f9bc820b3d4227408597673c6c587aee60e Binary files /dev/null and b/docs-en/general/principe_fonctionnement_bandeau_superieur.png differ diff --git a/docs-en/general/principe_fonctionnement_grandeurs.png b/docs-en/general/principe_fonctionnement_grandeurs.png new file mode 100644 index 0000000000000000000000000000000000000000..8c40f20fc07ac5f9168a895aec04858d5b55b38d Binary files /dev/null and b/docs-en/general/principe_fonctionnement_grandeurs.png differ diff --git a/docs-en/general/principe_fonctionnement_resultat_fix.png b/docs-en/general/principe_fonctionnement_resultat_fix.png new file mode 100644 index 0000000000000000000000000000000000000000..5dad10b2da6ec52c81fd196d59822934fa04882e Binary files /dev/null and b/docs-en/general/principe_fonctionnement_resultat_fix.png differ diff --git a/docs-en/general/principe_fonctionnement_resultat_var.png b/docs-en/general/principe_fonctionnement_resultat_var.png new file mode 100644 index 0000000000000000000000000000000000000000..6215f87e5995b6c6065a5d437e4af12ec8dbfd46 Binary files /dev/null and b/docs-en/general/principe_fonctionnement_resultat_var.png differ diff --git a/docs-en/general/principe_fonctionnement_varie_liste.png b/docs-en/general/principe_fonctionnement_varie_liste.png new file mode 100644 index 0000000000000000000000000000000000000000..95440f2ae06ce205c201c0c2b56141c051bc61de Binary files /dev/null and b/docs-en/general/principe_fonctionnement_varie_liste.png differ diff --git a/docs-en/general/principe_fonctionnement_varie_pas.png b/docs-en/general/principe_fonctionnement_varie_pas.png new file mode 100644 index 0000000000000000000000000000000000000000..b258a9816b12c549e71689eff07d73083503d6ec Binary files /dev/null and b/docs-en/general/principe_fonctionnement_varie_pas.png differ diff --git a/docs-en/general/raccourcis_clavier.md b/docs-en/general/raccourcis_clavier.md new file mode 100644 index 0000000000000000000000000000000000000000..df887d74a494236c5f1224b3e20ac5a8ed31020a --- /dev/null +++ b/docs-en/general/raccourcis_clavier.md @@ -0,0 +1,14 @@ +# Keyboard shortcuts list + +To use keyboard shortcuts, the feature must be enabled in [application parameters](parametres_application.md). + +- Alt + S: Saves the current session +- Alt + O: Opens a session file +- Alt + Q: Empties the current session +- Alt + N: Adds a new calculation module to the current session +- Alt + ↵: Triggers calculation of the current module +- Alt + D: Duplicates the current module +- Alt + W: Closes the current module +- Alt + 1: Positions the page on the "Input" section of the current module +- Alt + 2: Positions the page on the "Results" section of the current module +- Alt + 3: Positions the page on the "Charts" section of the current module diff --git a/docs-en/index.md b/docs-en/index.md new file mode 100644 index 0000000000000000000000000000000000000000..3da57228160870a569759e971f81670416c28928 --- /dev/null +++ b/docs-en/index.md @@ -0,0 +1,16 @@ +# Presentation of Cassiopée software + +<div style="height: 86px; border: solid #aaa 2px; padding: 10px; padding-right: 20px; border-radius: 5px; display: inline-block;"> + <a href="https://cassiopee.g-eau.fr" style="text-decoration: none;"> + <img style="float:left; margin-right: 20px;" src="logo.png"> + <span style="font-size: 30px; line-height: 60px">https://cassiopee.g-eau.fr</span> + </a> +</div> + +## General characteristics + +Cassiopée is a software dedicated to rivers hydraulics with especially some help for sizing fish passes, agricultural hydraulics and open-channel hydraulics in general. It comes in the form of independent [calculation modules](general/principe_fonctionnement.md) allowing one to solve a given problem. Calculation modules may be chained (parameters or calculation results may be "linked" from one module to another) in order to build complex calculation chains. Users may locally save the modules they use, in order to reuse them later. + +## Pre-requisites - installation + +Cassiopée does not require any installation. It is available online using an up-to-date browser (tested with Firefox, Chrome and Chromium) by navigating to the following address: [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr) diff --git a/docs-en/logo.png b/docs-en/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e24a9ca7a84e5ee5a86ad5a26be6cc87ed436ca7 Binary files /dev/null and b/docs-en/logo.png differ diff --git a/docs-en/mentions_legales.md b/docs-en/mentions_legales.md new file mode 100644 index 0000000000000000000000000000000000000000..dca2e93983a09553558218beb54d0bf1c7d615f4 --- /dev/null +++ b/docs-en/mentions_legales.md @@ -0,0 +1,101 @@ +# Legal notice and terms of use + +## Editor + +The site cassiopee.g-eau.fr hereinafter referred to as "Cassiopée" is published by [the UMR G-EAU (Mixed Research Unit "Water Management, Actors, Uses")](http://g-eau.fr): + +> UMR G-EAU<br/> +> 361 rue Jean-François Breton<br/> +> BP 5095<br/> +> 34196 Montpellier Cedex 5<br/> +> France +> Tel: +33 (0) 4 67 04 63 00 + +Director of publication: Olivier Barreteau, Director of the UMR G-EAU + +Development Project Manager: David Dorchies + +Developers: François Grand, Mathias Chouet + +Cassiopée is a tool proposed by [AFB (French Agency for Biodiversity)](https://www.afbiodiversite.fr/) within the framework of the AFB-Irstea conventions (Action n°100 of the 2016-2018 convention and Action n°21 of the 2019-2021 convention). + +## Hosting + +> UMR G-EAU<br/> +> 361 rue Jean-François Breton<br/> +> BP 5095<br/> +> 34196 Montpellier Cedex 5<br/> +> France + +## Contents of the Cassiopée software + +The AFB and the UMR G-EAU offer access to calculation tools in the field of hydraulics and more specifically tools to assist in the sizing of fish passes. + +Internet users' access to the Cassiopee site and tools is free and unlimited for all private and professional uses, as long as this access is made only through the tools and interfaces of the site cassiopee.g-eau.fr. + +Unless otherwise stated, the intellectual property of the content of the pages is held by the Institut national de Recherche en Sciences et Technologies pour l'Environnement et l'Agriculture (IRSTEA). + +## Limitation of liability + +The UMR G-EAU undertakes to provide the necessary and reasonable means to ensure or make ensure continuous access to the cassiopee.g-eau.fr website and its contents for the user. + +However, the UMR G-EAU cannot be held liable to users in the event of interruption, failure or possible lack of quality of Cassiopée's services for any reason whatsoever, including for reasons of maintenance, upkeep or updating of the servers. + +Unless otherwise stated, the contents of Cassiopee are published for information purposes only, excluding any guarantee as to their accuracy or suitability for the specific needs of users of the site cassiopee.g-eau.fr. The contents of Cassiopée do not in any way engage the responsibility of the producers in the event of direct or indirect damage resulting from their non-conformity with the reality on the ground. + +If you notice an error or omission in the tools and content of Cassiopée, please report it via the "Report a problem" feature available in the main menu of Cassiopée. + +## Users' personal information + +#### Data collected by Cassiopée + +The cassiopee.g-eau.fr site does not collect any personal data about the user except the IP address of the machine used to connect to the site. + +The data and calculations carried out by Cassiopée are entirely carried out on the user's machine and are not transmitted to the server or any other third party. + +Submitting a bug report via the "Report a problem" feature invites the user to send by email the content of his current work session to the Cassiopée development team. The user can choose not to transmit his session by deleting the text of the email below the line `--- Status of the current session - do not modify the text below ---`. The email address provided by the user to the development team will not be shared with third parties or used for any purpose other than to contact the user in connection with the reported problem. + +#### Data stored on the user's terminal + +Cassiopée does not store any information on the user's terminal except the application settings if they are explicitly saved by the user. + +All or part of the user's working session can be saved by the user on any medium at his convenience (json file) and then loaded for later use. + +## Hypertext links + +#### Links from cassiopee.g-eau.fr to other sites + +The links inserted in the pages of the site cassiopee.g-eau.fr to third party sites are provided for information purposes only. The content of the sites at which these links point does not engage the responsibility of the UMR G-EAU. + +#### Link to cassiopee.g-eau.fr + +The establishment of a hyperlink to Cassiopée is free and open on condition that this hyperlink allows the opening of a new viewing window and that the display of the URL cassiopee.g-eau.fr in the new window is readable by the Internet user as soon as it is opened and throughout the access to Cassiopée's data. + +UMR G-EAU reserves the right to delete any hyperlink to Cassiopée that may harm its editorial policy or its image. + +## Brands and logos + +The brands and logos appearing on the site make it possible to inform as to the origin of the data and software used; they have no advertising character and are the property of their respective owners. + +## Screenshots and prints + +The content produced by Cassiopée (calculation results, tables, graphs, etc.) can be reused and distributed on any medium without any limitation. + +Cassiopée's documentation is published under[CC BY-NC-ND 4.0 License](https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode) which authorizes to copy, distribute, communicate all or part of the documentation by any means and in any format under the conditions that it is credited with a link to the license, it is not used commercially, and that it is not modified. + +## Free software + +#### License of the Cassiopée calculation module + +Cassiopée is based on a library called JaLHyd (for JAvascript Library for HYDraulics) developed in Typescript by the Cassiopée development team. This library is published under [GNU AGPL 3 license](https://www.gnu.org/licenses/agpl.html) and the source code is available on request from the Cassiopée editor. + +#### Third-party tools and libraries + +Cassiopée has been developed using many libraries and free software tools including: + +- [Typescript](https://github.com/Microsoft/TypeScript) +- [Visual Studio Code](https://github.com/Microsoft/vscode) +- [Angular](https://github.com/angular/angular) +- [Angular Material](https://github.com/angular/components) +- [Chart.js](https://github.com/chartjs/Chart.js) +- [MathJax](https://github.com/mathjax/MathJax) diff --git a/docs-en/methodes_numeriques/brent.md b/docs-en/methodes_numeriques/brent.md new file mode 100644 index 0000000000000000000000000000000000000000..85670dc9761b84d666d19eddea35f410fe32d88e --- /dev/null +++ b/docs-en/methodes_numeriques/brent.md @@ -0,0 +1,3 @@ +# Brent's method + +[See definition on Wikipedia](https://en.wikipedia.org/wiki/Brent%27s_method) diff --git a/docs-en/methodes_numeriques/euler_explicite.md b/docs-en/methodes_numeriques/euler_explicite.md new file mode 100644 index 0000000000000000000000000000000000000000..414d43944423dd88573bfc73ca06ae65d509b3ab --- /dev/null +++ b/docs-en/methodes_numeriques/euler_explicite.md @@ -0,0 +1,49 @@ +# Explicite Euler method + +To describe an evolutionary process, or the profile of a water line, for example, we often have to solve a first-order ordinary differential equation (EDO). This equation writes how a function varies, at a given point (an instant or a point in space), knowing the value of this mathematical function, the problem to be solved is written: + +$$ +\left\{ + \begin{array}{rcr} + \frac{dy}{dt} & = & f(y,t) \\ + y(t=t_0) & = & y_0 \\ + \end{array} +\right. +$$ + +where \(\frac{dy}{dt}\) refers to the derivative with respect to t of the function \(y\) (which depends on the variable \(t\)); the variable \(y_0\) is called the boundary condition; it conditions the final solution of the equation. + +As we often do not know an analytical solution to this problem, we will use approximate methods to estimate the solution. So we make a discretization of the variable \(t\). We note the discretization step, and solve the problem at the points \(t_0\), \(t_1=t_0+\Delta t\), \(t_2=t_0+2\Delta t\), ..., \(t_n=t_0+n\Delta t\) where \(n\) is an integer. + + +The explicit Euler method is the most intuitive; it consists in considering that, from a point \(t_i\) to a point \(t_{i+1}\), the function evolves linearly, with a trajectory that is the one that can be calculated at point \(t_i\). + +The problem is solved as follows: + + * we know the function \(f\), a point \(t_i\) where we know \(y_i\) + * so we can calculate \(y'_i=f(y,t)\) + * we then estimate the value of \(y\) at point \(t_{i+1}=t_i+\Delta t\): \(y_{i+1}\simeq y_i + y'_i \Delta t\) + * you can then iterate (solve step by step) to move to the next point. The problem is initialized from \(t_0\) where we know \(y_0\) (boundary condition). + +We can feel that this scheme will only work well if Delta is not too big. Values of too high \(\Delta t\) can give completely false results, leading to erroneous physical interpretations. However, its interest is its simplicity, and it can be easily implemented on a table. + +## Example application: exponential process + +Consider the following (simple) problem: +$$ +\left\{ + \begin{array}{rcr}\label{eq:exp} + \frac{dy}{dt} & = & -a y \\ + y(t=t_0) & = & y_0 \\ + \end{array} +\right. +$$ + +So we have here \(f(y,t)=-ay\). The analytical solution is easily solved, giving \(y(t)=y_0 \exp\left(-a(t-t_0)\right)\). +The problem can be solved by the Euler method: + + * we choose \(\Delta t\) (for example, \(\Delta t=1\)) + * calculate \( y_1=y_0 - a y_0 \Delta t\) + * calculate \( y_2=y_1 - a y_1 \Delta t\) etc. + +It can be seen that the resolution is not very precise; this is linked to the calculation step being too large given the method chosen and the equation to be solved. diff --git a/docs-en/methodes_numeriques/integration_trapezes.md b/docs-en/methodes_numeriques/integration_trapezes.md new file mode 100644 index 0000000000000000000000000000000000000000..f6bf2b01af2b7205f08bce55b99b3f348636fa98 --- /dev/null +++ b/docs-en/methodes_numeriques/integration_trapezes.md @@ -0,0 +1,9 @@ +# Trapezes integration method + +The integral form of the ordinary first-order differential equation is written: + +$$\int_{t_{i}}^{t_{i+1}}\frac{dy}{dt} = \int_{t_{i}}^{t_{i+1}}f(y,t)$$ + +Trapezes methods gives: + +$$y_{i+1} \simeq y_i + \frac{y'_i + y'_{i+1}}{2} \Delta t$$ diff --git a/docs-en/methodes_numeriques/newton.md b/docs-en/methodes_numeriques/newton.md new file mode 100644 index 0000000000000000000000000000000000000000..2740d5ccef2fda93d0f044ab08859db0360524c4 --- /dev/null +++ b/docs-en/methodes_numeriques/newton.md @@ -0,0 +1,3 @@ +# Newton's method + +[See definition on Wikipedia](https://en.wikipedia.org/wiki/Newton%27s_method) diff --git a/docs-en/methodes_numeriques/rk4.md b/docs-en/methodes_numeriques/rk4.md new file mode 100644 index 0000000000000000000000000000000000000000..0b6579bc8faae8cef2a16ebcad5b7f25ad191350 --- /dev/null +++ b/docs-en/methodes_numeriques/rk4.md @@ -0,0 +1,64 @@ +# Runge-Kutta diagram of order 4 + +The Runge-Kutta scheme of order 4 is based on an approximation of the derivative to a higher order (order 4). The principle of discretization is the same as for the [Euler method](euler_explicite.md), but we will make some additional calculations to approach the derivative: + + * we know the function \(f\), a point \(t_i\) where we know \(y_i\) + * we can therefore calculate \(f_1=y'_i=f(y_i,t_i)\) (cf. Euler=pente method to the point (\(t_i,y_i\))) + * we calculate \(f_2=f(y_i+\frac12 \Delta t f_1,t_i+\frac12 \Delta t)\) (estimated value in the middle of the interval, with the slope taken in \(t_i\)) + * we calculate \(f_3=f(y_i+\frac12 \Delta t f_2,t_i+\frac12 \Delta t)\) (estimated value in the middle of the interval \(t_{i+1/2}\), with the slope taken in \(t_{i+1/2}\) + * we calculate \(f_4=f(y_i+ \Delta t f_3,t_i+ \Delta t)\) (estimated value in \(t_{i+1}\), with the slope taken in \(t_{i+1/2}\) + * we then have \(y_{i+1}\simeq y_1 + \frac16 \Delta t(f_1+2f_2+2f_3+f_4)\) + * you can then iterate (solve step by step) to move to the next point. The problem is initialized from \(t_0\) where we know \(y_0\) (boundary condition). + +It is clear that the method is much more precise. Even with a much higher calculation step, the solution is approached correctly, whereas the Euler method gives results very far from the exact solution. We also note that, between the discretization points, the solution was approached by line segments (although we may have more advanced interpolation if we need to know intermediate values). + +The program can be written as follows, using the Scilab scientific calculation software: + +```scilab +// Program for solving a differential equation +// Equation to be solved: dy/dt=f(y,t) + +// Definition of the function f +a=-0.1; +function z=f(y,t);z=a*y; endfunction + +// Boundary condition: +t0=0; +y0=1; + +// Time discretization +tmax=50; +dt=5; + +// Number of discretization steps +N=(tmax-t0)/dt; +// Indices +ii=1:N+1; +t=(ii-1)*dt; // time vector + +t2=0:tmax; // time vector with a finer step, for the exact solution + +// Solution by Euler method, noted ye +ye(1)=y0; // boundary condition +for i=1:N + ye(i+1)=ye(i)+dt*f(ye(i),t(i)); +end + +// Solution by RK4 method, noted yrk4 +yrk4(1)=y0; // boundary condition +for i=1:N + f1=f(yrk4(i),t(i)); + f2=f(yrk4(i)+f1*dt/2,t(i)+dt/2); + f3=f(yrk4(i)+f2*dt/2,t(i)+dt/2); + f4=f(yrk4(i)+f3*dt,t(i)+dt); + yrk4(i+1)=yrk4(i)+dt*(f1+2*f2+2*f3+f4)/6; +end + +Solution mapping // +scf(2) +plot(t2,exp(a*t2),'k-',t,ye,'kd-',t,yrk4,'ks-') +title('Resolution by Runge-Kutta method of'order 4 - dy/dt=-0.1y') +xlabel('t') +ylabel('y') +legend('Exact solution','Euler method, dt=5','RK4 method, dt=5') +``` diff --git a/docs-fr/avant-propos.md b/docs-fr/avant-propos.md deleted file mode 100644 index de56100f77a6fea591efe0429595a733dac0d78c..0000000000000000000000000000000000000000 --- a/docs-fr/avant-propos.md +++ /dev/null @@ -1,20 +0,0 @@ -# Avant-Propos - -Concernant les passes à poissons, le logiciel CASSIOPEE doit être considéré comme un outil d'aide à la conception des passes à -poissons. - -Son utilisateur doit être parfaitement familier de la technique de dimensionnement des passes à -poissons. - -Dans le processus de mise au point d'une passe à poissons, la fonction de CASSIOPEE est de calculer -certaines grandeurs caractérisant son fonctionnement et de présenter les résultats de façon claire et -conviviale. - -Il ne peut évidemment répondre au problème de l'optimisation de l'implantation de l'ouvrage sur le -site. - -Il convient à l'utilisateur de vérifier que le projet élaboré répond bien au problème posé et que toutes -les conditions assurant sa franchissabilité sont satisfaites. - -En aucun cas l'AFB ou Irstea ne pourront être tenus responsables du mauvais fonctionnement -d'un projet dimensionné avec CASSIOPEE. diff --git a/docs-fr/calculators/devalaison/grille.md b/docs-fr/calculators/devalaison/grille.md index e40581b1ee18737eb29c2f74a7b25e8cab5a1827..2329b633a70accb0b5a016a54543534d70d02a42 100644 --- a/docs-fr/calculators/devalaison/grille.md +++ b/docs-fr/calculators/devalaison/grille.md @@ -17,7 +17,7 @@ Plans de grille orientés par rapport à l'écoulement et quasi-verticaux.  -*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. https://doi.org/10.13140/RG.2.1.2359.1449.* +*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. <https://doi.org/10.13140/RG.2.1.2359.1449>.* ### Formule @@ -34,7 +34,7 @@ Plans de grille perpendiculaires à l'écoulement, et inclinés par rapport à l  -*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. https://doi.org/10.13140/RG.2.1.2359.1449.* +*Courret, D. et Larinier, M. Guide pour la conception de prise d’eau ichtyocompatibles pour les petites centrales hydroélectriques, 2008. <https://doi.org/10.13140/RG.2.1.2359.1449>.* ### Formule diff --git a/docs-fr/calculators/devalaison/jet.md b/docs-fr/calculators/devalaison/jet.md index 23b53e4b5bbc97439cc68cdf31195cad7d0b7c6f..f8e82ef64fd208aebb98574da99fb7406cb7652d 100644 --- a/docs-fr/calculators/devalaison/jet.md +++ b/docs-fr/calculators/devalaison/jet.md @@ -14,7 +14,7 @@ Avec \(g\) : accélération de la gravité = 9.81 m.s-2 $$H = 0.5 * g * \frac{D^{2}}{\cos \alpha^{2} * V_0^{2}} - \tan \alpha * D$$ -### Abscisse de l'impact (distance parcourue) +### Abscisse de l'impact (distance horizontale parcourue) $$D = \frac{V_0}{g * \cos \alpha} \left ( V_0 * \sin \alpha + \sqrt{ \left ( V_0 * \sin \alpha \right )^{2} + 2 * g * H } \right )$$ @@ -32,4 +32,4 @@ $$V_z = V_0 \sin \alpha - t * g$$ ### Vitesse à l'impact -$$V_t = \sqrt{ \frac{V_x^{2}}{V_z^{2}} }$$ +$$V_t = \sqrt{ \V_x^{2} + V_z^{2} }$$ diff --git a/docs-fr/calculators/pab/pab.md b/docs-fr/calculators/pab/pab.md index 6e707409453a0887641f91b9e417e01b1a0b8414..a388f1c0e7edbe6b53c9a0d356d125d8c22d3a12 100644 --- a/docs-fr/calculators/pab/pab.md +++ b/docs-fr/calculators/pab/pab.md @@ -52,7 +52,7 @@ La barre d'outils est constituée des boutons suivants : ### Modification avancée de la géométrie de la passe -La sélection des bassins ou des ouvrages donne accès à un bouton "Modifier les valeurs# qui permet de modifier un paramètre parmi toutes les variables des cellules sélectionnées dans le tableau de géométrie. +La sélection des bassins ou des ouvrages donne accès à un bouton "Modifier les valeurs" qui permet de modifier un paramètre parmi toutes les variables des cellules sélectionnées dans le tableau de géométrie. Pour cette variable à modifier, on pourra : diff --git a/docs-fr/calculators/pam/macrorugo_complexe.md b/docs-fr/calculators/pam/macrorugo_complexe.md index e7f277c64cbd6a7a56181d792e1915b39c965d9b..283a4d19f9ec3c574f3f117e7dbb00d43dbb3a96 100644 --- a/docs-fr/calculators/pam/macrorugo_complexe.md +++ b/docs-fr/calculators/pam/macrorugo_complexe.md @@ -13,4 +13,4 @@ Les données calculées sont les mêmes que pour [la passe à macro-rugosité di ## Cas du radier incliné -Le calcul d'une passe à radier incliné consiste à discrétiser la passe en plusieurs radiers horizontaux. La largeur des radiers créés est fixée à la distance à la distance séparant deux blocs avec un ajustement des deux radiers situés aux extrémités pour obtenir la largeur totale de la passe. Il est possible d'éditer les radiers créés en sélectionnant "Radiers multiples" après avoir effectué un calcul avec un radier incliné. +Le calcul d'une passe à radier incliné consiste à discrétiser la passe en plusieurs radiers horizontaux. La largeur des radiers créés est fixée à la distance séparant deux blocs avec un ajustement du radier le plus haut pour obtenir la largeur totale de la passe. Il est possible d'éditer les radiers créés en sélectionnant "Radiers multiples" après avoir effectué un calcul avec un radier incliné. diff --git a/docs-fr/calculators/structures/dever.md b/docs-fr/calculators/structures/dever.md index 3807a40890d52e196b845141b14e86bb0fd9ab42..b604230b5b6172ae4c0e459451f8a1d7640aa646 100644 --- a/docs-fr/calculators/structures/dever.md +++ b/docs-fr/calculators/structures/dever.md @@ -1,6 +1,6 @@ # Lois de déversoirs dénoyés -Ce module de calcul est similaire à celui des [Lois d'ouvrages](lois_ouvrages.md) à la différence près qu'il ne simule que des écoulements dénoyés et permet d'affiner le calcul en utilisant la vitesse d'approche dans le bief amont. +Ce module de calcul est similaire à celui des [Lois d'ouvrages](lois_ouvrages.md) à la différence près qu'il ne simule que des écoulements dénoyés et affine le calcul en utilisant la vitesse d'approche dans le bief amont. Il permet de calculer la relation entre le niveau de l'eau à l'amont d'un déversoir et le débit. Il est utilisé le plus souvent pour évaluer la relation cote amont-débit au niveau d'un seuil ou d'un ouvrage diff --git a/docs-fr/calculators/structures/dever_triang_tronque.md b/docs-fr/calculators/structures/dever_triang_tronque.md index d6e7e155102e30187b3cdf4a95909c2c2627c71d..e6542d8ebf4bd0bb918926a8717907d41f3f21ef 100644 --- a/docs-fr/calculators/structures/dever_triang_tronque.md +++ b/docs-fr/calculators/structures/dever_triang_tronque.md @@ -4,7 +4,7 @@ TT1 caractérisé par : * \(C_d\) : coefficient de débit * \(Z_d\) : cote de déversement basse du triangle -* \(Z_t\) : cote de déversement basse du triangle +* \(Z_t\) : cote de déversement haute du triangle * \(B/2\) : demi-ouverture du triangle ## Formule diff --git a/docs-fr/calculators/structures/kivi.md b/docs-fr/calculators/structures/kivi.md index 351a74caf97612edc57b00ba132807eac83c75fa..2d00fc7e150094d45555c25d379b83997f5987c2 100644 --- a/docs-fr/calculators/structures/kivi.md +++ b/docs-fr/calculators/structures/kivi.md @@ -7,6 +7,8 @@ Le module de calcul permet d'effectuer des calculs hydrauliques pour plusieurs o  +Figure 12 : vue en perspective d'un déversoir rectangulaire avec contraction latérale. + La formule de Kindsvater-Carter correspond à la formule classique du déversoir : $$Q = \mu L \sqrt{2g}h_1^{1.5}$$ diff --git a/docs-fr/calculators/structures/kivi_schema_seuil.png b/docs-fr/calculators/structures/kivi_schema_seuil.png index 81ce161e39bc36fd290199cae8ab6e4fef78bf18..0b2021dc04030b3766a37d528bdc7ff90a001806 100644 Binary files a/docs-fr/calculators/structures/kivi_schema_seuil.png and b/docs-fr/calculators/structures/kivi_schema_seuil.png differ diff --git a/docs-fr/calculators/structures/orifice_denoye.md b/docs-fr/calculators/structures/orifice_denoye.md index 0eb20d9d1671621c3431b024d43a373aadde1c85..062d98374d2dcb47821d28963cd95b85d0bcbab9 100644 --- a/docs-fr/calculators/structures/orifice_denoye.md +++ b/docs-fr/calculators/structures/orifice_denoye.md @@ -14,7 +14,7 @@ Avec : * \(C_d\) le coefficient de débit; * \(S\) la surface de l'orifice en m<sup>2</sup> ; * \(g\) l'accélération de la pesanteur terrestre égale à 9.81 m/s<sup>2</sup> -* \(H\) La la hauteur d'eau mesurée entre la surface de l'eau et le centre de l'orifice en mètres. +* \(H\) La hauteur d'eau mesurée entre la surface de l'eau et le centre de l'orifice en mètres. La surface \(S\) à prendre en compte est la section la plus réduite de l’orifice ou de l’ajutage (Figure 5.12c). diff --git a/docs-fr/general/parametres_application.md b/docs-fr/general/parametres_application.md index 0b3d8453dac214ce25196477b4eec38c8ffe65ff..68d5d96143ff812476a06fa5002c6de0682fd2cc 100644 --- a/docs-fr/general/parametres_application.md +++ b/docs-fr/general/parametres_application.md @@ -3,10 +3,11 @@ Accessible depuis le menu latéral gauche, les paramètres de l'application modifiables par l'utilisateur sont les suivants : - Nombre de décimales affichées : Nombre de décimales affichées pour les résultats des calculs. Pour les nombres proches de zéro affichés en notation scientifique, cette option règle le nombres de chiffres significatifs affichés ; -- Précision de calcul : Précision utilisée pour la convergence des calculs numériques ([Méthode de Brent](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Brent) ou [méthode de Newton](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Newton)) ; -- Nombre d'itération de l'algorithme de Newton ; +- Précision de calcul : Précision utilisée pour la convergence du solveur numérique ([Méthode de Brent](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Brent) ou [méthode de Newton](https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Newton)) ; +- Solveur: nombre d'itérations maximum ; - Activer les notifications à l'écran : autorise l'affichage de notifications lors de certaines opérations (avertissement au chargement d'une session, invalidation de calcul...) ; -- Activer les raccourcis clavier: autorise l'utilisation des raccourcis clavier (Voir liste des raccourcis disponibles) ; -- Langue : définit la langue des interfaces du logiciel en français ou en anglais (N.B. : la documentation n'existe qu'en français). +- Activer les raccourcis clavier: autorise l'utilisation des raccourcis clavier (Voir [liste des raccourcis disponibles](raccourcis_clavier.md)) ; +- Créer des nouveaux modules avec des champs vides (aucune valeur par défaut) : si décoché les paramètres des modules sont pré-remplis avec des valeurs par défaut ; +- Langue : définit la langue des interfaces du logiciel en français ou en anglais. Le bouton d'enregistrement en haut de la fenêtre permet d'enregistrer les préférences de l'utilisateur dans son navigateur pour les utilisations ultérieures. Le bouton "Reset" permet de restaurer les réglages par défaut de l'application. diff --git a/docs-fr/general/principe_fonctionnement.md b/docs-fr/general/principe_fonctionnement.md index 370800c4c00adc99dfee08286f535f68ec87a03d..0d597365a45222c0965692c291523edc52512919 100644 --- a/docs-fr/general/principe_fonctionnement.md +++ b/docs-fr/general/principe_fonctionnement.md @@ -28,7 +28,7 @@ L'interface est conçue pour qu'un paramètre et un seul soit choisi pour le cal Une série de calculs peut être lancée entre une valeur min et une valeur max pour un pas donné : - + Ou pour une liste de valeurs définies : diff --git a/docs-fr/index.md b/docs-fr/index.md index c5855385a62ae7f05c3429b0c2af7f13d7ea766a..514879164bc87233e1311ef6db6520a7e737005a 100644 --- a/docs-fr/index.md +++ b/docs-fr/index.md @@ -1,9 +1,9 @@ # Présentation du logiciel Cassiopée <div style="height: 86px; border: solid #aaa 2px; padding: 10px; padding-right: 20px; border-radius: 5px; display: inline-block;"> - <a href="http://cassiopee.g-eau.fr" style="text-decoration: none;"> + <a href="https://cassiopee.g-eau.fr" style="text-decoration: none;"> <img style="float:left; margin-right: 20px;" src="logo.png"> - <span style="font-size: 30px; line-height: 60px">http://cassiopee.g-eau.fr</span> + <span style="font-size: 30px; line-height: 60px">https://cassiopee.g-eau.fr</span> </a> </div> @@ -13,4 +13,4 @@ Cassiopée est un logiciel consacré à l'hydraulique des rivières avec notamme ## Pré-requis - installation -Cassiopée ne nécessite aucune installation. Il est disponible en ligne à partir d'un navigateur récent (testé sous Firefox, Chrome et Chromium) en se rendant à l'adresse suivante : [http://cassiopee.g-eau.fr](http://cassiopee.g-eau.fr) +Cassiopée ne nécessite aucune installation. Il est disponible en ligne à partir d'un navigateur récent (testé sous Firefox, Chrome et Chromium) en se rendant à l'adresse suivante : [https://cassiopee.g-eau.fr](https://cassiopee.g-eau.fr) diff --git a/electron-builder.yml b/electron-builder.yml index d2d0e88d7831bf94dc8262e6873ddfd6a9d67f37..28087463289cff9f4fa4f5f9d69e693673426fe3 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -16,6 +16,7 @@ files: - "!e2e/" - "!doc/" - "!docs-fr/" + - "!docs-en/" - "!compodoc-fr/" - "!hooks/" - "!node_modules/" diff --git a/jalhyd_branch b/jalhyd_branch index d0b9a50d4d8e0d44bd133d969ef995101f8ee174..1f7391f92b6a3792204e07e99f71f643cc35e7e1 100644 --- a/jalhyd_branch +++ b/jalhyd_branch @@ -1 +1 @@ -172-lechapt-et-calmon-ajouter-les-pertes-de-charges-singulieres +master diff --git a/mkdocs-en.yml b/mkdocs-en.yml new file mode 100644 index 0000000000000000000000000000000000000000..877dc87d3d0ba2e7e9156c46a15af9fd7c6fbcf0 --- /dev/null +++ b/mkdocs-en.yml @@ -0,0 +1,77 @@ +site_name: Cassiopée documentation +site_author: UMR G-EAU +docs_dir: docs-en +site_dir: src/assets/docs-en/ +copyright: CC BY-NC-ND 4.0, UMR G-EAU 2019 - <a href="https://cassiopee.g-eau.fr">https://cassiopee.g-eau.fr</a> +repo_name: '' +repo_url: 'https://gitlab.irstea.fr/cassiopee' +theme: + name: 'material' + language: 'en' +use_directory_urls: false +extra_javascript: + - javascripts/mathjax/MathJax.js?config=TeX-AMS_CHTML + - javascripts/matomo-tracking.js +markdown_extensions: + - mdx_math + - footnotes + - codehilite +nav: + - Presentation of Cassiopée: + - index.md + - general/principe_fonctionnement.md + - general/parametres_application.md + - general/raccourcis_clavier.md + - Pipe flow: + - calculators/hyd_en_charge/lechapt-calmon.md + - calculators/hyd_en_charge/cond_distri.md + - Open-channel flow: + - Uniform flow: calculators/hsl/regime_uniforme.md + - calculators/hsl/courbe_remous.md + - calculators/hsl/section_parametree.md + - calculators/hsl/pente.md + - calculators/hsl/types_sections.md + - calculators/hsl/var_hydrauliques.md + - calculators/hsl/strickler.md + - Parallel structures: + - calculators/structures/lois_ouvrages.md + - calculators/structures/dever.md + - Cross walls: calculators/pab/cloisons.md + - Device equations: + - calculators/structures/liste.md + - calculators/structures/kivi.md + - calculators/structures/orifice_noye.md + - calculators/structures/orifice_denoye.md + - calculators/structures/fente_noyee.md + - calculators/structures/seuil_noye.md + - calculators/structures/seuil_denoye.md + - calculators/structures/dever_triang.md + - calculators/structures/dever_triang_tronque.md + - calculators/structures/cem_88_v.md + - calculators/structures/cem_88_d.md + - calculators/structures/cunge_80.md + - calculators/structures/vanne_denoyee.md + - calculators/structures/vanne_noyee.md + - calculators/structures/villemonte_1947.md + - Fish ladders: + - Fall: calculators/pab/chute.md + - Number of falls: calculators/pab/nombre.md + - Dissipated power: calculators/pab/volume.md + - Dimensions: calculators/pab/dimensions.md + - Cross walls: calculators/pab/cloisons.md + - Fish ladder: calculators/pab/pab.md + - Rock-ramp fishpasses: + - calculators/pam/macrorugo.md + - calculators/pam/macrorugo_theorie.md + - calculators/pam/macrorugo_complexe.md + - Downstream migration: + - Loss of charge, water grid: calculators/devalaison/grille.md + - Jet impact: calculators/devalaison/jet.md + - Numerical methods: + - Runge-Kutta 4: methodes_numeriques/rk4.md + - Euler explicit: methodes_numeriques/euler_explicite.md + - Trapezes integration: methodes_numeriques/integration_trapezes.md + - Brent method: methodes_numeriques/brent.md + - Newton method: methodes_numeriques/newton.md + - Versions history: CHANGELOG.md + - mentions_legales.md diff --git a/mkdocs.yml b/mkdocs-fr.yml similarity index 95% rename from mkdocs.yml rename to mkdocs-fr.yml index 4cdf19af82c0fbf540a38e7d73735a1b7569ab55..c99784f8fca9c3411b53d644d8d32b7a850151cd 100644 --- a/mkdocs.yml +++ b/mkdocs-fr.yml @@ -2,7 +2,7 @@ site_name: Documentation de Cassiopée site_author: UMR G-EAU docs_dir: docs-fr site_dir: src/assets/docs-fr/ -copyright: CC BY-NC-ND 4.0, UMR G-EAU 2019 - <a href="http://cassiopee.g-eau.fr">http://cassiopee.g-eau.fr</a> +copyright: CC BY-NC-ND 4.0, UMR G-EAU 2019 - <a href="https://cassiopee.g-eau.fr">https://cassiopee.g-eau.fr</a> repo_name: '' repo_url: 'https://gitlab.irstea.fr/cassiopee' theme: @@ -17,7 +17,6 @@ markdown_extensions: - footnotes - codehilite nav: - - avant-propos.md - Présentation de Cassiopée: - index.md - general/principe_fonctionnement.md diff --git a/package.json b/package.json index 82a9b4ed1bf177a0985d83afe1779ca3979637f6..222a12349daede552547e3d7dfc0e3f07be1961d 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,14 @@ "author": "Irstea", "version": "4.8.1", "main": "main.js", - "homepage": "http://cassiopee.g-eau.fr", + "homepage": "https://cassiopee.g-eau.fr", "license": "MIT", "scripts": { "ng": "cd . && \"node_modules/.bin/ng\"", "lint": "npm run ng -- lint", "e2e": "npm run preprocess && npm run ng -- e2e", "e2equick": "npm run ng -- e2e --dev-server-target=", - "mkdocs": "node scripts/mkdocs-preprocess.js && node scripts/python3.js -m mkdocs build", + "mkdocs": "node scripts/mkdocs-preprocess.js && node scripts/python3.js -m mkdocs build -f mkdocs-fr.yml && node scripts/python3.js -m mkdocs build -f mkdocs-en.yml", "preprocess": "node scripts/preprocessors.js && npm run mkdocs", "start": "npm run preprocess && npm run ng serve -- --host 0.0.0.0 --poll 5000", "prod": "npm run preprocess && npm run ng serve -- --host 0.0.0.0 --prod", diff --git a/scripts/mkdocs-preprocess.js b/scripts/mkdocs-preprocess.js index 46fbbadc095cc11363ec4b8c19a61f2059a4ca96..19d0b769e5ce2d3edec103b2c0285b6f30611a12 100644 --- a/scripts/mkdocs-preprocess.js +++ b/scripts/mkdocs-preprocess.js @@ -1,27 +1,26 @@ 'use strict'; const fs = require('fs-extra'); -// const find = require('find'); -const destPath = "docs-fr/javascripts/mathjax"; +const langs = [ "en", "fr" ]; -// empty destination folder -fs.emptyDirSync(destPath); +for (const l of langs) { + preprocessForLang(l); +} + +function preprocessForLang(lang = "fr") { + const destPath = "docs-" + lang + "/javascripts/mathjax"; -// create destination subfolders -fs.ensureDirSync(destPath + "/fonts/HTML-CSS/TeX/", { recursive: true }); + // empty destination folder + fs.emptyDirSync(destPath); -// copy required files only -fs.copySync("node_modules/mathjax/MathJax.js", destPath + "/MathJax.js"); -fs.copySync("node_modules/mathjax/config", destPath + "/config"); -fs.copySync("node_modules/mathjax/jax", destPath + "/jax"); -fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/woff", destPath + "/fonts/HTML-CSS/TeX/woff"); -fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/otf", destPath + "/fonts/HTML-CSS/TeX/otf"); + // create destination subfolders + fs.ensureDirSync(destPath + "/fonts/HTML-CSS/TeX/", { recursive: true }); -// remove md files (obsolete ?) -/* -const files = find.fileSync(/.\.md/i, "docs-fr/javascripts/"); -for (const file of files) { - fs.unlinkSync(file); + // copy required files only + fs.copySync("node_modules/mathjax/MathJax.js", destPath + "/MathJax.js"); + fs.copySync("node_modules/mathjax/config", destPath + "/config"); + fs.copySync("node_modules/mathjax/jax", destPath + "/jax"); + fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/woff", destPath + "/fonts/HTML-CSS/TeX/woff"); + fs.copySync("node_modules/mathjax/fonts/HTML-CSS/TeX/otf", destPath + "/fonts/HTML-CSS/TeX/otf"); } -*/ diff --git a/src/app/app.component.html b/src/app/app.component.html index 894aa27931152b4126e87b635b2331d0d20ae7c9..6290855566bcf263753c5705c77f8593ed0877c4 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -61,7 +61,7 @@ [title]="uitextSidenavNewCalc" (click)="sidenav.close()"> <mat-icon>add_box</mat-icon> </button> - <a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" href="assets/docs-fr/index.html" + <a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" [href]="docIndexPath" [title]="uitextSidenavHelp" (click)="sidenav.close()"> <mat-icon>help</mat-icon> </a> @@ -135,7 +135,7 @@ <mat-icon>report_problem</mat-icon> {{ uitextSidenavReportBug }} </a> - <a id="side-nav-help" target="_blank" href="assets/docs-fr/index.html" (click)="sidenav.close()"> + <a id="side-nav-help" target="_blank" [href]="docIndexPath" (click)="sidenav.close()"> <mat-icon>help</mat-icon> {{ uitextSidenavHelp }} </a> diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1990f8cabdcf617a8906ed2e633f9be9aa09fad1..6f2375744cffb7798869c6862506f078a8a12878 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -782,6 +782,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer { moveItemInArray(this.calculators, event.previousIndex, event.currentIndex); } + public get docIndexPath(): string { + return "assets/docs-" + this.appSetupService.language + "/index.html"; + } + /** * détection de la fermeture de la page/navigateur et demande de confirmation */ diff --git a/src/app/components/base-param-input/base-param-input.component.ts b/src/app/components/base-param-input/base-param-input.component.ts index ab8c254a1973786f432d48f6f61f930e17115a41..49d20f3ef665a87cb124645ae0f97c647249929f 100644 --- a/src/app/components/base-param-input/base-param-input.component.ts +++ b/src/app/components/base-param-input/base-param-input.component.ts @@ -8,6 +8,7 @@ import { I18nService } from "../../services/internationalisation.service"; import { GenericInputComponent } from "../generic-input/generic-input.component"; import { ServiceFactory } from "../../services/service-factory"; import { NgParameter } from "../../formulaire/ngparam"; +import { ApplicationSetupService } from "../../services/app-setup.service"; export class NgBaseParam extends Observable { private _param: ParamDefinition; @@ -92,8 +93,12 @@ export class NgBaseParam extends Observable { templateUrl: "../generic-input/generic-input.component.html", }) export class BaseParamInputComponent extends GenericInputComponent { - constructor(intlService: I18nService, cdRef: ChangeDetectorRef) { - super(cdRef, intlService); + constructor( + intlService: I18nService, + appSetupService: ApplicationSetupService, + cdRef: ChangeDetectorRef + ) { + super(cdRef, intlService, appSetupService); } /** diff --git a/src/app/components/field-set/field-set.component.ts b/src/app/components/field-set/field-set.component.ts index 39b875ad59c682585ed93e2cfc0ad591f95fd0c6..ef2cc68855cbce89b5b6a56d865b40d53c807124 100644 --- a/src/app/components/field-set/field-set.component.ts +++ b/src/app/components/field-set/field-set.component.ts @@ -10,6 +10,7 @@ import { FormulairePab } from "../../formulaire/definition/concrete/form-pab"; import { SelectFieldLineComponent } from "../select-field-line/select-field-line.component"; import { FieldsetContainer } from "../../formulaire/fieldset-container"; import { NotificationsService } from "../../services/notifications.service"; +import { ApplicationSetupService } from "../../services/app-setup.service"; import { I18nService } from "../../services/internationalisation.service"; import { sprintf } from "sprintf-js"; @@ -146,7 +147,8 @@ export class FieldSetComponent implements DoCheck { public constructor( private notifService: NotificationsService, - private i18nService: I18nService + private i18nService: I18nService, + private appSetupService: ApplicationSetupService ) { } public hasRadioFix(): boolean { @@ -397,7 +399,7 @@ export class FieldSetComponent implements DoCheck { } public openHelp() { - window.open("assets/docs-fr/calculators/" + this._fieldSet.helpLink, "_blank"); + window.open("assets/docs-" + this.appSetupService.language + "/calculators/" + this._fieldSet.helpLink, "_blank"); } public get enableHelpButton() { diff --git a/src/app/components/fieldset-container/fieldset-container.component.ts b/src/app/components/fieldset-container/fieldset-container.component.ts index 04e6b058cd57204bde05f1227809ee0a5bd2bc5e..2d206a1336a2f68d031fed3d1e2c4731a34a9fb7 100644 --- a/src/app/components/fieldset-container/fieldset-container.component.ts +++ b/src/app/components/fieldset-container/fieldset-container.component.ts @@ -211,7 +211,7 @@ export class FieldsetContainerComponent implements DoCheck, AfterViewInit { } public openHelp() { - window.open("assets/docs-fr/calculators/" + this._container.helpLink, "_blank"); + window.open("assets/docs-" + this.appSetupService.language + "/calculators/" + this._container.helpLink, "_blank"); } public get enableHelpButton() { diff --git a/src/app/components/generic-calculator/calc-name.component.ts b/src/app/components/generic-calculator/calc-name.component.ts index 9ed7ccb714ac03cf2e97d2a6f9de5be1cc7f366c..e93c1de254f2404ccb93f83c2694ed93957270de 100644 --- a/src/app/components/generic-calculator/calc-name.component.ts +++ b/src/app/components/generic-calculator/calc-name.component.ts @@ -2,6 +2,7 @@ import { Component } from "@angular/core"; import { GenericInputComponent } from "../generic-input/generic-input.component"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; import { I18nService } from "../../services/internationalisation.service"; +import { ApplicationSetupService } from "../../services/app-setup.service"; @Component({ selector: "calc-name", @@ -12,8 +13,11 @@ import { I18nService } from "../../services/internationalisation.service"; }) export class CalculatorNameComponent extends GenericInputComponent { - constructor(intlService: I18nService) { - super(null, intlService); + constructor( + intlService: I18nService, + appSetupService: ApplicationSetupService + ) { + super(null, intlService, appSetupService); } /** diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index 77f8e7e15fd4a89d9e887f97cf168b2d13d5bce1..8e256b367d71586b1bb20bc1d18830f8b0e472f9 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -6,6 +6,7 @@ import { Observer, Session, Cloisons, Pab, ParamValueMode, CalculatorType, Bief, import { AppComponent } from "../../app.component"; import { FormulaireService } from "../../services/formulaire.service"; +import { ApplicationSetupService } from "../../services/app-setup.service"; import { I18nService } from "../../services/internationalisation.service"; import { FieldSet } from "../../formulaire/fieldset"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; @@ -17,7 +18,6 @@ import { FormulaireElement } from "../../formulaire/formulaire-element"; import { FieldsetContainer } from "../../formulaire/fieldset-container"; import { FieldsetContainerComponent } from "../fieldset-container/fieldset-container.component"; import { PabTableComponent } from "../pab-table/pab-table.component"; -import { ServiceFactory } from "../../services/service-factory"; import { MatDialog } from "@angular/material"; import { DialogConfirmCloseCalcComponent } from "../dialog-confirm-close-calc/dialog-confirm-close-calc.component"; import { DialogGeneratePABComponent } from "../dialog-generate-pab/dialog-generate-pab.component"; @@ -96,11 +96,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe private _pendingRadioClick = false; private _pendingRadioClickInfo: any; - // services - - private intlService: I18nService; - private formulaireService: FormulaireService; - public get ID() { if (this._formulaire) { return this._formulaire.uid; @@ -117,11 +112,11 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe private generatePABDialog: MatDialog, private _elementRef: ElementRef, private hotkeysService: HotkeysService, + private appSetupService: ApplicationSetupService, + private intlService: I18nService, + private formulaireService: FormulaireService, private matomoTracker: MatomoTracker ) { - this.intlService = ServiceFactory.instance.i18nService; - this.formulaireService = ServiceFactory.instance.formulaireService; - // hotkeys listeners this.hotkeysService.add(new Hotkey("alt+w", AppComponent.onHotkey(this.closeCalculator, this))); this.hotkeysService.add(new Hotkey("alt+d", AppComponent.onHotkey(this.cloneCalculator, this))); @@ -512,7 +507,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe } public openHelp() { - window.open("assets/docs-fr/calculators/" + this._formulaire.helpLink, "_blank"); + window.open("assets/docs-" + this.appSetupService.language + "/calculators/" + this._formulaire.helpLink, "_blank"); } /** diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index bf38b83e1deb77ae8dfaa681596851226608b91c..bbc0476d9c1cc930d0a7612e6f6bfe0641ad7b11 100644 --- a/src/app/components/generic-input/generic-input.component.ts +++ b/src/app/components/generic-input/generic-input.component.ts @@ -1,9 +1,10 @@ import { Input, Output, EventEmitter, ChangeDetectorRef, OnChanges, ViewChild } from "@angular/core"; import { NgModel } from "@angular/forms"; -import { isNumeric, Structure, Pab, MacrorugoCompound, SPP } from "jalhyd"; +import { isNumeric } from "jalhyd"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; import { NgParameter } from "../../formulaire/ngparam"; import { I18nService } from "../../services/internationalisation.service"; +import { ApplicationSetupService } from "../../services/app-setup.service"; /** * classe de gestion générique d'un champ de saisie avec titre, validation et message d'erreur @@ -101,7 +102,11 @@ export abstract class GenericInputComponent implements OnChanges { @ViewChild("inputControl", { static: true }) inputField: NgModel; - constructor(private cdRef: ChangeDetectorRef, protected intlService: I18nService) { } + constructor( + private cdRef: ChangeDetectorRef, + protected intlService: I18nService, + protected appSetupService: ApplicationSetupService + ) { } public get isDisabled(): boolean { return this._inputDisabled; @@ -336,7 +341,7 @@ export abstract class GenericInputComponent implements OnChanges { } public openHelp($event: any) { - window.open("assets/docs-fr/calculators/" + this._model.helpLink, "_blank"); + window.open("assets/docs-" + this.appSetupService.language + "/calculators/" + this._model.helpLink, "_blank"); $event.preventDefault(); $event.stopPropagation(); return false; diff --git a/src/app/components/ngparam-input/ngparam-input.component.ts b/src/app/components/ngparam-input/ngparam-input.component.ts index 8476cc2d2d8455d8a69752f84ecc89fa379ba23a..1a06a691d6f01172203187bc6b6ea6c71242b1bb 100644 --- a/src/app/components/ngparam-input/ngparam-input.component.ts +++ b/src/app/components/ngparam-input/ngparam-input.component.ts @@ -7,6 +7,7 @@ import { Message, Observer } from "jalhyd"; import { I18nService } from "../../services/internationalisation.service"; import { NgParameter } from "../../formulaire/ngparam"; import { GenericInputComponent } from "../generic-input/generic-input.component"; +import { ApplicationSetupService } from "../../services/app-setup.service"; @Component({ selector: "ngparam-input", @@ -29,8 +30,12 @@ export class NgParamInputComponent extends GenericInputComponent implements Obse */ private _tmp: number; - constructor(intlService: I18nService, cdRef: ChangeDetectorRef) { - super(cdRef, intlService); + constructor( + intlService: I18nService, + appSetupService: ApplicationSetupService, + cdRef: ChangeDetectorRef + ) { + super(cdRef, intlService, appSetupService); } /** diff --git a/src/app/components/select-field-line/select-field-line.component.ts b/src/app/components/select-field-line/select-field-line.component.ts index 9f4793c7dc9f5e18de7da3da48195f705572f114..6b863acda453ccaeeab67460d99d0bc977657da8 100644 --- a/src/app/components/select-field-line/select-field-line.component.ts +++ b/src/app/components/select-field-line/select-field-line.component.ts @@ -4,6 +4,7 @@ import { SelectField } from "../../formulaire/select-field"; import { SelectEntry } from "../../formulaire/select-entry"; import { I18nService } from "../../services/internationalisation.service"; import { SelectFieldReference } from "../../formulaire/select-field-reference"; +import { ApplicationSetupService } from "../../services/app-setup.service"; @Component({ selector: "select-field-line", @@ -20,7 +21,10 @@ export class SelectFieldLineComponent implements OnInit { @Input() private _select: SelectField; - public constructor(private i18nService: I18nService) {} + public constructor( + private i18nService: I18nService, + private appSetupService: ApplicationSetupService + ) {} public get selectId() { return this._select.id; @@ -66,7 +70,7 @@ export class SelectFieldLineComponent implements OnInit { const entryId = cv.id.substring(this._select.entriesBaseId.length); link = this._select.helpLink[entryId]; } - window.open("assets/docs-fr/calculators/" + link, "_blank"); + window.open("assets/docs-" + this.appSetupService.language + "/calculators/" + link, "_blank"); $event.preventDefault(); $event.stopPropagation(); return false; diff --git a/src/app/results/calculator-results.ts b/src/app/results/calculator-results.ts index 27c0b89b34d23d1e3ec05549ff1fbe174db7e2bb..53e7a58b01ffce2a44db4fcb2fb9aab88ea364a1 100644 --- a/src/app/results/calculator-results.ts +++ b/src/app/results/calculator-results.ts @@ -58,7 +58,8 @@ export abstract class CalculatorResults { public getHelpLink(symbol: string): string { // add help link if any if (this.helpLinks !== undefined && this.helpLinks[symbol] !== undefined) { - const helpURL = "assets/docs-fr/calculators/" + this.helpLinks[symbol]; + const helpURL = "assets/docs-" + ServiceFactory.instance.applicationSetupService.language + + "/calculators/" + this.helpLinks[symbol]; // pseudo-<mat-icon> dirty trick because <mat-icon> renderer cannot be // triggered when code is set through innerHTML return `<a href="${helpURL}" target="_blank"><span class="material-icons mat-accent">help</span></a>`; diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index d064a60a081ca6703fb339759073058b74c5230a..63ea5e92501fa9d65a02326655dcb43da6388b8f 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -475,7 +475,7 @@ "INFO_THEME_PASSE_NATURELLE_TITRE": "Natural pass", "INFO_TITREJOURNAL": "Calculation log", "INFO_TITREJOURNAL_GLOBAL": "Calculation log synthesis", - "INFO_WELCOME_CONTENT": "<p>Il regroupe des outils d'aide à la conception des dispositifs de franchissement piscicoles pour la montaison et la dévalaison ainsi que des outils de calcul hydraulique utiles pour l'ingénierie en environnement et agriculture.</p><p>The Cassiopée software was developed by the ecohydraulic R&D pole gathering <a href=\"https://www.afbiodiversite.fr\" target=\"_blank\">AFB</a> (French Agency for Biodiversity) and <a href=\"https://www.imft.fr\" target=\"_blank\">IMFT</a> (Fluids Mechanics Institute of Toulouse) and by <a href=\"http://g-eau.fr/index.php/en/\" target=\"_blank\">UMR G-EAU</a> (Joint Research Unit \"Water Management, Actors, Territories\").</p><p>It includes tools for designing fish crossing devices for upstream and downstream migrations, and hydraulic calculation tools useful for environmental and agricultural engineering.</p><p>For more information, consult <a href=\"assets/docs-fr/mentions_legales.html\" target=\"_blank\">legal notice</a> and <a href=\"assets/docs-fr/index.html\" target=\"_blank\">documentation</a>.</p>", + "INFO_WELCOME_CONTENT": "<p>Il regroupe des outils d'aide à la conception des dispositifs de franchissement piscicoles pour la montaison et la dévalaison ainsi que des outils de calcul hydraulique utiles pour l'ingénierie en environnement et agriculture.</p><p>The Cassiopée software was developed by the ecohydraulic R&D pole gathering <a href=\"https://www.afbiodiversite.fr\" target=\"_blank\">AFB</a> (French Agency for Biodiversity) and <a href=\"https://www.imft.fr\" target=\"_blank\">IMFT</a> (Fluids Mechanics Institute of Toulouse) and by <a href=\"http://g-eau.fr/index.php/en/\" target=\"_blank\">UMR G-EAU</a> (Joint Research Unit \"Water Management, Actors, Territories\").</p><p>It includes tools for designing fish crossing devices for upstream and downstream migrations, and hydraulic calculation tools useful for environmental and agricultural engineering.</p><p>For more information, consult <a href=\"assets/docs-en/mentions_legales.html\" target=\"_blank\">legal notice</a> and <a href=\"assets/docs-en/index.html\" target=\"_blank\">documentation</a>.</p>", "INFO_WELCOME_SUBTITLE": "Hydraulic calculators", "INFO_EXAMPLE_LABEL_CHANNEL_FLOW": "Channel flow with hydraulic structures", "INFO_EXAMPLE_LABEL_PAB_COMPLETE": "Standard fish ladder",