Index: src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculation.cs
===================================================================
diff -u
--- src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculation.cs (revision 0)
+++ src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculation.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,118 @@
+using Deltares.WTIPiping;
+
+namespace Wti.Calculation.Piping
+{
+ ///
+ /// This class represents a combination of piping sub-calculations, which together can be used
+ /// to assess based on piping.
+ ///
+ public class PipingCalculation {
+
+ private readonly PipingCalculationInput input;
+
+ ///
+ /// Constructs a new . The is used to
+ /// obtain the parameters used in the different sub calculations.
+ ///
+ /// The containing all the values required
+ /// for performing a piping calculation.
+ public PipingCalculation(PipingCalculationInput input)
+ {
+ this.input = input;
+ }
+
+ ///
+ /// Performs the actual sub calculations and returns a , which
+ /// contains the results of all sub calculations.
+ ///
+ /// A containing the results of the sub calculations.
+ public PipingCalculationResult Calculate()
+ {
+ var upliftResultContainer = CalculateUplift();
+ var heaveResultContainer = CalulateHeave();
+ var sellmejerResultContainer = CalulateSellmeijer();
+
+ return new PipingCalculationResult(
+ upliftResultContainer.Zu,
+ upliftResultContainer.FoSu,
+ heaveResultContainer.Zh,
+ heaveResultContainer.FoSh,
+ sellmejerResultContainer.Zp,
+ sellmejerResultContainer.FoSp
+ );
+ }
+
+ private HeaveCalculator CalulateHeave()
+ {
+ var calculator = new HeaveCalculator
+ {
+ Ich = input.CriticalHeaveGradient,
+ PhiExit = input.PiezometricHeadExit,
+ DTotal = input.ThicknessCoverageLayer,
+ PhiPolder = input.PiezometricHeadPolder,
+ RExit = input.DampingFactorExit,
+ HExit = input.PhreaticLevelExit
+ };
+ calculator.Calculate();
+ return calculator;
+ }
+
+ private WTIUpliftCalculator CalculateUplift()
+ {
+ var effectiveStressResult = CalculateEffectiveThickness();
+
+ var calculator = new WTIUpliftCalculator
+ {
+ VolumetricWeightOfWater = input.WaterVolumetricWeight,
+ ModelFactorUplift = input.UpliftModelFactor,
+ EffectiveStress = effectiveStressResult.EffectiveStress,
+ HRiver = input.AssessmentLevel,
+ PhiExit = input.PiezometricHeadExit,
+ RExit = input.DampingFactorExit,
+ HExit = input.PhreaticLevelExit,
+ PhiPolder = input.PiezometricHeadPolder
+ };
+ calculator.Calculate();
+ return calculator;
+ }
+
+ private Sellmeijer2011Calculator CalulateSellmeijer()
+ {
+ var calculator = new Sellmeijer2011Calculator
+ {
+ ModelFactorPiping = input.SellmeijerModelFactor,
+ HRiver = input.AssessmentLevel,
+ HExit = input.PhreaticLevelExit,
+ Rc = input.ReductionFactorSellmeijer,
+ DTotal = input.ThicknessCoverageLayer,
+ SeepageLength = input.SeepageLength,
+ GammaSubParticles = input.SandParticlesVolumicWeight,
+ WhitesDragCoefficient = input.WhitesDragCoefficient,
+ D70 = input.Diameter70,
+ VolumetricWeightOfWater = input.WaterVolumetricWeight,
+ DarcyPermeability = input.DarcyPermeability,
+ KinematicViscosityWater = input.WaterKinematicViscosity,
+ Gravity = input.Gravity,
+ DAquifer = input.ThicknessAquiferLayer,
+ D70Mean = input.MeanDiameter70,
+ BeddingAngle = input.BeddingAngle
+ };
+ calculator.Calculate();
+ return calculator;
+ }
+
+ private EffectiveThicknessCalculator CalculateEffectiveThickness()
+ {
+ var calculator = new EffectiveThicknessCalculator
+ {
+ ExitPointXCoordinate = input.ExitPointXCoordinate,
+ PhreaticLevel = input.PhreaticLevelExit,
+ SoilProfile = new PipingProfileCreator().Create(),
+ SurfaceLine = new PipingSurfaceLineCreator().Create(),
+ VolumicWeightOfWater = input.WaterVolumetricWeight
+ };
+ calculator.Calculate();
+ return calculator;
+ }
+ }
+}
\ No newline at end of file
Index: src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationInput.cs
===================================================================
diff -u
--- src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationInput.cs (revision 0)
+++ src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationInput.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,296 @@
+namespace Wti.Calculation.Piping
+{
+ ///
+ /// This class contains all the parameters that are required to perform a piping assessment.
+ ///
+ public class PipingCalculationInput
+ {
+ private readonly double waterVolumetricWeight;
+ private readonly double upliftModelFactor;
+ private readonly double effectiveStress;
+ private readonly double assessmentLevel;
+ private readonly double piezometricHeadExit;
+ private readonly double dampingFactorExit;
+ private readonly double phreaticLevelExit;
+ private readonly double piezometricHeadPolder;
+ private readonly double criticalHeaveGradient;
+ private readonly double thicknessCoverageLayer;
+ private readonly double sellmeijerModelFactor;
+ private readonly double reductionFactorSellmeijer;
+ private readonly double seepageLength;
+ private readonly double sandParticlesVolumicWeight;
+ private readonly double whitesDragCoefficient;
+ private readonly double diameter70;
+ private readonly double darcyPermeability;
+ private readonly double waterKinematicViscosity;
+ private readonly double gravity;
+ private readonly double thicknessAquiferLayer;
+ private readonly double meanDiameter70;
+ private readonly double beddingAngle;
+ private readonly double exitPointXCoordinate;
+
+ #region properties
+
+ public double WaterVolumetricWeight
+ {
+ get
+ {
+ return waterVolumetricWeight;
+ }
+ }
+
+ public double UpliftModelFactor
+ {
+ get
+ {
+ return upliftModelFactor;
+ }
+ }
+
+ public double EffectiveStress
+ {
+ get
+ {
+ return effectiveStress;
+ }
+ }
+
+ public double AssessmentLevel
+ {
+ get
+ {
+ return assessmentLevel;
+ }
+ }
+
+ public double PiezometricHeadExit
+ {
+ get
+ {
+ return piezometricHeadExit;
+ }
+ }
+
+ public double DampingFactorExit
+ {
+ get
+ {
+ return dampingFactorExit;
+ }
+ }
+
+ public double PhreaticLevelExit
+ {
+ get
+ {
+ return phreaticLevelExit;
+ }
+ }
+
+ public double PiezometricHeadPolder
+ {
+ get
+ {
+ return piezometricHeadPolder;
+ }
+ }
+
+ public double CriticalHeaveGradient
+ {
+ get
+ {
+ return criticalHeaveGradient;
+ }
+ }
+
+ public double ThicknessCoverageLayer
+ {
+ get
+ {
+ return thicknessCoverageLayer;
+ }
+ }
+
+ public double SellmeijerModelFactor {
+ get
+ {
+ return sellmeijerModelFactor;
+ }
+ }
+
+ public double ReductionFactorSellmeijer
+ {
+ get
+ {
+ return reductionFactorSellmeijer;
+ }
+ }
+
+ public double SeepageLength
+ {
+ get
+ {
+ return seepageLength;
+ }
+ }
+
+ public double SandParticlesVolumicWeight
+ {
+ get
+ {
+ return sandParticlesVolumicWeight;
+ }
+ }
+
+ public double WhitesDragCoefficient
+ {
+ get
+ {
+ return whitesDragCoefficient;
+ }
+ }
+
+ public double Diameter70
+ {
+ get
+ {
+ return diameter70;
+ }
+ }
+
+ public double DarcyPermeability
+ {
+ get
+ {
+ return darcyPermeability;
+ }
+ }
+
+ public double WaterKinematicViscosity
+ {
+ get
+ {
+ return waterKinematicViscosity;
+ }
+ }
+
+ public double Gravity
+ {
+ get
+ {
+ return gravity;
+ }
+ }
+
+ public double ThicknessAquiferLayer
+ {
+ get
+ {
+ return thicknessAquiferLayer;
+ }
+ }
+
+ public double MeanDiameter70
+ {
+ get
+ {
+ return meanDiameter70;
+ }
+ }
+
+ public double BeddingAngle
+ {
+ get
+ {
+ return beddingAngle;
+ }
+ }
+
+ public double ExitPointXCoordinate
+ {
+ get
+ {
+ return exitPointXCoordinate;
+ }
+ }
+
+ #endregion
+
+ ///
+ /// Constructs a new , which contains values for the parameters used
+ /// in the piping sub calculations.
+ ///
+ /// The volumetric weight of water.
+ /// Calculation value used to account for uncertainty in the model for uplift.
+ /// The effective stress of a layer.
+ /// Outside high water level.
+ /// Piezometric head at the exit point.
+ /// Damping factor at the exit point.
+ /// Phreatic level at the exit point.
+ /// Piezometric head in the hinterland.
+ /// Critical exit gradient for heave.
+ /// The total thickness of the coverage layer at the exit point.
+ /// Calculation value used to account for uncertainty in the model for Sellmeijer.
+ /// Reduction factor Sellmeijer.
+ /// Horizontal distance between entree and exit point.
+ /// The (lowerbound) volumic weight of sand grain material of a sand layer under water.
+ /// White's drag coefficient.
+ /// Sieve size through which 70% fraction of the grains of the top part of the aquifer passes.
+ /// Darcy-speed with which water flows through the aquifer layer.
+ /// The kinematic viscosity of water at 10 degrees Celsius.
+ /// Gravitational acceleration.
+ /// The thickness of the aquifer layer.
+ /// Mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit.
+ /// Angle of the force balance representing the amount in which sand grains resist rolling.
+ /// X coordinate of the exit point.
+ public PipingCalculationInput(
+ double waterVolumetricWeight,
+ double upliftModelFactor,
+ double effectiveStress,
+ double assessmentLevel,
+ double piezometricHeadExit,
+ double dampingFactorExit,
+ double phreaticLevelExit,
+ double piezometricHeadPolder,
+ double criticalHeaveGradient,
+ double thicknessCoverageLayer,
+ double sellmeijerModelFactor,
+ double reductionFactorSellmeijer,
+ double seepageLength,
+ double sandParticlesVolumicWeight,
+ double whitesDragCoefficient,
+ double diameter70,
+ double darcyPermeability,
+ double waterKinematicViscosity,
+ double gravity,
+ double thicknessAquiferLayer,
+ double meanDiameter70,
+ double beddingAngle,
+ double exitPointXCoordinate)
+ {
+ this.waterVolumetricWeight = waterVolumetricWeight;
+ this.upliftModelFactor = upliftModelFactor;
+ this.effectiveStress = effectiveStress;
+ this.assessmentLevel = assessmentLevel;
+ this.piezometricHeadExit = piezometricHeadExit;
+ this.dampingFactorExit = dampingFactorExit;
+ this.phreaticLevelExit = phreaticLevelExit;
+ this.piezometricHeadPolder = piezometricHeadPolder;
+ this.criticalHeaveGradient = criticalHeaveGradient;
+ this.thicknessCoverageLayer = thicknessCoverageLayer;
+ this.sellmeijerModelFactor = sellmeijerModelFactor;
+ this.reductionFactorSellmeijer = reductionFactorSellmeijer;
+ this.seepageLength = seepageLength;
+ this.sandParticlesVolumicWeight = sandParticlesVolumicWeight;
+ this.whitesDragCoefficient = whitesDragCoefficient;
+ this.diameter70 = diameter70;
+ this.darcyPermeability = darcyPermeability;
+ this.waterKinematicViscosity = waterKinematicViscosity;
+ this.gravity = gravity;
+ this.thicknessAquiferLayer = thicknessAquiferLayer;
+ this.meanDiameter70 = meanDiameter70;
+ this.beddingAngle = beddingAngle;
+ this.exitPointXCoordinate = exitPointXCoordinate;
+ }
+ }
+}
\ No newline at end of file
Index: src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationResult.cs
===================================================================
diff -u
--- src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationResult.cs (revision 0)
+++ src/Plugins/Wti/Wti.Calculation/Piping/PipingCalculationResult.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,98 @@
+namespace Wti.Calculation.Piping
+{
+ public class PipingCalculationResult {
+ private readonly double upliftZValue;
+ private readonly double upliftFactorOfSafety;
+ private readonly double heaveZValue;
+ private readonly double heaveFactorOfSafety;
+ private readonly double sellmeijerZValue;
+ private readonly double sellmeijerFactorOfSafety;
+
+ #region properties
+
+ ///
+ /// The z-value of the Uplift sub calculation.
+ ///
+ public double UpliftZValue { get
+ {
+ return upliftZValue;
+ }
+ }
+
+ ///
+ /// The factory of safety of the Uplift sub calculation.
+ ///
+ public double UpliftFactorOfSafety
+ {
+ get
+ {
+ return upliftFactorOfSafety;
+ }
+ }
+
+ ///
+ /// The z-value of the Heave sub calculation.
+ ///
+ public double HeaveZValue
+ {
+ get
+ {
+ return heaveZValue;
+ }
+ }
+
+ ///
+ /// The factory of safety of the Heave sub calculation.
+ ///
+ public double HeaveFactorOfSafety
+ {
+ get
+ {
+ return heaveFactorOfSafety;
+ }
+ }
+
+ ///
+ /// The z-value of the Sellmeijer sub calculation.
+ ///
+ public double SellmeijerZValue
+ {
+ get
+ {
+ return sellmeijerZValue;
+ }
+ }
+
+ ///
+ /// The factory of safety of the Sellmeijer sub calculation.
+ ///
+ public double SellmeijerFactorOfSafety
+ {
+ get
+ {
+ return sellmeijerFactorOfSafety;
+ }
+ }
+
+ #endregion
+
+ ///
+ /// Constructs a new . The result will hold all the values which were given.
+ ///
+ /// The z-value of the Uplift sub calculation.
+ /// The factory of safety of the Uplift sub calculation.
+ /// The z-value of the Heave sub calculation.
+ /// The factory of safety of the Heave sub calculation.
+ /// The z-value of the Sellmeijer sub calculation.
+ /// The factory of safety of the Sellmeijer sub calculation.
+ public PipingCalculationResult(double upliftZValue, double upliftFactorOfSafety, double heaveZValue, double heaveFactorOfSafety, double sellmeijerZValue, double sellmeijerFactorOfSafety)
+ {
+ this.upliftZValue = upliftZValue;
+ this.upliftFactorOfSafety = upliftFactorOfSafety;
+ this.heaveZValue = heaveZValue;
+ this.heaveFactorOfSafety = heaveFactorOfSafety;
+ this.sellmeijerZValue = sellmeijerZValue;
+ this.sellmeijerFactorOfSafety = sellmeijerFactorOfSafety;
+ }
+ }
+}
\ No newline at end of file
Index: src/Plugins/Wti/Wti.Calculation/Piping/PipingProfileCreator.cs
===================================================================
diff -u
--- src/Plugins/Wti/Wti.Calculation/Piping/PipingProfileCreator.cs (revision 0)
+++ src/Plugins/Wti/Wti.Calculation/Piping/PipingProfileCreator.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,20 @@
+using Deltares.WTIPiping;
+
+namespace Wti.Calculation.Piping
+{
+ ///
+ /// Creates instances which are required by the .
+ ///
+ internal class PipingProfileCreator
+ {
+ public PipingProfile Create()
+ {
+ var profile = new PipingProfile();
+ var layer = new PipingLayer();
+ layer.IsAquifer = true;
+ profile.Layers.Add(layer);
+
+ return profile;
+ }
+ }
+}
\ No newline at end of file
Index: src/Plugins/Wti/Wti.Calculation/Piping/PipingSurfaceLineCreator.cs
===================================================================
diff -u
--- src/Plugins/Wti/Wti.Calculation/Piping/PipingSurfaceLineCreator.cs (revision 0)
+++ src/Plugins/Wti/Wti.Calculation/Piping/PipingSurfaceLineCreator.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,18 @@
+using Deltares.WTIPiping;
+
+namespace Wti.Calculation.Piping
+{
+ ///
+ /// Creates instances which are required by the .
+ ///
+ internal class PipingSurfaceLineCreator
+ {
+ public PipingSurfaceLine Create()
+ {
+ var surfaceLine = new PipingSurfaceLine();
+ surfaceLine.Points.Add(new PipingPoint(0,0,0));
+
+ return surfaceLine;
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Calculation/PipingCalculation.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Calculation/PipingCalculationInput.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `src/Plugins/Wti/Wti.Calculation/PipingCalculationResult.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: src/Plugins/Wti/Wti.Calculation/Wti.Calculation.csproj
===================================================================
diff -u -r3912a159ea7726b8b92966345440c2fff2b297e0 -r9f140a1d7ebc5dfaabd213c626b596ad55f66e56
--- src/Plugins/Wti/Wti.Calculation/Wti.Calculation.csproj (.../Wti.Calculation.csproj) (revision 3912a159ea7726b8b92966345440c2fff2b297e0)
+++ src/Plugins/Wti/Wti.Calculation/Wti.Calculation.csproj (.../Wti.Calculation.csproj) (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -73,9 +73,11 @@
-
-
-
+
+
+
+
+
Index: test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationInputTest.cs
===================================================================
diff -u
--- test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationInputTest.cs (revision 0)
+++ test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationInputTest.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,88 @@
+using System;
+using NUnit.Framework;
+using Wti.Calculation.Piping;
+
+namespace Wti.Calculation.Test.Piping
+{
+ public class PipingCalculationInputTest
+ {
+ [Test]
+ public void GivenSomeRandomValues_WhenPipingCalculationInputConstructedFromInput_ThenPropertiesAreSet()
+ {
+ var random = new Random(22);
+
+ double volumetricWeightOfWaterValue = random.NextDouble();
+ double modelFactorUpliftValue = random.NextDouble();
+ double effectiveStressValue = random.NextDouble();
+ double hRiverValue = random.NextDouble();
+ double phiExitValue = random.NextDouble();
+ double rExitValue = random.NextDouble();
+ double hExitValue = random.NextDouble();
+ double phiPolderValue = random.NextDouble();
+ double ichValue = random.NextDouble();
+ double dTotalValue = random.NextDouble();
+ double sellmeijerModelFactorValue = random.NextDouble();
+ double reductionFactorValue = random.NextDouble();
+ double seepageLengthValue = random.NextDouble();
+ double sandParticlesVolumicWeightValue = random.NextDouble();
+ double whitesDragCoefficientValue = random.NextDouble();
+ double diameter70Value = random.NextDouble();
+ double darcyPermeabilityValue = random.NextDouble();
+ double waterKinematicViscosityValue = random.NextDouble();
+ double gravityValue = random.NextDouble();
+ double thicknessAquiferLayerValue = random.NextDouble();
+ double meanDiameter70Value = random.NextDouble();
+ double beddingAngleValue = random.NextDouble();
+ double exitPointXCoordinate = random.NextDouble();
+
+ var input = new PipingCalculationInput(
+ volumetricWeightOfWaterValue,
+ modelFactorUpliftValue,
+ effectiveStressValue,
+ hRiverValue,
+ phiExitValue,
+ rExitValue,
+ hExitValue,
+ phiPolderValue,
+ ichValue,
+ dTotalValue,
+ sellmeijerModelFactorValue,
+ reductionFactorValue,
+ seepageLengthValue,
+ sandParticlesVolumicWeightValue,
+ whitesDragCoefficientValue,
+ diameter70Value,
+ darcyPermeabilityValue,
+ waterKinematicViscosityValue,
+ gravityValue,
+ thicknessAquiferLayerValue,
+ meanDiameter70Value,
+ beddingAngleValue,
+ exitPointXCoordinate);
+
+ Assert.That(input.WaterVolumetricWeight, Is.EqualTo(volumetricWeightOfWaterValue));
+ Assert.That(input.UpliftModelFactor, Is.EqualTo(modelFactorUpliftValue));
+ Assert.That(input.EffectiveStress, Is.EqualTo(effectiveStressValue));
+ Assert.That(input.AssessmentLevel, Is.EqualTo(hRiverValue));
+ Assert.That(input.PiezometricHeadExit, Is.EqualTo(phiExitValue));
+ Assert.That(input.DampingFactorExit, Is.EqualTo(rExitValue));
+ Assert.That(input.PhreaticLevelExit, Is.EqualTo(hExitValue));
+ Assert.That(input.PiezometricHeadPolder, Is.EqualTo(phiPolderValue));
+ Assert.That(input.CriticalHeaveGradient, Is.EqualTo(ichValue));
+ Assert.That(input.ThicknessCoverageLayer, Is.EqualTo(dTotalValue));
+ Assert.That(input.SellmeijerModelFactor, Is.EqualTo(sellmeijerModelFactorValue));
+ Assert.That(input.ReductionFactorSellmeijer, Is.EqualTo(reductionFactorValue));
+ Assert.That(input.SeepageLength, Is.EqualTo(seepageLengthValue));
+ Assert.That(input.SandParticlesVolumicWeight, Is.EqualTo(sandParticlesVolumicWeightValue));
+ Assert.That(input.WhitesDragCoefficient, Is.EqualTo(whitesDragCoefficientValue));
+ Assert.That(input.Diameter70, Is.EqualTo(diameter70Value));
+ Assert.That(input.DarcyPermeability, Is.EqualTo(darcyPermeabilityValue));
+ Assert.That(input.WaterKinematicViscosity, Is.EqualTo(waterKinematicViscosityValue));
+ Assert.That(input.Gravity, Is.EqualTo(gravityValue));
+ Assert.That(input.ThicknessAquiferLayer, Is.EqualTo(thicknessAquiferLayerValue));
+ Assert.That(input.MeanDiameter70, Is.EqualTo(meanDiameter70Value));
+ Assert.That(input.BeddingAngle, Is.EqualTo(beddingAngleValue));
+ Assert.That(input.ExitPointXCoordinate, Is.EqualTo(exitPointXCoordinate));
+ }
+ }
+}
\ No newline at end of file
Index: test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationResultTest.cs
===================================================================
diff -u
--- test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationResultTest.cs (revision 0)
+++ test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationResultTest.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,30 @@
+using System;
+using NUnit.Framework;
+using Wti.Calculation.Piping;
+
+namespace Wti.Calculation.Test.Piping
+{
+ public class PipingCalculationResultTest
+ {
+ [Test]
+ public void GivenSomeValues_WhenConstructedWithValues_ThenPropertiesAreSet()
+ {
+ var random = new Random(22);
+ var zuValue = random.NextDouble();
+ var foSuValue = random.NextDouble();
+ var zhValue = random.NextDouble();
+ var foShValue = random.NextDouble();
+ var zsValue = random.NextDouble();
+ var foSsValue = random.NextDouble();
+
+ var actual = new PipingCalculationResult(zuValue,foSuValue,zhValue,foShValue,zsValue,foSsValue);
+
+ Assert.That(actual.UpliftZValue, Is.EqualTo(zuValue));
+ Assert.That(actual.UpliftFactorOfSafety, Is.EqualTo(foSuValue));
+ Assert.That(actual.HeaveZValue, Is.EqualTo(zhValue));
+ Assert.That(actual.HeaveFactorOfSafety, Is.EqualTo(foShValue));
+ Assert.That(actual.SellmeijerZValue, Is.EqualTo(zsValue));
+ Assert.That(actual.SellmeijerFactorOfSafety, Is.EqualTo(foSsValue));
+ }
+ }
+}
\ No newline at end of file
Index: test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationTest.cs
===================================================================
diff -u
--- test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationTest.cs (revision 0)
+++ test/Plugins/Wti/Wti.Calculation.Test/Piping/PipingCalculationTest.cs (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -0,0 +1,47 @@
+using System;
+using NUnit.Framework;
+using Wti.Calculation.Piping;
+
+namespace Wti.Calculation.Test.Piping
+{
+ public class PipingCalculationTest
+ {
+ [Test]
+ public void GivenACompleteInput_WhenCalculationPerformed_ThenResultContainsNoNaN()
+ {
+ Random random = new Random(22);
+ PipingCalculationInput input = new PipingCalculationInput(
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble(),
+ random.NextDouble());
+ PipingCalculationResult actual = new PipingCalculation(input).Calculate();
+
+ Assert.That(actual.UpliftZValue, Is.Not.NaN);
+ Assert.That(actual.UpliftFactorOfSafety, Is.Not.NaN);
+ Assert.That(actual.HeaveZValue, Is.Not.NaN);
+ Assert.That(actual.HeaveFactorOfSafety, Is.Not.NaN);
+ Assert.That(actual.SellmeijerZValue, Is.Not.NaN);
+ Assert.That(actual.SellmeijerFactorOfSafety, Is.Not.NaN);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `test/Plugins/Wti/Wti.Calculation.Test/PipingCalculationInputTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `test/Plugins/Wti/Wti.Calculation.Test/PipingCalculationResultTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 9f140a1d7ebc5dfaabd213c626b596ad55f66e56 refers to a dead (removed) revision in file `test/Plugins/Wti/Wti.Calculation.Test/PipingCalculationTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: test/Plugins/Wti/Wti.Calculation.Test/Wti.Calculation.Test.csproj
===================================================================
diff -u -r3912a159ea7726b8b92966345440c2fff2b297e0 -r9f140a1d7ebc5dfaabd213c626b596ad55f66e56
--- test/Plugins/Wti/Wti.Calculation.Test/Wti.Calculation.Test.csproj (.../Wti.Calculation.Test.csproj) (revision 3912a159ea7726b8b92966345440c2fff2b297e0)
+++ test/Plugins/Wti/Wti.Calculation.Test/Wti.Calculation.Test.csproj (.../Wti.Calculation.Test.csproj) (revision 9f140a1d7ebc5dfaabd213c626b596ad55f66e56)
@@ -73,9 +73,9 @@
-
-
-
+
+
+