//-----------------------------------------------------------------------
//
// Copyright (c) 2010 Deltares. All rights reserved.
//
// B.S.T. The
// tom.the@deltares.nl
// 8-9-2010
//
//-----------------------------------------------------------------------
namespace Deltares.Piping.Data
{
using System.Runtime.InteropServices;
using System;
public enum DAMPipingHistoricSandBoil { TrueAtLowerMaxLevel = 0, TrueAtHigherMaxLevel = 1, False = 2 };
public enum DAMPipingQualityOfSurvey { High = 0, Low = 1 };
public enum DAMPipingElapsedTimeSinceLastSurvey { Short = 0, Medium = 1, Long = 2 };
public enum DAMPipingWaterLevelTrend { Rising = 0, AtTop = 1, Descending = 2 };
public enum DAMPipingHistoricMaxLevelComparison { Lower = 0, Same = 1, Higher = 2 };
///
/// Structure to communicate the input values to the PipinDAM BBN DLL
/// Note: The size and place of each parameter is important! Only change if the DLL API changes
///
[StructLayout(LayoutKind.Sequential)]
public struct PipingDAMBBNInputStruct
{
public double CrackFactor;
public double CrackFactorAtMaxLevel;
public double CrackFactorSensitivity;
public double WaterLevelChange;
public double CalculatedSandBoilLevelDiff;
public double CalculatedOpenPipeLevelDiff;
public int HistoricSandBoil;
public int QualityOfSurvey;
public int ElapsedTimeSinceLastSurvey;
public int WaterLevelTrend;
public int HistoricMaxLevelComparison;
[MarshalAs(UnmanagedType.I1)]
public Boolean IsWellVisible;
[MarshalAs(UnmanagedType.I1)]
public Boolean IsSandBoilVisible;
[MarshalAs(UnmanagedType.I1)]
public Boolean IsSandBoilCalculated;
[MarshalAs(UnmanagedType.I1)]
public Boolean IsOpenPipeCalculated;
}
///
/// Structure to communicate the output values to the PipinDAM BBN DLL
/// Note: The size and place of each parameter is important! Only change if the DLL API changes
///
[StructLayout(LayoutKind.Sequential)]
public struct PipingDAMBBNOutputStruct
{
public double ChanceOpenPipeTrue;
public double ChanceOpenPipeFalse;
}
///
/// Class containing soil profile data
///
public class PipingDAMLocationSoilStruct
{
public string Name;
public double ChanceOccurence;
public double Height1;
public double Height2;
public double Permeability1;
public double Permeability2;
public double Permeability3;
public double ParticleDiameter;
public PipingDAMLocationSoilStruct(string aName, double aHeight1, double aHeight2,
double aPermeability1, double aPermeability2, double aPermeability3, double aParticleDiameter)
{
Name = aName;
ChanceOccurence = 0.0;
Height1 = aHeight1;
Height2 = aHeight2;
Permeability1 = aPermeability1;
Permeability2 = aPermeability2;
Permeability3 = aPermeability3;
ParticleDiameter = aParticleDiameter;
}
}
///
/// Class containing information that applies to a collection of locations
///
public class PipingDAMRegionInfo
{
public DAMPipingQualityOfSurvey QualityOfSurvey;// { High = 0, Low = 1 };
public DAMPipingElapsedTimeSinceLastSurvey ElapsedTimeSinceLastSurvey; // { Short = 0, Medium = 1, Long = 2 };
// public DAMPipingWaterLevelTrend WaterLevelTrend; // { Rising = 0, AtTop = 1, Descending = 2 };
public DAMPipingHistoricMaxLevelComparison HistoricMaxLevelComparison; // { Lower = 0, Same = 1, Higher = 2 };
public PipingDAMRegionInfo(DAMPipingQualityOfSurvey aQualityOfSurvey, DAMPipingElapsedTimeSinceLastSurvey aElapsedTimeSinceLastSurvey,
DAMPipingHistoricMaxLevelComparison aHistoricMaxLevelComparison)
{
QualityOfSurvey = aQualityOfSurvey;
ElapsedTimeSinceLastSurvey = aElapsedTimeSinceLastSurvey;
// WaterLevelTrend = aWaterLevelTrend;
HistoricMaxLevelComparison = aHistoricMaxLevelComparison;
}
}
///
/// Class containing the geometry of a location
///
public class PipingDAMLocationGeometryStruct
{
public string Name;
public string SegmentName;
public double XCoordinate;
public double YCoordinate;
public double thicknessSoftSoils;
public double SeepageLength;
public double PolderLevel;
public double DecimeringsHoogte;
public double FNeer;
public double BovenkantZand;
public bool IsWellVisible;
public bool IsSandBoilVisible;
public PipingDAMRegionInfo PipingDAMRegionInfo;
public DAMPipingHistoricSandBoil HistoricSandBoil;// { TrueAtLowerMaxLevel = 0, TrueAtHigherMaxLevel = 1, False = 2 };
public PipingDAMLocationGeometryStruct(string aName, string aSegmentName, double aXCoordinate, double aYCoordinate,
double aCrackLength, double aSeepageLength, double aPolderLevel, double aDecimeringsHoogte, double aFNeer, double aBovenkantZand)
{
Name = aName;
SegmentName = aSegmentName;
XCoordinate = aXCoordinate;
YCoordinate = aYCoordinate;
thicknessSoftSoils = aCrackLength;
SeepageLength = aSeepageLength;
PolderLevel = aPolderLevel;
DecimeringsHoogte = aDecimeringsHoogte;
FNeer = aFNeer;
BovenkantZand = aBovenkantZand;
IsWellVisible = false;
IsSandBoilVisible = false;
}
public PipingDAMLocationGeometryStruct(string aName, string aSegmentName, double aXCoordinate, double aYCoordinate,
double aThicknessSoftSoils, double aSeepageLength, double aPolderLevel, double aDecimeringsHoogte, double aFNeer, double aBovenkantZand,
bool aIsWellVisible, bool aIsSandBoilVisible, bool aIsHistoricSandBoil, DAMPipingHistoricSandBoil aHistoricSandBoil,
PipingDAMRegionInfo aPipingDAMRegionInfo)
{
Name = aName;
SegmentName = aSegmentName;
XCoordinate = aXCoordinate;
YCoordinate = aYCoordinate;
thicknessSoftSoils = aThicknessSoftSoils;
SeepageLength = aSeepageLength;
PolderLevel = aPolderLevel;
DecimeringsHoogte = aDecimeringsHoogte;
FNeer = aFNeer;
BovenkantZand = aBovenkantZand;
IsWellVisible = aIsWellVisible;
IsSandBoilVisible = aIsSandBoilVisible;
HistoricSandBoil = aHistoricSandBoil;
PipingDAMRegionInfo = aPipingDAMRegionInfo;
}
}
///
/// Class thant binds a soil to a geometry
///
public class PipingDAMSegmentSoilRelationStruct
{
public string SegmentName;
public string SoilName;
public double ChanceOccurence;
public PipingDAMSegmentSoilRelationStruct(string aSegmentName, string aSoilName, double aChanceOccurence)
{
SegmentName = aSegmentName;
SoilName = aSoilName;
ChanceOccurence = aChanceOccurence;
}
}
///
/// Class containing waterlevels in a location
///
public class PipingDAMWaterLevelInfoStruct
{
public string LocationName;
public double H1;
public double H2;
public double H3;
public double H4;
public double H5;
public PipingDAMWaterLevelInfoStruct(string aLocationName, double aH1, double aH2, double aH3, double aH4, double aH5)
{
LocationName = aLocationName;
H1 = aH1;
H2 = aH2;
H3 = aH3;
H4 = aH4;
H5 = aH5;
}
}
///
/// Class containing QHPoint
///
public class PipingDAMQHPoint
{
public double Q;
public double H;
public PipingDAMQHPoint(double aQ, double aH)
{
Q = aQ;
H = aH;
}
}
}