Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jalhyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
jalhyd
Commits
83db3917
Commit
83db3917
authored
5 years ago
by
David Dorchies
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#97
ZDV à -Infinity
parent
faf6ec5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/structure/structure.ts
+4
-2
4 additions, 2 deletions
src/structure/structure.ts
src/structure/structure_orifice_submerged_params.ts
+1
-1
1 addition, 1 deletion
src/structure/structure_orifice_submerged_params.ts
with
5 additions
and
3 deletions
src/structure/structure.ts
+
4
−
2
View file @
83db3917
...
...
@@ -202,11 +202,13 @@ export abstract class Structure extends Nub {
);
}
this
.
prms
.
update_h1h2
();
// Gestion du débit nul
const
flagsNull
=
{
ENUM_StructureFlowMode
:
StructureFlowMode
.
NULL
,
ENUM_StructureFlowRegime
:
StructureFlowRegime
.
NULL
};
if
(
sVarCalc
===
"
Q
"
)
{
if
(
this
.
prms
.
Z
1
.
v
<=
this
.
prms
.
ZDV
.
v
||
this
.
prms
.
Z
1
.
v
===
this
.
prms
.
Z
2
.
v
||
this
.
prms
.
W
.
v
<=
0
)
{
if
(
this
.
prms
.
h
1
.
v
<=
0
||
Math
.
abs
(
this
.
prms
.
h
1
.
v
-
this
.
prms
.
h
2
.
v
)
<
1
E
-
20
||
this
.
prms
.
W
.
v
<=
1
E
-
2
0
)
{
return
new
Result
(
0
,
this
,
flagsNull
);
}
}
else
if
(
this
.
prms
.
Q
.
v
===
0
)
{
...
...
@@ -234,7 +236,7 @@ export abstract class Structure extends Nub {
let
rPrm
:
number
;
switch
(
sVarCalc
)
{
case
"
ZDV
"
:
rPrm
=
Infinity
;
rPrm
=
Math
.
max
(
this
.
prms
.
Z1
.
v
,
this
.
prms
.
Z2
.
v
)
;
break
;
default
:
rPrm
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/structure/structure_orifice_submerged_params.ts
+
1
−
1
View file @
83db3917
...
...
@@ -23,7 +23,7 @@ export class StructureOrificeSubmergedParams extends StructureParams {
* @param rS Surface de l'orifice (m2)
*/
constructor
(
rQ
:
number
,
rZ1
:
number
,
rZ2
:
number
,
rCd
:
number
,
rS
:
number
)
{
super
(
rQ
,
-
Infinity
,
rZ1
,
rZ2
);
super
(
rQ
,
100
,
rZ1
,
rZ2
);
this
.
S
=
new
ParamDefinition
(
this
,
"
S
"
,
ParamDomainValue
.
POS_NULL
,
rS
);
this
.
addParamDefinition
(
this
.
S
);
this
.
Cd
=
new
ParamDefinition
(
this
,
"
Cd
"
,
ParamDomainValue
.
POS_NULL
,
rCd
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment