Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mayer
CircularGreenSimCity
Commits
106e0f17
Commit
106e0f17
authored
Jun 06, 2023
by
Eric Duminil
Browse files
renames
parent
f17d02f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tree-water-demand/src/main/java/de/hft/stuttgart/water/TreeWaterDemand.java
View file @
106e0f17
...
...
@@ -95,8 +95,8 @@ public class TreeWaterDemand {
// convert to MJ/h - 1 W = 0.0036 MJ/h
incomingRadiation
*=
0.0036
;
double
windSpeed
=
Double
.
parseDouble
(
row
[
windSpeedIndex
]);
double
saturationVaporPressure
=
e
0
(
temp
);
double
actualVaporPressure
=
e
a
(
saturationVaporPressure
,
humidity
);
double
saturationVaporPressure
=
saturationVaporPressur
e
(
temp
);
double
actualVaporPressure
=
a
ctualVaporPressure
(
saturationVaporPressure
,
humidity
);
int
dayOfYear
=
counter
.
getDayOfYear
();
double
hourOfDay
=
counter
.
getHour
()
+
0.5
;
double
et0
=
et0
(
temp
,
actualVaporPressure
,
incomingRadiation
,
height
,
windSpeed
,
humidity
,
dayOfYear
,
...
...
@@ -111,8 +111,6 @@ public class TreeWaterDemand {
bw
.
write
(
String
.
format
(
";%.3f"
,
et0u
));
et0s
.
add
(
et0
);
// System.out.println("et0: " + et0);
// System.out.println("etia: " + etia);
et0us
.
add
(
et0u
);
counter
=
counter
.
plusHours
(
1
);
bw
.
write
(
"\n"
);
...
...
@@ -136,9 +134,8 @@ public class TreeWaterDemand {
demands
.
add
(
etia
);
}
System
.
out
.
println
(
"Summe aller ETIa: "
+
demands
.
stream
().
collect
(
Collectors
.
summingDouble
(
Double:
:
doubleValue
)));
System
.
out
.
println
(
"Summe aller ETIa: "
+
demands
.
stream
().
collect
(
Collectors
.
summingDouble
(
Double:
:
doubleValue
)));
}
...
...
@@ -155,22 +152,22 @@ public class TreeWaterDemand {
private
static
double
et0
(
double
temperature
,
double
actualVaporPressure
,
double
shortWaveRadiation
,
double
height
,
double
windSpeed
,
double
humidity
,
int
dayOfYear
,
double
hourOfDay
,
double
lz
,
double
lm
)
{
double
n
ominal
Radiation
=
rn
(
temperature
,
actualVaporPressure
,
shortWaveRadiation
,
height
,
dayOfYear
,
hourOfDay
,
double
n
et
Radiation
=
rn
(
temperature
,
actualVaporPressure
,
shortWaveRadiation
,
height
,
dayOfYear
,
hourOfDay
,
lz
,
lm
);
double
gamma
=
gamma
(
height
);
double
saturationVaporPressure
=
e
0
(
temperature
);
double
saturationVaporPressure
=
saturationVaporPressur
e
(
temperature
);
double
delta
=
delta
(
temperature
,
saturationVaporPressure
);
double
g
=
g
(
n
ominal
Radiation
,
shortWaveRadiation
>
0
);
double
n
=
0.408
*
delta
*
(
n
ominal
Radiation
-
g
)
double
g
=
g
(
n
et
Radiation
,
shortWaveRadiation
>
0
);
double
n
=
0.408
*
delta
*
(
n
et
Radiation
-
g
)
+
gamma
*
(
37
/
(
temperature
+
273
))
*
windSpeed
*
(
saturationVaporPressure
-
actualVaporPressure
);
return
n
/
(
delta
+
gamma
*
(
1
+
0.34
*
windSpeed
));
}
private
static
double
e
a
(
double
saturationVaporPressure
,
double
humidity
)
{
private
static
double
a
ctualVaporPressure
(
double
saturationVaporPressure
,
double
humidity
)
{
return
saturationVaporPressure
*
humidity
/
100
;
}
private
static
double
e
0
(
double
temperature
)
{
private
static
double
saturationVaporPressur
e
(
double
temperature
)
{
return
0.6108
*
Math
.
exp
((
17.27
*
temperature
)
/
(
temperature
+
237.3
));
}
...
...
@@ -179,11 +176,11 @@ public class TreeWaterDemand {
return
0.665
*
0.001
*
pressure
;
}
private
static
double
g
(
double
n
ominal
Radiation
,
boolean
daylight
)
{
private
static
double
g
(
double
n
et
Radiation
,
boolean
daylight
)
{
if
(
daylight
)
{
return
0.1
*
n
ominal
Radiation
;
return
0.1
*
n
et
Radiation
;
}
else
{
return
0.5
*
n
ominal
Radiation
;
return
0.5
*
n
et
Radiation
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment