Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs
===================================================================
diff -u -r4052 -r4229
--- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs (.../WtiPipingSellmeijerRevisedKernelWrapper.cs) (revision 4052)
+++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/WtiPipingSellmeijerRevised/WtiPipingSellmeijerRevisedKernelWrapper.cs (.../WtiPipingSellmeijerRevisedKernelWrapper.cs) (revision 4229)
@@ -84,8 +84,10 @@
PlLines plLines =
PlLinesHelper.CreatePlLinesForPiping(damKernelInput.TimeStepDateTime, location, soilProfile1D, waterLevel);
- EvaluateUpliftSituation(damKernelInput, out kernelDataInput, plLines, waterLevel, damPipingOutput);
- return PrepareResult.Successful;
+ if (EvaluateUpliftSituation(damKernelInput, out kernelDataInput, plLines, waterLevel, damPipingOutput))
+ {
+ return PrepareResult.Successful;
+ }
}
}
@@ -411,7 +413,7 @@
///
/// Type of the characteristic point.
/// the PipingCharacteristicPointType
- internal static PipingCharacteristicPointType ConvertToPipingPointType(CharacteristicPointType characteristicPointType)
+ internal PipingCharacteristicPointType ConvertToPipingPointType(CharacteristicPointType characteristicPointType)
{
switch (characteristicPointType)
{
@@ -430,7 +432,7 @@
///
/// The surface line.
/// the PipingSurfaceLine
- internal static PipingSurfaceLine ConvertToPipingSurfaceLine(SurfaceLine2 surfaceLine)
+ internal PipingSurfaceLine ConvertToPipingSurfaceLine(SurfaceLine2 surfaceLine)
{
var pipingSurfaceLine = new PipingSurfaceLine();
foreach (CharacteristicPoint surfaceLineCharacteristicPoint in surfaceLine.CharacteristicPoints)
@@ -453,7 +455,7 @@
///
/// The soil profile1 d.
/// the PipingProfile
- internal static PipingProfile ConvertToPipingProfile(SoilProfile1D soilProfile1D)
+ internal PipingProfile ConvertToPipingProfile(SoilProfile1D soilProfile1D)
{
var pipingProfile = new PipingProfile();
foreach (SoilLayer1D soilLayer1D in soilProfile1D.Layers)
@@ -474,21 +476,21 @@
return pipingProfile;
}
- internal static void AssignFailedValuesWtiUplift(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
+ internal void AssignFailedValuesWtiUplift(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
{
wtiPipingOutput.FoSu = defaultFailedValue;
wtiPipingOutput.Hcu = defaultFailedValue;
wtiPipingOutput.DeltaPhiCu = defaultFailedValue;
}
- internal static void AssignFailedValuesWtiHeave(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
+ internal void AssignFailedValuesWtiHeave(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
{
wtiPipingOutput.FoSh = defaultFailedValue;
wtiPipingOutput.Hch = defaultFailedValue;
wtiPipingOutput.Gradient = defaultFailedValue;
}
- internal static void AssignFailedValuesWtiSellmeijerRevised(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
+ internal void AssignFailedValuesWtiSellmeijerRevised(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
{
wtiPipingOutput.FoSbe = defaultFailedValue;
wtiPipingOutput.Hcbe = defaultFailedValue;
@@ -503,7 +505,7 @@
/// The pl lines.
/// The water level.
/// The dam piping output.
- private static void EvaluateUpliftSituation(DamKernelInput damKernelInput, out IKernelDataInput kernelDataInput,
+ private bool EvaluateUpliftSituation(DamKernelInput damKernelInput, out IKernelDataInput kernelDataInput,
PlLines plLines, double waterLevel,
WtiPipingSellmeijerRevisedOutput damPipingOutput)
{
@@ -525,92 +527,89 @@
UpliftLocationAndResult upliftLocationAndResult = upliftLocationDeterminator.GetLocationAndResult(upliftCriterion);
upliftSituation.IsUplift = (upliftLocationAndResult != null);
double xEntry = surfaceLine.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeToeAtRiver).X;
- var xExit = 0.0;
- var surfaceLevel = 0.0;
- var dCoverLayer = 0.0;
- var d70 = 0.0;
- var aquiferHeight = 0.0;
- var permeabilityKx = 0.0;
- double? upliftFactor = null;
+
if (upliftLocationAndResult != null)
{
- xExit = upliftLocationAndResult.X;
- surfaceLevel = surfaceLine.Geometry.GetZatX(upliftLocationAndResult.X);
+ double xExit = upliftLocationAndResult.X;
+ double surfaceLevel = surfaceLine.Geometry.GetZatX(upliftLocationAndResult.X);
double topLevelAquifer = soilProfile1D.GetLayerWithName(upliftLocationAndResult.LayerWhereUpliftOccuresId).TopLevel;
- dCoverLayer = DamPipingHelper.DetermineHeightCoverLayer(topLevelAquifer, surfaceLevel);
+ double dCoverLayer = DamPipingHelper.DetermineHeightCoverLayer(topLevelAquifer, surfaceLevel);
SoilProfile1DAquiferLayerCombiner.AquiferLayerProperties aquiferLayer = SoilProfile1DAquiferLayerCombiner.CombineLayers(soilProfile1D, upliftLocationAndResult.LayerWhereUpliftOccuresId);
- d70 = aquiferLayer.D70;
+ double d70 = aquiferLayer.D70;
- aquiferHeight = aquiferLayer.Height;
- permeabilityKx = aquiferLayer.PermeabilityKx;
- upliftFactor = upliftLocationAndResult.UpliftFactor;
- }
+ double aquiferHeight = aquiferLayer.Height;
+ double permeabilityKx = aquiferLayer.PermeabilityKx;
+ double? upliftFactor = upliftLocationAndResult.UpliftFactor;
+ double seepageLength = (xExit - xEntry) + damKernelInput.Location.DistanceToEntryPoint;
- double seepageLength = (xExit - xEntry) + damKernelInput.Location.DistanceToEntryPoint;
+ // Reference level is highest value of surfaceLevel or PolderLevel
+ // Uit TR Zandmeevoerende wellen (1999): "Het verval dH is gelijk aan het verschil tussen buitenwaterstand (het ontwerppeil(OP))
+ // bij zeedijken en de maatgevende hoogwaterstand (MHW bij rivierdijken) en de waterstand binnendijks ter plaatse van het uittredepunt,
+ // rekening houdend met zeespiegelrijzing etc.(zie paragraaf 3.7.2). In dien ter plaatse van het uittreepunt of de opbarstlocatie
+ // geen vrije waterstand heerst kan gerekend worden met het maaiveldniveau, rekening houdend met eventuele maaiveld daling (zie paragraaf 3.7.2)."
+ double referenceLevel = Math.Max(location.Scenarios[0].PolderLevel, surfaceLevel);
- // Reference level is highest value of surfaceLevel or PolderLevel
- // Uit TR Zandmeevoerende wellen (1999): "Het verval dH is gelijk aan het verschil tussen buitenwaterstand (het ontwerppeil(OP))
- // bij zeedijken en de maatgevende hoogwaterstand (MHW bij rivierdijken) en de waterstand binnendijks ter plaatse van het uittredepunt,
- // rekening houdend met zeespiegelrijzing etc.(zie paragraaf 3.7.2). In dien ter plaatse van het uittreepunt of de opbarstlocatie
- // geen vrije waterstand heerst kan gerekend worden met het maaiveldniveau, rekening houdend met eventuele maaiveld daling (zie paragraaf 3.7.2)."
- double referenceLevel = Math.Max(location.Scenarios[0].PolderLevel, surfaceLevel);
+ Soil inBetweenAquiferlayerSoil = soilProfile1D.BottomAquiferLayer.Soil;
+ if (soilProfile1D.InBetweenAquiferLayer != null)
+ {
+ inBetweenAquiferlayerSoil = soilProfile1D.InBetweenAquiferLayer.Soil;
+ }
- Soil inBetweenAquiferlayerSoil = soilProfile1D.BottomAquiferLayer.Soil;
- if (soilProfile1D.InBetweenAquiferLayer != null)
- {
- inBetweenAquiferlayerSoil = soilProfile1D.InBetweenAquiferLayer.Soil;
- }
+ // Additional parameters for Uplift
+ double phiPolder = referenceLevel;
+ double rExit = 1 - location.ModelParametersForPlLines.DampingFactorPl3;
+ if (soilProfile1D.InBetweenAquiferLayer != null)
+ {
+ rExit = 1 - location.ModelParametersForPlLines.DampingFactorPl4;
+ }
- // Additional parameters for Uplift
- double phiPolder = referenceLevel;
- double rExit = 1 - location.ModelParametersForPlLines.DampingFactorPl3;
- if (soilProfile1D.InBetweenAquiferLayer != null)
- {
- rExit = 1 - location.ModelParametersForPlLines.DampingFactorPl4;
+ EffectiveThicknessCalculator effectiveThicknessCalculator = CreateEffectiveThicknessCalculator(soilProfile1D, surfaceLine, location.Scenarios[0].PolderLevel,
+ Physics.UnitWeightOfwater, xExit);
+ effectiveThicknessCalculator.Calculate();
+ double effectiveStress = effectiveThicknessCalculator.EffectiveStress;
+
+ // Fill the input for the wti-uplift calculation as well as the wti-piping SellmeijerRevised calculation.
+ kernelDataInput = new WtiPipingSellmeijerRevisedInput
+ {
+ HRiver = waterLevel,
+ HExit = referenceLevel,
+ Rc = defaultFluidisationGradient,
+ DTotal = dCoverLayer,
+ SeepageLength = seepageLength,
+ // specific Sellmeijer 4 Forces
+ KinematicViscosityWater = Physics.WaterViscosity,
+ VolumetricWeightOfWater = Physics.UnitWeightOfwater,
+ WhitesDragCoefficient = inBetweenAquiferlayerSoil.WhitesConstant,
+ BeddingAngle = inBetweenAquiferlayerSoil.BeddingAngle,
+ D70 = d70,
+ DAquifer = aquiferHeight,
+ DarcyPermeability = permeabilityKx,
+ ModelFactorUplift = 1.0,
+ EffectiveStress = effectiveStress,
+ PhiExit = phiPolder + rExit * (waterLevel - phiPolder),
+ RExit = rExit,
+ PhiPolder = phiPolder
+ };
+ damPipingOutput.EffectiveStress = effectiveStress;
+ damPipingOutput.ExitPointX = xExit;
+ damPipingOutput.UpliftFactor = upliftFactor;
+ damPipingOutput.UpliftSituation = upliftSituation;
+ damPipingOutput.DeltaPhibe = waterLevel - referenceLevel - defaultFluidisationGradient * dCoverLayer;
+ damPipingOutput.SeepageLength = seepageLength;
+ return true;
}
- EffectiveThicknessCalculator effectiveThicknessCalculator = CreateEffectiveThicknessCalculator(soilProfile1D, surfaceLine, location.Scenarios[0].PolderLevel,
- Physics.UnitWeightOfwater, xExit);
- effectiveThicknessCalculator.Calculate();
- double effectiveStress = effectiveThicknessCalculator.EffectiveStress;
-
- // Fill the input for the wti-uplift calculation as well as the wti-piping SellmeijerRevised calculation.
- kernelDataInput = new WtiPipingSellmeijerRevisedInput
- {
- HRiver = waterLevel,
- HExit = referenceLevel,
- Rc = defaultFluidisationGradient,
- DTotal = dCoverLayer,
- SeepageLength = seepageLength,
- // specific Sellmeijer 4 Forces
- KinematicViscosityWater = Physics.WaterViscosity,
- VolumetricWeightOfWater = Physics.UnitWeightOfwater,
- WhitesDragCoefficient = inBetweenAquiferlayerSoil.WhitesConstant,
- BeddingAngle = inBetweenAquiferlayerSoil.BeddingAngle,
- D70 = d70,
- DAquifer = aquiferHeight,
- DarcyPermeability = permeabilityKx,
- ModelFactorUplift = 1.0,
- EffectiveStress = effectiveStress,
- PhiExit = phiPolder + rExit * (waterLevel - phiPolder),
- RExit = rExit,
- PhiPolder = phiPolder
- };
- damPipingOutput.EffectiveStress = effectiveStress;
- damPipingOutput.ExitPointX = xExit;
- damPipingOutput.UpliftFactor = upliftFactor;
- damPipingOutput.UpliftSituation = upliftSituation;
- damPipingOutput.DeltaPhibe = waterLevel - referenceLevel - defaultFluidisationGradient * dCoverLayer;
- damPipingOutput.SeepageLength = seepageLength;
+ kernelDataInput = new WtiPipingSellmeijerRevisedInput();
+ return false;
}
///
/// Creates the piping calculator wti sellmeijer revised.
///
/// The kernel data input.
/// the Sellmeijer2011Calculator
- private static Sellmeijer2011Calculator CreatePipingCalculatorWtiSellmeijerRevised(IKernelDataInput kernelDataInput)
+ private Sellmeijer2011Calculator CreatePipingCalculatorWtiSellmeijerRevised(IKernelDataInput kernelDataInput)
{
var wtiPipingSellmeijerRevisedInput = kernelDataInput as WtiPipingSellmeijerRevisedInput;
ThrowWhenKernelInputNull(wtiPipingSellmeijerRevisedInput);
@@ -642,7 +641,7 @@
///
/// The kernel data input.
///
- private static WTIUpliftCalculator CreateWtiUpliftCalculator(IKernelDataInput kernelDataInput)
+ private WTIUpliftCalculator CreateWtiUpliftCalculator(IKernelDataInput kernelDataInput)
{
var wtiPipingSellmeijerRevisedInput = kernelDataInput as WtiPipingSellmeijerRevisedInput;
ThrowWhenKernelInputNull(wtiPipingSellmeijerRevisedInput);
@@ -665,7 +664,7 @@
///
/// The kernel data input.
///
- private static HeaveCalculator CreateWtiHeaveCalculator(IKernelDataInput kernelDataInput)
+ private HeaveCalculator CreateWtiHeaveCalculator(IKernelDataInput kernelDataInput)
{
var wtiPipingSellmeijerRevisedInput = kernelDataInput as WtiPipingSellmeijerRevisedInput;
ThrowWhenKernelInputNull(wtiPipingSellmeijerRevisedInput);
@@ -689,7 +688,7 @@
/// The volumetric weight of water.
/// The x exit.
/// the EffectiveThicknessCalculator
- private static EffectiveThicknessCalculator CreateEffectiveThicknessCalculator(SoilProfile1D soilProfile, SurfaceLine2 surfaceLine,
+ private EffectiveThicknessCalculator CreateEffectiveThicknessCalculator(SoilProfile1D soilProfile, SurfaceLine2 surfaceLine,
double phreaticLevel, double volumicWeightOfWater, double xExit)
{
var calculator = new EffectiveThicknessCalculator
@@ -709,7 +708,7 @@
/// The messages.
/// The wti piping output.
/// The wti piping input.
- private static void PerformSingleCalculationWtiSellmeijerRevised(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
+ private void PerformSingleCalculationWtiSellmeijerRevised(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
WtiPipingSellmeijerRevisedInput wtiPipingInput)
{
wtiPipingOutput.FoSbe = defaultMaxReturnValue;
@@ -737,7 +736,7 @@
/// The messages.
/// The wti piping output.
/// The wti piping input.
- private static void PerformSingleCalculationWtiUplift(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
+ private void PerformSingleCalculationWtiUplift(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
WtiPipingSellmeijerRevisedInput wtiPipingInput)
{
wtiPipingOutput.FoSu = defaultMaxReturnValue;
@@ -759,7 +758,7 @@
}
}
- private static void PerformSingleCalculationWtiHeave(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
+ private void PerformSingleCalculationWtiHeave(out List messages, WtiPipingSellmeijerRevisedOutput wtiPipingOutput,
WtiPipingSellmeijerRevisedInput wtiPipingInput)
{
wtiPipingOutput.FoSh = defaultMaxReturnValue;
@@ -781,23 +780,23 @@
}
}
- private static void ThrowWhenKernelInputNull(WtiPipingSellmeijerRevisedInput wtiPipingInput)
+ private void ThrowWhenKernelInputNull(WtiPipingSellmeijerRevisedInput wtiPipingInput)
{
if (wtiPipingInput == null)
{
throw new NoNullAllowedException(Resources.WtiPipingSellmeijerRevisedKernelWrapper_NoInputObjectDefined);
}
}
- private static void ThrowWhenKernelOutputNull(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
+ private void ThrowWhenKernelOutputNull(WtiPipingSellmeijerRevisedOutput wtiPipingOutput)
{
if (wtiPipingOutput == null)
{
throw new NoNullAllowedException(Resources.WtiPipingSellmeijerRevisedKernelWrapper_NoOutputObjectDefined);
}
}
- private static void ThrowWhenDamKernelInputNull(DamKernelInput damKernelInput)
+ private void ThrowWhenDamKernelInputNull(DamKernelInput damKernelInput)
{
if (damKernelInput == null)
{