Commit 106e0f17 authored by Eric Duminil's avatar Eric Duminil
Browse files

renames

parent f17d02f0
...@@ -95,8 +95,8 @@ public class TreeWaterDemand { ...@@ -95,8 +95,8 @@ public class TreeWaterDemand {
// convert to MJ/h - 1 W = 0.0036 MJ/h // convert to MJ/h - 1 W = 0.0036 MJ/h
incomingRadiation *= 0.0036; incomingRadiation *= 0.0036;
double windSpeed = Double.parseDouble(row[windSpeedIndex]); double windSpeed = Double.parseDouble(row[windSpeedIndex]);
double saturationVaporPressure = e0(temp); double saturationVaporPressure = saturationVaporPressure(temp);
double actualVaporPressure = ea(saturationVaporPressure, humidity); double actualVaporPressure = actualVaporPressure(saturationVaporPressure, humidity);
int dayOfYear = counter.getDayOfYear(); int dayOfYear = counter.getDayOfYear();
double hourOfDay = counter.getHour() + 0.5; double hourOfDay = counter.getHour() + 0.5;
double et0 = et0(temp, actualVaporPressure, incomingRadiation, height, windSpeed, humidity, dayOfYear, double et0 = et0(temp, actualVaporPressure, incomingRadiation, height, windSpeed, humidity, dayOfYear,
...@@ -111,8 +111,6 @@ public class TreeWaterDemand { ...@@ -111,8 +111,6 @@ public class TreeWaterDemand {
bw.write(String.format(";%.3f", et0u)); bw.write(String.format(";%.3f", et0u));
et0s.add(et0); et0s.add(et0);
// System.out.println("et0: " + et0);
// System.out.println("etia: " + etia);
et0us.add(et0u); et0us.add(et0u);
counter = counter.plusHours(1); counter = counter.plusHours(1);
bw.write("\n"); bw.write("\n");
...@@ -136,9 +134,8 @@ public class TreeWaterDemand { ...@@ -136,9 +134,8 @@ public class TreeWaterDemand {
demands.add(etia); demands.add(etia);
} }
System.out System.out.println(
.println( "Summe aller ETIa: " + demands.stream().collect(Collectors.summingDouble(Double::doubleValue)));
"Summe aller ETIa: " + demands.stream().collect(Collectors.summingDouble(Double::doubleValue)));
} }
...@@ -155,22 +152,22 @@ public class TreeWaterDemand { ...@@ -155,22 +152,22 @@ public class TreeWaterDemand {
private static double et0(double temperature, double actualVaporPressure, double shortWaveRadiation, double height, 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 windSpeed, double humidity, int dayOfYear, double hourOfDay, double lz, double lm) {
double nominalRadiation = rn(temperature, actualVaporPressure, shortWaveRadiation, height, dayOfYear, hourOfDay, double netRadiation = rn(temperature, actualVaporPressure, shortWaveRadiation, height, dayOfYear, hourOfDay,
lz, lm); lz, lm);
double gamma = gamma(height); double gamma = gamma(height);
double saturationVaporPressure = e0(temperature); double saturationVaporPressure = saturationVaporPressure(temperature);
double delta = delta(temperature, saturationVaporPressure); double delta = delta(temperature, saturationVaporPressure);
double g = g(nominalRadiation, shortWaveRadiation > 0); double g = g(netRadiation, shortWaveRadiation > 0);
double n = 0.408 * delta * (nominalRadiation - g) double n = 0.408 * delta * (netRadiation - g)
+ gamma * (37 / (temperature + 273)) * windSpeed * (saturationVaporPressure - actualVaporPressure); + gamma * (37 / (temperature + 273)) * windSpeed * (saturationVaporPressure - actualVaporPressure);
return n / (delta + gamma * (1 + 0.34 * windSpeed)); return n / (delta + gamma * (1 + 0.34 * windSpeed));
} }
private static double ea(double saturationVaporPressure, double humidity) { private static double actualVaporPressure(double saturationVaporPressure, double humidity) {
return saturationVaporPressure * humidity / 100; return saturationVaporPressure * humidity / 100;
} }
private static double e0(double temperature) { private static double saturationVaporPressure(double temperature) {
return 0.6108 * Math.exp((17.27 * temperature) / (temperature + 237.3)); return 0.6108 * Math.exp((17.27 * temperature) / (temperature + 237.3));
} }
...@@ -179,11 +176,11 @@ public class TreeWaterDemand { ...@@ -179,11 +176,11 @@ public class TreeWaterDemand {
return 0.665 * 0.001 * pressure; return 0.665 * 0.001 * pressure;
} }
private static double g(double nominalRadiation, boolean daylight) { private static double g(double netRadiation, boolean daylight) {
if (daylight) { if (daylight) {
return 0.1 * nominalRadiation; return 0.1 * netRadiation;
} else { } else {
return 0.5 * nominalRadiation; return 0.5 * netRadiation;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment