Index: dam failuremechanisms/damMacroStability/trunk/src/Tests/Files/zuivering Gendt result.std =================================================================== diff -u --- dam failuremechanisms/damMacroStability/trunk/src/Tests/Files/zuivering Gendt result.std (revision 0) +++ dam failuremechanisms/damMacroStability/trunk/src/Tests/Files/zuivering Gendt result.std (revision 411) @@ -0,0 +1,1420 @@ +Dump file for D-Geo Stability : Stability of earth slopes. +============================================================================== +COMPANY : +LICENSE : Unknown +DATE : 01-09-2017 +TIME : 18:08:55 +FILENAME : D:\src\dam\dam failuremechanisms\damMacroStability\trunk\src\Tests\Files\zuivering Gendt.std +CREATED BY : D-Geo Stability version 16.2.2.900 +========================== BEGINNING OF DATA ========================== +[Input Data] +[VERSION] +Soil=1002 +Geometry=1000 +StressCurve=1000 +BondStressDiagram=1000 +YieldStress=1000 +D-Geo Stability=1006 +[END OF VERSION] + +[SOIL COLLECTION] + 3 = number of items +[SOIL] +zand +SoilColor=9764853 +SoilSoilType=2 +SoilUseSoilType=0 +SoilExcessPorePressure=0.00 +SoilPorePressureFactor=1.00 +SoilGamDry=19.50 +SoilGamWet=19.50 +SoilRestSlope=0 +SoilCohesion=0.00 +SoilPhi=30.00 +SoilDilatancy=30.00 +SoilCuTop=0.00 +SoilCuBottom=0.00 +SoilCuGradient=0.00 +SoilStressTableName= +SoilBondStressTableName= +SoilMatStrengthType=0 +SoilProbInputValues=0 +SoilRatioCuPc=0.22 +SoilStrengthIncreaseExponent=0.80 +SoilPc=0.00E+00 +SoilPOP=10.00 +SoilRheologicalCoefficient=0.00 +SoilXCoorSoilPc=-100.000 +SoilYCoorSoilPc=-100.000 +SoilIsPopCalculated=0 +SoilIsOCRCalculated=0 +SoilIsAquifer=0 +SoilUseProbDefaults=0 +SoilStdCohesion=0.00 +SoilStdPhi=3.57 +SoilStdRatioCuPc=0.06 +SoilStdRatioCuPcPassive=0.06 +SoilStdRatioCuPcActive=0.06 +SoilStdCu=0.00 +SoilStdCuTop=0.00 +SoilStdCuGradient=0.00 +SoilStdPn=1.50 +SoilDistCohesion=3 +SoilDistPhi=3 +SoilDistStressTable=3 +SoilDistRatioCuPc=3 +SoilDistRatioCuPcPassive=3 +SoilDistRatioCuPcActive=3 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +SoilDistPn=3 +SoilCorrelationCPhi=0.00 +SoilRatioCuPcPassive=0.22 +SoilRatioCuPcActive=0.22 +SoilCuPassiveTop=0.00 +SoilCuPassiveBottom=0.00 +SoilCuActiveTop=0.00 +SoilCuActiveBottom=0.00 +SoilUniformRatioCuPc=1 +SoilUniformCu=1 +SoilDesignPartialCohesion=1.25 +SoilDesignStdCohesion=-1.65 +SoilDesignPartialPhi=1.10 +SoilDesignStdPhi=-1.65 +SoilDesignPartialStressTable=1.15 +SoilDesignStdStressTable=-1.65 +SoilDesignPartialRatioCuPc=1.15 +SoilDesignStdRatioCuPc=-1.65 +SoilDesignPartialCu=1.15 +SoilDesignStdCu=-1.65 +SoilDesignPartialPOP=1.10 +SoilDesignStdPOP=-1.65 +SoilDesignPartialRRatio=1.00 +SoilDesignStdRRatio=0.00 +SoilSoilGroup=0 +SoilStdPOP=1.00 +SoilDistPOP=3 +SoilHorFluctScaleCoh=50.00 +SoilVertFluctScaleCoh=0.25 +SoilNumberOfTestsCoh=1 +SoilVarianceRatioCoh=0.75 +SoilHorFluctScalePhi=50.00 +SoilVertFluctScalePhi=0.25 +SoilNumberOfTestsPhi=1 +SoilVarianceRatioPhi=0.75 +SoilRRatio=1.0000000 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +[END OF SOIL] +[SOIL] +klei +SoilColor=5953498 +SoilSoilType=2 +SoilUseSoilType=0 +SoilExcessPorePressure=0.00 +SoilPorePressureFactor=1.00 +SoilGamDry=14.50 +SoilGamWet=14.50 +SoilRestSlope=0 +SoilCohesion=2.00 +SoilPhi=18.00 +SoilDilatancy=18.00 +SoilCuTop=0.00 +SoilCuBottom=0.00 +SoilCuGradient=0.00 +SoilStressTableName= +SoilBondStressTableName= +SoilMatStrengthType=0 +SoilProbInputValues=0 +SoilRatioCuPc=0.22 +SoilStrengthIncreaseExponent=0.80 +SoilPc=0.00E+00 +SoilPOP=10.00 +SoilRheologicalCoefficient=0.00 +SoilXCoorSoilPc=-100.000 +SoilYCoorSoilPc=-100.000 +SoilIsPopCalculated=0 +SoilIsOCRCalculated=0 +SoilIsAquifer=0 +SoilUseProbDefaults=0 +SoilStdCohesion=1.00 +SoilStdPhi=2.67 +SoilStdRatioCuPc=0.06 +SoilStdRatioCuPcPassive=0.06 +SoilStdRatioCuPcActive=0.06 +SoilStdCu=0.00 +SoilStdCuTop=0.00 +SoilStdCuGradient=0.00 +SoilStdPn=2.50 +SoilDistCohesion=3 +SoilDistPhi=3 +SoilDistStressTable=3 +SoilDistRatioCuPc=3 +SoilDistRatioCuPcPassive=3 +SoilDistRatioCuPcActive=3 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +SoilDistPn=3 +SoilCorrelationCPhi=0.00 +SoilRatioCuPcPassive=0.22 +SoilRatioCuPcActive=0.22 +SoilCuPassiveTop=0.00 +SoilCuPassiveBottom=0.00 +SoilCuActiveTop=0.00 +SoilCuActiveBottom=0.00 +SoilUniformRatioCuPc=1 +SoilUniformCu=1 +SoilDesignPartialCohesion=1.25 +SoilDesignStdCohesion=-1.65 +SoilDesignPartialPhi=1.10 +SoilDesignStdPhi=-1.65 +SoilDesignPartialStressTable=1.15 +SoilDesignStdStressTable=-1.65 +SoilDesignPartialRatioCuPc=1.15 +SoilDesignStdRatioCuPc=-1.65 +SoilDesignPartialCu=1.15 +SoilDesignStdCu=-1.65 +SoilDesignPartialPOP=1.10 +SoilDesignStdPOP=-1.65 +SoilDesignPartialRRatio=1.00 +SoilDesignStdRRatio=0.00 +SoilSoilGroup=0 +SoilStdPOP=1.00 +SoilDistPOP=3 +SoilHorFluctScaleCoh=50.00 +SoilVertFluctScaleCoh=0.25 +SoilNumberOfTestsCoh=1 +SoilVarianceRatioCoh=0.75 +SoilHorFluctScalePhi=50.00 +SoilVertFluctScalePhi=0.25 +SoilNumberOfTestsPhi=1 +SoilVarianceRatioPhi=0.75 +SoilRRatio=1.0000000 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +[END OF SOIL] +[SOIL] +nw dijks +SoilColor=9094655 +SoilSoilType=2 +SoilUseSoilType=0 +SoilExcessPorePressure=0.00 +SoilPorePressureFactor=1.00 +SoilGamDry=16.50 +SoilGamWet=16.50 +SoilRestSlope=0 +SoilCohesion=0.00 +SoilPhi=22.50 +SoilDilatancy=22.50 +SoilCuTop=0.00 +SoilCuBottom=0.00 +SoilCuGradient=0.00 +SoilStressTableName= +SoilBondStressTableName= +SoilMatStrengthType=0 +SoilProbInputValues=0 +SoilRatioCuPc=0.22 +SoilStrengthIncreaseExponent=0.80 +SoilPc=0.00E+00 +SoilPOP=10.00 +SoilRheologicalCoefficient=0.00 +SoilXCoorSoilPc=-100.000 +SoilYCoorSoilPc=-100.000 +SoilIsPopCalculated=0 +SoilIsOCRCalculated=0 +SoilIsAquifer=0 +SoilUseProbDefaults=0 +SoilStdCohesion=0.00 +SoilStdPhi=4.00 +SoilStdRatioCuPc=0.06 +SoilStdRatioCuPcPassive=0.06 +SoilStdRatioCuPcActive=0.06 +SoilStdCu=0.00 +SoilStdCuTop=0.00 +SoilStdCuGradient=0.00 +SoilStdPn=1.50 +SoilDistCohesion=3 +SoilDistPhi=3 +SoilDistStressTable=3 +SoilDistRatioCuPc=3 +SoilDistRatioCuPcPassive=3 +SoilDistRatioCuPcActive=3 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +SoilDistPn=3 +SoilCorrelationCPhi=0.00 +SoilRatioCuPcPassive=0.22 +SoilRatioCuPcActive=0.22 +SoilCuPassiveTop=0.00 +SoilCuPassiveBottom=0.00 +SoilCuActiveTop=0.00 +SoilCuActiveBottom=0.00 +SoilUniformRatioCuPc=1 +SoilUniformCu=1 +SoilDesignPartialCohesion=1.25 +SoilDesignStdCohesion=-1.65 +SoilDesignPartialPhi=1.10 +SoilDesignStdPhi=-1.65 +SoilDesignPartialStressTable=1.15 +SoilDesignStdStressTable=-1.65 +SoilDesignPartialRatioCuPc=1.15 +SoilDesignStdRatioCuPc=-1.65 +SoilDesignPartialCu=1.15 +SoilDesignStdCu=-1.65 +SoilDesignPartialPOP=1.10 +SoilDesignStdPOP=-1.65 +SoilDesignPartialRRatio=1.00 +SoilDesignStdRRatio=0.00 +SoilSoilGroup=0 +SoilStdPOP=1.00 +SoilDistPOP=3 +SoilHorFluctScaleCoh=50.00 +SoilVertFluctScaleCoh=0.25 +SoilNumberOfTestsCoh=1 +SoilVarianceRatioCoh=0.75 +SoilHorFluctScalePhi=50.00 +SoilVertFluctScalePhi=0.25 +SoilNumberOfTestsPhi=1 +SoilVarianceRatioPhi=0.75 +SoilRRatio=1.0000000 +SoilDistCu=3 +SoilDistCuTop=3 +SoilDistCuGradient=3 +[END OF SOIL] +[END OF SOIL COLLECTION] + +[GEOMETRY DATA] +[ACCURACY] + 0.0010 +[END OF ACCURACY] + +[POINTS] + 33 - Number of geometry points - + 1 -150.000 8.700 0.000 + 2 -88.668 8.700 0.000 + 3 -30.272 9.500 0.000 + 4 -25.000 10.450 0.000 + 5 -14.000 12.000 0.000 + 6 2.000 17.300 0.000 + 7 8.500 17.300 0.000 + 8 19.500 12.300 0.000 + 9 29.000 11.500 0.000 + 10 33.800 11.300 0.000 + 11 37.000 9.700 0.000 + 12 40.000 9.700 0.000 + 13 42.600 11.000 0.000 + 14 53.258 10.750 0.000 + 15 70.000 10.750 0.000 + 16 -14.187 10.000 0.000 + 17 4.000 11.000 0.000 + 18 8.500 11.000 0.000 + 19 -150.000 5.900 0.000 + 20 70.000 5.900 0.000 + 21 -150.000 -10.000 0.000 + 22 70.000 -10.000 0.000 + 23 -150.000 6.500 0.000 + 24 -14.000 6.500 0.000 + 25 2.000 14.000 0.000 + 26 10.500 14.000 0.000 + 27 19.500 11.300 0.000 + 28 34.000 10.000 0.000 + 29 70.000 10.000 0.000 + 30 -30.293 6.500 0.000 + 31 20.000 7.600 0.000 + 32 37.000 8.300 0.000 + 33 70.000 8.300 0.000 +[END OF POINTS] + +[CURVES] + 30 - Number of curves - + 1 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 1 2 + 2 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 2 3 + 3 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 3 4 + 4 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 4 5 + 5 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 5 6 + 6 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 6 7 + 7 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 7 8 + 8 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 8 9 + 9 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 9 10 + 10 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 10 11 + 11 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 11 12 + 12 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 12 13 + 13 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 13 14 + 14 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 14 15 + 15 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 3 16 + 16 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 16 17 + 17 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 17 18 + 18 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 18 8 + 19 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 19 20 + 20 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 21 22 + 21 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 23 24 + 22 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 24 25 + 23 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 25 26 + 24 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 26 27 + 25 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 27 28 + 26 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 28 29 + 27 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 23 30 + 28 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 30 31 + 29 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 31 32 + 30 - Curve number + 2 - number of points on curve, next line(s) are pointnumbers + 32 33 +[END OF CURVES] + +[BOUNDARIES] + 4 - Number of boundaries - + 0 - Boundary number + 1 - number of curves on boundary, next line(s) are curvenumbers + 20 + 1 - Boundary number + 1 - number of curves on boundary, next line(s) are curvenumbers + 19 + 2 - Boundary number + 13 - number of curves on boundary, next line(s) are curvenumbers + 1 2 15 16 17 18 8 9 10 11 + 12 13 14 + 3 - Boundary number + 14 - number of curves on boundary, next line(s) are curvenumbers + 1 2 3 4 5 6 7 8 9 10 + 11 12 13 14 +[END OF BOUNDARIES] + +[USE PROBABILISTIC DEFAULTS BOUNDARIES] + 4 - Number of boundaries - + 1 + 1 + 1 + 1 +[END OF USE PROBABILISTIC DEFAULTS BOUNDARIES] + +[STDV BOUNDARIES] + 4 - Number of boundaries - + 0.00000000000000E+0000 + 0.00000000000000E+0000 + 0.00000000000000E+0000 + 0.00000000000000E+0000 +[END OF STDV BOUNDARIES] + +[DISTRIBUTION BOUNDARIES] + 4 - Number of boundaries - + 0 + 0 + 0 + 0 +[END OF DISTRIBUTION BOUNDARIES] + +[PIEZO LINES] + 2 - Number of piezometric level lines - + 1 - PlLine number + 6 - number of curves on PlLine, next line(s) are curvenumbers + 21 22 23 24 25 26 + 2 - PlLine number + 4 - number of curves on PlLine, next line(s) are curvenumbers + 27 28 29 30 +[END OF PIEZO LINES] + +[PHREATIC LINE] + 1 - Number of the piezometric level line acting as phreatic line - +[END OF PHREATIC LINE] + +[WORLD CO-ORDINATES] + 0.000 - X world 1 - + 0.000 - Y world 1 - + 0.000 - X world 2 - + 0.000 - Y world 2 - +[END OF WORLD CO-ORDINATES] + +[LAYERS] + 3 - Number of layers - + 1 - Layer number, next line is material of layer + zand + 2 - Piezometric level line at top of layer + 2 - Piezometric level line at bottom of layer + 1 - Boundarynumber at top of layer + 0 - Boundarynumber at bottom of layer + 2 - Layer number, next line is material of layer + klei + 99 - Piezometric level line at top of layer + 99 - Piezometric level line at bottom of layer + 2 - Boundarynumber at top of layer + 1 - Boundarynumber at bottom of layer + 3 - Layer number, next line is material of layer + nw dijks + 1 - Piezometric level line at top of layer + 99 - Piezometric level line at bottom of layer + 3 - Boundarynumber at top of layer + 2 - Boundarynumber at bottom of layer +[END OF LAYERS] + +[LAYERLOADS] + - Layers which are loads - + +[END OF LAYERLOADS] + +[END OF GEOMETRY DATA] +[RUN IDENTIFICATION TITLES] +dijkvak Ophemert, Hm 63 - 64 +profiel aan de norm + +[MODEL] + 1 : Bishop + 1 : C phi + 0 : Probabilistic off + 1 : Mean + 1 : Geotextiles on + 1 : Nails on + 0 : Zone plot off + 0 : Local measurements +[END OF MODEL] +[MSEEPNET] + Use potential file + 0 : Do not use water net of MSeep file + 0 : Do not make negative pressures 0 +[FORBIDDEN LINES] + 1 - Forbidden lines + 1 + 8.50 17.30 - X1 Y1 + 19.50 12.30 - X2 Y2 +[UNIT WEIGHT WATER] + 9.81 : Unit weight water +[DEGREE OF CONSOLIDATION] + 3 Number of layers + 3 100 + 2 100 100 + 1 100 100 100 + 0 capillary water not included +[degree Temporary loads] + 100 0 0 + 0 capillary water not included +[degree Free water(Cu)] + 100 100 100 +[degree earth quake] + 100 100 100 +[CIRCLES] + 21.556 32.691 11 X-direction + 15.092 28.850 11 Y-direction + 11.064 5.064 7 Tangent lines + 0.000 0.000 0 no fixed point used +[SPENCER SLIP DATA] + 0 Number of points +[SPENCER SLIP DATA 2] + 0 Number of points +[SPENCER SLIP INTERVAL] + 2 : Slip spencer interval +[LINE LOADS] + 0 = number of items +[UNIFORM LOADS ] + 1 = number of items +verkeer + 13.00 = magnitude + 6.00 8.50 = xstart and xend + 0.00 = distribution angle + 1 = permanent load +[TREE ON SLOPE] +0.00 = WindForce +0.00 = XCoordinate +0.00 = YCoordinate +10.00 = width of root zone +0.0 = AngleOfDistribution +[END OF TREE ON SLOPE] +[EARTH QUAKE] + 0.000 = horizontal acceleration + 0.000 = vertical acceleration + 0.000 = free water moment factor +[SIGMA-TAU CURVES] + 0 = number of items +[END OF SIGMA-TAU CURVES] +[BOND STRESS DIAGRAMS] + 0 = number of items +[END OF BOND STRESS DIAGRAMS] +[MEASURED YIELD STRESSES] +[YIELD STRESSES] + 0 = number of items +[END OF YIELD STRESSES] +[END OF MEASURED YIELD STRESSES] +[MINIMAL REQUIRED CIRCLE DEPTH] + 5.00 [m] +[Slip Circle Selection] +IsMinXEntryUsed=0 +IsMaxXEntryUsed=0 +XEntryMin=0.00 +XEntryMax=0.00 +[End of Slip Circle Selection] +[START VALUE SAFETY FACTOR] + 1.000 [-] +[REFERENCE LEVEL SU] + 16.000 Excavation gamma above freatic level + 18.000 Excavation gamma below freatic level + 15 number of points + -150.000 8.700 x y + -88.668 8.700 x y + -30.272 9.500 x y + -25.000 10.450 x y + -14.000 12.000 x y + 2.000 17.300 x y + 8.500 17.300 x y + 19.500 12.300 x y + 29.000 11.500 x y + 33.800 11.300 x y + 37.000 9.700 x y + 40.000 9.700 x y + 42.600 11.000 x y + 53.258 10.750 x y + 70.000 10.750 x y +[END OF REFERENCE LEVEL SU] + +[LIFT SLIP DATA] + 23.196 33.196 6 X-direction Left + 16.802 26.802 6 Y-direction Left + 47.043 51.227 3 X-direction Right + 12.840 16.288 3 Y-direction Right + 7.900 7.900 1 Y-direction tangent lines + 0 Automatic grid calculation (1) +[EXTERNAL WATER LEVELS] + 0 = No water data used + 0.00 = Design level + 0.30 = Decimate height + 1 norm = 1/10000 + 1 = number of items +Water data (1) + 1 = Phreatic line + 0.00 = Level + Piezo lines + 3 - Number of layers + 3 3 = Pl-top and pl-bottom + 2 3 = Pl-top and pl-bottom + 99 2 = Pl-top and pl-bottom +[MODEL FACTOR] + 1.00 = Limit value stability factor + 0.08 = Standard deviation for limit value stability factor + 0.00 = Reference standard deviation for degree of consolidation + 100.00 = Length of the section + 0 = Use contribution of end section + 0.00 = Lateral stress ratio + 0.25 = Coefficient of variation contribution edge of section +[CALCULATION OPTIONS] +MoveCalculationGrid=1 +ProbCalculationType=2 +SearchMethod=0 +[END OF CALCULATION OPTIONS] +[PROBABILISTIC DEFAULTS] +CohesionVariationTotal=0.25 +CohesionDesignPartial=1.25 +CohesionDesignStdDev=-1.65 +CohesionDistribution=3 +PhiVariationTotal=0.15 +PhiDesignPartial=1.10 +PhiDesignStdDev=-1.65 +PhiDistribution=3 +StressTableVariationTotal=0.20 +StressTableDesignPartial=1.15 +StressTableDesignStdDev=-1.65 +StressTableDistribution=3 +RatioCuPcVariationTotal=0.25 +RatioCuPcDesignPartial=1.15 +RatioCuPcDesignStdDev=-1.65 +RatioCuPcDistribution=3 +CuVariationTotal=0.25 +CuDesignPartial=1.15 +CuDesignStdDev=-1.65 +CuDistribution=3 +POPVariationTotal=0.10 +POPDesignPartial=1.10 +POPDesignStdDev=-1.65 +POPDistribution=3 +CompressionRatioVariationTotal=0.25 +CompressionRatioDesignPartial=1.00 +CompressionRatioDesignStdDev=0.00 +CompressionRatioDistribution=3 +ConsolidationCoefTotalStdDev=0.20 +ConsolidationCoefDesignPartial=1.00 +ConsolidationCoefDesignStdDev=1.65 +ConsolidationCoefDistribution=2 +HydraulicPressureTotalStdDev=0.50 +HydraulicPressureDesignPartial=1.00 +HydraulicPressureDesignStdDev=1.65 +HydraulicPressureDistribution=3 +LimitValueBishopMean=1.00 +LimitValueBishopStdDev=0.08 +LimitValueBishopDistribution=3 +LimitValueVanMean=0.95 +LimitValueVanStdDev=0.08 +LimitValueVanDistribution=3 +[END OF PROBABILISTIC DEFAULTS] +[NEWZONE PLOT DATA] + 0.00 = Diketable Height [m] + 3.00 = Width top rest profile [m] + 0.00 = X co-ordinate indicating start of zone [m] + 0.00 = Boundary of M.H.W influence at X [m] + 0.00 = Boundary of M.H.W influence at Y [m] + 1.19 = Required safety in zone 1a + 1.11 = Required safety in zone 1b + 1.00 = Required safety in zone 2a + 1.00 = Required safety in zone 2b + 0.00 = Left side minimum road [m] + 0.00 = Right side minimum road [m] + 0.90 = Required safety in zone 3a + 0.90 = Required safety in zone 3b + 1 Stability calculation at right side + 0.50 = Remolding reduction factor + 0.80 = Schematization reduction factor + 1 Overtopping condition less or equal 0.1 l/m/s +[HORIZONTAL BALANCE] +HorizontalBalanceXLeft=0.000 +HorizontalBalanceXRight=0.000 +HorizontalBalanceYTop=0.00 +HorizontalBalanceYBottom=0.00 +HorizontalBalanceNYInterval=1 +[END OF HORIZONTAL BALANCE] +[REQUESTED CIRCLE SLICES] + 30 = number of slices +[REQUESTED LIFT SLICES] + 50 = number of slices +[REQUESTED SPENCER SLICES] + 50 = number of slices +[SOIL RESISTANCE] +SoilResistanceDowelAction=1 +SoilResistancePullOut=1 +[END OF SOIL RESISTANCE] +[GENETIC ALGORITHM OPTIONS BISHOP] +PopulationCount=30 +GenerationCount=30 +EliteCount=2 +MutationRate=0.200 +CrossOverScatterFraction=1.000 +CrossOverSinglePointFraction=0.000 +CrossOverDoublePointFraction=0.000 +MutationJumpFraction=1.000 +MutationCreepFraction=0.000 +MutationInverseFraction=0.000 +MutationCreepReduction=0.050 +[END OF GENETIC ALGORITHM OPTIONS BISHOP] +[GENETIC ALGORITHM OPTIONS LIFTVAN] +PopulationCount=30 +GenerationCount=60 +EliteCount=2 +MutationRate=0.200 +CrossOverScatterFraction=1.000 +CrossOverSinglePointFraction=0.000 +CrossOverDoublePointFraction=0.000 +MutationJumpFraction=1.000 +MutationCreepFraction=0.000 +MutationInverseFraction=0.000 +MutationCreepReduction=0.050 +[END OF GENETIC ALGORITHM OPTIONS LIFTVAN] +[GENETIC ALGORITHM OPTIONS SPENCER] +PopulationCount=50 +GenerationCount=50 +EliteCount=2 +MutationRate=0.300 +CrossOverScatterFraction=0.000 +CrossOverSinglePointFraction=0.700 +CrossOverDoublePointFraction=0.300 +MutationJumpFraction=0.000 +MutationCreepFraction=0.900 +MutationInverseFraction=0.100 +MutationCreepReduction=0.050 +[END OF GENETIC ALGORITHM OPTIONS SPENCER] +[MODEL SPECIAL] +IsAlternativeStrength=0 +IsAdditionalPorePressure=0 +[END OF MODEL SPECIAL] +[NAIL TYPE DEFAULTS] +NailTypeLengthNail=0.00 +NailTypeDiameterNail=0.00 +NailTypeDiameterGrout=0.00 +NailTypeYieldForceNail=0.00 +NailTypePlasticMomentNail=0.00 +NailTypeBendingStiffnessNail=0.00E+00 +NailTypeUseFacingOrBearingPlate=0 +[END OF NAIL TYPE DEFAULTS] +[End of Input Data] + +[ZONE RESULTS] +[Column Indication] +X-Centrepoint +Y-Centrepoint +Radius +Stability factor +[End of Column Indication] +[Data] + 21.56 19.22 14.16 2.44 + 21.56 20.60 15.53 2.26 + 21.56 20.60 14.53 1.78 + 21.56 20.60 13.53 1.75 + 21.56 21.97 16.91 2.17 + 21.56 21.97 15.91 1.68 + 21.56 21.97 14.91 1.63 + 21.56 23.35 18.28 2.12 + 21.56 23.35 17.28 1.64 + 21.56 23.35 16.28 1.56 + 21.56 24.72 19.66 2.08 + 21.56 24.72 18.66 1.62 + 21.56 24.72 17.66 1.53 + 21.56 26.10 21.03 2.06 + 21.56 26.10 20.03 1.61 + 21.56 26.10 19.03 1.52 + 21.56 26.10 18.03 1.43 + 21.56 27.47 22.41 2.04 + 21.56 27.47 21.41 1.61 + 21.56 27.47 20.41 1.53 + 21.56 27.47 19.41 1.43 + 21.56 28.85 23.79 2.04 + 21.56 28.85 22.79 1.60 + 21.56 28.85 21.79 1.53 + 21.56 28.85 20.79 1.44 + 22.67 20.60 15.53 2.41 + 22.67 21.97 16.91 2.23 + 22.67 21.97 15.91 1.81 + 22.67 23.35 18.28 2.13 + 22.67 23.35 17.28 1.70 + 22.67 23.35 16.28 1.68 + 22.67 24.72 19.66 2.08 + 22.67 24.72 18.66 1.64 + 22.67 24.72 17.66 1.60 + 22.67 26.10 21.03 2.04 + 22.67 26.10 20.03 1.61 + 22.67 26.10 19.03 1.56 + 22.67 27.47 22.41 2.01 + 22.67 27.47 21.41 1.60 + 22.67 27.47 20.41 1.54 + 22.67 28.85 23.79 1.99 + 22.67 28.85 22.79 1.59 + 22.67 28.85 21.79 1.54 + 23.78 21.97 16.91 2.35 + 23.78 23.35 18.28 2.18 + 23.78 23.35 17.28 1.80 + 23.78 24.72 19.66 2.08 + 23.78 24.72 18.66 1.69 + 23.78 24.72 17.66 1.73 + 23.78 26.10 21.03 2.02 + 23.78 26.10 20.03 1.62 + 23.78 26.10 19.03 1.63 + 23.78 27.47 22.41 1.99 + 23.78 27.47 21.41 1.59 + 23.78 27.47 20.41 1.57 + 23.78 28.85 23.79 1.97 + 23.78 28.85 22.79 1.57 + 23.78 28.85 21.79 1.55 + 24.90 23.35 18.28 2.28 + 24.90 24.72 19.66 2.13 + 24.90 24.72 18.66 1.78 + 24.90 26.10 21.03 2.04 + 24.90 26.10 20.03 1.66 + 24.90 27.47 22.41 1.99 + 24.90 27.47 21.41 1.59 + 24.90 28.85 23.79 1.97 + 24.90 28.85 22.79 1.56 + 26.01 24.72 19.66 2.25 + 26.01 26.10 21.03 2.12 + 26.01 26.10 20.03 1.75 + 26.01 27.47 22.41 2.03 + 26.01 27.47 21.41 1.65 + 26.01 28.85 23.79 1.99 + 26.01 28.85 22.79 1.59 + 27.12 26.10 21.03 2.27 + 27.12 27.47 22.41 2.17 + 27.12 27.47 21.41 1.76 + 27.12 28.85 23.79 2.11 + 27.12 28.85 22.79 1.67 + 28.24 15.09 9.03 5.76 + 28.24 27.47 22.41 2.44 + 28.24 28.85 23.79 2.32 + 29.35 15.09 10.03 5.68 + 29.35 15.09 9.03 4.66 + 29.35 16.47 10.40 4.06 + 30.46 15.09 10.03 5.09 + 30.46 15.09 9.03 3.88 + 30.46 16.47 11.40 4.77 + 30.46 16.47 10.40 3.56 + 30.46 17.84 11.78 3.37 + 31.58 15.09 10.03 4.69 + 31.58 15.09 9.03 3.40 + 31.58 16.47 11.40 4.56 + 31.58 16.47 10.40 3.23 + 31.58 17.84 12.78 4.67 + 31.58 17.84 11.78 3.14 + 31.58 19.22 13.16 3.14 + 31.58 20.60 14.53 3.27 + 32.69 15.09 10.03 4.61 + 32.69 15.09 9.03 3.11 + 32.69 16.47 11.40 4.88 + 32.69 16.47 10.40 3.07 + 32.69 17.84 12.78 5.17 + 32.69 17.84 11.78 3.20 + 32.69 19.22 14.16 5.40 + 32.69 19.22 13.16 3.45 + 32.69 20.60 15.53 5.58 + 32.69 20.60 14.53 3.67 + 32.69 21.97 15.91 3.85 + 20.44 17.84 12.78 2.48 + 20.44 19.22 14.16 2.28 + 20.44 19.22 13.16 1.78 + 20.44 19.22 12.16 1.73 + 20.44 20.60 15.53 2.17 + 20.44 20.60 14.53 1.67 + 20.44 20.60 13.53 1.60 + 20.44 20.60 12.53 1.56 + 20.44 21.97 16.91 2.13 + 20.44 21.97 15.91 1.62 + 20.44 21.97 14.91 1.53 + 20.44 21.97 13.91 1.46 + 20.44 23.35 18.28 2.11 + 20.44 23.35 17.28 1.61 + 20.44 23.35 16.28 1.50 + 20.44 23.35 15.28 1.41 + 20.44 24.72 19.66 2.10 + 20.44 24.72 18.66 1.61 + 20.44 24.72 17.66 1.50 + 20.44 24.72 16.66 1.40 + 20.44 26.10 21.03 2.09 + 20.44 26.10 20.03 1.61 + 20.44 26.10 19.03 1.51 + 20.44 26.10 18.03 1.40 + 20.44 27.47 22.41 2.10 + 20.44 27.47 21.41 1.62 + 20.44 27.47 20.41 1.52 + 20.44 27.47 19.41 1.42 + 20.44 28.85 23.79 2.11 + 20.44 28.85 22.79 1.63 + 20.44 28.85 21.79 1.53 + 20.44 28.85 20.79 1.43 + 19.33 17.84 12.78 2.33 + 19.33 17.84 11.78 1.81 + 19.33 19.22 14.16 2.20 + 19.33 19.22 13.16 1.68 + 19.33 19.22 12.16 1.60 + 19.33 19.22 11.16 1.55 + 19.33 20.60 15.53 2.15 + 19.33 20.60 14.53 1.62 + 19.33 20.60 13.53 1.52 + 19.33 20.60 12.53 1.45 + 19.33 21.97 16.91 2.12 + 19.33 21.97 15.91 1.60 + 19.33 21.97 14.91 1.49 + 19.33 21.97 13.91 1.39 + 19.33 23.35 18.28 2.12 + 19.33 23.35 17.28 1.60 + 19.33 23.35 16.28 1.49 + 19.33 23.35 15.28 1.38 + 19.33 24.72 19.66 2.12 + 19.33 24.72 18.66 1.60 + 19.33 24.72 17.66 1.50 + 19.33 24.72 16.66 1.39 + 19.33 26.10 21.03 2.14 + 19.33 26.10 20.03 1.61 + 19.33 26.10 19.03 1.51 + 19.33 26.10 18.03 1.41 + 19.33 27.47 22.41 2.17 + 19.33 27.47 21.41 1.64 + 19.33 27.47 20.41 1.52 + 19.33 27.47 19.41 1.43 + 19.33 27.47 18.41 1.33 + 19.33 28.85 23.79 2.20 + 19.33 28.85 22.79 1.66 + 19.33 28.85 21.79 1.55 + 19.33 28.85 20.79 1.45 + 19.33 28.85 19.79 1.35 + 18.22 17.84 12.78 2.27 + 18.22 17.84 11.78 1.73 + 18.22 17.84 10.78 1.66 + 18.22 17.84 9.78 1.58 + 18.22 19.22 14.16 2.20 + 18.22 19.22 13.16 1.65 + 18.22 19.22 12.16 1.54 + 18.22 19.22 11.16 1.46 + 18.22 20.60 15.53 2.16 + 18.22 20.60 14.53 1.62 + 18.22 20.60 13.53 1.51 + 18.22 20.60 12.53 1.39 + 18.22 21.97 16.91 2.15 + 18.22 21.97 15.91 1.61 + 18.22 21.97 14.91 1.50 + 18.22 21.97 13.91 1.38 + 18.22 21.97 12.91 1.28 + 18.22 23.35 18.28 2.15 + 18.22 23.35 17.28 1.61 + 18.22 23.35 16.28 1.50 + 18.22 23.35 15.28 1.39 + 18.22 23.35 14.28 1.28 + 18.22 24.72 19.66 2.17 + 18.22 24.72 18.66 1.62 + 18.22 24.72 17.66 1.51 + 18.22 24.72 16.66 1.41 + 18.22 24.72 15.66 1.30 + 18.22 26.10 21.03 2.21 + 18.22 26.10 20.03 1.65 + 18.22 26.10 19.03 1.53 + 18.22 26.10 18.03 1.43 + 18.22 26.10 17.03 1.33 + 18.22 27.47 22.41 2.25 + 18.22 27.47 21.41 1.68 + 18.22 27.47 20.41 1.55 + 18.22 27.47 19.41 1.45 + 18.22 27.47 18.41 1.35 + 18.22 28.85 23.79 2.30 + 18.22 28.85 22.79 1.71 + 18.22 28.85 21.79 1.58 + 18.22 28.85 20.79 1.48 + 18.22 28.85 19.79 1.38 + 17.10 17.84 12.78 2.29 + 17.10 17.84 11.78 1.70 + 17.10 17.84 10.78 1.60 + 17.10 17.84 9.78 1.51 + 17.10 17.84 8.78 1.43 + 17.10 19.22 14.16 2.24 + 17.10 19.22 13.16 1.66 + 17.10 19.22 12.16 1.53 + 17.10 19.22 11.16 1.42 + 17.10 19.22 10.16 1.33 + 17.10 20.60 15.53 2.21 + 17.10 20.60 14.53 1.64 + 17.10 20.60 13.53 1.52 + 17.10 20.60 12.53 1.40 + 17.10 20.60 11.53 1.29 + 17.10 21.97 16.91 2.21 + 17.10 21.97 15.91 1.63 + 17.10 21.97 14.91 1.52 + 17.10 21.97 13.91 1.41 + 17.10 21.97 12.91 1.29 + 17.10 23.35 18.28 2.22 + 17.10 23.35 17.28 1.65 + 17.10 23.35 16.28 1.53 + 17.10 23.35 15.28 1.42 + 17.10 23.35 14.28 1.31 + 17.10 24.72 19.66 2.26 + 17.10 24.72 18.66 1.67 + 17.10 24.72 17.66 1.55 + 17.10 24.72 16.66 1.44 + 17.10 24.72 15.66 1.34 + 17.10 26.10 21.03 2.31 + 17.10 26.10 20.03 1.70 + 17.10 26.10 19.03 1.57 + 17.10 26.10 18.03 1.47 + 17.10 26.10 17.03 1.37 + 17.10 27.47 22.41 2.36 + 17.10 27.47 21.41 1.74 + 17.10 27.47 20.41 1.61 + 17.10 27.47 19.41 1.49 + 17.10 27.47 18.41 1.40 + 17.10 27.47 17.41 1.31 + 17.10 28.85 23.79 2.42 + 17.10 28.85 22.79 1.78 + 17.10 28.85 21.79 1.65 + 17.10 28.85 20.79 1.53 + 17.10 28.85 19.79 1.43 + 17.10 28.85 18.79 1.35 +[End of Data] +[END OF ZONE RESULTS] +[CircleResults] + 11.064 5.064 7 +11 11 + 18.216 21.971 12.907 1.276 + 17.102 15.092 0.000 9999.999 + 17.102 16.468 0.000 9999.999 + 17.102 17.844 8.780 1.435 + 17.102 19.219 10.155 1.332 + 17.102 20.595 11.531 1.286 + 17.102 21.971 12.907 1.294 + 17.102 23.347 14.283 1.315 + 17.102 24.723 15.659 1.341 + 17.102 26.098 17.034 1.370 + 17.102 27.474 17.410 1.309 + 17.102 28.850 18.786 1.345 + 18.216 15.092 0.000 9999.999 + 18.216 16.468 0.000 9999.999 + 18.216 17.844 9.780 1.579 + 18.216 19.219 11.155 1.457 + 18.216 20.595 12.531 1.391 + 18.216 21.971 12.907 1.276 + 18.216 23.347 14.283 1.282 + 18.216 24.723 15.659 1.302 + 18.216 26.098 17.034 1.327 + 18.216 27.474 18.410 1.354 + 18.216 28.850 19.786 1.383 + 19.329 15.092 0.000 9999.999 + 19.329 16.468 0.000 9999.999 + 19.329 17.844 11.780 1.814 + 19.329 19.219 11.155 1.550 + 19.329 20.595 12.531 1.446 + 19.329 21.971 13.907 1.391 + 19.329 23.347 15.283 1.382 + 19.329 24.723 16.659 1.391 + 19.329 26.098 18.034 1.406 + 19.329 27.474 18.410 1.326 + 19.329 28.850 19.786 1.350 + 20.443 15.092 0.000 9999.999 + 20.443 16.468 0.000 9999.999 + 20.443 17.844 12.780 2.479 + 20.443 19.219 12.155 1.729 + 20.443 20.595 12.531 1.561 + 20.443 21.971 13.907 1.463 + 20.443 23.347 15.283 1.411 + 20.443 24.723 16.659 1.396 + 20.443 26.098 18.034 1.403 + 20.443 27.474 19.410 1.417 + 20.443 28.850 20.786 1.435 + 21.556 15.092 0.000 9999.999 + 21.556 16.468 0.000 9999.999 + 21.556 17.844 0.000 9999.999 + 21.556 19.219 14.155 2.437 + 21.556 20.595 13.531 1.750 + 21.556 21.971 14.907 1.627 + 21.556 23.347 16.283 1.555 + 21.556 24.723 17.659 1.527 + 21.556 26.098 18.034 1.425 + 21.556 27.474 19.410 1.430 + 21.556 28.850 20.786 1.440 + 22.670 15.092 0.000 9999.999 + 22.670 16.468 0.000 9999.999 + 22.670 17.844 0.000 9999.999 + 22.670 19.219 0.000 9999.999 + 22.670 20.595 15.531 2.412 + 22.670 21.971 15.907 1.806 + 22.670 23.347 16.283 1.681 + 22.670 24.723 17.659 1.602 + 22.670 26.098 19.034 1.557 + 22.670 27.474 20.410 1.544 + 22.670 28.850 21.786 1.538 + 23.783 15.092 0.000 9999.999 + 23.783 16.468 0.000 9999.999 + 23.783 17.844 0.000 9999.999 + 23.783 19.219 0.000 9999.999 + 23.783 20.595 0.000 9999.999 + 23.783 21.971 16.907 2.348 + 23.783 23.347 17.283 1.801 + 23.783 24.723 18.659 1.690 + 23.783 26.098 20.034 1.622 + 23.783 27.474 20.410 1.571 + 23.783 28.850 21.786 1.546 + 24.897 15.092 0.000 9999.999 + 24.897 16.468 0.000 9999.999 + 24.897 17.844 0.000 9999.999 + 24.897 19.219 0.000 9999.999 + 24.897 20.595 0.000 9999.999 + 24.897 21.971 0.000 9999.999 + 24.897 23.347 18.283 2.278 + 24.897 24.723 18.659 1.776 + 24.897 26.098 20.034 1.665 + 24.897 27.474 21.410 1.592 + 24.897 28.850 22.786 1.560 + 26.010 15.092 0.000 9999.999 + 26.010 16.468 0.000 9999.999 + 26.010 17.844 0.000 9999.999 + 26.010 19.219 0.000 9999.999 + 26.010 20.595 0.000 9999.999 + 26.010 21.971 0.000 9999.999 + 26.010 23.347 0.000 9999.999 + 26.010 24.723 19.659 2.254 + 26.010 26.098 20.034 1.753 + 26.010 27.474 21.410 1.652 + 26.010 28.850 22.786 1.585 + 27.124 15.092 0.000 9999.999 + 27.124 16.468 0.000 9999.999 + 27.124 17.844 0.000 9999.999 + 27.124 19.219 0.000 9999.999 + 27.124 20.595 0.000 9999.999 + 27.124 21.971 0.000 9999.999 + 27.124 23.347 0.000 9999.999 + 27.124 24.723 0.000 9999.999 + 27.124 26.098 21.034 2.273 + 27.124 27.474 21.410 1.765 + 27.124 28.850 22.786 1.665 + 28.237 15.092 9.028 5.757 + 28.237 16.468 0.000 9999.999 + 28.237 17.844 0.000 9999.999 + 28.237 19.219 0.000 9999.999 + 28.237 20.595 0.000 9999.999 + 28.237 21.971 0.000 9999.999 + 28.237 23.347 0.000 9999.999 + 28.237 24.723 0.000 9999.999 + 28.237 26.098 0.000 9999.999 + 28.237 27.474 22.410 2.442 + 28.237 28.850 23.786 2.325 +[End of CircleResults] + +[Dumps] + 1 : number of dumps in file + +[Dump] +[Dump Header] +[Column Indication] +Stability factor +Number of slices +X-Centrepoint +Y-Centrepoint +Radius +X coordinate left surface +X coordinate right surface +Dump name +[End of Column Indication] +[Data] + 1.276 34 18.216 21.971 12.907 6.183 26.091 Design level +[End of Data] +[End Of Dump Header] +[SliceGeometry] +[Column Indication] +xRight +xLeft +yBottomRight +YBottomLeft +yTopRight +YTopLeft +[End of Column Indication] +[Data] + 6.810 6.183 15.929 17.300 17.300 17.300 + 7.437 6.810 14.871 15.929 17.300 17.300 + 8.064 7.437 14.000 14.871 17.300 17.300 + 8.500 8.064 13.474 14.000 17.300 17.300 + 9.000 8.500 12.934 13.474 17.073 17.300 + 9.500 9.000 12.451 12.934 16.845 17.073 + 10.000 9.500 12.016 12.451 16.618 16.845 + 10.500 10.000 11.624 12.016 16.391 16.618 + 10.967 10.500 11.292 11.624 16.179 16.391 + 11.581 10.967 10.900 11.292 15.899 16.179 + 12.195 11.581 10.554 10.900 15.620 15.899 + 12.810 12.195 10.251 10.554 15.341 15.620 + 13.424 12.810 9.986 10.251 15.062 15.341 + 14.038 13.424 9.759 9.986 14.783 15.062 + 14.652 14.038 9.566 9.759 14.504 14.783 + 15.266 14.652 9.405 9.566 14.224 14.504 + 15.881 15.266 9.277 9.405 13.945 14.224 + 16.495 15.881 9.179 9.277 13.666 13.945 + 17.109 16.495 9.112 9.179 13.387 13.666 + 17.707 17.109 9.074 9.112 13.115 13.387 + 18.305 17.707 9.064 9.074 12.843 13.115 + 18.902 18.305 9.082 9.064 12.572 12.843 + 19.500 18.902 9.128 9.082 12.300 12.572 + 20.154 19.500 9.210 9.128 12.245 12.300 + 20.808 20.154 9.327 9.210 12.190 12.245 + 21.463 20.808 9.479 9.327 12.135 12.190 + 22.117 21.463 9.668 9.479 12.080 12.135 + 22.771 22.117 9.895 9.668 12.025 12.080 + 23.425 22.771 10.162 9.895 11.969 12.025 + 24.079 23.425 10.473 10.162 11.914 11.969 + 24.734 24.079 10.831 10.473 11.859 11.914 + 25.186 24.734 11.108 10.831 11.821 11.859 + 25.638 25.186 11.412 11.108 11.783 11.821 + 26.091 25.638 11.745 11.412 11.745 11.783 +[End of Data] +[End of SliceGeometry] +[strength and Loads] +[Column Indication] +CohBottom +PhiBottom +Dilatancy +Cu +K0 +PoreOnSurface +YFrea +HPoreOnSurface +VPoreOnSurface +Weight +ExternalLoad +PseudoFactor +Strengthtype +[End of Column Indication] +[Data] + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 0.000 -0.000 7.092 8.149 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 0.000 -0.000 19.657 8.149 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 0.000 -0.000 29.631 8.149 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 0.000 -0.000 25.635 5.669 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 -0.000 -0.000 32.854 0.000 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 -0.000 -0.000 35.199 0.000 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 -0.000 -0.000 37.110 0.000 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 14.000 -0.000 -0.000 38.647 0.000 0.000 1 + 0.000 22.500 22.500 0.000 0.000 0.000 13.930 -0.000 -0.000 37.198 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 13.768 -0.000 -0.000 49.813 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 13.584 -0.000 -0.000 50.179 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 13.399 -0.000 -0.000 50.150 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 13.215 -0.000 -0.000 49.759 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 13.031 -0.000 -0.000 49.031 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 12.846 -0.000 -0.000 47.986 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 12.662 -0.000 -0.000 46.641 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 12.478 -0.000 -0.000 45.008 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 12.294 -0.000 -0.000 43.097 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 12.109 -0.000 -0.000 40.915 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.928 -0.000 -0.000 37.473 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.748 -0.000 -0.000 34.913 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.569 -0.000 -0.000 32.113 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.390 -0.000 -0.000 29.073 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.271 -0.000 -0.000 29.437 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.212 -0.000 -0.000 27.970 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.153 -0.000 -0.000 26.173 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.095 -0.000 -0.000 24.035 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 11.036 -0.000 -0.000 21.542 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.977 -0.000 -0.000 18.674 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.919 -0.000 -0.000 15.409 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.860 -0.000 -0.000 11.715 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.810 -0.000 -0.000 5.712 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.770 -0.000 -0.000 3.556 0.000 0.000 1 + 2.000 18.000 18.000 0.000 0.000 0.000 10.729 -0.000 -0.000 1.217 0.000 0.000 1 +[End of Data] +[End of Strength and Loads] +[Stresses] +[Column Indication] +TotalStress +EffectiveStress +HydrostaticPore +AanpasPore +PnLinePore +ShearStress +NormalStress +LoadStress +NormalStress +WaterLoadStress +TotalPore +[End of Column Indication] +[Data] + 24.314 24.314 0.000 0.000 0.000 5.889 14.216 13.000 14.216 0.000 0.000 + 44.357 44.357 0.000 0.000 0.000 11.869 28.654 13.000 28.654 0.000 0.000 + 60.268 60.268 0.000 0.000 0.000 17.206 41.539 13.000 41.539 0.000 0.000 + 71.790 71.330 2.580 0.000 0.460 21.230 51.254 13.000 51.254 0.000 0.460 + 65.708 64.307 7.808 0.000 1.402 19.723 47.615 0.000 47.615 0.000 1.402 + 70.398 68.078 12.826 0.000 2.320 21.465 51.821 0.000 51.821 0.000 2.320 + 74.220 71.063 17.328 0.000 3.157 22.955 55.419 0.000 55.419 0.000 3.157 + 77.293 73.368 21.385 0.000 3.925 24.219 58.471 0.000 58.471 0.000 3.925 + 79.646 75.124 24.252 0.000 4.522 25.277 61.023 0.000 61.023 0.000 4.522 + 81.103 76.074 26.214 0.000 5.028 22.982 64.577 0.000 64.577 0.000 5.028 + 81.699 76.145 28.025 0.000 5.553 23.389 65.829 0.000 65.829 0.000 5.553 + 81.652 75.630 29.400 0.000 6.022 23.605 66.493 0.000 66.493 0.000 6.022 + 81.015 74.581 30.376 0.000 6.434 23.642 66.608 0.000 66.608 0.000 6.434 + 79.829 73.039 30.981 0.000 6.790 23.512 66.207 0.000 66.207 0.000 6.790 + 78.128 71.040 31.238 0.000 7.089 23.223 65.316 0.000 65.316 0.000 7.089 + 75.938 68.612 31.163 0.000 7.326 22.780 63.955 0.000 63.955 0.000 7.326 + 73.280 65.780 30.772 0.000 7.500 22.191 62.141 0.000 62.141 0.000 7.500 + 70.168 62.564 30.074 0.000 7.604 21.459 59.887 0.000 59.887 0.000 7.604 + 66.616 58.982 29.077 0.000 7.633 20.587 57.204 0.000 57.204 0.000 7.633 + 62.690 55.108 27.810 0.000 7.582 19.593 54.145 0.000 54.145 0.000 7.582 + 58.408 50.964 26.282 0.000 7.444 18.483 50.729 0.000 50.729 0.000 7.444 + 53.724 46.514 24.483 0.000 7.210 17.245 46.920 0.000 46.920 0.000 7.210 + 48.637 41.768 22.411 0.000 6.869 15.881 42.722 0.000 42.722 0.000 6.869 + 44.996 38.486 20.615 0.000 6.511 14.985 39.964 0.000 39.964 0.000 6.511 + 42.754 36.583 19.063 0.000 6.172 14.547 38.617 0.000 38.617 0.000 6.172 + 40.008 34.299 17.170 0.000 5.709 13.971 36.843 0.000 36.843 0.000 5.709 + 36.739 31.644 14.924 0.000 5.096 13.255 34.639 0.000 34.639 0.000 5.096 + 32.928 28.612 12.310 0.000 4.316 12.391 31.981 0.000 31.981 0.000 4.316 + 28.545 25.194 9.310 0.000 3.351 11.370 28.837 0.000 28.837 0.000 3.351 + 23.553 21.374 5.898 0.000 2.179 10.176 25.164 0.000 25.164 0.000 2.179 + 17.907 17.132 2.043 0.000 0.775 8.791 20.901 0.000 20.901 0.000 0.775 + 12.626 12.626 0.000 0.000 0.000 7.232 16.101 0.000 16.101 0.000 0.000 + 7.860 7.860 0.000 0.000 0.000 5.494 10.753 0.000 10.753 0.000 0.000 + 2.690 2.690 0.000 0.000 0.000 3.537 4.731 0.000 4.731 0.000 0.000 +[End of Data] +[End of Stresses] +[CUCalculates results} +[Column Indication] +PreLoadStress +Yieldstress +POP +OCR +Exponent +SFactor +[End of Column Indication] +[Data] + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 + 0.000 0.000 0.000 0.000 0.800 0.100 +[End of Data] +[End of CUCalculates results} +[End of Dump] + +[CALCULATION TIME] +00:00:02 +[END OF CALCULATION TIME] + +[End of Dump File] Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.Designer.cs =================================================================== diff -u -r407 -r411 --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 407) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 411) @@ -86,5 +86,42 @@ return ResourceManager.GetString("DGeoStabilityExeRunner_RunDGeoStabilityProject_ProjectNotExist", resourceCulture); } } + + /// + /// Looks up a localized string similar to Could not extract safety factor. + /// + internal static string DGeoStabilityResultReader_ExtractStabilityResults_CouldNotExtractSafetyFactor { + get { + return ResourceManager.GetString("DGeoStabilityResultReader_ExtractStabilityResults_CouldNotExtractSafetyFactor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Project filename '{0}' is not valid. + /// + internal static string DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNameNullOrEmpty { + get { + return ResourceManager.GetString("DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNameNullOrEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Project file '{0}' not found. + /// + internal static string DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNotExist { + get { + return ResourceManager.GetString("DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No valid calculation performed. + /// + internal static string DGeoStabilityResultReader_ParseResultsFromOutputFile_No_valid_calculation_performed { + get { + return ResourceManager.GetString("DGeoStabilityResultReader_ParseResultsFromOutputFile_No_valid_calculation_perform" + + "ed", resourceCulture); + } + } } } Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReaderException.cs =================================================================== diff -u --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReaderException.cs (revision 0) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReaderException.cs (revision 411) @@ -0,0 +1,39 @@ +using System; + +namespace Deltares.DamMacroStability.Calculator +{ + /// + /// Exception class for reading DGeoStability result + /// + /// + public class DGeoStabilityResultReaderException : Exception + { + /// + /// Initializes a new instance of the class. + /// + public DGeoStabilityResultReaderException() : this("There was an error") { } + + /// + /// Initializes a new instance of the class. + /// + /// The message that describes the error. + public DGeoStabilityResultReaderException(string message) : base(message) { } + + /// + /// Initializes a new instance of the class. + /// + /// The message. + /// The inner. + public DGeoStabilityResultReaderException(string message, Exception inner) : base(message, inner) { } + + /// + /// Initializes a new instance of the class. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + protected DGeoStabilityResultReaderException( + System.Runtime.Serialization.SerializationInfo info, + System.Runtime.Serialization.StreamingContext context) + : base(info, context) { } + } +} Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.resx =================================================================== diff -u -r407 -r411 --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.resx (.../Resources.resx) (revision 407) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.resx (.../Resources.resx) (revision 411) @@ -126,4 +126,16 @@ Could not find DGeoStability.exe at location {0} + + Project filename '{0}' is not valid + + + Project file '{0}' not found + + + Could not extract safety factor + + + No valid calculation performed + \ No newline at end of file Index: dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/DGeoStabilityResultReaderTests.cs =================================================================== diff -u --- dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/DGeoStabilityResultReaderTests.cs (revision 0) +++ dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/DGeoStabilityResultReaderTests.cs (revision 411) @@ -0,0 +1,591 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Deltares.DamMacroStability.Calculator; +using NUnit.Framework; + +namespace Deltares.DamMacroStability.CalculatorTests +{ + [TestFixture] + public class DGeoStabilityResultReaderTests + { + + private const string TestFolder = @"..\..\Tests\Files"; + private const string TestFile = @"zuivering Gendt result.std"; + // private const string TestFileWithZonePlot = @"..\..\..\data\dam\mstabfiles\damWithZonePlotEnabled.std"; + + private DGeoStabilityResultReader reader; + + [TestFixtureSetUp] + public void FixtureSetup() + { + reader = new DGeoStabilityResultReader(); + } + + + [Test] + public void ReadSafetyFactor() + { + string expectedFileName = Path.Combine(TestFolder, TestFile); + var result = reader.ExtractStabilityResults(expectedFileName); + Assert.GreaterOrEqual(1.276, result.zone1.SafetyFactor); + } + + + + + // [Test] + // public void CanParseStringContentWhenSafetyFactorIsInFirstColumn() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]" + + // @"[MODEL]" + Environment.NewLine + + // @" 1 : Bishop" + Environment.NewLine; + // + // var result = StabilityServiceFileParser.GetMStabResults(contents); + // Assert.AreEqual(1.276, result.zone1.safetyFactor, 0.001); + // } + // + // [Test] + // public void CanParseStringContentWhenSafetyFactorIsInOtherColumn() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]" + + // @"[MODEL]" + Environment.NewLine + + // @" 1 : Bishop" + Environment.NewLine; + // + // var result = StabilityServiceFileParser.GetMStabResults(contents); + // Assert.AreEqual(21.971, result.zone1.safetyFactor, 0.001); + // } + // + // [Test] + // public void CanParseFileContentsStability() + // { + // var contents = StabilityServiceFileParser.GetFileContents(TestFile); + // var result = StabilityServiceFileParser.GetMStabResults(contents); + // Assert.AreEqual(1.276, result.zone1.safetyFactor, 0.001); + // Assert.AreEqual(26.091, result.zone1.circleSurfacePointRightXCoordinate, 0.001); + // } + // + // [Test] + // public void ValidateIfFileContentsHasZonePlotEnabled() + // { + // var contents = StabilityServiceFileParser.GetFileContents(TestFileWithZonePlot); + // var result = StabilityServiceFileParser.ParseHasZonePlotEnabled(contents); + // Assert.IsTrue(result); + // } + // [Test] + // public void FileContentsHasZonePlotZone1a() + // { + // var contents = StabilityServiceFileParser.GetFileContents(TestFileWithZonePlot); + // MStabResultsSingleZone? actualStabilityZone1a = StabilityServiceFileParser.GetZoneStability1a(contents); + // MStabResultsSingleZone expectedStabilityZone1a = new MStabResultsSingleZone(); + // expectedStabilityZone1a.safetyFactor = 1.104; + // expectedStabilityZone1a.circleSurfacePointLeftXCoordinate = 35.401; + // expectedStabilityZone1a.circleSurfacePointRightXCoordinate = 54.764; + // + // Assert.IsNotNull(actualStabilityZone1a); + // Assert.AreEqual(expectedStabilityZone1a.safetyFactor, actualStabilityZone1a.Value.safetyFactor); + // Assert.AreEqual(expectedStabilityZone1a.circleSurfacePointRightXCoordinate, actualStabilityZone1a.Value.circleSurfacePointRightXCoordinate); + // } + // + // [Test] + // public void FileContentsHasZonePlotDisabled() + // { + // string zonePlotOff = @"[MODEL]" + Environment.NewLine + + // @" 1 : Bishop" + Environment.NewLine + + // @" 1 : C phi" + Environment.NewLine + + // @" 0 : Probabilistic off" + Environment.NewLine + + // @" 1 : Mean" + Environment.NewLine + + // @" 0 : Geotextiles off" + Environment.NewLine + + // @" 0 : Nails off" + Environment.NewLine + + // @" 0 : Zone plot on" + Environment.NewLine + + // @" 0 : Local measurements" + Environment.NewLine + + // @"[END OF MODEL]" + Environment.NewLine; + // + // bool actualZonePlot = StabilityServiceFileParser.ParseHasZonePlotEnabled(zonePlotOff); + // bool expectedZonePlot = false; + // + // Assert.AreEqual(actualZonePlot, expectedZonePlot); + // } + // + // [Test] + // public void FileContentsHasZonePlotZone1b() + // { + // string testWithZonePlot1b = @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Zone number" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.234 35 46.429 7.714 11.357 17.810 24.310 2 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[MODEL]" + Environment.NewLine + + // @" 1 : Bishop" + Environment.NewLine; + // + // MStabResultsSingleZone? actualStabilityZone1b = StabilityServiceFileParser.GetZoneStability1b(testWithZonePlot1b); + // MStabResultsSingleZone expectedStabilityZone1b = new MStabResultsSingleZone(); + // expectedStabilityZone1b.safetyFactor = 1.234; + // expectedStabilityZone1b.circleSurfacePointLeftXCoordinate = 17.810; + // expectedStabilityZone1b.circleSurfacePointRightXCoordinate = 24.310; + // + // Assert.IsNotNull(actualStabilityZone1b); + // Assert.AreEqual(expectedStabilityZone1b.safetyFactor, actualStabilityZone1b.Value.safetyFactor); + // Assert.AreEqual(expectedStabilityZone1b.circleSurfacePointRightXCoordinate, actualStabilityZone1b.Value.circleSurfacePointRightXCoordinate); + // } + // + // + // [Test] + // public void FileContentsHasNoZonePlotZone1b() + // { + // var contents = StabilityServiceFileParser.GetFileContents(TestFileWithZonePlot); + // MStabResultsSingleZone? actualStabilityZone1b = StabilityServiceFileParser.GetZoneStability1b(TestFileWithZonePlot); + // MStabResultsSingleZone? expectedStabilityZone1b = null; + // + // Assert.AreEqual(actualStabilityZone1b, expectedStabilityZone1b); + // } + // + // [Test] + // public void FileContentsHasZonePlotZone1bAndZone2b() + // { + // string testWithZonePlot1bAnd2b = @"[MODEL]" + Environment.NewLine + + // @" 1 : Bishop" + Environment.NewLine + + // @" 1 : C phi" + Environment.NewLine + + // @" 0 : Probabilistic off" + Environment.NewLine + + // @" 1 : Mean" + Environment.NewLine + + // @" 0 : Geotextiles off" + Environment.NewLine + + // @" 0 : Nails off" + Environment.NewLine + + // @" 1 : Zone plot on" + Environment.NewLine + + // @" 0 : Local measurements" + Environment.NewLine + + // @"[END OF MODEL]" + Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Zone number" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.234 35 46.429 7.714 11.357 17.810 24.310 2 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Zone number" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.345 35 46.429 7.714 11.357 19.810 26.310 4 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine; + // + // MStabResults actualMStabResults = StabilityServiceFileParser.GetMStabResults(testWithZonePlot1bAnd2b); + // MStabResultsSingleZone expectedStabilityZone1 = new MStabResultsSingleZone(); + // MStabResultsSingleZone expectedStabilityZone2 = new MStabResultsSingleZone(); + // expectedStabilityZone1.safetyFactor = 1.234; + // expectedStabilityZone1.circleSurfacePointLeftXCoordinate = 17.810; + // expectedStabilityZone1.circleSurfacePointRightXCoordinate = 24.310; + // expectedStabilityZone2.safetyFactor = 1.345; + // expectedStabilityZone2.circleSurfacePointLeftXCoordinate = 19.810; + // expectedStabilityZone2.circleSurfacePointRightXCoordinate = 26.310; + // + // Assert.IsNotNull(actualMStabResults); + // Assert.AreEqual(expectedStabilityZone1.safetyFactor, actualMStabResults.zone1.safetyFactor); + // Assert.AreEqual(expectedStabilityZone1.circleSurfacePointRightXCoordinate, actualMStabResults.zone1.circleSurfacePointRightXCoordinate); + // Assert.IsNotNull(actualMStabResults.zone2); + // Assert.AreEqual(expectedStabilityZone2.safetyFactor, actualMStabResults.zone2.Value.safetyFactor); + // Assert.AreEqual(expectedStabilityZone2.circleSurfacePointRightXCoordinate, actualMStabResults.zone2.Value.circleSurfacePointRightXCoordinate); + // } + // + // [Test] + // public void CanParseFileHasStabilityFactorZone() + // { + // var contents = StabilityServiceFileParser.GetFileContents(TestFileWithZonePlot); + // var result = StabilityServiceFileParser.GetMStabResults(contents); + // Assert.AreEqual(1.104, result.zone1.safetyFactor, 0.001); + // } + // + // [Test] + // public void CanParseStringContentForPositiveBeta() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Beta" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 17.810 1.1 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // var beta = StabilityServiceFileParser.GetBeta(contents); + // Assert.AreEqual(1.1, beta, 0.001); + // } + // + // [Test] + // public void CanParseStringContentForNegativeBeta() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Beta" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 17.810 -1.1 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // var beta = StabilityServiceFileParser.GetBeta(contents); + // Assert.AreEqual(-1.1, beta, 0.001); + // } + + // #region Exceptions + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowsExceptionWhenFileHasNoContent() + // { + // StabilityServiceFileParser.GetMStabResults(""); + // } + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowsExceptionWhenFileHasContentIsNull() + // { + // StabilityServiceFileParser.GetMStabResults(null); + // } + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowsExceptionWhenFileContainsOnlySpaces() + // { + // StabilityServiceFileParser.GetMStabResults(" "); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfDumpsHeaderNotFoundInContent() + // { + // var contents = " 8.30 " + Environment.NewLine; + // contents += " [Dumps] " + Environment.NewLine; + // contents += " test "; + // contents += "[Data]" + Environment.NewLine; + // contents += " 1.276 35 18.216 21.971 12.907 Design level"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfDumpHeaderNotFoundInContent() + // { + // var contents = " 8.30 " + Environment.NewLine; + // contents += " test "; + // contents += "[Data]" + Environment.NewLine; + // contents += " 1.276 35 18.216 21.971 12.907 Design level"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfDataHeaderNotFoundInContent() + // { + // var contents = " 8.30 " + Environment.NewLine; + // contents += "[Dump]" + Environment.NewLine; + // contents += " test "; + // contents += "[iets]" + Environment.NewLine; + // contents += " 1.276 35 18.216 21.971 12.907 Design level"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfStabilityColumnNotFound() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // //@"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfExitPointXCoordinateColumnNotFound() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfStabilityColumnCouldntBeParsed() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor " + + // @"Number of slices " + + // @"X-Centrepoint " + + // @"Y-Centrepoint " + + // @"Radius " + + // @"X coordinate left surface" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name " + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfExitPointXCoordinateColumnCouldntBeParsed() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor " + + // @"Number of slices " + + // @"X-Centrepoint " + + // @"Y-Centrepoint " + + // @"Radius " + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name " + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // StabilityServiceFileParser.GetMStabResults(contents); + // } + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowIfOuputFileNameEmpty() + // { + // StabilityServiceFileParser.GetFileContents(""); + // } + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowIfOuputFileNameIsNull() + // { + // StabilityServiceFileParser.GetFileContents(null); + // } + // + // [Test] + // [ExpectedException(typeof(ArgumentException))] + // public void ThrowIfOuputFileNameContainsSpaces() + // { + // StabilityServiceFileParser.GetFileContents(""); + // } + // + // [Test] + // [ExpectedException(typeof(FileNotFoundException))] + // public void ThrowIfOuputFileNotFound() + // { + // StabilityServiceFileParser.GetFileContents("test.std"); + // } + // + // [Test] + // [ExpectedException(typeof(StabilityFileParseException))] + // public void ThrowIfBetaColumnNotFound() + // { + // var contents = @" 28.237 28.850 23.786 2.324 " + Environment.NewLine + + // @"[End of CircleResults]" + Environment.NewLine + + // Environment.NewLine + + // @"[Dumps]" + Environment.NewLine + + // @" 1 : number of dumps in file" + Environment.NewLine + + // Environment.NewLine + + // @"[Dump]" + Environment.NewLine + + // @"[Dump Header]" + Environment.NewLine + + // @"[Column Indication]" + Environment.NewLine + + // @"Stability factor" + Environment.NewLine + + // @"Number of slices" + Environment.NewLine + + // @"X-Centrepoint" + Environment.NewLine + + // @"Y-Centrepoint" + Environment.NewLine + + // @"Radius" + Environment.NewLine + + // @"X coordinate right surface" + Environment.NewLine + + // @"Dump name" + Environment.NewLine + + // @"[End of Column Indication]" + Environment.NewLine + + // @"[Data]" + Environment.NewLine + + // @" 1.276 35 18.216 21.971 12.907 17.810 Design level" + Environment.NewLine + + // @"[End of Data]" + Environment.NewLine + + // @"[End Of Dump Header]" + Environment.NewLine + + // @"[SliceGeometry]" + Environment.NewLine + + // @"[Column Indication]"; + // + // StabilityServiceFileParser.GetBeta(contents); + // } + // + // #endregion + + } +} Index: dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/Deltares.DamMacroStability.CalculatorTests.csproj =================================================================== diff -u -r393 -r411 --- dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/Deltares.DamMacroStability.CalculatorTests.csproj (.../Deltares.DamMacroStability.CalculatorTests.csproj) (revision 393) +++ dam failuremechanisms/damMacroStability/trunk/src/Tests/Deltares.DamMacroStability.CalculatorTests/Deltares.DamMacroStability.CalculatorTests.csproj (.../Deltares.DamMacroStability.CalculatorTests.csproj) (revision 411) @@ -38,6 +38,7 @@ + Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.nl-NL.resx =================================================================== diff -u -r407 -r411 --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 407) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Properties/Resources.nl-NL.resx (.../Resources.nl-NL.resx) (revision 411) @@ -126,4 +126,16 @@ Project '{0}' niet gevonden + + Kon geen veiligheidsfactor afleiden + + + Project filenaam '{0}' is niet geldig + + + Projectfile '{0}' niet gevonden + + + Geen geldige berekening uitgevoerd + \ No newline at end of file Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Deltares.DamMacroStability.Calculator.csproj =================================================================== diff -u -r407 -r411 --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Deltares.DamMacroStability.Calculator.csproj (.../Deltares.DamMacroStability.Calculator.csproj) (revision 407) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/Deltares.DamMacroStability.Calculator.csproj (.../Deltares.DamMacroStability.Calculator.csproj) (revision 411) @@ -39,6 +39,8 @@ + + True True Index: dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReader.cs =================================================================== diff -u --- dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReader.cs (revision 0) +++ dam failuremechanisms/damMacroStability/trunk/src/Deltares.DamMacroStability.Calculator/DGeoStabilityResultReader.cs (revision 411) @@ -0,0 +1,508 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Deltares.DamMacroStability.Calculator.Properties; + +namespace Deltares.DamMacroStability.Calculator +{ + + /// + /// Read results from DGeoStability output file + /// + public class DGeoStabilityResultReader + { + enum StabilityZone { stabilityZone1a = 1, stabilityZone1b = 2, stabilityZone2a = 3, stabilityZone2b = 4, stabilityZone3a = 5, stabilityZone3b = 6 }; + + #region structs + + public struct DGeoStabilityResults + { + public DGeoStabilityResultsSingleZone zone1; + public DGeoStabilityResultsSingleZone? zone2; + public string CalculationName; + public string CalculationSubDir; + public int IterationNumber; + + public void Init() + { + zone1 = new DGeoStabilityResultsSingleZone(); + zone1.Init(); + zone2 = new DGeoStabilityResultsSingleZone(); + zone2.Value.Init(); + } + } + + public struct DGeoStabilityResultsSingleZone + { + public double SafetyFactor; + public double CircleSurfacePointLeftXCoordinate; + public double CircleSurfacePointRightXCoordinate; + public double EntryPointXCoordinate; + public double ExitPointXCoordinate; + public double Beta; + public void Init() + { + SafetyFactor = 0.0; + CircleSurfacePointLeftXCoordinate = 0.0; + CircleSurfacePointRightXCoordinate = 0.0; + EntryPointXCoordinate = 0.0; + ExitPointXCoordinate = 0.0; + Beta = 0.0; + } + } + + #endregion + + /// + /// Extracts the relevant calculation results from the outputfile of DGeoStability + /// + /// The project file to process + /// The DGeoStability calculation results + public DGeoStabilityResults ExtractStabilityResults(string projectFileName) + { + if (string.IsNullOrEmpty(projectFileName) || projectFileName.Trim() == "") + { + throw new ArgumentException(string.Format( + Resources.DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNameNullOrEmpty, projectFileName)); + } + + if (!File.Exists(projectFileName)) + { + throw new FileNotFoundException(string.Format( + Resources.DGeoStabilityResultReader_ExtractStabilityResults_ProjectFileNotExist, projectFileName)); + } + + try + { + string outputFile = Path.Combine(Path.GetDirectoryName(projectFileName), GetOutputFileName(projectFileName)); + return ParseResultsFromOutputFile(outputFile); + } + catch (ArgumentNullException argumentNullException) + { + string message = Resources.DGeoStabilityResultReader_ExtractStabilityResults_CouldNotExtractSafetyFactor; + throw new DGeoStabilityResultReaderException(message, argumentNullException); + } + catch (FileNotFoundException outputFileNotFoundException) + { + string message = Resources.DGeoStabilityResultReader_ExtractStabilityResults_CouldNotExtractSafetyFactor; + + string outputFile = Path.Combine(Path.GetDirectoryName(projectFileName), GetOutputFileName(projectFileName)); + string[] errorMessages = ParseDGeoStabilityErrorFile(outputFile); + if (errorMessages.Length > 0) + { + message = errorMessages[0]; + } + + throw new DGeoStabilityResultReaderException(message, outputFileNotFoundException); + } + } + + /// + /// Gets the stripped file name with the correct extension extracted from the input file name + /// + /// The file name with path + /// The project file name without path and correct extension + private static string GetOutputFileName(string projectFileName) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(projectFileName); + return fileNameWithoutExtension + ".std"; + } + + /// + /// Parses the safety factor from the output file + /// + /// The file to parse + /// The safety factor + internal static DGeoStabilityResults ParseResultsFromOutputFile(string outputFile) + { + if (!File.Exists(outputFile)) + { + throw new FileNotFoundException( + Resources.DGeoStabilityResultReader_ParseResultsFromOutputFile_No_valid_calculation_performed); + } + + var fileContent = GetFileContents(outputFile); + return GetDGeoStabilityResults(fileContent); + } + + /// + /// Gets the file content (text) from a file + /// + /// The name of the file + /// The content string + public static string GetFileContents(string fileName) + { + if (string.IsNullOrEmpty(fileName) || fileName.Trim() == "") + { + throw new ArgumentException(string.Format( + "Output file {0} is not valid", fileName)); + } + + if (!File.Exists(fileName)) + { + throw new FileNotFoundException(string.Format( + "Output file {0} does not exist", fileName)); + } + + string fileContents; + using (var sr = new StreamReader(fileName)) + { + fileContents = sr.ReadToEnd(); + } + return fileContents; + } + + /// + /// Read all relevant DGeoStability results from file + /// + /// + /// + public static DGeoStabilityResults GetDGeoStabilityResults(string fileContent) + { + DGeoStabilityResults results = new DGeoStabilityResults(); + + if (string.IsNullOrEmpty(fileContent) || fileContent.Trim() == "") + { + throw new ArgumentException(string.Format( + "Output file {0} has no content", fileContent)); + } + if (ParseHasZonePlotEnabled(fileContent)) + { + DGeoStabilityResultsSingleZone? zoneResults1 = GetDGeoStabilityResultsSingleZoneFrom(fileContent, StabilityZone.stabilityZone1a, StabilityZone.stabilityZone1b); + if (zoneResults1 != null) + { + results.zone1 = zoneResults1.Value; + } + else + { + throw new DGeoStabilityResultReaderException("Stabilityzone 1a or 1b should exist"); + } + results.zone2 = GetDGeoStabilityResultsSingleZoneFrom(fileContent, StabilityZone.stabilityZone2a, StabilityZone.stabilityZone2b); + } + else + { + DGeoStabilityResultsSingleZone? noZoneResults = GetDGeoStabilityResultsNoZones(fileContent); + results.zone1 = noZoneResults.Value; + } + return results; + } + + public static bool ParseHasZonePlotEnabled(string fileContent) + { + StringReader stringReader = new StringReader(fileContent); + string line = ""; + + while ((line = stringReader.ReadLine()) != null) + { + if (line.EndsWith(": Zone plot on")) + { + return int.Parse(line.Substring(0, 3)).Equals(1) ? true : false; + } + } + return false; + } + + /// + /// Get the results from a zone (A or if not exists then B) + /// + /// + /// + private static DGeoStabilityResultsSingleZone? GetDGeoStabilityResultsSingleZoneFrom(string fileContent, StabilityZone zoneA, StabilityZone zoneB) + { + DGeoStabilityResultsSingleZone? resultsSingleZone = null; + DGeoStabilityResultsSingleZone? zoneAResults = ParseZoneResults(fileContent, (int)zoneA); + DGeoStabilityResultsSingleZone? zoneBResults = null; + if (zoneAResults != null) + { + resultsSingleZone = zoneAResults.Value; + } + + else + { + zoneBResults = ParseZoneResults(fileContent, (int)zoneB); + if (zoneBResults != null) + { + resultsSingleZone = zoneBResults.Value; + } + } + return resultsSingleZone; + } + + private static DGeoStabilityResultsSingleZone? ParseZoneResults(string fileContent, int stabilityZone) + { + StringReader stringReader = new StringReader(fileContent); + string line = ""; + string zoneStabilityResults = null; + + int stabilityFactorIndex = -1; + int xCoordinateLeftSurfaceIndex = -1; + int xCoordinateRightSurfaceIndex = -1; + int zoneNumberIndex = -1; + int betaIndex = -1; + + DGeoStabilityResultsSingleZone resultsStruct = new DGeoStabilityResultsSingleZone(); + while ((line = stringReader.ReadLine()) != null) + { + if (line.Equals("[Dump]")) + { + if (!ReadParameterColumnIndices(stringReader, ref stabilityFactorIndex, + ref xCoordinateLeftSurfaceIndex, ref xCoordinateRightSurfaceIndex, ref zoneNumberIndex, ref betaIndex)) + throw new DGeoStabilityResultReaderException("Could not read Column Indication"); + + while ((line = stringReader.ReadLine()) != null) + { + if (line.Equals("[Data]")) + { + zoneStabilityResults = stringReader.ReadLine(); + + var zoneStabilityResultsElements = zoneStabilityResults.Split(' ').ToList().Where(x => x.Length > 0).ToArray(); + + if (zoneStabilityResultsElements != null) + { + if ((zoneStabilityResultsElements.Count() > stabilityFactorIndex) && (zoneStabilityResultsElements.Count() > zoneNumberIndex)) + { + try + { + if (int.Parse(zoneStabilityResultsElements[zoneNumberIndex]).Equals(stabilityZone)) + { + Double.TryParse(zoneStabilityResultsElements[stabilityFactorIndex], out resultsStruct.SafetyFactor); + if (IsUpliftResults(fileContent)) + resultsStruct.SafetyFactor = resultsStruct.SafetyFactor / 1.05; + Double.TryParse(zoneStabilityResultsElements[xCoordinateLeftSurfaceIndex], out resultsStruct.CircleSurfacePointLeftXCoordinate); + Double.TryParse(zoneStabilityResultsElements[xCoordinateRightSurfaceIndex], out resultsStruct.CircleSurfacePointRightXCoordinate); + if (betaIndex > -1) + { + Double.TryParse(zoneStabilityResultsElements[betaIndex], out resultsStruct.Beta); + } + return resultsStruct; + } + } + catch (Exception e) + { + throw new DGeoStabilityResultReaderException("Could not parse Stabilityzone : " + e); + } + } + else + throw new DGeoStabilityResultReaderException("stabilityZone or stabilityFactorIndex not found"); + } + break; + } + } + } + } + return null; + } + + private static bool ReadParameterColumnIndices(StringReader stringReader, ref int stabilityFactorIndex, + ref int xCoordinateLeftSurfaceIndex, ref int xCoordinateRightSurfaceIndex, ref int zoneNumberIndex, ref int betaIndex) + { + string line = ""; + const string startCondition = "[Column Indication]"; + const string endCondition = "[End of Column Indication]"; + const string headerSafetyFactor = "Stability factor"; + const string headerXCoordinateLeftSurface = "X coordinate left surface"; + const string headerXCoordinateRightSurface = "X coordinate right surface"; + const string headerZoneNumber = "Zone number"; + const string headerBeta = "Beta"; + + bool isEndCondition = false; + stabilityFactorIndex = -1; + xCoordinateLeftSurfaceIndex = -1; + xCoordinateRightSurfaceIndex = -1; + zoneNumberIndex = -1; + while ((line = stringReader.ReadLine()) != null) + { + if (line.Equals(startCondition)) + { + int columnIndex = 0; + while ((line = stringReader.ReadLine()) != null) + { + if (line.Equals(headerSafetyFactor)) + stabilityFactorIndex = columnIndex; + + if (line.Equals(headerXCoordinateLeftSurface)) + xCoordinateLeftSurfaceIndex = columnIndex; + + if (line.Equals(headerXCoordinateRightSurface)) + xCoordinateRightSurfaceIndex = columnIndex; + + if (line.Equals(headerZoneNumber)) + zoneNumberIndex = columnIndex; + + if (line.Equals(headerBeta)) + betaIndex = columnIndex; + + columnIndex++; + if (line.Equals(endCondition)) + { + isEndCondition = true; + break; + } + } + } + if (isEndCondition) + break; + } + + return ((stabilityFactorIndex >= 0) && (zoneNumberIndex >= 0) && (xCoordinateLeftSurfaceIndex >= 0) && (xCoordinateRightSurfaceIndex >= 0)) ? true : false; + } + + private static bool IsUpliftResults(string fileContent) + { + fileContent = ReadContentAfterIdentifier(fileContent, "[MODEL]"); + if (fileContent.Contains(" 4 : Uplift Van")) + { + return true; + } + else + { + return false; + } + } + + /// + /// + /// + /// + /// + /// + private static string ReadContentAfterIdentifier(string fileContent, string identifier) + { + if (!fileContent.Contains(identifier)) + throw new DGeoStabilityResultReaderException("Stability file doesn't contain identifier " + identifier); + fileContent = fileContent.Substring(fileContent.IndexOf(identifier)); + return fileContent.Replace(identifier + Environment.NewLine, ""); + } + + private static DGeoStabilityResultsSingleZone GetDGeoStabilityResultsNoZones(string fileContent) + { + DGeoStabilityResultsSingleZone resultsStruct = new DGeoStabilityResultsSingleZone(); + resultsStruct.SafetyFactor = GetColumnValueNoZones(fileContent, "Stability factor"); + if (IsUpliftResults(fileContent)) + resultsStruct.SafetyFactor = resultsStruct.SafetyFactor / 1.05; + resultsStruct.CircleSurfacePointLeftXCoordinate = GetColumnValueNoZones(fileContent, "X coordinate left surface"); + resultsStruct.CircleSurfacePointRightXCoordinate = GetColumnValueNoZones(fileContent, "X coordinate right surface"); + return resultsStruct; + } + + /// + /// Parses the content to get the safety factory + /// + /// The text to parse + /// The safety factor + private static double GetColumnValueNoZones(string fileContent, string columnName) + { + fileContent = ReadContentAfterIdentifier(fileContent, "[Dumps]"); + fileContent = ReadContentAfterIdentifier(fileContent, "[Dump]"); + fileContent = ReadContentAfterIdentifier(fileContent, "[Dump Header]"); + fileContent = ReadContentAfterIdentifier(fileContent, "[Column Indication]"); + + int columnIndex = GetDataColumnIndex(fileContent, columnName, "[End of Column Indication]"); + + fileContent = ReadContentAfterIdentifier(fileContent, "[Data]"); + + double columnValue = GetNumberFromLine(fileContent, columnIndex); + + return columnValue; + } + + /// + /// + /// + /// + /// Returns -1 if identifier is not found + /// + /// The content to search in + /// The identifier to look for + /// The index of the column + private static int GetDataColumnIndex(string fileContent, string identifier, string endTag) + { + if (!fileContent.Contains(identifier)) + throw new DGeoStabilityResultReaderException(); + + var items = fileContent + .Substring(0, fileContent.IndexOf(endTag) - Environment.NewLine.Length) + .Replace(Environment.NewLine, ";") + .Split(';'); + + var foundMatch = false; + var i = -1; + if (items.Length == 1 && StringsAreEqual(items[0], identifier)) + i = 0; + else if (items.Length > 1) + { + foreach (var word in items) + { + ++i; + if (StringsAreEqual(word, identifier)) + { + foundMatch = true; + break; + } + } + } + + if (i == -1 || !foundMatch) + throw new DGeoStabilityResultReaderException(); + + return i; + } + + private static bool StringsAreEqual(string left, string right) + { + return ((!string.IsNullOrEmpty(left) || left.Trim() == "") && + left.Equals(right, StringComparison.InvariantCulture)); + } + + /// + /// + /// + /// + /// + private static double GetNumberFromLine(string fileContent, int idPos) + { + var doublesPattern = new Regex(@"-?\d+(?:\.\d+)?"); + var matches = doublesPattern.Matches(fileContent); + return double.Parse(matches[idPos].Value, NumberStyles.Any, CultureInfo.InvariantCulture); + } + + /// + /// Parses the error messages from the error file + /// + /// The file to parse + /// The error messages + private string[] ParseDGeoStabilityErrorFile(string outputFile) + { + string errorFile = outputFile.Replace(".std", ".err"); + + if (File.Exists(errorFile)) + { + List messages = new List(); + bool content = false; + foreach (string line in File.ReadAllLines(outputFile)) + { + if (line.StartsWith("**********")) + { + content = !content; + } + else if (content) + { + messages.Add(line); + } + } + + return messages.ToArray(); + } + else + { + return new string[0]; + } + } + + } +}