Добавьте файлы проекта.

This commit is contained in:
palex
2026-01-06 02:07:18 +03:00
parent 153b9675e3
commit 8e4b375e80
109 changed files with 10817 additions and 0 deletions

119
BL/Bore.cs Normal file
View File

@@ -0,0 +1,119 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class Bore
{
/// <summary>
/// Порядковый номер скважины
/// </summary>
public int Number { get; set; }
/// <summary>
/// Имя скважины
/// </summary>
public string Name { get; set; }
/// <summary>
/// Х-координата распложения скважины
/// </summary>
public double X { get; set; }
/// <summary>
/// Y-координата распложения скважины
/// </summary>
public double Y { get; set; }
/// <summary>
/// Абсолютная отметка устья скважины
/// </summary>
public double Z { get; set; }
/// <summary>
/// Относительная отметка уровня грунтовых вод
/// </summary>
public double? WL { get; set; }
/// <summary>
/// Превышение глубины сважины в расчетах осадки
/// </summary>
public double DZ { get; set; }
/// <summary>
/// Массив грунтовых слоев
/// </summary>
public ObservableCollection<Layer> Layers { get; set; }
public Bore()
{
Layers = new ObservableCollection<Layer>();
}
public void AddLayer(Layer layer)
{
if (Layers == null) Layers = new ObservableCollection<Layer>();
Layers.Add(layer);
}
public void AddLayers(ObservableCollection<Layer> layers)
{
Layers = layers;
}
public void AddLayers(List<Layer> layers)
{
if (Layers == null) Layers = new ObservableCollection<Layer>();
foreach (var item in layers) Layers.Add(item);
}
public void DeleteLayers()
{
Layers = new ObservableCollection<Layer>();
}
internal string PropsToString()
{
string s = ";";
return Number + s + Name + s + X + s + Y + s + Z + s + WL + s + DZ;
}
internal List<object> PropsToList()
{
return new List<object> { Number, Name, X, Y, Z, WL, DZ };
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
Name = src[1];
X = double.Parse(src[2]);
Y = double.Parse(src[3]);
Z = double.Parse(src[4]);
WL = double.Parse(src[5]);
DZ = double.Parse(src[6]);
}
catch
{
return;
}
}
internal void ListToProps(List<object> src)
{
try
{
Number = (int)(double)src[0];
Name = (string)src[1];
X = (double)src[2];
Y = (double)src[3];
Z = (double)src[4];
WL = (double)src[5];
DZ = (double)src[6];
}
catch
{
return;
}
}
}
}

26
BL/DataPair.cs Normal file
View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{ [Serializable]
public struct DataPair
{
public string Описание { get; set; }
public object Параметр { get; set; }
public UnitsForce ForcesUnits { get; set; }
public UnitsStress StressUnits { get; set; }
public UnitsArea AreasUnits { get; set; }
public UnitsLin LenghtsUnits { get; set; }
}
[Serializable]
public struct DataPairProps
{
public string Описание { get; set; }
public object Параметр { get; set; }
public UnitsList Ед_изм { get; set; }
}
}

404
BL/DataR.cs Normal file
View File

@@ -0,0 +1,404 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public struct DataR
{
public string Bore { get; set; }
public string Base { get; set; }
public double R { get; set; }
public double P { get; set; }
public double PmaxX { get; set; }
public double PmaxY { get; set; }
public double GapX { get; set; }
public double GapY { get; set; }
public double CheckP { get; set; }
public double CheckGap { get; set; }
public double YIIu { get; set; }
public double YII { get; set; }
public double FiII { get; set; }
public double CII { get; set; }
public double Yc1 { get; set; }
public double Yc2 { get; set; }
public double My { get; set; }
public double Mq { get; set; }
public double Mc { get; set; }
public double IL { get; set; }
public double Ys { get; set; }
public double Ke { get; set; }
public double Kz { get; set; }
public double K { get; set; }
public double d1 { get; set; }
public double db { get; set; }
public string Ground { get; set; }
public string GroundType { get; set; }
public List<DataPair> FullData { get; private set; }
public List<DataPair> MediumData { get; private set; }
public List<DataPair> SmallData { get; private set; }
internal void CreateFullData()
{
FullData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Скважина", Параметр = Bore };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX};
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY};
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина заложения", Параметр = d1, LenghtsUnits = UnitsLin.м };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина подвала", Параметр = db, LenghtsUnits = UnitsLin.м };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Грунт под подошвой", Параметр = Ground };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Объемный вес (осредненный) грунта выше подошвы", Параметр = YIIu,
AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Объемный вес (осредненный) грунта ниже подошвы", Параметр = YII,
AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Угол внутреннего трения грунта основания (осредненный)", Параметр = FiII };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Удельное сцепление грунта основания (осредненное)", Параметр = CII,
AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Показатель текучести грунта основания ", Параметр = IL };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент пористости грунта основания ", Параметр = Ke };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Тип грунта основания согласно таблице 5.4", Параметр = GroundType };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Yc1 согласно таблице 5.4", Параметр = Yc1 };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Yc2 согласно таблице 5.4", Параметр = Yc2 };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт My согласно таблице 5.5", Параметр = My };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Mq согласно таблице 5.5", Параметр = Mq };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Mc согласно таблице 5.5", Параметр = Mc };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Kz", Параметр = Kz };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт K", Параметр = K };
FullData.Add(dataPair);
}
internal void CreateMediumData()
{
MediumData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина заложения", Параметр = d1, LenghtsUnits = UnitsLin.м };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина подвала", Параметр = db, LenghtsUnits = UnitsLin.м };
MediumData.Add(dataPair);
//dataPair = new DataPair() { Descriptions = "Грунт под подошвой", DataEntity = Ground };
//MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта выше подошвы",
Параметр = YIIu,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта ниже подошвы",
Параметр = YII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Угол внутреннего трения грунта основания (осредненный)", Параметр = FiII };
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Удельное сцепление грунта основания (осредненное)",
Параметр = CII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
}
internal void CreateSmallData()
{
SmallData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
SmallData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
SmallData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
SmallData.Add(dataPair);
}
internal List<DataPair> FullResults()
{
FullData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Скважина", Параметр = Bore };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
FullData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
FullData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина заложения", Параметр = d1, LenghtsUnits = UnitsLin.м };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина подвала", Параметр = db, LenghtsUnits = UnitsLin.м };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Грунт под подошвой", Параметр = Ground };
FullData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта выше подошвы",
Параметр = YIIu,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
FullData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта ниже подошвы",
Параметр = YII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Угол внутреннего трения грунта основания (осредненный)", Параметр = FiII };
FullData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Удельное сцепление грунта основания (осредненное)",
Параметр = CII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Показатель текучести грунта основания ", Параметр = IL };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент пористости грунта основания ", Параметр = Ke };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Тип грунта основания согласно таблице 5.4", Параметр = GroundType };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Yc1 согласно таблице 5.4", Параметр = Yc1 };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Yc2 согласно таблице 5.4", Параметр = Yc2 };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт My согласно таблице 5.5", Параметр = My };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Mq согласно таблице 5.5", Параметр = Mq };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Mc согласно таблице 5.5", Параметр = Mc };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт Kz", Параметр = Kz };
FullData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффицинт K", Параметр = K };
FullData.Add(dataPair);
return FullData;
}
internal List<DataPair> MediumResults()
{
MediumData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина заложения", Параметр = d1, LenghtsUnits = UnitsLin.м };
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Глубина подвала", Параметр = db, LenghtsUnits = UnitsLin.м };
MediumData.Add(dataPair);
//dataPair = new DataPair() { Descriptions = "Грунт под подошвой", DataEntity = Ground };
//MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта выше подошвы",
Параметр = YIIu,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Объемный вес (осредненный) грунта ниже подошвы",
Параметр = YII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
dataPair = new DataPair() { Описание = "Угол внутреннего трения грунта основания (осредненный)", Параметр = FiII };
MediumData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Удельное сцепление грунта основания (осредненное)",
Параметр = CII,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
MediumData.Add(dataPair);
return MediumData;
}
internal List<DataPair> SmallResults()
{
SmallData = new List<DataPair>();
DataPair dataPair = new DataPair() { Описание = "Фундамент", Параметр = Base };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Расчетное сопротивление", Параметр = R, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Среднее давление под подошвой", Параметр = P, AreasUnits = UnitsArea.м, ForcesUnits = UnitsForce.т };
SmallData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении длины фундамента",
Параметр = PmaxX,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
SmallData.Add(dataPair);
dataPair = new DataPair()
{
Описание = "Максимальное давление под подошвой в направлении ширины фундамента",
Параметр = PmaxY,
AreasUnits = UnitsArea.м,
ForcesUnits = UnitsForce.т
};
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении длины фундамента", Параметр = GapX };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Отрыв в направлении ширины фундамента", Параметр = GapY };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Максимальный отрыв подошвы", Параметр = CheckGap };
SmallData.Add(dataPair);
dataPair = new DataPair() { Описание = "Коэффициент использования расчетного сопротивления", Параметр = CheckP };
SmallData.Add(dataPair);
return SmallData;
}
}
}

28
BL/DataS.cs Normal file
View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public struct DataS
{
public string Bore { get; set; }
public string Base { get; set; }
public double Sp { get; set; }
public double Sr { get; set; }
public double p { get; set; }
public double Hc { get; set; }
public double Hmin { get; set; }
public double YIIu { get; set; }
public List<double> Z { get; set; }
public List<double?> Alfa { get; set; }
public List<double> sig_zp { get; set; }
public List<double> sig_zy { get; set; }
public List<double> sig_zg { get; set; }
public List<double> E { get; set; }
public List<double> N { get; set; }
}
}

18
BL/Enums.cs Normal file
View File

@@ -0,0 +1,18 @@
namespace GroundOrganizer
{
public enum TypeFound { Прямоугольный, Ленточный, Круглый }
public enum PointFound { Центр, Угол}
public enum TypeFlexStructure { Гибкая, Жесткая }
public enum ResKey { eps_b_max, eps_b_min, sig_b_max, sig_b_min, eps_bult, eps_s_max, eps_s_min, sig_s_max, sig_s_min, asel, kf, Mxult, Myult, Nult, Mxcrc, Mycrc, num_itr, rep, info }
public enum SecShape { прямоугольник, круг, кольцо, тавр_с_полками_вверху, тавр_с_полками_внизу, двутавр, короб, пользовательское }
public enum ElementType { стержень, пластина }
public enum CharMat { C, CL, N, NL }
public enum LongForces { кратковременное, длительное }
public enum Vlajnost { Ниже_40, От_40_до_75, Выше_75 }
public enum Orientation { вертикальная, горизонтальная }
public enum ClassBet { B10, B15, B20, B25, B30, B35, B40, B45, B50, B55, B60 }
public enum ClassArm { A240, A400, A500, B500, A600, A800, A1000, Bp500, Bp1200 }
public enum TypeDiagramm { трехлинейная, двухлинейная }
public enum TypeLayer { Au, As1, As2, As3, As4, одиночный, радиальный, линейный, AuAs }
public enum ParamsLayer { AsDs, AsNd, DsNd }
}

82
BL/FoundLoad.cs Normal file
View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class FoundLoad
{
public double NC { get; set; }
public double MxC { get; set; }
public double MyC { get; set; }
public double QyC { get; set; }
public double QxC { get; set; }
public double N { get; set; }
public double Mx { get; set; }
public double My { get; set; }
public double Qy { get; set; }
public double Qx { get; set; }
public double q { get; set; }
public int Number { get; set; }
public bool InFoot { get; set; }
public UnitsForce UnitsF { get; set; }
public UnitsLin UnitsL { get; set; }
internal string PropsToString()
{
string s = ";";
return Number + s + N + s + Mx + s + My + s + Qx + s + Qy + s + q;
}
internal List<object> PropsToList()
{
return new List<object> { Number, N, Mx, My, Qx, Qy, q, InFoot };
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
N = double.Parse(src[1]);
Mx = double.Parse(src[2]);
My = double.Parse(src[3]);
Qx = double.Parse(src[4]);
Qy = double.Parse(src[5]);
q = double.Parse(src[6]);
}
catch
{
return;
}
}
internal void ListToProps(List<object> src)
{
try
{
Number = (int)(double)src[0];
N = (double)src[1];
Mx = (double)src[2];
My = (double)src[3];
Qx = (double)src[4];
Qy = (double)src[5];
q = (double)src[6];
InFoot = (bool)src[7];
}
catch
{
return;
}
}
}
}

920
BL/Foundation.cs Normal file
View File

@@ -0,0 +1,920 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Geo;
using TriangleNet;
using TriangleNet.Geometry;
using TriangleNet.Meshing;
using TriangleNet.Tools;
namespace GroundOrganizer
{
[Serializable]
public class Foundation
{
public int Number { get; set; }
public string Name { get; set; }
public TypeFound Type { get; set; }
public bool Basement { get; set; }
public double B { get; set; }
public double L { get; set; }
public double Db { get; set; }
public double D1 { get; set; }
public double H { get; set; }
public double AlfaDeg { get; set; }
public double Hs { get; set; }
public double Hcf { get; set; }
public double Ycf { get; set; }
public double X { get; set; }
public double Y { get; set; }
/// <summary>
/// Относительная отметка подошвы фундамента
/// </summary>
public double FL { get; set; }
/// <summary>
/// Абсолютная отметка планировки в центральной точке фундамента
/// </summary>
public double DL { get; set; }
/// <summary>
/// Абсолютная отметка естественного рельефа в центральной точке фундамента
/// </summary>
public double NL { get; set; }
public ObservableCollection<FoundLoad> Loads { get; set; }
public UnitsForce UnitsF { get; set; }
public UnitsLin UnitsL { get; set; }
public Quadrangle Contour { get; set; }
public List<DataPair> FullResults { get; private set; }
public List<DataPairProps> FullProps { get; private set; }
public List<DataPair> MediumResults { get; private set; }
public List<DataPairProps> MediumProps { get; private set; }
public List<DataPair> SmallResults{ get; private set; }
public List<DataPairProps> SmallProps{ get; private set; }
public Foundation()
{
Loads = new ObservableCollection<FoundLoad>();
Type = TypeFound.Прямоугольный;
UnitsF = UnitsForce.т;
UnitsL = UnitsLin.м;
Ycf = 2.2;
FullResults = new List<DataPair>();
MediumResults = new List<DataPair>();
SmallResults = new List<DataPair>();
}
public Foundation(Quadrangle cntr)
{
if (cntr.Units == UnitsLin.см)
{
Contour.Vertex1 = cntr.Vertex1 * 0.01;
Contour.Vertex2 = cntr.Vertex2 * 0.01;
Contour.Vertex3 = cntr.Vertex3 * 0.01;
Contour.Vertex4 = cntr.Vertex4 * 0.01;
}
if (cntr.Units == UnitsLin.мм)
{
Contour.Vertex1 = cntr.Vertex1 * 0.001;
Contour.Vertex2 = cntr.Vertex2 * 0.001;
Contour.Vertex3 = cntr.Vertex3 * 0.001;
Contour.Vertex4 = cntr.Vertex4 * 0.001;
}
if(cntr.Units == UnitsLin.м) Contour = cntr;
X = Math.Round(Contour.Centroid.X, 3);
Y = Math.Round(Contour.Centroid.Y, 3);
IOrderedEnumerable<Line2d> selected = from l in Contour.Segments // определяем каждый объект как
orderby l.Length // упорядочиваем по возрастанию
select l; // выбираем объект
AlfaDeg = Math.Round(RadToDeg(Math.Acos(selected.First().Directive.Vx / selected.First().Length)), 3);
B = Math.Round(selected.First().Length, 3);
L = Math.Round(selected.Last().Length, 3);
Loads = new ObservableCollection<FoundLoad>();
Type = TypeFound.Прямоугольный;
UnitsF = UnitsForce.т;
UnitsL = UnitsLin.м;
Ycf = 2.2;
FullResults = new List<DataPair>();
MediumResults = new List<DataPair>();
SmallResults = new List<DataPair>();
}
internal void CreateFullPropsList()
{
FullProps = new List<DataPairProps>();
DataPairProps dataPair = new DataPairProps() { Описание = "Номер", Параметр = Number };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Марка", Параметр = Name };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Ширина", Параметр = B, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Длина", Параметр = L, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Высота", Параметр = H, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка подошвы", Параметр = FL, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Глубина заложения", Параметр = D1, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка планировки", Параметр = DL };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка рельефа", Параметр = NL };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Наличие подвала", Параметр = Basement };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Глубина подвала", Параметр = Db, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "h_s", Параметр = Hs, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "h_cf", Параметр = Hcf, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Ycf, т/м3", Параметр = Ycf };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Х", Параметр = X, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Y", Параметр = Y, Ед_изм = UnitsList.м };
FullProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Поворот", Параметр = AlfaDeg, Ед_изм= UnitsList.градус };
FullProps.Add(dataPair);
}
internal void CreateMediumPropsList()
{
MediumProps = new List<DataPairProps>();
DataPairProps dataPair = new DataPairProps() { Описание = "Номер", Параметр = Number };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Марка", Параметр = Name };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Ширина", Параметр = B, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Длина", Параметр = L, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Высота", Параметр = H, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка подошвы", Параметр = FL, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Глубина заложения", Параметр = D1, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка планировки", Параметр = DL };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка рельефа", Параметр = NL };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Наличие подвала", Параметр = Basement };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Глубина подвала", Параметр = Db, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "h_s", Параметр = Hs, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "h_cf", Параметр = Hcf, Ед_изм = UnitsList.м };
MediumProps.Add(dataPair);
}
internal void CreateSmallPropsList()
{
SmallProps = new List<DataPairProps>();
DataPairProps dataPair = new DataPairProps() { Описание = "Номер", Параметр = Number };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Марка", Параметр = Name };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Ширина b", Параметр = B, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Длина l", Параметр = L, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Высота h", Параметр = H, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка подошвы FL", Параметр = FL, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Глубина заложения d_1", Параметр = D1, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка планировки DL", Параметр = DL, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
dataPair = new DataPairProps() { Описание = "Отметка рельефа NL", Параметр = NL, Ед_изм = UnitsList.м };
SmallProps.Add(dataPair);
}
public DataS Sp(Bore bore, FoundLoad load, double kHc = 0.5, PointFound ptFond = PointFound.Центр)
{
DataS res = new DataS();
List<Layer> downFS = DownFS(bore);
List<double> n = res.N;
n = new List<double>();
foreach (Layer item in downFS)
{
n.Add(Math.Ceiling(item.H / (0.4 * B)));
}
List<Layer> layers = new List<Layer>();
for (int i = 0; i < n.Count; i++)
{
double z = downFS[i].Up;
double dlt = downFS[i].H / n[i];
while (downFS[i].Down > z)
{
z += dlt;
Layer lay = downFS[i].Clone();
lay.Down = z;
lay.H = dlt;
lay.Up = z - dlt;
layers.Add(lay);
}
}
double FL;
if (Basement) FL = Hs + Hcf + Db;
else FL = D1;
res.Z = new List<double>() { 0 };
foreach (Layer item in layers)
{
res.Z.Add(item.Up + 0.5 * item.H - FL);
}
res.Alfa = TablesInterolator.Table_5_8(res.Z, B, L, Type);
List<Layer> upF = UpF(bore);
double roh = 0;
double h = 0;
if (upF.Count > 0)
{
foreach (Layer item in upF)
{
roh += item.H * item.IGE.RoII;
h += item.H;
}
}
res.YIIu = Math.Round(roh / h, 3);
double sig_zg0 = res.YIIu * FL;
double p = load.N / (B * L) + load.q + 2 * FL;
res.sig_zy = new List<double>();
res.sig_zp = new List<double>();
for (int i = 0; i < res.Z.Count; i++)
{
res.sig_zp.Add((double)res.Alfa[i] * p);
res.sig_zy.Add((double)res.Alfa[i] * sig_zg0);
}
res.sig_zg = new List<double> { sig_zg0 };
res.E = new List<double>();
for (int i = 0; i < layers.Count; i++)
{
res.sig_zg.Add(sig_zg0 + layers[i].IGE.RoII * (res.Z[i + 1] - (layers[i].Up - FL)));
sig_zg0 += layers[i].H * layers[i].IGE.RoII;
res.E.Add(layers[i].IGE.E * 101.972);
}
sig_zg0 = res.YIIu * FL;
if (B <= 10) res.Hmin = B / 2;
else if (B > 10 && B <= 60) res.Hmin = 4 + 0.1 * B;
else res.Hmin = 10;
int j = 0;
for (int i = 0; i < layers.Count; i++)
{
if (res.sig_zp[i] >= kHc * res.sig_zg[i])
{
res.Hc = res.Z[i];
}
else
{
j = i;
break;
}
}
int t = 0; double pt = layers[t].H;
while (pt <= res.Hmin)
{
t++;
pt += layers[t].H;
}
if (res.Hmin > res.Hc)
{
res.Hc = res.Hmin;
j = t;
}
if (sig_zg0 >= p)
{
for (int i = 0; i <= j; i++)
{
res.Sp += res.sig_zp[i + 1] * layers[i].H / (5 * res.E[i]);
}
res.Sp *= 0.8;
}
else
{
for (int i = 0; i <= j; i++)
{
res.Sp += (res.sig_zp[i + 1] - res.sig_zy[i + 1]) * layers[i].H / res.E[i] + res.sig_zy[i + 1] * layers[i].H / (5 * res.E[i]);
}
res.Sp *= 0.8;
}
res.Sp = Math.Round(res.Sp * 100, 1);
res.p = Math.Round(p, 2);
return res;
}
public DataR P(Bore bore, TypeFlexStructure ts, double ls, double hs, double k = 1)
{
DataR dataR = R(bore, ts, ls, hs, k);
dataR.Base = Name;
dataR.Bore = "Скв." + bore.Name;
if (Loads == null || Loads.Count == 0)
{
FullResults = dataR.FullResults();
MediumResults = dataR.MediumResults();
SmallResults = dataR.SmallResults();
return dataR;
}
List<double> P = new List<double>(Loads.Count);
List<double> PmaxX = new List<double>(Loads.Count);
List<double> PmaxY = new List<double>(Loads.Count);
List<double> chP = new List<double>(Loads.Count);
List<double> GapX = new List<double>(Loads.Count);
List<double> GapY = new List<double>(Loads.Count);
List<double> chGap = new List<double>(Loads.Count);
foreach (FoundLoad item in Loads)
{
P.Add(item.N / (B * L) + item.q + 2 * D1);
double ex = (Math.Abs(item.Mx) / (item.N + 2 * D1 * L * B)) / L;
double wx = (B * L * L * L) / 6;
double pmaxx;
if (ex <= (1.0 / 6)) {pmaxx= item.N / (B * L) + 2 * D1 + Math.Abs(item.Mx) / wx; PmaxX.Add(pmaxx); GapX.Add(0); ex = 0; }
else
{
double C0x = 0.5 * L - item.Mx / (item.N + 2 * D1 * L * B);
pmaxx = 2 * (item.N + 2 * D1 * L * B) / (3 * B * C0x);
PmaxX.Add(pmaxx);
GapX.Add(ex);
}
double ey = (Math.Abs(item.My) / (item.N + 2 * D1 * L * B)) / B;
double wy = (L * B * B * B) / 6;
double pmaxy;
if (ey <= (1.0 / 6)) {pmaxy= item.N / (B * L) + 2 * D1 + Math.Abs(item.My) / wy; PmaxY.Add(pmaxy); GapY.Add(0); ey = 0; }
else
{
double C0y = 0.5 * B - item.My / (item.N + 2 * D1 * L * B);
pmaxy = 2 * (item.N + 2 * D1 * L * B) / (3 * L * C0y);
PmaxY.Add(pmaxy);
GapY.Add(ey);
}
chGap.Add(Math.Max(ex, ey));
List<double> chp = new List<double> { (item.N / (B * L) + item.q + 2 * D1) / dataR.R, pmaxx / (1.2 * dataR.R), pmaxy / (1.2 * dataR.R) };
chP.Add(chp.Max());
}
dataR.P = Math.Round(P.Max(), 3);
dataR.PmaxX = Math.Round(PmaxX.Max(), 3);
dataR.PmaxY = Math.Round(PmaxY.Max(), 3);
dataR.CheckP = Math.Round(chP.Max(), 3);
dataR.CheckGap = Math.Round(chGap.Max(), 3);
dataR.GapX = Math.Round(GapX.Max(), 3);
dataR.GapY = Math.Round(GapY.Max(), 3);
FullResults = dataR.FullResults();
MediumResults = dataR.MediumResults();
SmallResults = dataR.SmallResults();
return dataR;
}
public ObservableCollection<DataR> P(ObservableCollection<Bore> bores, TypeFlexStructure ts, double ls, double hs, double k = 1)
{
ObservableCollection<DataR> res = new ObservableCollection<DataR>();
foreach (Bore bore in bores)
{
DataR dataR = R(bore, ts, ls, hs, k);
dataR.Base = Name;
dataR.Bore = "Скв." + bore.Name;
if (Loads == null || Loads.Count == 0)
{
dataR.CreateFullData();
dataR.CreateMediumData();
dataR.CreateSmallData();
res.Add(dataR);
continue;
}
List<double> P = new List<double>(Loads.Count);
List<double> PmaxX = new List<double>(Loads.Count);
List<double> PmaxY = new List<double>(Loads.Count);
List<double> chP = new List<double>(Loads.Count);
List<double> GapX = new List<double>(Loads.Count);
List<double> GapY = new List<double>(Loads.Count);
List<double> chGap = new List<double>(Loads.Count);
foreach (FoundLoad item in Loads)
{
P.Add(item.N / (B * L) + item.q + 2 * D1);
double ex = (item.Mx / (item.N + 2 * D1 * L * B)) / L;
double wx = (B * L * L * L) / 6;
double pmaxx;
if (ex <= 1 / 6) { pmaxx = item.N / (B * L) + 2 * D1 + Math.Abs(item.Mx) / wx; PmaxX.Add(pmaxx); GapX.Add(0); ex = 0; }
else
{
double C0x = 0.5 * L - item.Mx / (item.N + 2 * D1 * L * B);
pmaxx = 2 * (item.N + 2 * D1 * L * B) / (3 * B * C0x);
PmaxX.Add(pmaxx);
GapX.Add(ex);
}
double ey = (item.My / (item.N + 2 * D1 * L * B)) / B;
double wy = (L * B * B * B) / 6;
double pmaxy;
if (ey <= 1 / 6) { pmaxy = item.N / (B * L) + 2 * D1 + Math.Abs(item.My) / wy; PmaxY.Add(pmaxy); GapY.Add(0); ey = 0; }
else
{
double C0y = 0.5 * B - item.My / (item.N + 2 * D1 * L * B);
pmaxy = 2 * (item.N + 2 * D1 * L * B) / (3 * L * C0y);
PmaxY.Add(pmaxy);
GapY.Add(ey);
}
chGap.Add(Math.Max(ex, ey));
List<double> chp = new List<double> { (item.N / (B * L) + item.q + 2 * D1) / dataR.R, pmaxx / (1.2 * dataR.R), pmaxy / (1.2 * dataR.R) };
chP.Add(chp.Max());
}
dataR.P = Math.Round(P.Max(), 3);
dataR.PmaxX = Math.Round(PmaxX.Max(), 3);
dataR.PmaxY = Math.Round(PmaxY.Max(), 3);
dataR.CheckP = Math.Round(chP.Max(), 3);
dataR.CheckGap = Math.Round(chGap.Max(), 3);
dataR.GapX = Math.Round(GapX.Max(), 3);
dataR.GapY = Math.Round(GapY.Max(), 3);
dataR.CreateFullData();
dataR.CreateMediumData();
dataR.CreateSmallData();
res.Add(dataR);
}
return res;
}
private DataR R(Bore bore, TypeFlexStructure ts, double ls, double hs, double k = 1)
{
DataR res = new DataR();
List<Layer> upF = UpF(bore);
List<Layer> downF = DownF(bore);
double roh = 0;
double h = 0;
if (upF.Count > 0)
{
foreach (Layer item in upF)
{
roh += item.H * item.IGE.RoII;
h += item.H;
}
}
res.YIIu = Math.Round(roh / h, 3);
double fih = 0;
double ch = 0;
roh = 0;
h = 0;
if (downF.Count > 0)
{
foreach (Layer item in downF)
{
fih += item.H * item.IGE.FiII;
ch += item.H * item.IGE.CII * 100;
roh += item.H * item.IGE.RoII;
h += item.H;
}
}
res.YII = Math.Round(roh / h, 3);
res.FiII = Math.Round(fih / h);
res.CII = Math.Round(ch / h, 3);
res.IL = downF[0].IGE.IL;
res.Ke = downF[0].IGE.Ke;
res.Ys = downF[0].IGE.Ys;
res.Ground = "ИГЭ " + downF[0].IGE.NumIGE + " " + downF[0].IGE.Description;
res.GroundType = downF[0].IGE.GroundType;
res.Yc1 = TablesInterolator.Yc1(res.GroundType);
res.Yc2 = TablesInterolator.Yc2(res.GroundType, ts, ls, hs);
double[] MyMqMc = TablesInterolator.My_Mq_Mc(res.FiII);
res.My = MyMqMc[0];
res.Mq = MyMqMc[1];
res.Mc = MyMqMc[2];
res.K = k;
if (B < 10) res.Kz = 1;
else res.Kz = 8 / B + 0.2;
if (Basement) res.d1 = Math.Round(Hs + Hcf * (Ycf / res.YIIu), 3);
else res.d1 = D1;
if (Basement && Db > 2) res.db = 2;
else if (Basement && Db <= 2) res.db = Db;
else res.db = 0;
res.R = res.Yc1 * res.Yc2 * (res.My * res.Kz * B * res.YII + res.Mq * res.d1 * res.YIIu + (res.Mq - 1) * res.db * res.YIIu + res.Mc * res.CII) / k;
res.R = Math.Round(res.R, 2);
//res.GroundType = "";
return res;
}
private List<Layer> UpF(Bore bore)
{
List<Layer> res = new List<Layer>();
double d;
if (Basement) d = Hs + Hcf + Db;
else d = D1;
double FL;
FL = d;
Bore boreW = BoreW(bore);
if (boreW.Layers.Count == 0) return res;
foreach (Layer item in boreW.Layers)
{
if (item.Up > FL) break;
res.Add(item.Clone());
}
res[res.Count - 1].Down = FL;
res[res.Count - 1].H = res[res.Count - 1].Down - res[res.Count - 1].Up;
return res;
}
private List<Layer> DownF(Bore bore)
{
List<Layer> res = new List<Layer>();
double d, z;
if (Basement) d = Hs + Hcf + Db;
else d = D1;
if (B < 10) z = 0.5 * B;
else z = 4 + 0.1 * B;
double FL, ZL;
FL = d;
ZL = d + z;
Bore boreW = BoreW(bore);
if (boreW.Layers.Count == 0) return res;
foreach (Layer item in boreW.Layers)
{
if (item.Down > FL) res.Add(item.Clone());
if (item.Down >= ZL) break;
}
res[0].Up = FL;
res[0].H = res[0].Down - res[0].Up;
res[res.Count - 1].Down = ZL;
res[res.Count - 1].H = res[res.Count - 1].Down - res[res.Count - 1].Up;
return res;
}
private List<Layer> UpW(Bore bore)
{
List<Layer> res = new List<Layer>();
foreach (Layer item in bore.Layers)
{
if (item.Up > bore.WL) break;
res.Add(item.Clone());
}
if (res.Count > 0)
{
res[res.Count - 1].Down = (double)bore.WL;
res[res.Count - 1].H = res[res.Count - 1].Down - res[res.Count - 1].Up;
}
return res;
}
private List<Layer> DownW(Bore bore)
{
List<Layer> layers = new List<Layer>(bore.Layers.Reverse());
List<Layer> res = new List<Layer>();
foreach (Layer item in layers)
{
if (item.Down <= bore.WL) break;
if (item.IGE.W) item.IGE.RoII = (item.IGE.Ys - 1) / (1 + item.IGE.Ke);
res.Add(item.Clone());
}
if (res.Count > 0)
{
res.Reverse();
res[0].Up = (double)bore.WL;
res[0].H = res[0].Down - res[0].Up;
}
return res;
}
private List<Layer> DownFS(Bore bore)
{
List<Layer> res = new List<Layer>();
double FL;
if (Basement) FL = Hs + Hcf + Db;
else FL = D1;
Bore boreW = BoreW(bore);
if (boreW.Layers.Count == 0) return res;
foreach (Layer item in boreW.Layers.Reverse())
{
if (item.Down < FL) break;
res.Add(item.Clone());
}
if (res.Count > 0) res.Reverse();
res[0].Up = FL;
res[0].H = res[0].Down - res[0].Up;
return res;
}
private Bore BoreW(Bore bore)
{
Bore res = new Bore
{
Name = bore.Name,
Number = bore.Number,
WL = bore.WL,
X = bore.X,
Y = bore.Y,
Z = bore.Z
};
List<Layer> downW = DownW(bore);
List<Layer> layers = new List<Layer>(UpW(bore));
if (downW.Count > 0) layers.AddRange(downW);
if (layers.Count > 0)
{
res.Layers = new ObservableCollection<Layer>(layers);
res.Layers[res.Layers.Count - 1].Down = res.Layers[res.Layers.Count - 1].Down + bore.DZ;
res.Layers[res.Layers.Count - 1].H = res.Layers[res.Layers.Count - 1].H + bore.DZ;
res.Layers[res.Layers.Count - 1].Z = res.Layers[res.Layers.Count - 1].Z - bore.DZ;
return res;
}
else
{
bore.Layers[bore.Layers.Count - 1].Down = bore.Layers[bore.Layers.Count - 1].Down + bore.DZ;
bore.Layers[bore.Layers.Count - 1].H = bore.Layers[bore.Layers.Count - 1].H + bore.DZ;
bore.Layers[bore.Layers.Count - 1].Z = bore.Layers[bore.Layers.Count - 1].Z - bore.DZ;
return bore;
}
}
internal void CalcDL(Structure str)
{
if (str == null || str.RedPlanning == null || str.RedPlanning.Count == 0) return;
List<Vertex> vrtxs = new List<Vertex>();
Vertex vrtx;
int i = 1;
foreach (PlanningVertex item in str.RedPlanning)
{
vrtx = new Vertex(item.X, item.Y, item.Number, 2);
vrtx.Attributes[0] = item.Red;
vrtx.Attributes[1] = item.Black;
vrtxs.Add(vrtx);
i++;
}
Contour cnt = new Contour(vrtxs);
TriangleNet.Geometry.Polygon polygon = new TriangleNet.Geometry.Polygon();
polygon.Add(cnt);
GenericMesher mesher = new GenericMesher();
ConstraintOptions constraint = new ConstraintOptions();
constraint.Convex = true;
Mesh meshPlanning = (Mesh)mesher.Triangulate(polygon, constraint);
TriangleQuadTree meshTree = new TriangleQuadTree(meshPlanning);
TriangleNet.Topology.Triangle trgl = (TriangleNet.Topology.Triangle)meshTree.Query(X, Y);
if (trgl == null)
{
Dictionary<Vertex, double> valuePairs = new Dictionary<Vertex, double>();
Line2d ln;
foreach (Vertex item in meshPlanning.Vertices)
{
ln = new Line2d(new Point2d(X, Y), new Point2d(item.X, item.Y));
valuePairs.Add(item, ln.Length);
}
IOrderedEnumerable<KeyValuePair<Vertex, double>> selected = from v in valuePairs // определяем каждый объект как
orderby v.Value // упорядочиваем по возрастанию
select v; // выбираем объект
List<KeyValuePair<Vertex, double>> lst = selected.ToList();
foreach (TriangleNet.Topology.Triangle item in meshPlanning.Triangles)
{
if (item.Contains(lst[0].Key) && item.Contains(lst[1].Key)) { trgl = item; break; }
}
}
vrtx = new Vertex(X, Y, Number, 2);
Interpolation.InterpolateAttributes(vrtx, trgl, 1);
DL = Math.Round(vrtx.Attributes[0], 3);
}
internal void CalcDL(Mesh planningMesh)
{
if (planningMesh == null) return;
Vertex vrtx;
TriangleQuadTree meshTree = new TriangleQuadTree(planningMesh);
TriangleNet.Topology.Triangle trgl = (TriangleNet.Topology.Triangle)meshTree.Query(X, Y);
if (trgl == null)
{
Dictionary<Vertex, double> valuePairs = new Dictionary<Vertex, double>();
Line2d ln;
foreach (Vertex item in planningMesh.Vertices)
{
ln = new Line2d(new Point2d(X, Y), new Point2d(item.X, item.Y));
valuePairs.Add(item, ln.Length);
}
IOrderedEnumerable<KeyValuePair<Vertex, double>> selected = from v in valuePairs // определяем каждый объект как
orderby v.Value // упорядочиваем по возрастанию
select v; // выбираем объект
List<KeyValuePair<Vertex, double>> lst = selected.ToList();
foreach (TriangleNet.Topology.Triangle item in planningMesh.Triangles)
{
if (item.Contains(lst[0].Key) && item.Contains(lst[1].Key)) { trgl = item; break; }
}
}
vrtx = new Vertex(X, Y, Number, 2);
Interpolation.InterpolateAttributes(vrtx, trgl, 1);
DL = Math.Round(vrtx.Attributes[0], 3);
}
internal void CalcNL(Mesh blackMesh)
{
if (blackMesh == null) return;
Vertex vrtx;
TriangleQuadTree meshTree = new TriangleQuadTree(blackMesh);
TriangleNet.Topology.Triangle trgl = (TriangleNet.Topology.Triangle)meshTree.Query(X, Y);
if (trgl == null)
{
Dictionary<Vertex, double> valuePairs = new Dictionary<Vertex, double>();
Line2d ln;
foreach (Vertex item in blackMesh.Vertices)
{
ln = new Line2d(new Point2d(X, Y), new Point2d(item.X, item.Y));
valuePairs.Add(item, ln.Length);
}
IOrderedEnumerable<KeyValuePair<Vertex, double>> selected = from v in valuePairs // определяем каждый объект как
orderby v.Value // упорядочиваем по возрастанию
select v; // выбираем объект
List<KeyValuePair<Vertex, double>> lst = selected.ToList();
foreach (TriangleNet.Topology.Triangle item in blackMesh.Triangles)
{
if (item.Contains(lst[0].Key) && item.Contains(lst[1].Key)) { trgl = item; break; }
}
}
vrtx = new Vertex(X, Y, Number, 2);
Interpolation.InterpolateAttributes(vrtx, trgl, 1);
NL = Math.Round(vrtx.Attributes[0], 3);
}
internal void DLtoD1(double nullLevel)
{
double dlt = nullLevel - DL;
D1 = Math.Round(-FL - dlt, 3);
}
internal void D1toDL(double nullLevel)
{
DL = Math.Round(nullLevel + FL + D1, 3);
}
internal void D1toFL(double nullLevel)
{
double dlt = nullLevel - DL;
FL = Math.Round(-dlt - D1, 3);
}
internal void FLtoD1(double nullLevel)
{
double dlt = nullLevel + FL;
D1 = Math.Round(DL - dlt, 3);
}
internal string PropsToString()
{
string s = ";";
return Number + s + Name + s + (int)Type + s + Basement + s + B + s + L + s + H + s + Db + s + D1 + s + Hs + s + Hcf + s + Ycf + s + X + s + Y + s + FL
+ s + DL + s + NL + s + AlfaDeg;
}
internal List<object> PropsToList()
{
return new List<object> { Number, Name, (int)Type, Basement, B, L, H, Db, D1, Hs, Hcf, Ycf, X, Y, FL, DL, NL, AlfaDeg };
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
Name = src[1];
Type = (TypeFound)Int32.Parse(src[2]);
Basement = bool.Parse(src[3]);
B = double.Parse(src[4]);
L = double.Parse(src[5]);
H = double.Parse(src[6]);
Db = double.Parse(src[7]);
D1 = double.Parse(src[8]);
Hs = double.Parse(src[9]);
Hcf = double.Parse(src[10]);
Ycf = double.Parse(src[11]);
X = double.Parse(src[12]);
Y = double.Parse(src[13]);
FL = double.Parse(src[14]);
DL = double.Parse(src[15]);
NL = double.Parse(src[16]);
AlfaDeg = double.Parse(src[17]);
}
catch
{
return;
}
}
internal void ListToProps(List<object> src)
{
try
{
Number = (int)(double)src[0];
Name = (string)src[1];
Type = (TypeFound)(int)(double)src[2];
Basement = (bool)src[3];
B = (double)src[4];
L = (double)src[5];
H = (double)src[6];
Db = (double)src[7];
D1 = (double)src[8];
Hs = (double)src[9];
Hcf = (double)src[10];
Ycf = (double)src[11];
X = (double)src[12];
Y = (double)src[13];
FL = (double)src[14];
DL = (double)src[15];
NL = (double)src[16];
AlfaDeg = (double)src[17];
}
catch
{
return;
}
}
internal void CalcLevels(Mesh planningMesh, Mesh blackMesh)
{
CalcDL(planningMesh);
CalcNL(blackMesh);
}
public void CopyProps(IEnumerable<Foundation> founds)
{
foreach (Foundation item in founds)
{
if (this.Equals(item)) continue;
item.Name = Name;
item.B = B;
item.L = L;
item.H = H;
item.FL = FL;
item.DL = DL;
item.D1 = D1;
item.Loads = Loads;
}
}
internal void CalcContour()
{
if (Type == TypeFound.Круглый) return;
Point2d v1 = new Point2d(-0.5 * B, -0.5 * L);
Point2d v2 = new Point2d(-0.5 * B, 0.5 * L);
Point2d v3 = new Point2d(0.5 * B, 0.5 * L);
Point2d v4 = new Point2d(0.5 * B, -0.5 * L);
double alfa = DegToRad(AlfaDeg);
double x = v1.X; double y = v1.Y;
v1.X = x * Math.Cos(alfa) - y * Math.Sin(alfa) + X;
v1.Y = x * Math.Sin(alfa) + y * Math.Cos(alfa) + Y;
x = v2.X; y = v2.Y;
v2.X = x * Math.Cos(alfa) - y * Math.Sin(alfa) + X;
v2.Y = x * Math.Sin(alfa) + y * Math.Cos(alfa) + Y;
x = v3.X; y = v3.Y;
v3.X = x * Math.Cos(alfa) - y * Math.Sin(alfa) + X;
v3.Y = x * Math.Sin(alfa) + y * Math.Cos(alfa) + Y;
x = v4.X; y = v4.Y;
v4.X = x * Math.Cos(alfa) - y * Math.Sin(alfa) + X;
v4.Y = x * Math.Sin(alfa) + y * Math.Cos(alfa) + Y;
Contour = new Quadrangle(v1, v2, v3, v4);
}
private double RadToDeg(double radians)
{
return radians * 180 / Math.PI;
}
private double DegToRad(double degries)
{
return degries * Math.PI / 180;
}
}
}

168
BL/IGE.cs Normal file
View File

@@ -0,0 +1,168 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class IGE
{
private string groundType;
public int Number { get; set; }
/// <summary>
/// Номер иженерно-геологического элемента
/// </summary>
public string NumIGE { get; set; }
/// <summary>
/// Тип грунта согласно таблицы 5.4 СП 22.13330.2011
/// </summary>
public string GroundType { get => groundType; set { groundType = value; ChangeTypeGroundIdx(); } }
/// <summary>
/// Плотность грунта для расчетов по 2-й группе предельных сосотояний
/// </summary>
public double RoII { get; set; }
/// <summary>
/// Угол внутреннего трения грунта в градусах для расчетов по 2-й группе предельных сосотояний
/// </summary>
public double FiII { get; set; }
/// <summary>
/// Удельное сцепление для расчетов по 2-й группе предельных сосотояний
/// </summary>
public double CII { get; set; }
/// <summary>
/// Модуль деформации грунта
/// </summary>
public double E { get; set; }
/// <summary>
/// Удельный вес частиц (минеральной части) грунта
/// </summary>
public double Ys { get; set; }
/// <summary>
/// Коэффициент пористости
/// </summary>
public double Ke { get; set; }
/// <summary>
///Показатель текучести
/// </summary>
public double IL { get; set; }
/// <summary>
/// Наличие водонасыщения
/// </summary>
public bool W { get; set; }
/// <summary>
/// Описание слоя грунта
/// </summary>
public string Description { get; set; }
public int GroundTypeIdx { get; private set; }
/// <summary>
/// Типы грунтов согласно таблицы 5.4 СП 22.13330.2011
/// </summary>
private readonly string[] groundTypes = new string[]
{
"Крупнообломочные с песчаным заполнителем и пески кроме мелких и пылеватых",
"Пески мелкие",
"Пески пылеватые маловлажные",
"Пески пылеватые влажные насыщенные водой",
"Пески рыхлые",
"Глинистые, а также крупнообломочные с глинистым заполнителем при IL<=0.25",
"Глинистые, а также крупнообломочные с глинистым заполнителем при 0.25<IL<=0.5",
"Глинистые, а также крупнообломочные с глинистым заполнителем при 0.5<IL"
};
public IGE Clone()
{
return new IGE()
{
Number=Number,
NumIGE=NumIGE,
GroundType = GroundType,
RoII = RoII,
FiII = FiII,
CII = CII,
E = E,
Ys = Ys,
Ke = Ke,
IL = IL,
W = W,
Description = Description
};
}
void ChangeTypeGroundIdx()
{
int i = 1;
foreach (string item in groundTypes)
{
if (item == groundType)
{
GroundTypeIdx = i;
break;
}
i++;
}
}
internal string PropsToString()
{
string s = ";";
return Number.ToString() + s + NumIGE + s + Description + s + RoII.ToString() + s + FiII.ToString() + s + CII.ToString() + s + E.ToString() +
s + Ys.ToString() + s + Ke.ToString() + s + IL.ToString() + s + W.ToString() + s + GroundType + s + GroundTypeIdx.ToString();
}
internal List<object> PropsToList()
{
return new List<object> { Number, NumIGE, Description, RoII, FiII, CII, E, Ys, Ke, IL, W, GroundType, GroundTypeIdx };
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
NumIGE = src[1];
Description = src[2];
RoII = double.Parse(src[3]);
FiII = double.Parse(src[4]);
CII = double.Parse(src[5]);
E = double.Parse(src[6]);
Ys = double.Parse(src[7]);
Ke = double.Parse(src[8]);
IL = double.Parse(src[9]);
W = bool.Parse(src[10]);
GroundType = src[11];
}
catch
{
return;
}
}
internal void ListToProps(List<object> src)
{
try
{
Number = (int)(double)src[0];
NumIGE = (string)src[1];
Description = (string)src[2];
RoII = (double)src[3];
FiII = (double)src[4];
CII = (double)src[5];
E = (double)src[6];
Ys = (double)src[7];
Ke = (double)src[8];
IL = (double)src[9];
W = (bool)src[10];
GroundType = (string)src[11];
}
catch
{
return;
}
}
}
}

96
BL/Layer.cs Normal file
View File

@@ -0,0 +1,96 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class Layer
{
public int Number { get; set; }
public string NumIGE { get; set; }
public IGE IGE { get; set; }
/// <summary>
///Относительная отметка верхней границы слоя относительно устья скважины
/// </summary>
public double Up { get; set; }
/// <summary>
///Относительная отметка нижней границы слоя относительно устья скважины
/// </summary>
public double Down { get; set; }
/// <summary>
///Мощность слоя
/// </summary>
public double H { get; set; }
/// <summary>
///Абсолютная отметка подошвы слоя
/// </summary>
public double Z { get; set; }
/// <summary>
/// Описание слоя грунта
/// </summary>
public string Description { get; set; }
public Layer Clone()
{
return new Layer()
{
Number = this.Number,
NumIGE = this.NumIGE,
IGE = this.IGE,
Up = this.Up,
Down = this.Down,
H = this.H,
Z = this.Z,
Description = this.Description
};
}
internal string PropsToString()
{
string s = ";";
return Number + s + NumIGE + s + Down + s + H + s + Z;
}
internal List<object> PropsToList()
{
return new List<object> { Number, NumIGE, Down, H, Z };
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
NumIGE = src[1];
Down = double.Parse(src[2]);
H = double.Parse(src[3]);
Z = double.Parse(src[4]);
}
catch
{
return;
}
}
internal void ListToProps(List<object> src)
{
try
{
Number = (int)(double)src[0];
NumIGE = (string)src[1];
Down = (double)src[2];
H = (double)src[3];
Z = (double)src[4];
}
catch
{
return;
}
}
}
}

39
BL/PlanningVertex.cs Normal file
View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class PlanningVertex : Geo.Point3d
{
public int Number { get; set; }
public double Red { get; set; }
public double Black { get; set; }
internal string PropsToString()
{
string s = ";";
return Number + s + X + s + Y + s + Red + s + Black;
}
internal void StringToProps(string line, char separator = ';')
{
string[] src = line.Split(separator);
try
{
Number = Int32.Parse(src[0]);
X = double.Parse(src[1]);
Y = double.Parse(src[2]);
Red = double.Parse(src[3]);
Black = double.Parse(src[4]);
}
catch
{
return;
}
}
}
}

69
BL/PlayGround.cs Normal file
View File

@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class PlayGround
{
public string Description { get; set; }
public int Number { get; set; }
public string Name { get; set; }
public ObservableCollection<IGE> IGEs { get; private set; }
public ObservableCollection<Bore> Bores { get; private set; }
public ObservableCollection<Structure> Structures { get; private set; }
public PlayGround()
{
IGEs = new ObservableCollection<IGE>();
Bores = new ObservableCollection<Bore>();
Structures = new ObservableCollection<Structure>();
}
public void AddIGE(IGE ige)
{
if (IGEs == null) IGEs = new ObservableCollection<IGE>();
IGEs.Add(ige);
}
public void AddIGEs(ObservableCollection<IGE> iges)
{
IGEs = iges;
}
public void AddIGEs(List<IGE> iges)
{
if (IGEs == null) IGEs = new ObservableCollection<IGE>();
foreach (var item in iges) IGEs.Add(item);
}
public void AddBore(Bore bore)
{
if (Bores == null) Bores = new ObservableCollection<Bore>();
Bores.Add(bore);
}
public void AddBores(ObservableCollection<Bore> bores)
{
Bores = bores;
}
public void AddBores(List<Bore> bores)
{
if (Bores == null) Bores = new ObservableCollection<Bore>();
foreach (var item in bores) Bores.Add(item);
}
public void DeleteBores()
{
Bores = new ObservableCollection<Bore>();
}
public void DeleteIGEs()
{
IGEs = new ObservableCollection<IGE>();
}
}
}

30
BL/Structure.cs Normal file
View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
public class Structure
{
public TypeFlexStructure flexStructure { get; set; }
public double L { get; set; }
public double H { get; set; }
public double Null { get; set; }
public int Number { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public ObservableCollection<Foundation> Foundations { get; set; }
public ObservableCollection<PlanningVertex> RedPlanning { get; set; }
public ObservableCollection<PlanningVertex> BlackPlanning { get; set; }
public Structure()
{
Foundations = new ObservableCollection<Foundation>();
RedPlanning = new ObservableCollection<PlanningVertex>();
BlackPlanning = new ObservableCollection<PlanningVertex>();
}
}
}

415
BL/TablesInterolator.cs Normal file
View File

@@ -0,0 +1,415 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Geo;
namespace GroundOrganizer
{
public struct My_Mq_Mc
{
public double My;
public double Mq;
public double Mc;
Dictionary<double, double[]> table_5_5;
public My_Mq_Mc(double fi)
{
table_5_5 = new Dictionary<double, double[]>
{
{0,new double[]{0,1,3.14}},
{1,new double[]{0.01,1.06,3.23}},
{2,new double[]{0.03,1.12,3.32}},
{3,new double[]{0.04,1.18,3.41}},
{4,new double[]{0.06,1.25,3.51}},
{5,new double[]{0.08,1.32,3.61}},
{6,new double[]{0.1,1.39,3.71}},
{7,new double[]{0.12,1.47,3.82}},
{8,new double[]{0.14,1.55,3.93}},
{9,new double[]{0.16,1.64,4.05}},
{10,new double[]{0.18,1.73,4.17}},
{11,new double[]{0.21,1.83,4.29}},
{12,new double[]{0.23,1.94,4.42}},
{13,new double[]{0.26,2.05,4.55}},
{14,new double[]{0.29,2.17,4.69}},
{15,new double[]{0.32,2.3,4.84}},
{16,new double[]{0.36,2.43,4.99}},
{17,new double[]{0.39,2.57,5.15}},
{18,new double[]{0.43,2.73,5.31}},
{19,new double[]{0.47,2.89,5.48}},
{20,new double[]{0.51,3.06,5.66}},
{21,new double[]{0.56,3.24,5.84}},
{22,new double[]{0.61,3.44,6.04}},
{23,new double[]{0.66,3.65,6.24}},
{24,new double[]{0.72,3.87,6.45}},
{25,new double[]{0.78,4.11,6.67}},
{26,new double[]{0.84,4.37,6.9}},
{27,new double[]{0.91,4.64,7.14}},
{28,new double[]{0.98,4.93,7.4}},
{29,new double[]{1.06,5.25,7.67}},
{30,new double[]{1.15,5.59,7.95}},
{31,new double[]{1.24,5.95,8.24}},
{32,new double[]{1.34,6.34,8.55}},
{33,new double[]{1.44,6.76,8.88}},
{34,new double[]{1.55,7.22,9.22}},
{35,new double[]{1.68,7.71,9.58}},
{36,new double[]{1.81,8.24,9.97}},
{37,new double[]{1.95,8.81,10.37}},
{38,new double[]{2.11,9.44,10.8}},
{39,new double[]{2.28,10.11,11.25}},
{40,new double[]{2.46,10.85,11.73}},
{41,new double[]{2.66,11.64,12.24}},
{42,new double[]{2.88,12.51,12.79}},
{43,new double[]{3.12,13.46,13.37}},
{44,new double[]{3.38,14.5,13.98}},
{45,new double[]{3.66,15.64,14.64}}
};
My= table_5_5[fi][0];
Mq = table_5_5[fi][1];
Mc = table_5_5[fi][2];
}
}
public class TablesInterolator
{
static readonly Dictionary<double, double[]> table_5_5 = new Dictionary<double, double[]>
{
{0,new double[]{0,1,3.14}},
{1,new double[]{0.01,1.06,3.23}},
{2,new double[]{0.03,1.12,3.32}},
{3,new double[]{0.04,1.18,3.41}},
{4,new double[]{0.06,1.25,3.51}},
{5,new double[]{0.08,1.32,3.61}},
{6,new double[]{0.1,1.39,3.71}},
{7,new double[]{0.12,1.47,3.82}},
{8,new double[]{0.14,1.55,3.93}},
{9,new double[]{0.16,1.64,4.05}},
{10,new double[]{0.18,1.73,4.17}},
{11,new double[]{0.21,1.83,4.29}},
{12,new double[]{0.23,1.94,4.42}},
{13,new double[]{0.26,2.05,4.55}},
{14,new double[]{0.29,2.17,4.69}},
{15,new double[]{0.32,2.3,4.84}},
{16,new double[]{0.36,2.43,4.99}},
{17,new double[]{0.39,2.57,5.15}},
{18,new double[]{0.43,2.73,5.31}},
{19,new double[]{0.47,2.89,5.48}},
{20,new double[]{0.51,3.06,5.66}},
{21,new double[]{0.56,3.24,5.84}},
{22,new double[]{0.61,3.44,6.04}},
{23,new double[]{0.66,3.65,6.24}},
{24,new double[]{0.72,3.87,6.45}},
{25,new double[]{0.78,4.11,6.67}},
{26,new double[]{0.84,4.37,6.9}},
{27,new double[]{0.91,4.64,7.14}},
{28,new double[]{0.98,4.93,7.4}},
{29,new double[]{1.06,5.25,7.67}},
{30,new double[]{1.15,5.59,7.95}},
{31,new double[]{1.24,5.95,8.24}},
{32,new double[]{1.34,6.34,8.55}},
{33,new double[]{1.44,6.76,8.88}},
{34,new double[]{1.55,7.22,9.22}},
{35,new double[]{1.68,7.71,9.58}},
{36,new double[]{1.81,8.24,9.97}},
{37,new double[]{1.95,8.81,10.37}},
{38,new double[]{2.11,9.44,10.8}},
{39,new double[]{2.28,10.11,11.25}},
{40,new double[]{2.46,10.85,11.73}},
{41,new double[]{2.66,11.64,12.24}},
{42,new double[]{2.88,12.51,12.79}},
{43,new double[]{3.12,13.46,13.37}},
{44,new double[]{3.38,14.5,13.98}},
{45,new double[]{3.66,15.64,14.64}}
};
static readonly Dictionary<string, double[]> table_5_4 = new Dictionary<string, double[]>
{
{"Крупнообломочные с песчаным заполнителем и пески кроме мелких и пылеватых", new double[]{1.4, 1.2, 1.4} },
{"Пески мелкие", new double[]{1.3, 1.1, 1.3} },
{"Пески пылеватые маловлажные", new double[]{1.25, 1.0, 1.2} },
{"Пески пылеватые влажные насыщенные водой", new double[]{1.1, 1.0, 1.2} },
{"Пески рыхлые", new double[]{1.0, 1.0, 1.0} },
{"Глинистые, а также крупнообломочные с глинистым заполнителем при IL<=0.25", new double[]{1.25, 1.0, 1.1} },
{"Глинистые, а также крупнообломочные с глинистым заполнителем при 0.25<IL<=0.5", new double[]{1.2, 1.0, 1.1} },
{"Глинистые, а также крупнообломочные с глинистым заполнителем при 0.5<IL", new double[]{1.1, 1.0, 1.0} },
};
static readonly double[,] table_5_8_R =
{
{ 1, 1, 1, 1, 1, 1, 1 },
{ 0.96, 0.972, 0.975, 0.976, 0.977, 0.977, 0.977 },
{ 0.8, 0.848, 0.866, 0.876, 0.879, 0.881, 0.881 },
{ 0.606, 0.682, 0.717, 0.739, 0.749, 0.754, 0.755 },
{ 0.449, 0.532, 0.578, 0.612, 0.629, 0.639, 0.642 },
{ 0.336, 0.414, 0.463, 0.505, 0.53, 0.545, 0.55 },
{ 0.257, 0.325, 0.374, 0.419, 0.449, 0.47, 0.477 },
{ 0.201, 0.26, 0.304, 0.349, 0.383, 0.41, 0.42 },
{ 0.16, 0.21, 0.251, 0.294, 0.329, 0.36, 0.374 },
{ 0.131, 0.173, 0.209, 0.25, 0.285, 0.319, 0.337 },
{ 0.108, 0.145, 0.176, 0.214, 0.248, 0.285, 0.306 },
{ 0.091, 0.123, 0.15, 0.185, 0.218, 0.255, 0.28 },
{ 0.077, 0.105, 0.13, 0.161, 0.192, 0.23, 0.258 },
{ 0.067, 0.091, 0.113, 0.141, 0.17, 0.208, 0.239 },
{ 0.058, 0.079, 0.099, 0.124, 0.152, 0.189, 0.223 },
{ 0.051, 0.07, 0.087, 0.11, 0.136, 0.173, 0.208 },
{ 0.045, 0.062, 0.077, 0.099, 0.122, 0.158, 0.196 },
{ 0.04, 0.055, 0.069, 0.088, 0.11, 0.145, 0.185 },
{ 0.036, 0.049, 0.062, 0.08, 0.1, 0.133, 0.175 },
{ 0.032, 0.044, 0.056, 0.072, 0.091, 0.123, 0.166 },
{ 0.029, 0.04, 0.051, 0.066, 0.084, 0.113, 0.158 },
{ 0.026, 0.037, 0.046, 0.06, 0.077, 0.105, 0.15 },
{ 0.024, 0.033, 0.042, 0.055, 0.071, 0.098, 0.143 },
{ 0.022, 0.031, 0.039, 0.051, 0.065, 0.091, 0.137 },
{ 0.02, 0.028, 0.036, 0.047, 0.06, 0.085, 0.132 },
{ 0.019, 0.026, 0.033, 0.043, 0.056, 0.079, 0.126 },
{ 0.017, 0.024, 0.031, 0.04, 0.052, 0.074, 0.122 },
{ 0.016, 0.022, 0.029, 0.037, 0.049, 0.069, 0.117 },
{ 0.015, 0.021, 0.027, 0.035, 0.045, 0.065, 0.113 },
{ 0.014, 0.02, 0.025, 0.033, 0.042, 0.061, 0.109 },
{ 0.013, 0.018, 0.023, 0.031, 0.04, 0.058, 0.106 },
};
static readonly double[] table_5_8_C =
{
1, 0.949, 0.756, 0.547, 0.39, 0.285, 0.214, 0.165, 0.13,
0.106, 0.087, 0.073, 0.062, 0.053, 0.046, 0.04, 0.036,
0.031, 0.028, 0.024, 0.022, 0.021, 0.019, 0.017,
0.016, 0.015, 0.014, 0.013, 0.012, 0.011, 0.01
};
static readonly double[] table_5_8_L =
{
1,0.977,0.881,0.755,0.642,0.55,0.477,0.42,0.374,0.337,
0.306,0.28,0.258,0.239,0.223,0.208,0.196,0.185,0.175,
0.166,0.158,0.15,0.143,0.137,0.132,0.126,0.122,0.117,0.113,0.109,0.106
};
static readonly double[] table_5_8_ksi =
{
0,0.4,0.8,1.2,1.6,2,2.4,2.8,3.2,3.6,4,
4.4,4.8,5.2,5.6,6,6.4,6.8,7.2,7.6,8,8.4,
8.8,9.2,9.6,10,10.4,10.8,11.2,11.6,12
};
static readonly double[] table_5_8_nu = { 1, 1.4, 1.8, 2.4, 3.2, 5, 10 };
public static double[] My_Mq_Mc(double fi)
{
return table_5_5[fi];
}
public static double Yc1(string ground)
{
return table_5_4[ground][0];
}
public static double Yc2(string ground, TypeFlexStructure flex = TypeFlexStructure.Гибкая, double L = 0, double H = 1)
{
if (flex == TypeFlexStructure.Гибкая) return 1;
double Yc21 = table_5_4[ground][1];
double Yc22 = table_5_4[ground][2];
Geo.Line2d interpolant = new Geo.Line2d(new Geo.Point2d(4, Yc21), new Geo.Point2d(1.5, Yc22));
if (L / H < 4 && L / H > 1.5) return interpolant.Interpolation(L / H);
else if (L / H >= 4) return Yc21;
else return Yc22;
}
public static double? table_5_8(double z, double b, double l, TypeFound typeFound = TypeFound.Прямоугольный, PointFound ptFound = PointFound.Центр)
{
double nu, ksi;
if (ptFound == PointFound.Центр) ksi = 2 * z / b;
else ksi = z / b;
if (typeFound == TypeFound.Прямоугольный && l / b < 10)
{
nu = l / b;
return BilinearInterpolation(table_5_8_ksi, table_5_8_nu, table_5_8_R, ksi, nu);
}
if (typeFound == TypeFound.Ленточный || l / b >= 10)
{
return LinearInterpolation(table_5_8_ksi, table_5_8_L, ksi);
}
if (typeFound == TypeFound.Круглый)
{
return LinearInterpolation(table_5_8_ksi, table_5_8_C, ksi);
}
return null;
}
public static List<double?> Table_5_8(List<double> z, double b, double l, TypeFound typeFound = TypeFound.Прямоугольный, PointFound ptFound = PointFound.Центр)
{
List<double?> res = new List<double?>();
double nu, ksi;
foreach (double item in z)
{
if (ptFound == PointFound.Центр) ksi = 2 * item / b;
else ksi = item / b;
if (typeFound == TypeFound.Прямоугольный && l / b < 10)
{
nu = l / b;
res.Add(BilinearInterpolation(table_5_8_ksi, table_5_8_nu, table_5_8_R, ksi, nu));
}
if (typeFound == TypeFound.Ленточный || l / b >= 10)
{
res.Add(LinearInterpolation(table_5_8_ksi, table_5_8_L, ksi));
}
if (typeFound == TypeFound.Круглый)
{
res.Add(LinearInterpolation(table_5_8_ksi, table_5_8_C, ksi));
}
}
return res;
}
static double? LinearInterpolation(double[] x, double[] y, double xval)
{
double? zval = null;
Line2d interpolant;
int lx = x.Length;
int ly = y.Length;
if (lx < 2 || ly < 2) return zval;
if (lx != ly) return zval;
for (int i = 0; i < lx - 1; i++)
{
if (xval >= x[i] && xval < x[i + 1])
{
interpolant = new Line2d(new Point2d(x[i], y[i]), new Point2d(x[i + 1], y[i + 1]));
return interpolant.Interpolation(xval);
}
if (xval < x[0])
{
interpolant = new Line2d(new Point2d(x[0], y[0]), new Point2d(x[1], y[1]));
return interpolant.Interpolation(xval);
}
if (xval >= x[lx - 1])
{
interpolant = new Line2d(new Point2d(x[lx - 2], y[lx - 2]), new Point2d(x[lx - 1], y[lx - 1]));
return interpolant.Interpolation(xval);
}
}
return zval;
}
static double? BilinearInterpolation(double[] x, double[] y, double[,] z, double xval, double yval)
{
//calculates single point bilinear interpolation
double? zval = null;
Plane interpolant;
int lx = x.Length;
int ly = y.Length;
if (lx < 2 || ly < 2 || z.Length < 4) return zval;
if (lx !=z.GetLength(0)) return zval;
if (ly !=z.GetLength(1)) return zval;
for (int i = 0; i < lx - 1; i++)
{
for (int j = 0; j < ly - 1; j++)
{
if (xval >= x[i] && xval < x[i + 1] && yval >= y[j] && yval < y[j + 1])
{
interpolant = new Plane(
new Point3d(x[i], y[j], z[i, j]),
new Point3d(x[i + 1], y[j], z[i + 1, j]),
new Point3d(x[i], y[j + 1], z[i, j + 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval >= x[lx-1] && yval >= y[j] && yval < y[j + 1])
{
interpolant = new Plane(
new Point3d(x[lx - 2], y[j], z[lx - 2, j]),
new Point3d(x[lx - 1], y[j], z[lx - 1, j]),
new Point3d(x[lx - 2], y[j + 1], z[lx - 2, j + 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval < x[0] && yval >= y[j] && yval < y[j + 1])
{
interpolant = new Plane(
new Point3d(x[0], y[j], z[0, j]),
new Point3d(x[1], y[j], z[1, j]),
new Point3d(x[0], y[j + 1], z[0, j + 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval >= x[i] && xval < x[i + 1] && yval >= y[ly-1])
{
interpolant = new Plane(
new Point3d(x[i], y[ly - 2], z[i, ly - 2]),
new Point3d(x[i + 1], y[ly - 2], z[i + 1, ly - 2]),
new Point3d(x[i], y[ly - 1], z[i, ly - 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval >= x[i] && xval < x[i + 1] && yval < y[0])
{
interpolant = new Plane(
new Point3d(x[i], y[0], z[i, 0]),
new Point3d(x[i + 1], y[0], z[i + 1, 0]),
new Point3d(x[i], y[1], z[i, 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval < x[0] && yval < y[0])
{
interpolant = new Plane(
new Point3d(x[0], y[0], z[0, 0]),
new Point3d(x[1], y[0], z[1, 0]),
new Point3d(x[0], y[1], z[0, 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval >= x[lx-1] && yval < y[0])
{
interpolant = new Plane(
new Point3d(x[lx - 2], y[0], z[lx - 2, 0]),
new Point3d(x[lx - 1], y[0], z[lx - 1, 0]),
new Point3d(x[lx - 2], y[1], z[lx - 2, 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval < x[0] && yval >= y[ly-1])
{
interpolant = new Plane(
new Point3d(x[0], y[ly - 2], z[0, ly - 2]),
new Point3d(x[0], y[ly - 1], z[0, ly - 1]),
new Point3d(x[1], y[ly - 1], z[1, ly - 1])
);
return interpolant.Interpolation(xval, yval);
}
if (xval >= x[lx-1] && yval >= y[ly - 1])
{
interpolant = new Plane(
new Point3d(x[lx - 2], y[ly - 2], z[lx - 2, ly - 2]),
new Point3d(x[lx - 1], y[ly - 2], z[lx - 1, ly - 2]),
new Point3d(x[lx - 2], y[ly - 1], z[lx - 2, ly - 1])
);
return interpolant.Interpolation(xval, yval);
}
}
}
return zval;
}
//double[] BilinearInterpolation(double[] x, double[] y, double[,] z, double[] xvals, double[] yvals)
//{
// //calculates multiple point bilinear interpolation
// double[] zvals = new double[xvals.Length];
// for (int i = 0; i < xvals.Length; i++)
// zvals[i] = BilinearInterpolation(x, y, z, xvals[i], yvals[i]);
// return zvals;
//}
}
}

15
BL/ToSerializ.cs Normal file
View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GroundOrganizer
{
[Serializable]
internal class ToSerializ
{
public ObservableCollection<PlayGround> PlayGroundList { get; set; }
}
}