diff --git a/.gitignore b/.gitignore index fcbb2c9..eda86d0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ gradle/* gradlew gradlew.bat +# Ignore test output +resources/Output/** + + # Ignore Gradle GUI config gradle-app.setting diff --git a/src/main/java/it/geoframe/blogspot/geoframenewage/dam/WeirDischarge.java b/src/main/java/it/geoframe/blogspot/geoframenewage/dam/WeirDischarge.java index c918cb3..58114c2 100644 --- a/src/main/java/it/geoframe/blogspot/geoframenewage/dam/WeirDischarge.java +++ b/src/main/java/it/geoframe/blogspot/geoframenewage/dam/WeirDischarge.java @@ -1,7 +1,7 @@ /* * GNU GPL v3 License * - * Copyright 2021 Niccolò Tubini, Giuseppe Formetta, Riccardo Rigon + * Copyright 2021 Niccol� Tubini, Giuseppe Formetta, Riccardo Rigon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ package it.geoframe.blogspot.geoframenewage.dam; /** - * @author Niccolò Tubini, Giuseppe Formetta + * @author Niccol� Tubini, Giuseppe Formetta * */ public class WeirDischarge { @@ -28,6 +28,7 @@ public class WeirDischarge { double weirCoefficient; double weirWidth; double weirHeight; + double exponent = 3.0/2.0; public WeirDischarge(double weirCoefficient, double weirWidth, double weirHeight) { @@ -45,7 +46,7 @@ public double computeDischarge(double level) { } else { - return weirCoefficient*weirWidth*Math.sqrt(2*9.81)*Math.pow(level-weirHeight, 3/2); + return weirCoefficient*weirWidth*Math.sqrt(2*9.81)*Math.pow(level-weirHeight, exponent); } @@ -59,7 +60,7 @@ public double computeDerivativeDischarge(double level) { } else { - return 3/2*weirCoefficient*weirWidth*Math.sqrt(2*9.81)*Math.pow(level-weirHeight, 3/2-1); + return exponent*weirCoefficient*weirWidth*Math.sqrt(2*9.81)*Math.pow(level-weirHeight, exponent-1.0); }