comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/TkhCalculator.java @ 9121:8675912c7f48

Fixed tkh calculation (sign of an exponent of the critical shields term)
author mschaefer
date Tue, 05 Jun 2018 15:37:34 +0200
parents d5802f22e4f5
children 7dc238bd062c
comparison
equal deleted inserted replaced
9120:2fb72a0aa313 9121:8675912c7f48
207 final double PHYS_GRAIN_DENSITY_RHOS = 2603; 207 final double PHYS_GRAIN_DENSITY_RHOS = 2603;
208 final double PHYS_WATER_DENSITY_RHO = 999.97; 208 final double PHYS_WATER_DENSITY_RHO = 999.97;
209 209
210 final double froude = vm / Math.sqrt(PHYS_G * h); 210 final double froude = vm / Math.sqrt(PHYS_G * h);
211 final double partReynolds = Math.sqrt((PHYS_SPECGRAV_S - 1) * PHYS_G * d50) / PHYS_VISCOSITY_NUE * d50; 211 final double partReynolds = Math.sqrt((PHYS_SPECGRAV_S - 1) * PHYS_G * d50) / PHYS_VISCOSITY_NUE * d50;
212 final double critShields = 0.22 * Math.pow(partReynolds, -0.6) + 0.06 * Math.pow(10, 7.7 * Math.pow(partReynolds, -0.6)); 212 final double critShields = 0.22 * Math.pow(partReynolds, -0.6) + 0.06 * Math.pow(10, -7.7 * Math.pow(partReynolds, -0.6));
213 final double critTau = critShields * (PHYS_GRAIN_DENSITY_RHOS - PHYS_WATER_DENSITY_RHO) * PHYS_G * d50; 213 final double critTau = critShields * (PHYS_GRAIN_DENSITY_RHOS - PHYS_WATER_DENSITY_RHO) * PHYS_G * d50;
214 final double tkh = 100 * h * (1 - Math.pow(froude, 2)) / (2 * PHYS_VELOCCOEFF_N * PHYS_FORMCOEFF_ALPHA) * (1 - critTau / tau); 214 final double tkh = 100 * h * (1 - Math.pow(froude, 2)) / (2 * PHYS_VELOCCOEFF_N * PHYS_FORMCOEFF_ALPHA) * (1 - critTau / tau);
215 // Some regular input values may give a negative calculation result; that is unwanted 215 // Some regular input values may give a negative calculation result; that is unwanted
216 if (tkh < 0.0) 216 if (tkh < 0.0)
217 return 0.0; 217 return 0.0;

http://dive4elements.wald.intevation.org