Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cassiopee
jalhyd
Commits
4e6145c3
Commit
4e6145c3
authored
Oct 01, 2018
by
Dorchies David
Browse files
#22
MAJ pour IHM nghyd
parent
f75ae6c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
spec/macrorugo/macrorugo.spec.ts
View file @
4e6145c3
...
...
@@ -8,8 +8,7 @@
import
{
ParamCalculability
,
ParamValueMode
}
from
"
../../src
"
;
import
{
MacroRugo
,
MacroRugoFlowType
,
MacrorugoParams
}
from
"
../../src/macrorugo/macrorugo
"
;
import
{
Result
}
from
"
../../src/util/result
"
;
import
{
checkResult
,
checkPercent
}
from
"
../test_func
"
;
import
{
checkPercent
,
checkResult
}
from
"
../test_func
"
;
function
macroRugoInstanceEmergent
():
MacroRugo
{
return
new
MacroRugo
(
...
...
src/compute-node.ts
View file @
4e6145c3
...
...
@@ -17,7 +17,8 @@ export enum CalculatorType {
Structure
,
// ouvrages hydrauliques simples
ParallelStructure
,
// ouvrages hydrauliques en parallèle
Dever
,
// Outil Cassiopée Dever
Cloisons
// Outil Cassiopée PAB Cloisons
Cloisons
,
// Outil Cassiopée PAB Cloisons
MacroRugo
// Passe à enrochement simple (Cassan et al., 2016)
}
/**
...
...
src/macrorugo/macrorugo.ts
View file @
4e6145c3
...
...
@@ -72,7 +72,7 @@ export class MacroRugo extends Nub {
// Vitesse maximale
r
.
extraResults
.
V
=
r
.
extraResults
.
Vdeb
*
this
.
calc_fFr
(
r
.
extraResults
.
Vdeb
);
// Puissance dissipée
r
.
extraResults
.
P
=
1000
*
MacroRugo
.
g
*
this
.
V
(
this
.
prms
.
Q
)
/
this
.
prms
.
B
.
v
*
this
.
prms
.
If
.
v
;
r
.
extraResults
.
P
V
=
1000
*
MacroRugo
.
g
*
this
.
V
(
this
.
prms
.
Q
)
/
this
.
prms
.
B
.
v
*
this
.
prms
.
If
.
v
;
// Type d'écoulement
if
(
this
.
prms
.
Y
.
v
/
this
.
prms
.
PBH
.
v
<
1
)
{
r
.
extraResults
.
FlowType
=
MacroRugoFlowType
.
EMERGENT
;
...
...
@@ -95,14 +95,14 @@ export class MacroRugo extends Nub {
cV
=
[
3.35
,
0.27
,
0.53
];
}
else
{
cQ
=
[
0.815
,
1.45
,
0.557
,
-
0.456
];
cV
=
[
4.54
,
0.32
,
0.56
]
cV
=
[
4.54
,
0.32
,
0.56
]
;
}
}
r
.
extraResults
.
Q
2
=
cQ
[
0
]
*
Math
.
pow
(
this
.
prms
.
Y
.
v
/
hdk
,
cQ
[
1
])
*
r
.
extraResults
.
Q
_GuideTech
=
cQ
[
0
]
*
Math
.
pow
(
this
.
prms
.
Y
.
v
/
hdk
,
cQ
[
1
])
*
Math
.
pow
(
this
.
prms
.
If
.
v
,
cQ
[
2
])
*
Math
.
pow
(
this
.
prms
.
C
.
v
,
cQ
[
3
])
*
Math
.
sqrt
(
MacroRugo
.
g
*
this
.
prms
.
PBD
.
v
)
*
this
.
prms
.
PBD
.
v
*
this
.
prms
.
B
.
v
;
if
(
this
.
prms
.
Y
.
v
/
this
.
prms
.
PBH
.
v
<=
MacroRugo
.
limitSubmerg
)
{
r
.
extraResults
.
V
2
=
cV
[
0
]
*
Math
.
pow
(
this
.
prms
.
Y
.
v
/
this
.
prms
.
PBD
.
v
,
cV
[
1
])
*
r
.
extraResults
.
V
_GuideTech
=
cV
[
0
]
*
Math
.
pow
(
this
.
prms
.
Y
.
v
/
this
.
prms
.
PBD
.
v
,
cV
[
1
])
*
Math
.
pow
(
this
.
prms
.
If
.
v
,
cQ
[
2
])
*
Math
.
sqrt
(
MacroRugo
.
g
*
this
.
prms
.
PBD
.
v
);
}
return
r
;
...
...
src/nub_factory.ts
View file @
4e6145c3
...
...
@@ -5,6 +5,7 @@ import { Props, SessionNub } from "./session_nub";
// Calculettes
import
{
ConduiteDistrib
,
ConduiteDistribParams
}
from
"
./cond_distri
"
;
import
{
LechaptCalmon
,
LechaptCalmonParams
}
from
"
./lechaptcalmon
"
;
import
{
MacroRugo
,
MacrorugoParams
}
from
"
./macrorugo/macrorugo
"
;
import
{
PabDimension
,
PabDimensionParams
}
from
"
./pab/pab_dimension
"
;
import
{
PabPuissance
,
PabPuissanceParams
}
from
"
./pab/pab_puissance
"
;
import
{
RegimeUniforme
}
from
"
./regime_uniforme
"
;
...
...
@@ -353,6 +354,25 @@ export class NubFactory {
);
}
case
CalculatorType
.
MacroRugo
:
{
return
new
MacroRugo
(
new
MacrorugoParams
(
12.5
,
// ZF1
6
,
// L
1
,
// B
0.05
,
// If
1.57
,
// Q
0.6
,
// h
0.01
,
// Ks
0.05
,
// C
0.5
,
// D
0.8
,
// k
1.5
// Cd0
)
);
}
default
:
throw
new
Error
(
// tslint:disable-next-line:max-line-length
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment