diff --git a/StructureHelper/Libraries/LoaderCalculator.dll b/StructureHelper/Libraries/LoaderCalculator.dll
index fd7ba77..083e55c 100644
Binary files a/StructureHelper/Libraries/LoaderCalculator.dll and b/StructureHelper/Libraries/LoaderCalculator.dll differ
diff --git a/StructureHelper/StructureHelper.csproj.user b/StructureHelper/StructureHelper.csproj.user
index 3cd5c70..a9d2d08 100644
--- a/StructureHelper/StructureHelper.csproj.user
+++ b/StructureHelper/StructureHelper.csproj.user
@@ -60,7 +60,7 @@
Code
-
+
Code
@@ -155,7 +155,7 @@
Designer
-
+
Designer
diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/ValuePointDiagramLogic.cs b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/ValuePointDiagramLogic.cs
index b08bb5c..008312e 100644
--- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/ValuePointDiagramLogic.cs
+++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/ValuePointDiagramLogic.cs
@@ -149,9 +149,10 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu
CenterY = valuePoint.areaPoint.Point.Y,
Material = material,
};
- ndm.Prestrain = (userPrestrain.Mx + autoPrestrain.Mx) * valuePoint.areaPoint.Point.Y
+ var prestrain = (userPrestrain.Mx + autoPrestrain.Mx) * valuePoint.areaPoint.Point.Y
+ (userPrestrain.My + autoPrestrain.My) * valuePoint.areaPoint.Point.X
+ userPrestrain.Nz + autoPrestrain.Nz;
+ ndm.PrestrainLogic.Add(PrestrainTypes.Prestrain, prestrain);
return ndm;
}
private List GetValueLabels(IEnumerable selectedDelegates)
diff --git a/StructureHelper/Windows/MainWindow/AnalisesLogic.cs b/StructureHelper/Windows/MainWindow/AnalysesLogic.cs
similarity index 100%
rename from StructureHelper/Windows/MainWindow/AnalisesLogic.cs
rename to StructureHelper/Windows/MainWindow/AnalysesLogic.cs
diff --git a/StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml b/StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml
similarity index 96%
rename from StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml
rename to StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml
index 6e9bd6b..8913400 100644
--- a/StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml
+++ b/StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml
@@ -1,12 +1,12 @@
-
+ d:DataContext="{d:DesignInstance local:AnalysesManagerViewModel}"
+ Title="Analyses Manager" Height="450" Width="800" MinHeight="400" MinWidth="600">
diff --git a/StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml.cs b/StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml.cs
similarity index 86%
rename from StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml.cs
rename to StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml.cs
index 81cfe06..af11edd 100644
--- a/StructureHelper/Windows/MainWindow/AnalisesManagerView.xaml.cs
+++ b/StructureHelper/Windows/MainWindow/AnalysesManagerView.xaml.cs
@@ -17,9 +17,9 @@ namespace StructureHelper.Windows.MainWindow
///
/// Логика взаимодействия для AnalisesManagerView.xaml
///
- public partial class AnalisesManagerView : Window
+ public partial class AnalysesManagerView : Window
{
- public AnalisesManagerView()
+ public AnalysesManagerView()
{
InitializeComponent();
}
diff --git a/StructureHelper/Windows/MainWindow/AnalisesManagerViewModel.cs b/StructureHelper/Windows/MainWindow/AnalysesManagerViewModel.cs
similarity index 82%
rename from StructureHelper/Windows/MainWindow/AnalisesManagerViewModel.cs
rename to StructureHelper/Windows/MainWindow/AnalysesManagerViewModel.cs
index 7fe72f8..bec1f79 100644
--- a/StructureHelper/Windows/MainWindow/AnalisesManagerViewModel.cs
+++ b/StructureHelper/Windows/MainWindow/AnalysesManagerViewModel.cs
@@ -7,13 +7,13 @@ using System.Threading.Tasks;
namespace StructureHelper.Windows.MainWindow
{
- public class AnalisesManagerViewModel : ViewModelBase
+ public class AnalysesManagerViewModel : ViewModelBase
{
public FileLogic FileLogic { get; }
public DiagramLogic DiagramLogic { get; }
public AnalisesLogic AnalisesLogic { get; }
- public AnalisesManagerViewModel()
+ public AnalysesManagerViewModel()
{
FileLogic = new();
DiagramLogic = new();
diff --git a/StructureHelper/Windows/MainWindow/CrossSectionView.xaml b/StructureHelper/Windows/MainWindow/CrossSectionView.xaml
index ac8b107..8f9e094 100644
--- a/StructureHelper/Windows/MainWindow/CrossSectionView.xaml
+++ b/StructureHelper/Windows/MainWindow/CrossSectionView.xaml
@@ -339,7 +339,7 @@
-
+
diff --git a/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs b/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs
index 93f7330..b62e2a2 100644
--- a/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs
+++ b/StructureHelperLogics/Models/Templates/CrossSections/RCs/RectGeometryLogic.cs
@@ -62,7 +62,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
var point = new RebarPrimitive()
{
Area = area1,
- Name = "Left bottom point",
+ Name = "Left bottom rebar",
HeadMaterial = reinforcement,
HostPrimitive=concreteBlock
};
@@ -72,7 +72,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
point = new RebarPrimitive()
{
Area = area1,
- Name = "Right bottom point",
+ Name = "Right bottom rebar",
HeadMaterial = reinforcement,
HostPrimitive = concreteBlock
};
@@ -82,7 +82,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
point = new RebarPrimitive()
{
Area = area2,
- Name = "Left top point",
+ Name = "Left top rebar",
HeadMaterial = reinforcement,
HostPrimitive = concreteBlock
};
@@ -92,7 +92,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
point = new RebarPrimitive()
{
Area = area2,
- Name = "Right top point",
+ Name = "Right top rebar",
HeadMaterial = reinforcement,
HostPrimitive = concreteBlock
};
@@ -115,11 +115,11 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
double dist = (xs[1] - xs[0]) / count;
for (int i = 1; i < count; i++)
{
- point = new RebarPrimitive() { Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
+ point = new RebarPrimitive() { Area = area1, Name = $"Bottom rebar {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
point.Center.X = xs[0] + dist * i;
point.Center.Y = ys[0];
primitives.Add(point);
- point = new RebarPrimitive() {Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
+ point = new RebarPrimitive() {Area = area2, Name = $"Top rebar {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
point.Center.X = xs[0] + dist * i;
point.Center.Y = ys[1];
primitives.Add(point);
diff --git a/StructureHelperLogics/NdmCalculations/Analyses/RC/InputDataFactory.cs b/StructureHelperLogics/NdmCalculations/Analyses/RC/InputDataFactory.cs
index fff657b..64e18a0 100644
--- a/StructureHelperLogics/NdmCalculations/Analyses/RC/InputDataFactory.cs
+++ b/StructureHelperLogics/NdmCalculations/Analyses/RC/InputDataFactory.cs
@@ -42,7 +42,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
{
inputData.ReinforcementStress = inputData.ReinforcementStrength;
}
- inputData.IsPrestressed = ndm.Prestrain > 0.0005d ? true : false;
+ inputData.IsPrestressed = ndm.PrestrainLogic.GetByType(PrestrainTypes.Prestrain).Sum(x => x.PrestrainValue) > 0.0005d ? true : false;
inputData.LappedCountRate = lappedCountRate;
return inputData;
}
diff --git a/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthCalculationLogic.cs b/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthCalculationLogic.cs
index 89e66f2..faab256 100644
--- a/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthCalculationLogic.cs
+++ b/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthCalculationLogic.cs
@@ -32,7 +32,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
///
/// Width of crack from long term loads with short term properties of concrete
///
- private double longTermLoadShortConcreteWidth;
+ private double longTermLoadShortConcreteCrackWidth;
private IRebarStressCalculator rebarStressCalculator;
public IRebarCrackCalculatorInputData InputData { get; set; }
@@ -54,6 +54,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
public void Run()
{
+ TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
PrepareNewResult();
ProcessCrackWidthCalculation();
}
@@ -69,25 +70,31 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
private void ProcessCrackWidthCalculation()
{
+ crackWidthLogic.TraceLogger = TraceLogger;
CrackWidthRebarTupleResult longRebarResult = ProcessLongTermCalculations();
CrackWidthRebarTupleResult shortRebarResult = ProcessShortTermCalculations();
result.LongTermResult = longRebarResult;
+ TraceLogger?.AddMessage("Long term result has been obtained succesfully", TraceLogStatuses.Debug);
result.ShortTermResult = shortRebarResult;
+ TraceLogger?.AddMessage("Short term result has been obtained succesfully", TraceLogStatuses.Debug);
}
private CrackWidthRebarTupleResult ProcessShortTermCalculations()
{
+ TraceLogger?.AddMessage($"Short term softening factor calculation");
crackSofteningLogic = GetSofteningLogic(InputData.ShortRebarData);
rebarStressResult = GetRebarStressResult(InputData.ShortRebarData);
- acrc2InputData = GetCrackWidthInputData(crackSofteningLogic, InputData.ShortRebarData, CalcTerms.ShortTerm);
-
+ acrc3InputData = GetCrackWidthInputData(crackSofteningLogic, InputData.LongRebarData, CalcTerms.ShortTerm);
crackWidthLogic.InputData = acrc3InputData;
- longTermLoadShortConcreteWidth = crackWidthLogic.GetCrackWidth();
+ longTermLoadShortConcreteCrackWidth = crackWidthLogic.GetCrackWidth();
+ TraceLogger?.AddMessage($"Crack width from long term load with short term factor of concrete acrc,3 = {longTermLoadShortConcreteCrackWidth}(m)", TraceLogStatuses.Debug);
+ acrc2InputData = GetCrackWidthInputData(crackSofteningLogic, InputData.ShortRebarData, CalcTerms.ShortTerm);
crackWidthLogic.InputData = acrc2InputData;
fullLoadShortConcreteCrackWidth = crackWidthLogic.GetCrackWidth();
+ TraceLogger?.AddMessage($"Crack width from full load with short term factor of concrete acrc,2 = {fullLoadShortConcreteCrackWidth}(m)", TraceLogStatuses.Debug);
- double acrcShort = longTermLoadLongTermConcreteCrackWidth + fullLoadShortConcreteCrackWidth - longTermLoadShortConcreteWidth;
- TraceLogger?.AddMessage($"Short crack width acrc = acrc,1 + acrc,2 - acrc,3 = {longTermLoadLongTermConcreteCrackWidth} + {fullLoadShortConcreteCrackWidth} - {longTermLoadShortConcreteWidth} = {acrcShort}(m)");
+ double acrcShort = longTermLoadLongTermConcreteCrackWidth + fullLoadShortConcreteCrackWidth - longTermLoadShortConcreteCrackWidth;
+ TraceLogger?.AddMessage($"Short crack width acrc = acrc,1 + acrc,2 - acrc,3 = {longTermLoadLongTermConcreteCrackWidth} + {fullLoadShortConcreteCrackWidth} - {longTermLoadShortConcreteCrackWidth} = {acrcShort}(m)");
var shortRebarResult = new CrackWidthRebarTupleResult()
{
CrackWidth = acrcShort,
@@ -101,12 +108,13 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
private CrackWidthRebarTupleResult ProcessLongTermCalculations()
{
+ TraceLogger?.AddMessage($"Long term softening factor calculation");
crackSofteningLogic = GetSofteningLogic(InputData.LongRebarData);
rebarStressResult = GetRebarStressResult(InputData.LongRebarData);
acrc1InputData = GetCrackWidthInputData(crackSofteningLogic, InputData.LongRebarData, CalcTerms.LongTerm);
- acrc3InputData = GetCrackWidthInputData(crackSofteningLogic, InputData.LongRebarData, CalcTerms.ShortTerm);
crackWidthLogic.InputData = acrc1InputData;
longTermLoadLongTermConcreteCrackWidth = crackWidthLogic.GetCrackWidth();
+ TraceLogger?.AddMessage($"Crack width from long term load with long term factor of concrete acrc,1 = {longTermLoadLongTermConcreteCrackWidth}(m)", TraceLogStatuses.Debug);
var longRebarResult = new CrackWidthRebarTupleResult()
{
CrackWidth = longTermLoadLongTermConcreteCrackWidth,
@@ -137,6 +145,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
ICrackSofteningLogic crackSofteningLogic;
if (InputData.UserCrackInputData.SetSofteningFactor == true)
{
+ TraceLogger?.AddMessage("User value of softening factor is assigned");
crackSofteningLogic = new StabSoftetingLogic(InputData.UserCrackInputData.SofteningFactor)
{
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
@@ -144,6 +153,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
}
else
{
+ TraceLogger?.AddMessage("Exact value of softening factor is calculated");
crackSofteningLogic = new RebarStressSofteningLogic()
{
RebarPrimitive = InputData.RebarPrimitive,
@@ -156,7 +166,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
private ICrackWidthLogicInputData GetCrackWidthInputData(ICrackSofteningLogic crackSofteningLogic, IRebarCrackInputData inputData, CalcTerms calcTerm)
{
-
var factoryInputData = new CrackWidthLogicInputDataFactory(crackSofteningLogic)
{
CalcTerm = calcTerm,
diff --git a/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthLogicSP63.cs b/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthLogicSP63.cs
index f0e7a14..9c6cf87 100644
--- a/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthLogicSP63.cs
+++ b/StructureHelperLogics/NdmCalculations/Cracking/CrackWidthLogicSP63.cs
@@ -52,7 +52,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
}
else
{
- TraceLogger?.AddMessage($"Rebar elongation Epsilon = {inputData.RebarStrain} - {inputData.ConcreteStrain} = {rebarElongation}(dimensionless)");
+ TraceLogger?.AddMessage($"Rebar elongation Epsilon = {inputData.RebarStrain} - ({inputData.ConcreteStrain}) = {rebarElongation}(dimensionless)");
widthOfCrack = rebarElongation * inputData.LengthBetweenCracks;
widthOfCrack *= inputData.TermFactor * inputData.BondFactor * inputData.StressStateFactor * inputData.PsiSFactor;
TraceLogger?.AddMessage($"Width of crack a,crc = {inputData.TermFactor} * {inputData.BondFactor} * {inputData.StressStateFactor} * {inputData.PsiSFactor} * {rebarElongation} * {inputData.LengthBetweenCracks}(m) = {widthOfCrack}(m)");
diff --git a/StructureHelperLogics/NdmCalculations/Cracking/RebarStressCalculator.cs b/StructureHelperLogics/NdmCalculations/Cracking/RebarStressCalculator.cs
index 4c8358d..0614ccc 100644
--- a/StructureHelperLogics/NdmCalculations/Cracking/RebarStressCalculator.cs
+++ b/StructureHelperLogics/NdmCalculations/Cracking/RebarStressCalculator.cs
@@ -63,7 +63,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
var strainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
result.RebarStrain = stressLogic.GetSectionStrain(strainMatrix, rebarNdm);
result.RebarStress = stressLogic.GetStress(strainMatrix, rebarNdm);
- result.ConcreteStrain = -concreteNdm.Prestrain;
+ result.ConcreteStrain = -concreteNdm.PrestrainLogic.GetAll().Sum(x => x.PrestrainValue);
}
private void PrepareNewResult()
diff --git a/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/ExpSofteningLogic.cs b/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/ExpSofteningLogic.cs
index 22b42e0..026776b 100644
--- a/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/ExpSofteningLogic.cs
+++ b/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/ExpSofteningLogic.cs
@@ -1,5 +1,6 @@
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models;
+using StructureHelperCommon.Models.Loggers;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -64,7 +65,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
///
public double GetSofteningFactor()
{
- TraceLogger?.AddMessage($"Calculator type: {GetType()}", TraceLogStatuses.Service);
+ TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
TraceLogger?.AddMessage($"Logic of calculation of psi_s factor based on exponential softening model");
TraceLogger?.AddMessage($"psi_s = 1 - BettaFactor * ForceRatio ^ PowerFactor");
TraceLogger?.AddMessage($"But not less than psi_s_min = {PsiSMin}");
diff --git a/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/RebarStressSofteningLogic.cs b/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/RebarStressSofteningLogic.cs
index 1997c14..675001e 100644
--- a/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/RebarStressSofteningLogic.cs
+++ b/StructureHelperLogics/NdmCalculations/Cracking/SofteningLogics/RebarStressSofteningLogic.cs
@@ -69,6 +69,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
public double GetSofteningFactor()
{
+ TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
if (IsResultActual == false)
{
GetRebarAndConcreteNdms();
@@ -106,8 +107,10 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
rebarActualStrain = actualRebarResult.RebarStrain;
rebarActualStress = actualRebarResult.RebarStress;
TraceLogger?.AddMessage($"Actual strain of rebar EpsilonS = {rebarActualStrain}(dimensionless)");
- concreteStrainActual = concreteNdm.Prestrain;
- //concreteStrainActual = stressLogic.GetTotalStrain(TupleConverter.ConvertToLoaderStrainMatrix(strainTupleActual), concreteNdm);
+ concreteStrainActual = concreteNdm
+ .PrestrainLogic
+ .GetAll()
+ .Sum(x => x.PrestrainValue);
TraceLogger?.AddMessage($"Actual strain of concrete on the axis of rebar EpsilonC = {concreteStrainActual}(dimensionless)");
if (crackResult.IsSectionCracked == false)
{
@@ -126,7 +129,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
TraceLogger?.AddMessage($"Actual stress in rebar Sigma,s = {rebarActualStress}(Pa)");
double psiS = GetExponentialSofteningFactor(stressInCracking);
TraceLogger?.AddMessage($"PsiS = {psiS}");
- //return 0.94d;
return psiS;
}
diff --git a/StructureHelperLogics/Services/NdmPrimitives/MeshElasticLogic.cs b/StructureHelperLogics/Services/NdmPrimitives/MeshElasticLogic.cs
index 694c4bc..e99425b 100644
--- a/StructureHelperLogics/Services/NdmPrimitives/MeshElasticLogic.cs
+++ b/StructureHelperLogics/Services/NdmPrimitives/MeshElasticLogic.cs
@@ -38,10 +38,11 @@ namespace StructureHelperLogics.Services.NdmPrimitives
var material = ndm.Material;
var materialFunc = material.Diagram;
var newMaterialFunc = (IEnumerable parameters, double strain) => strain * material.InitModulus;
- var existingPrestrain = ndm.Prestrain;
+ var existingPrestrain = ndm.PrestrainLogic.GetAll().Sum(x => x.PrestrainValue);
var newPrestrain = materialFunc(null, existingPrestrain) / material.InitModulus;
ndm.Material.Diagram = newMaterialFunc;
- ndm.Prestrain = newPrestrain;
+ ndm.PrestrainLogic.DeleteAll();
+ ndm.PrestrainLogic.Add(PrestrainTypes.Prestrain, newPrestrain);
}
return ndms;
}