Index: Ringtoets/Piping/src/Ringtoets.Piping.InputParameterCalculation/InputParameterCalculationService.cs
===================================================================
diff -u -r9d781268ca54cba6a02715876d34a775396407b5 -r139f1c2f826579b27dbea3a98a21dfb6797a8eb0
--- Ringtoets/Piping/src/Ringtoets.Piping.InputParameterCalculation/InputParameterCalculationService.cs (.../InputParameterCalculationService.cs) (revision 9d781268ca54cba6a02715876d34a775396407b5)
+++ Ringtoets/Piping/src/Ringtoets.Piping.InputParameterCalculation/InputParameterCalculationService.cs (.../InputParameterCalculationService.cs) (revision 139f1c2f826579b27dbea3a98a21dfb6797a8eb0)
@@ -45,32 +45,14 @@
try
{
var calculatorInput = new PipingCalculatorInput(
- waterVolumetricWeight,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- phreaticLevelExit,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- exitPointL,
- surfaceLine,
- soilProfile
- );
+ new PipingCalculatorInput.ConstructionProperties
+ {
+ WaterVolumetricWeight = waterVolumetricWeight,
+ PhreaticLevelExit = phreaticLevelExit,
+ ExitPointXCoordinate = exitPointL,
+ SurfaceLine = surfaceLine,
+ SoilProfile = soilProfile
+ });
return new PipingCalculator(calculatorInput, PipingSubCalculatorFactory.Instance).CalculateEffectiveThicknessCoverageLayer();
}
catch (PipingCalculatorException)
@@ -89,32 +71,12 @@
public static double CalculatePiezometricHeadAtExit(RoundedDouble assessmentLevel, RoundedDouble dampingFactorExit, RoundedDouble phreaticLevelExit)
{
var calculatorInput = new PipingCalculatorInput(
- double.NaN,
- double.NaN,
- double.NaN,
- assessmentLevel,
- double.NaN,
- dampingFactorExit,
- phreaticLevelExit,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- double.NaN,
- null,
- null
- );
+ new PipingCalculatorInput.ConstructionProperties
+ {
+ AssessmentLevel = assessmentLevel,
+ DampingFactorExit = dampingFactorExit,
+ PhreaticLevelExit = phreaticLevelExit
+ });
return new PipingCalculator(calculatorInput, PipingSubCalculatorFactory.Instance).CalculatePiezometricHeadAtExit();
}
}
Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs
===================================================================
diff -u -r9d781268ca54cba6a02715876d34a775396407b5 -r139f1c2f826579b27dbea3a98a21dfb6797a8eb0
--- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs (.../PipingCalculatorInput.cs) (revision 9d781268ca54cba6a02715876d34a775396407b5)
+++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorInput.cs (.../PipingCalculatorInput.cs) (revision 139f1c2f826579b27dbea3a98a21dfb6797a8eb0)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Ringtoets.Piping.Primitives;
namespace Ringtoets.Piping.KernelWrapper
@@ -28,88 +29,44 @@
///
public class PipingCalculatorInput
{
- private readonly double waterVolumetricWeight;
- private readonly double upliftModelFactor;
- private readonly double assessmentLevel;
- private readonly double piezometricHeadExit;
- private readonly double dampingFactorExit;
- private readonly double phreaticLevelExit;
- private readonly double criticalHeaveGradient;
- private readonly double thicknessCoverageLayer;
- private readonly double effectiveThicknessCoverageLayer;
- private readonly double sellmeijerModelFactor;
- private readonly double sellmeijerReductionFactor;
- 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;
- private readonly RingtoetsPipingSurfaceLine surfaceLine;
- private readonly PipingSoilProfile soilProfile;
- private readonly double saturatedVolumicWeightOfCoverageLayer;
-
///
/// Constructs a new , which contains values for the parameters used
/// in the piping sub calculations.
///
- /// The volumetric weight of water. [kN/m³]
- /// The volumic weight of the coverage layer when saturated.
- /// The calculation value used to account for uncertainty in the model for uplift.
- /// The outside high water level. [m]
- /// The piezometric head at the exit point. [m]
- /// The damping factor at the exit point.
- /// The phreatic level at the exit point. [m]
- /// The critical exit gradient for heave.
- /// The total thickness of the coverage layer at the exit point. [m]
- /// The effective thickness of the coverage layer at the exit point. [m]
- /// The calculation value used to account for uncertainty in the model for Sellmeijer.
- /// The reduction factor Sellmeijer.
- /// The horizontal distance between entry and exit point. [m]
- /// The (lowerbound) volumic weight of sand grain material of a sand layer under water. [kN/m³]
- /// The White's drag coefficient.
- /// The sieve size through which 70% of the grains of the top part of the aquifer pass. [m]
- /// The Darcy-speed with which water flows through the aquifer layer. [m/s]
- /// The kinematic viscosity of water at 10 °C. [m²/s]
- /// The gravitational acceleration. [m/s²]
- /// The thickness of the aquifer layer. [m]
- /// The mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit. [m]
- /// The angle of the force balance representing the amount in which sand grains resist rolling. [°]
- /// The X-coordinate of the exit point. [m]
- /// The surface line.
- /// The profile which contains a 1 dimensional definition of soil layers with properties.
- public PipingCalculatorInput(double waterVolumetricWeight, double saturatedVolumicWeightOfCoverageLayer, double upliftModelFactor, double assessmentLevel, double piezometricHeadExit, double dampingFactorExit, double phreaticLevelExit, double criticalHeaveGradient, double thicknessCoverageLayer, double effectiveThicknessCoverageLayer, double sellmeijerModelFactor, double sellmeijerReductionFactor, double seepageLength, double sandParticlesVolumicWeight, double whitesDragCoefficient, double diameter70, double darcyPermeability, double waterKinematicViscosity, double gravity, double thicknessAquiferLayer, double meanDiameter70, double beddingAngle, double exitPointXCoordinate, RingtoetsPipingSurfaceLine surfaceLine, PipingSoilProfile soilProfile)
+ /// The object containing the values for the properties
+ /// of the new .
+ /// Thrown when is null.
+ public PipingCalculatorInput(ConstructionProperties properties)
{
- this.waterVolumetricWeight = waterVolumetricWeight;
- this.saturatedVolumicWeightOfCoverageLayer = saturatedVolumicWeightOfCoverageLayer;
- this.upliftModelFactor = upliftModelFactor;
- this.assessmentLevel = assessmentLevel;
- this.piezometricHeadExit = piezometricHeadExit;
- this.dampingFactorExit = dampingFactorExit;
- this.phreaticLevelExit = phreaticLevelExit;
- this.criticalHeaveGradient = criticalHeaveGradient;
- this.thicknessCoverageLayer = thicknessCoverageLayer;
- this.effectiveThicknessCoverageLayer = effectiveThicknessCoverageLayer;
- this.sellmeijerModelFactor = sellmeijerModelFactor;
- this.sellmeijerReductionFactor = sellmeijerReductionFactor;
- 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;
- this.surfaceLine = surfaceLine;
- this.soilProfile = soilProfile;
+ if (properties == null)
+ {
+ throw new ArgumentNullException("properties");
+ }
+ WaterVolumetricWeight = properties.WaterVolumetricWeight;
+ SaturatedVolumicWeightOfCoverageLayer = properties.SaturatedVolumicWeightOfCoverageLayer;
+ UpliftModelFactor = properties.UpliftModelFactor;
+ AssessmentLevel = properties.AssessmentLevel;
+ PiezometricHeadExit = properties.PiezometricHeadExit;
+ DampingFactorExit = properties.DampingFactorExit;
+ PhreaticLevelExit = properties.PhreaticLevelExit;
+ CriticalHeaveGradient = properties.CriticalHeaveGradient;
+ ThicknessCoverageLayer = properties.ThicknessCoverageLayer;
+ EffectiveThicknessCoverageLayer = properties.EffectiveThicknessCoverageLayer;
+ SellmeijerModelFactor = properties.SellmeijerModelFactor;
+ SellmeijerReductionFactor = properties.SellmeijerReductionFactor;
+ SeepageLength = properties.SeepageLength;
+ SandParticlesVolumicWeight = properties.SandParticlesVolumicWeight;
+ WhitesDragCoefficient = properties.WhitesDragCoefficient;
+ Diameter70 = properties.Diameter70;
+ DarcyPermeability = properties.DarcyPermeability;
+ WaterKinematicViscosity = properties.WaterKinematicViscosity;
+ Gravity = properties.Gravity;
+ ThicknessAquiferLayer = properties.ThicknessAquiferLayer;
+ MeanDiameter70 = properties.MeanDiameter70;
+ BeddingAngle = properties.BeddingAngle;
+ ExitPointXCoordinate = properties.ExitPointXCoordinate;
+ SurfaceLine = properties.SurfaceLine;
+ SoilProfile = properties.SoilProfile;
}
#region properties
@@ -118,293 +75,322 @@
/// Gets the volumetric weight of water.
/// [kN/m³]
///
- public double WaterVolumetricWeight
- {
- get
- {
- return waterVolumetricWeight;
- }
- }
+ public double WaterVolumetricWeight { get; private set; }
///
/// Gets the calculation value used to account for uncertainty in the model for uplift.
///
- public double UpliftModelFactor
- {
- get
- {
- return upliftModelFactor;
- }
- }
+ public double UpliftModelFactor { get; private set; }
///
/// Gets the outside high water level.
/// [m]
///
- public double AssessmentLevel
- {
- get
- {
- return assessmentLevel;
- }
- }
+ public double AssessmentLevel { get; private set; }
///
/// Gets the piezometric head at the exit point.
/// [m]
///
- public double PiezometricHeadExit
- {
- get
- {
- return piezometricHeadExit;
- }
- }
+ public double PiezometricHeadExit { get; private set; }
///
/// Gets the damping factor at the exit point.
///
- public double DampingFactorExit
- {
- get
- {
- return dampingFactorExit;
- }
- }
+ public double DampingFactorExit { get; private set; }
///
/// Gets the phreatic level at the exit point.
/// [m]
///
- public double PhreaticLevelExit
- {
- get
- {
- return phreaticLevelExit;
- }
- }
+ public double PhreaticLevelExit { get; private set; }
///
/// Gets the critical exit gradient for heave.
///
- public double CriticalHeaveGradient
- {
- get
- {
- return criticalHeaveGradient;
- }
- }
+ public double CriticalHeaveGradient { get; private set; }
///
/// Gets the total thickness of the coverage layer at the exit point.
/// [m]
///
- public double ThicknessCoverageLayer
- {
- get
- {
- return thicknessCoverageLayer;
- }
- }
+ public double ThicknessCoverageLayer { get; private set; }
///
/// Gets the effective thickness of the coverage layer at the exit point.
/// [m]
///
- public double EffectiveThicknessCoverageLayer
- {
- get
- {
- return effectiveThicknessCoverageLayer;
- }
- }
+ public double EffectiveThicknessCoverageLayer { get; private set; }
///
/// Gets the calculation value used to account for uncertainty in the model for Sellmeijer.
///
- public double SellmeijerModelFactor
- {
- get
- {
- return sellmeijerModelFactor;
- }
- }
+ public double SellmeijerModelFactor { get; private set; }
///
/// Gets the reduction factor Sellmeijer.
///
- public double SellmeijerReductionFactor
- {
- get
- {
- return sellmeijerReductionFactor;
- }
- }
+ public double SellmeijerReductionFactor { get; private set; }
///
/// Gets the horizontal distance between entry and exit point.
/// [m]
///
- public double SeepageLength
- {
- get
- {
- return seepageLength;
- }
- }
+ public double SeepageLength { get; private set; }
///
/// Gets the (lowerbound) volumic weight of sand grain material of a sand layer under water.
/// [kN/m³]
///
- public double SandParticlesVolumicWeight
- {
- get
- {
- return sandParticlesVolumicWeight;
- }
- }
+ public double SandParticlesVolumicWeight { get; private set; }
///
/// Gets the White's drag coefficient.
///
- public double WhitesDragCoefficient
- {
- get
- {
- return whitesDragCoefficient;
- }
- }
+ public double WhitesDragCoefficient { get; private set; }
///
/// Gets the sieve size through which 70% of the grains of the top part of the aquifer pass.
/// [m]
///
- public double Diameter70
- {
- get
- {
- return diameter70;
- }
- }
+ public double Diameter70 { get; private set; }
///
/// Gets the Darcy-speed with which water flows through the aquifer layer.
/// [m/s]
///
- public double DarcyPermeability
- {
- get
- {
- return darcyPermeability;
- }
- }
+ public double DarcyPermeability { get; private set; }
///
/// Gets the kinematic viscosity of water at 10 °C.
/// [m²/s]
///
- public double WaterKinematicViscosity
- {
- get
- {
- return waterKinematicViscosity;
- }
- }
+ public double WaterKinematicViscosity { get; private set; }
///
/// Gets the gravitational acceleration.
/// [m/s²]
///
- public double Gravity
- {
- get
- {
- return gravity;
- }
- }
+ public double Gravity { get; private set; }
///
/// Gets the thickness of the aquifer layer.
/// [m]
///
- public double ThicknessAquiferLayer
- {
- get
- {
- return thicknessAquiferLayer;
- }
- }
+ public double ThicknessAquiferLayer { get; private set; }
///
/// Gets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit.
/// [m]
///
- public double MeanDiameter70
- {
- get
- {
- return meanDiameter70;
- }
- }
+ public double MeanDiameter70 { get; private set; }
///
/// Gets the angle of the force balance representing the amount in which sand grains resist rolling.
/// [°]
///
- public double BeddingAngle
- {
- get
- {
- return beddingAngle;
- }
- }
+ public double BeddingAngle { get; private set; }
///
/// Gets the X-coordinate of the exit point.
/// [m]
///
- public double ExitPointXCoordinate
- {
- get
- {
- return exitPointXCoordinate;
- }
- }
+ public double ExitPointXCoordinate { get; private set; }
///
/// Gets the surface line.
///
- public RingtoetsPipingSurfaceLine SurfaceLine
- {
- get
- {
- return surfaceLine;
- }
- }
+ public RingtoetsPipingSurfaceLine SurfaceLine { get; private set; }
///
/// Gets the profile which contains a 1 dimensional definition of soil layers with properties.
///
- public PipingSoilProfile SoilProfile
- {
- get
- {
- return soilProfile;
- }
- }
+ public PipingSoilProfile SoilProfile { get; private set; }
///
/// Gets the volumic weight of the coverage layer when saturated.
///
- public double SaturatedVolumicWeightOfCoverageLayer
+ public double SaturatedVolumicWeightOfCoverageLayer { get; private set; }
+
+ #endregion
+ public class ConstructionProperties
{
- get
+ #region properties
+
+ ///
+ /// Gets the volumetric weight of water.
+ /// [kN/m³]
+ ///
+ public double WaterVolumetricWeight { get; set; }
+
+ ///
+ /// Gets the calculation value used to account for uncertainty in the model for uplift.
+ ///
+ public double UpliftModelFactor { get; set; }
+
+ ///
+ /// Gets the outside high water level.
+ /// [m]
+ ///
+ public double AssessmentLevel { get; set; }
+
+ ///
+ /// Gets the piezometric head at the exit point.
+ /// [m]
+ ///
+ public double PiezometricHeadExit { get; set; }
+
+ ///
+ /// Gets the damping factor at the exit point.
+ ///
+ public double DampingFactorExit { get; set; }
+
+ ///
+ /// Gets the phreatic level at the exit point.
+ /// [m]
+ ///
+ public double PhreaticLevelExit { get; set; }
+
+ ///
+ /// Gets the critical exit gradient for heave.
+ ///
+ public double CriticalHeaveGradient { get; set; }
+
+ ///
+ /// Gets the total thickness of the coverage layer at the exit point.
+ /// [m]
+ ///
+ public double ThicknessCoverageLayer { get; set; }
+
+ ///
+ /// Gets the effective thickness of the coverage layer at the exit point.
+ /// [m]
+ ///
+ public double EffectiveThicknessCoverageLayer { get; set; }
+
+ ///
+ /// Gets the calculation value used to account for uncertainty in the model for Sellmeijer.
+ ///
+ public double SellmeijerModelFactor { get; set; }
+
+ ///
+ /// Gets the reduction factor Sellmeijer.
+ ///
+ public double SellmeijerReductionFactor { get; set; }
+
+ ///
+ /// Gets the horizontal distance between entry and exit point.
+ /// [m]
+ ///
+ public double SeepageLength { get; set; }
+
+ ///
+ /// Gets the (lowerbound) volumic weight of sand grain material of a sand layer under water.
+ /// [kN/m³]
+ ///
+ public double SandParticlesVolumicWeight { get; set; }
+
+ ///
+ /// Gets the White's drag coefficient.
+ ///
+ public double WhitesDragCoefficient { get; set; }
+
+ ///
+ /// Gets the sieve size through which 70% of the grains of the top part of the aquifer pass.
+ /// [m]
+ ///
+ public double Diameter70 { get; set; }
+
+ ///
+ /// Gets the Darcy-speed with which water flows through the aquifer layer.
+ /// [m/s]
+ ///
+ public double DarcyPermeability { get; set; }
+
+ ///
+ /// Gets the kinematic viscosity of water at 10 °C.
+ /// [m²/s]
+ ///
+ public double WaterKinematicViscosity { get; set; }
+
+ ///
+ /// Gets the gravitational acceleration.
+ /// [m/s²]
+ ///
+ public double Gravity { get; set; }
+
+ ///
+ /// Gets the thickness of the aquifer layer.
+ /// [m]
+ ///
+ public double ThicknessAquiferLayer { get; set; }
+
+ ///
+ /// Gets the mean diameter of small scale tests applied to different kinds of sand, on which the formula of Sellmeijer has been fit.
+ /// [m]
+ ///
+ public double MeanDiameter70 { get; set; }
+
+ ///
+ /// Gets the angle of the force balance representing the amount in which sand grains resist rolling.
+ /// [°]
+ ///
+ public double BeddingAngle { get; set; }
+
+ ///
+ /// Gets the X-coordinate of the exit point.
+ /// [m]
+ ///
+ public double ExitPointXCoordinate { get; set; }
+
+ ///
+ /// Gets the surface line.
+ ///
+ public RingtoetsPipingSurfaceLine SurfaceLine { get; set; }
+
+ ///
+ /// Gets the profile which contains a 1 dimensional definition of soil layers with properties.
+ ///
+ public PipingSoilProfile SoilProfile { get; set; }
+
+ ///
+ /// Gets the volumic weight of the coverage layer when saturated.
+ ///
+ public double SaturatedVolumicWeightOfCoverageLayer { get; set; }
+
+ #endregion
+
+ ///
+ /// Creates new instance of .
+ ///
+ public ConstructionProperties()
{
- return saturatedVolumicWeightOfCoverageLayer;
+ WaterVolumetricWeight = double.NaN;
+ SaturatedVolumicWeightOfCoverageLayer = double.NaN;
+ UpliftModelFactor = double.NaN;
+ AssessmentLevel = double.NaN;
+ PiezometricHeadExit = double.NaN;
+ DampingFactorExit = double.NaN;
+ PhreaticLevelExit = double.NaN;
+ CriticalHeaveGradient = double.NaN;
+ ThicknessCoverageLayer = double.NaN;
+ EffectiveThicknessCoverageLayer = double.NaN;
+ SellmeijerModelFactor = double.NaN;
+ SellmeijerReductionFactor = double.NaN;
+ SeepageLength = double.NaN;
+ SandParticlesVolumicWeight = double.NaN;
+ WhitesDragCoefficient = double.NaN;
+ Diameter70 = double.NaN;
+ DarcyPermeability = double.NaN;
+ WaterKinematicViscosity = double.NaN;
+ Gravity = double.NaN;
+ ThicknessAquiferLayer = double.NaN;
+ MeanDiameter70 = double.NaN;
+ BeddingAngle = double.NaN;
+ ExitPointXCoordinate = double.NaN;
+ SurfaceLine = null;
+ SoilProfile = null;
}
}
-
- #endregion
}
}
\ No newline at end of file
Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs
===================================================================
diff -u -r18259e66145f5da6ade4866bee22627fc92b3d71 -r139f1c2f826579b27dbea3a98a21dfb6797a8eb0
--- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 18259e66145f5da6ade4866bee22627fc92b3d71)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingCalculationService.cs (.../PipingCalculationService.cs) (revision 139f1c2f826579b27dbea3a98a21dfb6797a8eb0)
@@ -340,31 +340,34 @@
private static PipingCalculatorInput CreateInputFromData(PipingInput inputParameters)
{
return new PipingCalculatorInput(
- inputParameters.WaterVolumetricWeight,
- PipingSemiProbabilisticDesignValueFactory.GetSaturatedVolumicWeightOfCoverageLayer(inputParameters).GetDesignValue(),
- inputParameters.UpliftModelFactor,
- inputParameters.AssessmentLevel,
- inputParameters.PiezometricHeadExit,
- PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(inputParameters).GetDesignValue(),
- PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters).GetDesignValue(),
- inputParameters.CriticalHeaveGradient,
- PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters).GetDesignValue(),
- PipingSemiProbabilisticDesignValueFactory.GetEffectiveThicknessCoverageLayer(inputParameters).GetDesignValue(),
- inputParameters.SellmeijerModelFactor,
- inputParameters.SellmeijerReductionFactor,
- PipingSemiProbabilisticDesignValueFactory.GetSeepageLength(inputParameters).GetDesignValue(),
- inputParameters.SandParticlesVolumicWeight,
- inputParameters.WhitesDragCoefficient,
- PipingSemiProbabilisticDesignValueFactory.GetDiameter70(inputParameters).GetDesignValue(),
- PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters).GetDesignValue(),
- inputParameters.WaterKinematicViscosity,
- inputParameters.Gravity,
- PipingSemiProbabilisticDesignValueFactory.GetThicknessAquiferLayer(inputParameters).GetDesignValue(),
- inputParameters.MeanDiameter70,
- inputParameters.BeddingAngle,
- inputParameters.ExitPointL,
- inputParameters.SurfaceLine,
- inputParameters.StochasticSoilProfile.SoilProfile);
+ new PipingCalculatorInput.ConstructionProperties
+ {
+ WaterVolumetricWeight = inputParameters.WaterVolumetricWeight,
+ SaturatedVolumicWeightOfCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetSaturatedVolumicWeightOfCoverageLayer(inputParameters).GetDesignValue(),
+ UpliftModelFactor = inputParameters.UpliftModelFactor,
+ AssessmentLevel = inputParameters.AssessmentLevel,
+ PiezometricHeadExit = inputParameters.PiezometricHeadExit,
+ DampingFactorExit = PipingSemiProbabilisticDesignValueFactory.GetDampingFactorExit(inputParameters).GetDesignValue(),
+ PhreaticLevelExit = PipingSemiProbabilisticDesignValueFactory.GetPhreaticLevelExit(inputParameters).GetDesignValue(),
+ CriticalHeaveGradient = inputParameters.CriticalHeaveGradient,
+ ThicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessCoverageLayer(inputParameters).GetDesignValue(),
+ EffectiveThicknessCoverageLayer = PipingSemiProbabilisticDesignValueFactory.GetEffectiveThicknessCoverageLayer(inputParameters).GetDesignValue(),
+ SellmeijerModelFactor = inputParameters.SellmeijerModelFactor,
+ SellmeijerReductionFactor = inputParameters.SellmeijerReductionFactor,
+ SeepageLength = PipingSemiProbabilisticDesignValueFactory.GetSeepageLength(inputParameters).GetDesignValue(),
+ SandParticlesVolumicWeight = inputParameters.SandParticlesVolumicWeight,
+ WhitesDragCoefficient = inputParameters.WhitesDragCoefficient,
+ Diameter70 = PipingSemiProbabilisticDesignValueFactory.GetDiameter70(inputParameters).GetDesignValue(),
+ DarcyPermeability = PipingSemiProbabilisticDesignValueFactory.GetDarcyPermeability(inputParameters).GetDesignValue(),
+ WaterKinematicViscosity = inputParameters.WaterKinematicViscosity,
+ Gravity = inputParameters.Gravity,
+ ThicknessAquiferLayer = PipingSemiProbabilisticDesignValueFactory.GetThicknessAquiferLayer(inputParameters).GetDesignValue(),
+ MeanDiameter70 = inputParameters.MeanDiameter70,
+ BeddingAngle = inputParameters.BeddingAngle,
+ ExitPointXCoordinate = inputParameters.ExitPointL,
+ SurfaceLine = inputParameters.SurfaceLine,
+ SoilProfile = inputParameters.StochasticSoilProfile.SoilProfile
+ });
}
}
}
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs
===================================================================
diff -u -r9d781268ca54cba6a02715876d34a775396407b5 -r139f1c2f826579b27dbea3a98a21dfb6797a8eb0
--- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs (.../PipingCalculatorInputTest.cs) (revision 9d781268ca54cba6a02715876d34a775396407b5)
+++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.Test/PipingCalculatorInputTest.cs (.../PipingCalculatorInputTest.cs) (revision 139f1c2f826579b27dbea3a98a21dfb6797a8eb0)
@@ -29,8 +29,20 @@
public class PipingCalculatorInputTest
{
[Test]
- public void GivenSomeRandomValues_WhenPipingCalculationInputConstructedFromInput_ThenPropertiesAreSet()
+ public void Constructor_WithoutConstructionProperies_ThrowsArgumentNullException()
{
+ // Call
+ TestDelegate test = () => new PipingCalculatorInput(null);
+
+ // Assert
+ var paramName = Assert.Throws(test).ParamName;
+ Assert.AreEqual("properties", paramName);
+ }
+
+ [Test]
+ public void Constructor_WithConstructionProperties_PropertiesAreSet()
+ {
+ // Setup
var random = new Random(22);
double volumetricWeightOfWaterValue = random.NextDouble();
@@ -65,33 +77,38 @@
}
}, SoilProfileType.SoilProfile1D, 0);
+ // Call
var input = new PipingCalculatorInput(
- volumetricWeightOfWaterValue,
- saturatedVolumicWeightOfCoverageLayer,
- modelFactorUpliftValue,
- hRiverValue,
- phiExit,
- rExitValue,
- hExitValue,
- ichValue,
- dTotalValue,
- effectiveThicknessCoverageLayerValue,
- sellmeijerModelFactorValue,
- reductionFactorValue,
- seepageLengthValue,
- sandParticlesVolumicWeightValue,
- whitesDragCoefficientValue,
- diameter70Value,
- darcyPermeabilityValue,
- waterKinematicViscosityValue,
- gravityValue,
- thicknessAquiferLayerValue,
- meanDiameter70Value,
- beddingAngleValue,
- exitPointXCoordinate,
- surfaceLine,
- soilProfile);
+ new PipingCalculatorInput.ConstructionProperties
+ {
+ WaterVolumetricWeight = volumetricWeightOfWaterValue,
+ SaturatedVolumicWeightOfCoverageLayer = saturatedVolumicWeightOfCoverageLayer,
+ UpliftModelFactor = modelFactorUpliftValue,
+ AssessmentLevel = hRiverValue,
+ PiezometricHeadExit = phiExit,
+ DampingFactorExit = rExitValue,
+ PhreaticLevelExit = hExitValue,
+ CriticalHeaveGradient = ichValue,
+ ThicknessCoverageLayer = dTotalValue,
+ EffectiveThicknessCoverageLayer = effectiveThicknessCoverageLayerValue,
+ SellmeijerModelFactor = sellmeijerModelFactorValue,
+ SellmeijerReductionFactor = reductionFactorValue,
+ SeepageLength = seepageLengthValue,
+ SandParticlesVolumicWeight = sandParticlesVolumicWeightValue,
+ WhitesDragCoefficient = whitesDragCoefficientValue,
+ Diameter70 = diameter70Value,
+ DarcyPermeability = darcyPermeabilityValue,
+ WaterKinematicViscosity = waterKinematicViscosityValue,
+ Gravity = gravityValue,
+ ThicknessAquiferLayer = thicknessAquiferLayerValue,
+ MeanDiameter70 = meanDiameter70Value,
+ BeddingAngle = beddingAngleValue,
+ ExitPointXCoordinate = exitPointXCoordinate,
+ SurfaceLine = surfaceLine,
+ SoilProfile = soilProfile
+ });
+ // Assert
Assert.AreEqual(volumetricWeightOfWaterValue, input.WaterVolumetricWeight);
Assert.AreEqual(saturatedVolumicWeightOfCoverageLayer, input.SaturatedVolumicWeightOfCoverageLayer);
Assert.AreEqual(modelFactorUpliftValue, input.UpliftModelFactor);
Index: Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs
===================================================================
diff -u -r9d781268ca54cba6a02715876d34a775396407b5 -r139f1c2f826579b27dbea3a98a21dfb6797a8eb0
--- Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs (.../TestPipingInput.cs) (revision 9d781268ca54cba6a02715876d34a775396407b5)
+++ Ringtoets/Piping/test/Ringtoets.Piping.KernelWrapper.TestUtil/TestPipingInput.cs (.../TestPipingInput.cs) (revision 139f1c2f826579b27dbea3a98a21dfb6797a8eb0)
@@ -32,32 +32,287 @@
///
public class TestPipingInput
{
+ private readonly PipingCalculatorInput.ConstructionProperties constructionProperties = new PipingCalculatorInput.ConstructionProperties();
+
private readonly Random random = new Random(22);
- public double WaterVolumetricWeight;
- public double SaturatedVolumicWeightOfCoverageLayer;
- public double UpliftModelFactor;
- public RoundedDouble AssessmentLevel;
- public RoundedDouble PiezometricHeadExit;
- public double DampingFactorExit;
- public double PhreaticLevelExit;
- public double CriticalHeaveGradient;
- public double ThicknessCoverageLayer;
- public double EffectiveThicknessCoverageLayer;
- public double SellmeijerModelFactor;
- public double SellmeijerReductionFactor;
- public double SeepageLength;
- public double SandParticlesVolumicWeight;
- public double WhitesDragCoefficient;
- public double Diameter70;
- public double DarcyPermeability;
- public double WaterKinematicViscosity;
- public double Gravity;
- public RoundedDouble ExitPointXCoordinate;
- public double BeddingAngle;
- public double MeanDiameter70;
- public double ThicknessAquiferLayer;
- public RingtoetsPipingSurfaceLine SurfaceLine;
- public PipingSoilProfile SoilProfile;
+
+ public double WaterVolumetricWeight
+ {
+ get
+ {
+ return constructionProperties.WaterVolumetricWeight;
+ }
+ set
+ {
+ constructionProperties.WaterVolumetricWeight = value;
+ }
+ }
+
+ public double SaturatedVolumicWeightOfCoverageLayer
+ {
+ get
+ {
+ return constructionProperties.SaturatedVolumicWeightOfCoverageLayer;
+ }
+ set
+ {
+ constructionProperties.SaturatedVolumicWeightOfCoverageLayer = value;
+ }
+ }
+ public double UpliftModelFactor
+ {
+ get
+ {
+ return constructionProperties.UpliftModelFactor;
+ }
+ set
+ {
+ constructionProperties.UpliftModelFactor = value;
+ }
+ }
+ public double AssessmentLevel
+ {
+ get
+ {
+ return constructionProperties.AssessmentLevel;
+ }
+ set
+ {
+ constructionProperties.AssessmentLevel = value;
+ }
+ }
+ public double PiezometricHeadExit
+ {
+ get
+ {
+ return constructionProperties.PiezometricHeadExit;
+ }
+ set
+ {
+ constructionProperties.PiezometricHeadExit = value;
+ }
+ }
+ public double DampingFactorExit
+ {
+ get
+ {
+ return constructionProperties.DampingFactorExit;
+ }
+ set
+ {
+ constructionProperties.DampingFactorExit = value;
+ }
+ }
+ public double PhreaticLevelExit
+ {
+ get
+ {
+ return constructionProperties.PhreaticLevelExit;
+ }
+ set
+ {
+ constructionProperties.PhreaticLevelExit = value;
+ }
+ }
+ public double CriticalHeaveGradient
+ {
+ get
+ {
+ return constructionProperties.CriticalHeaveGradient;
+ }
+ set
+ {
+ constructionProperties.CriticalHeaveGradient = value;
+ }
+ }
+ public double ThicknessCoverageLayer
+ {
+ get
+ {
+ return constructionProperties.ThicknessCoverageLayer;
+ }
+ set
+ {
+ constructionProperties.ThicknessCoverageLayer = value;
+ }
+ }
+ public double EffectiveThicknessCoverageLayer
+ {
+ get
+ {
+ return constructionProperties.EffectiveThicknessCoverageLayer;
+ }
+ set
+ {
+ constructionProperties.EffectiveThicknessCoverageLayer = value;
+ }
+ }
+ public double SellmeijerModelFactor
+ {
+ get
+ {
+ return constructionProperties.SellmeijerModelFactor;
+ }
+ set
+ {
+ constructionProperties.SellmeijerModelFactor = value;
+ }
+ }
+ public double SellmeijerReductionFactor
+ {
+ get
+ {
+ return constructionProperties.SellmeijerReductionFactor;
+ }
+ set
+ {
+ constructionProperties.SellmeijerReductionFactor = value;
+ }
+ }
+ public double SeepageLength
+ {
+ get
+ {
+ return constructionProperties.SeepageLength;
+ }
+ set
+ {
+ constructionProperties.SeepageLength = value;
+ }
+ }
+ public double SandParticlesVolumicWeight
+ {
+ get
+ {
+ return constructionProperties.SandParticlesVolumicWeight;
+ }
+ set
+ {
+ constructionProperties.SandParticlesVolumicWeight = value;
+ }
+ }
+ public double WhitesDragCoefficient
+ {
+ get
+ {
+ return constructionProperties.WhitesDragCoefficient;
+ }
+ set
+ {
+ constructionProperties.WhitesDragCoefficient = value;
+ }
+ }
+ public double Diameter70
+ {
+ get
+ {
+ return constructionProperties.Diameter70;
+ }
+ set
+ {
+ constructionProperties.Diameter70 = value;
+ }
+ }
+ public double DarcyPermeability
+ {
+ get
+ {
+ return constructionProperties.DarcyPermeability;
+ }
+ set
+ {
+ constructionProperties.DarcyPermeability = value;
+ }
+ }
+ public double WaterKinematicViscosity
+ {
+ get
+ {
+ return constructionProperties.WaterKinematicViscosity;
+ }
+ set
+ {
+ constructionProperties.WaterKinematicViscosity = value;
+ }
+ }
+ public double Gravity
+ {
+ get
+ {
+ return constructionProperties.Gravity;
+ }
+ set
+ {
+ constructionProperties.Gravity = value;
+ }
+ }
+ public double ExitPointXCoordinate
+ {
+ get
+ {
+ return constructionProperties.ExitPointXCoordinate;
+ }
+ set
+ {
+ constructionProperties.ExitPointXCoordinate = value;
+ }
+ }
+ public double BeddingAngle
+ {
+ get
+ {
+ return constructionProperties.BeddingAngle;
+ }
+ set
+ {
+ constructionProperties.BeddingAngle = value;
+ }
+ }
+ public double MeanDiameter70
+ {
+ get
+ {
+ return constructionProperties.MeanDiameter70;
+ }
+ set
+ {
+ constructionProperties.MeanDiameter70 = value;
+ }
+ }
+ public double ThicknessAquiferLayer
+ {
+ get
+ {
+ return constructionProperties.ThicknessAquiferLayer;
+ }
+ set
+ {
+ constructionProperties.ThicknessAquiferLayer = value;
+ }
+ }
+ public RingtoetsPipingSurfaceLine SurfaceLine
+ {
+ get
+ {
+ return constructionProperties.SurfaceLine;
+ }
+ set
+ {
+ constructionProperties.SurfaceLine = value;
+ }
+ }
+ public PipingSoilProfile SoilProfile
+ {
+ get
+ {
+ return constructionProperties.SoilProfile;
+ }
+ set
+ {
+ constructionProperties.SoilProfile = value;
+ }
+ }
+
private double last;
///
@@ -69,8 +324,8 @@
WaterVolumetricWeight = NextIncrementalDouble();
SaturatedVolumicWeightOfCoverageLayer = NextIncrementalDouble();
UpliftModelFactor = NextIncrementalDouble();
- AssessmentLevel = (RoundedDouble) NextIncrementalDouble();
- PiezometricHeadExit = (RoundedDouble) NextIncrementalDouble();
+ AssessmentLevel = NextIncrementalDouble();
+ PiezometricHeadExit = NextIncrementalDouble();
PhreaticLevelExit = NextIncrementalDouble();
DampingFactorExit = NextIncrementalDouble();
CriticalHeaveGradient = NextIncrementalDouble();
@@ -85,7 +340,7 @@
DarcyPermeability = NextIncrementalDouble();
WaterKinematicViscosity = NextIncrementalDouble();
Gravity = NextIncrementalDouble();
- ExitPointXCoordinate = (RoundedDouble) 0.5;
+ ExitPointXCoordinate = 0.5;
BeddingAngle = NextIncrementalDouble();
MeanDiameter70 = NextIncrementalDouble();
ThicknessAquiferLayer = NextIncrementalDouble();
@@ -98,32 +353,7 @@
///
public PipingCalculatorInput AsRealInput()
{
- return new PipingCalculatorInput(
- WaterVolumetricWeight,
- SaturatedVolumicWeightOfCoverageLayer,
- UpliftModelFactor,
- AssessmentLevel,
- PiezometricHeadExit,
- DampingFactorExit,
- PhreaticLevelExit,
- CriticalHeaveGradient,
- ThicknessCoverageLayer,
- EffectiveThicknessCoverageLayer,
- SellmeijerModelFactor,
- SellmeijerReductionFactor,
- SeepageLength,
- SandParticlesVolumicWeight,
- WhitesDragCoefficient,
- Diameter70,
- DarcyPermeability,
- WaterKinematicViscosity,
- Gravity,
- ThicknessAquiferLayer,
- MeanDiameter70,
- BeddingAngle,
- ExitPointXCoordinate,
- SurfaceLine,
- SoilProfile);
+ return new PipingCalculatorInput(constructionProperties);
}
private PipingSoilProfile CreateValidSoilProfile()