From ce8a487ad03e6d7c71a24598a1cbeca574870bc3 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Wed, 11 Mar 2020 16:36:08 +0100 Subject: [PATCH] Add new session example --- .../components/calculator-list/calculator-list.component.ts | 4 ++++ src/app/examples/pente-critique-canal.json | 1 + src/app/examples/solveur-channel-flow.json | 2 +- src/locale/messages.en.json | 1 + src/locale/messages.fr.json | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/app/examples/pente-critique-canal.json diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index 0cdc980bd..f014d75c8 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -180,6 +180,10 @@ export class CalculatorListComponent implements OnInit { label: this.intlService.localizeText("INFO_EXAMPLE_LABEL_WEIR_JET_LENGTH"), path: "weir-jet-length.json" }, + { + label: this.intlService.localizeText("INFO_EXAMPLE_LABEL_PENTE_CRITIQUE_CANAL"), + path: "pente-critique-canal.json" + }, { label: this.intlService.localizeText("INFO_EXAMPLE_LABEL_PAB_ECH_TRIANG"), path: "pab-ech-triang.json" diff --git a/src/app/examples/pente-critique-canal.json b/src/app/examples/pente-critique-canal.json new file mode 100644 index 000000000..f054b6192 --- /dev/null +++ b/src/app/examples/pente-critique-canal.json @@ -0,0 +1 @@ +{"header":{"source":"jalhyd","format_version":"1.3","created":"2020-03-11T15:24:03.129Z"},"settings":{"precision":1e-7,"maxIterations":100,"displayPrecision":3},"documentation":"## Calcul de la pente critique\n\nCeci est un exemple d'utilisation du *solveur multimodule* pour calculer la pente critique d'un canal.\n\nPour un canal ayant une géométrie, un débit et une rugosité donnés, la pente critique est la pente pour laquelle la hauteur normale est égale à la hauteur critique.\n\nCette session utilise le module *section paramétrée* pour calculer la hauteur normale et la hauteur critique pour une section, un rugosité, un débit et une pente donnés.\n\nLe module *fonction affine* calcule la différence entre les deux hauteurs et le *solveur multimodule* cherche la pente du module *section paramétrée* donnant zéro pour cette différence.\n\n","session":[{"uid":"N21taD","props":{"calcType":"SectionParametree"},"meta":{"title":"Sec. param."},"children":[{"uid":"aXFweW","props":{"calcType":"Section","nodeType":"SectionRectangle"},"children":[],"parameters":[{"symbol":"Ks","mode":"SINGLE","value":40},{"symbol":"Q","mode":"SINGLE","value":1.2},{"symbol":"If","mode":"SINGLE","value":0.012246730634834615},{"symbol":"YB","mode":"SINGLE","value":1},{"symbol":"Y","mode":"SINGLE","value":0.8},{"symbol":"LargeurBerge","mode":"SINGLE","value":2.5}]}],"parameters":[]},{"uid":"bmNldX","props":{"calcType":"YAXB"},"meta":{"title":"yn - yc"},"children":[],"parameters":[{"symbol":"Y","mode":"CALCUL"},{"symbol":"A","mode":"SINGLE","value":-1},{"symbol":"X","mode":"LINK","targetNub":"N21taD","targetParam":"Yc"},{"symbol":"B","mode":"LINK","targetNub":"N21taD","targetParam":"Yn"}]},{"uid":"eTcxMW","props":{"calcType":"Solveur","nubToCalculate":"bmNldX","searchedParameter":"N21taD/If","targettedResult":""},"meta":{"title":"Solveur"},"children":[],"parameters":[{"symbol":"Xinit","mode":"SINGLE","value":0.001},{"symbol":"Ytarget","mode":"SINGLE","value":0}]}]} \ No newline at end of file diff --git a/src/app/examples/solveur-channel-flow.json b/src/app/examples/solveur-channel-flow.json index b3493dd13..714e9245e 100644 --- a/src/app/examples/solveur-channel-flow.json +++ b/src/app/examples/solveur-channel-flow.json @@ -160,7 +160,7 @@ "props": { "calcType": "Structure", "structureType": "SeuilRectangulaire", - "loiDebit": "WeirVillemonte" + "loiDebit": "WeirSubmerged" }, "children": [], "parameters": [ diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index d8f03a702..3a4e3f25f 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -482,6 +482,7 @@ "INFO_EXAMPLE_LABEL_CHANNEL_FLOW": "Channel flow with hydraulic structures", "INFO_EXAMPLE_LABEL_PAB_COMPLETE": "Standard fish ladder", "INFO_EXAMPLE_LABEL_PAB_ECH_TRIANG": "Triangular weirs fish ladder", + "INFO_EXAMPLE_LABEL_PENTE_CRITIQUE_CANAL": "Canal critical slope", "INFO_EXAMPLE_LABEL_PERR": "Rock-ramp fish pass", "INFO_EXAMPLE_LABEL_WEIR_JET_LENGTH": "Weir jet length", "INFO_EXAMPLES_TITLE": "Examples", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 69b22dd4a..444dde1d3 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -481,6 +481,7 @@ "INFO_EXAMPLE_LABEL_CHANNEL_FLOW": "Débit d'un chenal avec ouvrages", "INFO_EXAMPLE_LABEL_PAB_COMPLETE": "Passe à bassins type", "INFO_EXAMPLE_LABEL_PAB_ECH_TRIANG": "Passe à bassins à échancrures triangulaires", + "INFO_EXAMPLE_LABEL_PENTE_CRITIQUE_CANAL": "Pente critique d'un canal", "INFO_EXAMPLE_LABEL_PERR": "Passe à enrochements régulièrement répartis", "INFO_EXAMPLE_LABEL_WEIR_JET_LENGTH": "Longueur de jet d'un déversoir", "INFO_EXAMPLES_TITLE": "Exemples", -- GitLab