Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java @ 4813:bf2fd9c58ac4
Fixed MINFO SQ calculation.
* Fixed calculation of sieve 8.
* Fixed calculation of 'Geschiebetransport'.
* Fixed calculation of fractions (Sand, gravel, coarse).
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Sun, 20 Jan 2013 15:02:19 +0100 |
parents | d4e39cc5c10c |
children | 9e25c7523485 |
comparison
equal
deleted
inserted
replaced
4794:a7d080347ac3 | 4813:bf2fd9c58ac4 |
---|---|
9 public class Measurement | 9 public class Measurement |
10 { | 10 { |
11 private static final Log log = | 11 private static final Log log = |
12 LogFactory.getLog(Measurement.class); | 12 LogFactory.getLog(Measurement.class); |
13 | 13 |
14 public static final double ADD_8 = Math.log(10) - Math.log(8)/Math.log(6.3); | 14 public static final double LOG_10_8 = Math.log(10) - Math.log(8); |
15 public static final double SCALE_8 = Math.log(6.3); | 15 public static final double SCALE_8 = Math.log(10) - Math.log(6.3); |
16 | 16 |
17 public static final double ADD_4 = Math.log(8) - Math.log(6.3)/Math.log(10); | 17 public static final double LOG_8_6 = Math.log(8) - Math.log(6.3); |
18 public static final double SCALE_4 = Math.log(6.3); | 18 public static final double SCALE_4 = Math.log(10) - Math.log(6.3); |
19 | 19 |
20 protected Map<String, Object> data; | 20 protected Map<String, Object> data; |
21 | 21 |
22 protected List<Sieve> sieves; | 22 protected List<Sieve> sieves; |
23 | 23 |
121 */ | 121 */ |
122 public SieveArray getSieveArray() { | 122 public SieveArray getSieveArray() { |
123 if (sieveArray == null) { | 123 if (sieveArray == null) { |
124 sieveArray = calculateSieveArray(); | 124 sieveArray = calculateSieveArray(); |
125 } | 125 } |
126 adjustSieves(); | |
126 return sieveArray; | 127 return sieveArray; |
127 } | 128 } |
128 | 129 |
129 protected Sieve findSieve(double diameter) { | 130 protected Sieve findSieve(double diameter) { |
130 for (Sieve s: sieves) { | 131 for (Sieve s: sieves) { |
169 double tenValue = ten.getLoad(); | 170 double tenValue = ten.getLoad(); |
170 double fourValue = four.getLoad(); | 171 double fourValue = four.getLoad(); |
171 | 172 |
172 deleteSieve(6.3); | 173 deleteSieve(6.3); |
173 | 174 |
174 double eightValue = ADD_8 - SCALE_8*sixValue + tenValue; | 175 double eightValue = ((LOG_10_8 / SCALE_8*sixValue) + tenValue); |
175 double newFourValue = ADD_4 - SCALE_4*sixValue + fourValue; | 176 double newFourValue = ((LOG_8_6 / SCALE_4*sixValue) + fourValue); |
176 | 177 |
178 deleteSieve(4.0); | |
177 sieves.add(new Sieve(8d, eightValue)); | 179 sieves.add(new Sieve(8d, eightValue)); |
178 sieves.add(new Sieve(4d, newFourValue)); | 180 sieves.add(new Sieve(4d, newFourValue)); |
181 sieveArray.adjust( | |
182 eightValue/sieveArray.totalLoad(), | |
183 newFourValue/sieveArray.totalLoad()); | |
179 } | 184 } |
180 | 185 |
181 protected SieveArray calculateSieveArray() { | 186 protected SieveArray calculateSieveArray() { |
182 | 187 |
183 SieveArray sa = new SieveArray(); | 188 SieveArray sa = new SieveArray(); |