//-----------------------------------------------------------------------
//
// Copyright (c) 2010 Deltares. All rights reserved.
//
// B.S.T.I.M. The
// tom.the@deltares.nl
// 13-7-2010
// Calculates the piping factor according to Sellmeijer 2 forces.
//-----------------------------------------------------------------------
using Deltares.Geometry;
using Deltares.Geotechnics.TestUtils;
namespace Deltares.Dam.Tests
{
using Deltares.Dam.Data;
using NUnit.Framework;
[TestFixture]
public class PipingCalculatorSellmeijer2ForcesTest
{
[Test]
public void CanCalculateThePipingFactorUsingSellmeijer2ForcesNoUplift()
{
using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1())
using (var dike = new Dike())
using (var location = new Location())
{
var soilProfile = FactoryForSoilProfileTests.CreateClaySandClaySandProfile();
var calculator = new PipingCalculatorSellmeijer2Forces(new ModelParametersForPLLines(),
1.0, dike.GaugePLLines, dike.Gauges, 1.0);
var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, -1.0);
// Phreatic level in profile (at -1) (This test should never have worked as the waterlevel was at 1 so ABOVE profile as constrained by the surface)
// Mass of soil volume above
// dry 6 m x 12 kN/m3 = 72
// wet 9 m x 16 kN/m3 = 144
// Total: 72 + 144 = 216
// Phreatic pressure
// 20 m x 10 kN/m3 = 200
// UpliftFactor = 216/200 = 1.08
// UpliftFactor > 1.0, so no piping, so returns cDefaultMaxReturnValue
var expected = PipingCalculatorSellmeijer2Forces.cDefaultMaxReturnValue;
Assert.AreEqual(expected, actual);
}
}
///
/// These results are documented in the document
/// ".\documents\DAM\Evaluation Piping\Nieuwe rekenregel bligh Sellmeijeruli.xls"
///
[Test]
public void CanCalculateThePipingFactorUsingSellmeijer2Forces()
{
using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1())
using (var dike = new Dike())
using (var location = new Location())
{
var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer();
var modelParametersForPLLines = new ModelParametersForPLLines();
modelParametersForPLLines.DampingFactorPL4 = 0.0;
var calculator = new PipingCalculatorSellmeijer2Forces(modelParametersForPLLines,
1.0, dike.GaugePLLines, dike.Gauges, 1.0);
var actual = calculator.CalculatePipingFactor(location, surfaceLine, soilProfile, 1.0);
// Phreatic level in profile
// Mass of soil volume above
// material above bottom sandlayer: 0 to -5 m
// dry/wet 5 m x 1 kN/m3 = 5
// Phreatic pressure (Head PLLine 4 is ca. 1.0
// 6.0 m x 10 kN/m3 = 60,0
// UpliftFactor = 5/60.0 = 0.0833
// UpliftFactor < 1.0, so piping will occur in toe of dike
//
const double expected = 9.45302433507155; // Value is taken from the actual calculation itself and not manual calculated
Assert.AreEqual(expected, actual.Value, 0.00000001);
}
}
[Test]
public void CanCalculateHCritical()
{
const double cTolerance = 0.001;
const double cwhitesConstant = 0.25;
const double cbeddingAngle = 37.0;
// double whitesConstant, double beddingAngle, double d70, double length, double permeability, double dSandlayer
double hCritical = PipingCalculatorSellmeijer2Forces.CalculateHCritical(cwhitesConstant, cbeddingAngle, 180, 15.00, 7.00e-05, 3);
Assert.AreEqual(2.101, hCritical, cTolerance);
hCritical = PipingCalculatorSellmeijer2Forces.CalculateHCritical(cwhitesConstant, cbeddingAngle, 260, 15.00, 1.30e-04, 3);
Assert.AreEqual(1.973, hCritical, cTolerance);
hCritical = PipingCalculatorSellmeijer2Forces.CalculateHCritical(cwhitesConstant, cbeddingAngle, 180, 20.00, 7.00e-05, 3);
Assert.AreEqual(2.721, hCritical, cTolerance);
hCritical = PipingCalculatorSellmeijer2Forces.CalculateHCritical(cwhitesConstant, cbeddingAngle, 260, 20.00, 1.30e-04, 3);
Assert.AreEqual(2.556, hCritical, cTolerance);
hCritical = PipingCalculatorSellmeijer2Forces.CalculateHCritical(cwhitesConstant, cbeddingAngle, 180, 60.00, 7.00e-05, 3);
Assert.AreEqual(7.352, hCritical, cTolerance);
}
[Test]
public void CanCalculateDesignAtPointNoResult()
{
using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1())
using (var dike = new Dike())
using (var location = new Location())
{
var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer();
var modelParametersForPLLines = new ModelParametersForPLLines();
modelParametersForPLLines.DampingFactorPL4 = 0.0;
var calculator = new PipingCalculatorSellmeijer2Forces(modelParametersForPLLines,
1.0, dike.GaugePLLines, dike.Gauges, 1.0);
var point = new GeometryPoint(55.0, 0, 0);
var actual = calculator.CalculateDesignAtPoint(location, surfaceLine, soilProfile, 1.0, point);
// as safety is well larger then required, null must be returned
Assert.AreEqual(null, actual);
}
}
[Test]
public void CanCalculateDesignAtPointWithResult()
{
using (var surfaceLine = FactoryForSurfaceLineTests.CreateSurfaceLineTutorial1())
using (var dike = new Dike())
using (var location = new Location())
{
var soilProfile = FactoryForSoilProfileTests.CreatePipingSellmeijerProfileWithOneSandlayer();
soilProfile.Layers[0].Soil.AbovePhreaticLevel = 18;
var modelParametersForPLLines = new ModelParametersForPLLines();
modelParametersForPLLines.DampingFactorPL4 = 0.0;
var calculator = new PipingCalculatorSellmeijer2Forces(modelParametersForPLLines,
12.0, dike.GaugePLLines, dike.Gauges, 1.0);
var point = new GeometryPoint(55.0, 0, 0);
var actual = calculator.CalculateDesignAtPoint(location, surfaceLine, soilProfile, 1.0, point);
// as safety is well larger then required, null must be returned
Assert.AreEqual(4.5, actual.PipingLengthFromToe);
Assert.AreEqual(1.524, actual.ShoulderHeightFromToe, 0.001);
}
}
}
}