Skip to content
Snippets Groups Projects
Commit 920cfe77 authored by Dorchies David's avatar Dorchies David
Browse files

Merge branch...

Merge branch '608-documentation-les-formules-de-math-ne-s-affichent-pas-dans-la-version-anglaise' into 'devel'

Resolve "Documentation: Les formules de math ne s'affichent pas dans la version anglaise"

Closes #608

See merge request !209
parents deca6b5b eb7c1271
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!209Resolve "Documentation: Les formules de math ne s'affichent pas dans la version anglaise"
Pipeline #140248 failed
......@@ -8,7 +8,7 @@ It allows the calculation of the value of one of the following quantities:
- Pipe diameter (m)
- Total head loss (m)
- Pipe length (m)
- Singular pressure loss coefficient (m)
- Singular pressure loss coefficient
The total head loss is the sum of the linear head losses \(J_L\) obtained from the Lechapt and Calmon abacuses and singular \(J_S\) depending on the above coefficient.
......
# Pressure loss
This module computes linear head losses in a circular pipe with the following laws:
- [Lechapt et Calmon](lechapt-calmon.md)
- [Strickler](strickler.md)
The following values can be computed:
- Flow (m<sup>3</sup>/s)
- Pipe diameter (m)
- Total pressure loss (m)
- Pipe length (m)
- Singular head loss coefficient
The total pressure loss is the sum of linear losses \(J_{lin}\), according to the used law, and singular losses \(J_{loc}\) depending on the above coefficient.
## Singular pressure loss
$$ J_{loc} = K_{loc} \frac{V^2}{2g}$$
Given&nbsp;:
- \(K_{loc}\)&nbsp;: singular head loss coefficient
- \(V\)&nbsp;: water speed in the pipe (\(V = 4 Q / \pi / D^2\))
## Linear head loss coefficient
$$ K_{lin} = \frac{2g J_{lin}}{V^2} $$
## Darcy head loss coefficient
$$ f_D = \frac{2g J D}{l_T V^2} $$
# Strickler formula
This linear head loss law is parameterised by the Stricker coefficient \(K_S\).
The other law parameters are shared with all pressure loss formulas:
- \(Q\) : flow (m<sup>3</sup>/s)
- \(D\) : pipe diameter (m)
- \(l_T\) : pipe length (m)
$$J_L=\frac{l_T.Q^2}{(K_S.\pi.D^2/4)^2.(D/4)^{4/3}}$$
......@@ -2,8 +2,8 @@
Ce module permet de calculer les pertes de charge dans une conduite circulaire à partir des lois suivantes donnant les pertes de charge linéaires :
- Lechapt et Calmon
- Strickler
- [Lechapt et Calmon](lechapt-calmon.md)
- [Strickler](strickler.md)
Il permet le calcul de la valeur d'une des grandeurs suivantes&nbsp;:
......
......@@ -451,4 +451,11 @@ export class CalculatorPage {
n++;
}
}
/**
* get help button related to calculator
*/
getCalculatorHelpButton() {
return element(by.css("#help-calc"));
}
}
import { ListPage } from "./list.po";
import { CalculatorPage } from "./calculator.po";
import { Navbar } from "./navbar.po";
import { browser, by, element } from "protractor";
import { PreferencesPage } from "./preferences.po";
describe("documentation − ", () => {
let listPage: ListPage;
let calcPage: CalculatorPage;
let prefPage: PreferencesPage;
let navbar: Navbar;
beforeAll(() => {
calcPage = new CalculatorPage();
prefPage = new PreferencesPage();
navbar = new Navbar();
listPage = new ListPage();
// browser.manage().window().setPosition(2000, 30);
});
async function checkMathjaxInHelp(lang: number) {
// change language setup
await prefPage.navigateTo();
await prefPage.changeLanguage(lang);
await browser.sleep(200);
// start page
await navbar.clickNewCalculatorButton();
// open "fish ladder: fall" calculator
await listPage.clickMenuEntryForCalcType(12);
await browser.sleep(200);
// click help
await calcPage.getCalculatorHelpButton().click();
await browser.sleep(200);
browser.getAllWindowHandles().then(async (handles) => {
browser.ignoreSynchronization = true; // deprecated but the only solution to work in the newly opened tab
// switch to help tab
browser.switchTo().window(handles[1]).then(async () => {
// check Mathjax element is present
expect(element(by.css("mjx-container")).isPresent()).toBe(true);
}).then(async () => {
// close help tab
await browser.close();
// switch back to calculator (required to avoid failure of next language test)
await browser.switchTo().window(handles[0]);
browser.ignoreSynchronization = false;
});
// switch back to calculator (required to avoid failure of next language test)
await browser.switchTo().window(handles[0]);
browser.ignoreSynchronization = false;
});
}
it("check Mathjax formula are displayed in calculator French help", async () => {
await checkMathjaxInHelp(1); // fr
});
it("check Mathjax formula are displayed in calculator English help", async () => {
await checkMathjaxInHelp(0); // en
});
});
......@@ -8,7 +8,7 @@ const fs = require('fs-extra');
const destPath_JS = "src/assets/docs/javascripts";
const destPath_FR_JS = "src/assets/docs/fr/javascripts"; // pour la compilation en local (français)
const destPath_EN_JS = "src/assets/docs/fr/javascripts"; // pour la compilation en local (anglais)
const destPath_EN_JS = "src/assets/docs/en/javascripts"; // pour la compilation en local (anglais)
const destPath_CSS = "src/assets/docs/stylesheets";
const destPath_FR_CSS = "src/assets/docs/fr/stylesheets"; // pour la compilation en local (français)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment