Skip to content

Commit 73be5f6

Browse files
committed
New closure equation for water depth
1 parent 9c087dd commit 73be5f6

File tree

1 file changed

+104
-0
lines changed
  • src/main/java/it/geoframe/blogspot/closureequation/closureequation

1 file changed

+104
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* GNU GPL v3 License
3+
*
4+
* Copyright 2019 Niccolo` Tubini
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
21+
/**
22+
*
23+
*/
24+
package it.geoframe.blogspot.closureequation.closureequation;
25+
26+
27+
28+
/**
29+
* @author Niccolo` Tubini
30+
*
31+
* Van Genuchten SWRC
32+
*/
33+
public class WaterDepth extends ClosureEquation {
34+
35+
36+
@Override
37+
public double f(double x, double y, int id) {
38+
39+
if(x>0.0) {
40+
return x;
41+
} else {
42+
return 0;
43+
}
44+
45+
}
46+
47+
48+
49+
@Override
50+
public double df(double x, double y, int id) {
51+
52+
if(x>0.0) {
53+
return 1.0;
54+
} else {
55+
return 0.0;
56+
}
57+
58+
}
59+
60+
61+
@Override
62+
public double ddf(double x, double y, int id) {
63+
64+
return 0.0;
65+
66+
}
67+
68+
69+
70+
@Override
71+
public double f(double x, int i) {
72+
73+
if(x>0.0) {
74+
return x;
75+
} else {
76+
return 0;
77+
}
78+
79+
}
80+
81+
82+
83+
@Override
84+
public double df(double x, int i) {
85+
86+
if(x>0.0) {
87+
return 1.0;
88+
} else {
89+
return 0.0;
90+
}
91+
92+
}
93+
94+
95+
96+
@Override
97+
public double ddf(double x, int i) {
98+
99+
return 0.0;
100+
101+
}
102+
103+
104+
}

0 commit comments

Comments
 (0)