Ndm prestrain logic was changed
This commit is contained in:
Binary file not shown.
@@ -60,7 +60,7 @@
|
||||
<Compile Update="Windows\MainWindow\AboutView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\MainWindow\AnalisesManagerView.xaml.cs">
|
||||
<Compile Update="Windows\MainWindow\AnalysesManagerView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Windows\MainWindow\Materials\HeadMaterialView.xaml.cs">
|
||||
@@ -155,7 +155,7 @@
|
||||
<Page Update="Windows\MainWindow\AboutView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\MainWindow\AnalisesManagerView.xaml">
|
||||
<Page Update="Windows\MainWindow\AnalysesManagerView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Windows\MainWindow\Materials\HeadMaterialView.xaml">
|
||||
|
||||
@@ -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<string> GetValueLabels(IEnumerable<ForceResultFunc> selectedDelegates)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<Window x:Class="StructureHelper.Windows.MainWindow.AnalisesManagerView"
|
||||
<Window x:Class="StructureHelper.Windows.MainWindow.AnalysesManagerView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.MainWindow"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:AnalisesManagerViewModel}"
|
||||
Title="Analises Manager" Height="450" Width="800" MinHeight="400" MinWidth="600">
|
||||
d:DataContext="{d:DesignInstance local:AnalysesManagerViewModel}"
|
||||
Title="Analyses Manager" Height="450" Width="800" MinHeight="400" MinWidth="600">
|
||||
<Grid>
|
||||
<DockPanel>
|
||||
<ToolBarTray DockPanel.Dock="Top">
|
||||
@@ -17,9 +17,9 @@ namespace StructureHelper.Windows.MainWindow
|
||||
/// <summary>
|
||||
/// Логика взаимодействия для AnalisesManagerView.xaml
|
||||
/// </summary>
|
||||
public partial class AnalisesManagerView : Window
|
||||
public partial class AnalysesManagerView : Window
|
||||
{
|
||||
public AnalisesManagerView()
|
||||
public AnalysesManagerView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -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();
|
||||
@@ -339,7 +339,7 @@
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Style="{StaticResource ButtonImage16}" Source="/Windows/MainWindow/Analysis32.png" />
|
||||
<TextBlock Text="Analisis" Margin="5,0,0,0"/>
|
||||
<TextBlock Text="Analysis" Margin="5,0,0,0"/>
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<Expander.ContextMenu>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
/// <summary>
|
||||
/// Width of crack from long term loads with short term properties of concrete
|
||||
/// </summary>
|
||||
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,
|
||||
|
||||
@@ -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)");
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
/// <inheritdoc/>
|
||||
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}");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,11 @@ namespace StructureHelperLogics.Services.NdmPrimitives
|
||||
var material = ndm.Material;
|
||||
var materialFunc = material.Diagram;
|
||||
var newMaterialFunc = (IEnumerable<double> 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user