Crack calculator was changed
This commit is contained in:
@@ -207,4 +207,15 @@
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="ShowRebarsResult">
|
||||
<Canvas Style="{DynamicResource ButtonResultCanvas}">
|
||||
<Canvas.Children>
|
||||
<ContentControl ContentTemplate="{DynamicResource ButtonResultRectangle}"/>
|
||||
<Rectangle Canvas.Left="8" Canvas.Top="6" Width="16" Height="21" Fill="LightGray" Stroke ="Black"/>
|
||||
<Ellipse Canvas.Left="10" Canvas.Top="21" Width="4" Height="4" Fill="DarkGray" Stroke ="Black"/>
|
||||
<Ellipse Canvas.Left="18" Canvas.Top="21" Width="4" Height="4" Fill="DarkGray" Stroke ="Black"/>
|
||||
</Canvas.Children>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -6,7 +6,7 @@
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews"
|
||||
d:DataContext="{d:DesignInstance local:CrackCalculatorInputDataViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="CrackCalculatorInputDataView" Height="390" Width="400" MinHeight="300" MinWidth="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||
Title="CrackCalculatorInputDataView" Height="390" Width="400" MinHeight="300" MinWidth="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Closing="Window_Closing">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
|
||||
@@ -30,5 +30,10 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
DataContext = viewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
viewModel.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,17 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews"
|
||||
d:DataContext="{d:DesignInstance local:CrackResultViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="CrackResultView" Height="450" Width="800">
|
||||
Title="Result of calculations of crack" Height="450" Width="800" MinHeight="300" MinWidth="600" MaxHeight="800" MaxWidth="1000">
|
||||
<DockPanel>
|
||||
<ToolBarTray DockPanel.Dock="Top">
|
||||
<ToolBar>
|
||||
<Button Style="{DynamicResource ToolButton}" Command="{Binding ShowRebarsCommand}" ToolTip="Show isofield results">
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource ShowRebarsResult}"/>
|
||||
</Viewbox>
|
||||
</Button>
|
||||
<Button Style="{DynamicResource ToolButton}" Command="{Binding ShowIsoFieldCommand}" ToolTip="Show isofield results">
|
||||
<Viewbox>
|
||||
<ContentControl ContentTemplate="{DynamicResource IsoFieldResult}"/>
|
||||
@@ -17,7 +23,11 @@
|
||||
</ToolBar>
|
||||
</ToolBarTray>
|
||||
<Grid>
|
||||
<DataGrid AutoGenerateColumns="False" ItemsSource="{Binding ForcesResults.ForcesResultList}" SelectedItem="{Binding SelectedResult}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid IsReadOnly="True" AutoGenerateColumns="False" ItemsSource="{Binding TupleResults}" SelectedItem="{Binding SelectedResult}">
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Style.Triggers>
|
||||
@@ -29,19 +39,100 @@
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn Header="Valid" Binding="{Binding Path=IsValid}"/>
|
||||
<DataGridTextColumn Header="LimitState" Width="70" Binding="{Binding DesignForceTuple.LimitState}"/>
|
||||
<DataGridTextColumn Header="Duration" Width="70" Binding="{Binding DesignForceTuple.CalcTerm}"/>
|
||||
<DataGridTextColumn Header="Moment Mx" Width="90" Binding="{Binding DesignForceTuple.ForceTuple.Mx, Converter={StaticResource MomentConverter}}"/>
|
||||
<DataGridTextColumn Header="Moment My" Width="90" Binding="{Binding DesignForceTuple.ForceTuple.My, Converter={StaticResource MomentConverter}}"/>
|
||||
<DataGridTextColumn Header="Force Nz" Width="90" Binding="{Binding DesignForceTuple.ForceTuple.Nz, Converter={StaticResource ForceConverter}}"/>
|
||||
<DataGridTextColumn Header="Kx" Width="90" Binding="{Binding LoaderResults.ForceStrainPair.StrainMatrix.Kx}"/>
|
||||
<DataGridTextColumn Header="Ky" Width="90" Binding="{Binding LoaderResults.ForceStrainPair.StrainMatrix.Ky}"/>
|
||||
<DataGridTextColumn Header="EpsZ" Width="90" Binding="{Binding LoaderResults.ForceStrainPair.StrainMatrix.EpsZ}"/>
|
||||
<DataGridTextColumn Header="Accuracy" Width="90" Binding="{Binding LoaderResults.AccuracyRate}"/>
|
||||
<DataGridTextColumn Header="Max Iteration" Width="90" Binding="{Binding LoaderResults.IterationCounter}"/>
|
||||
<DataGridTemplateColumn Header="Combination term" Width="120">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Long-term" />
|
||||
<TextBlock Grid.Row="1" Text="Short-term" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Moment Mx" Width="90">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding InputData.LongTermTuple.Mx, Converter={StaticResource MomentConverter}}" />
|
||||
<TextBlock Grid.Row="1" Text="{Binding InputData.ShortTermTuple.Mx, Converter={StaticResource MomentConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Moment My" Width="90">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding InputData.LongTermTuple.My, Converter={StaticResource MomentConverter}}" />
|
||||
<TextBlock Grid.Row="1" Text="{Binding InputData.ShortTermTuple.My, Converter={StaticResource MomentConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Force Nz" Width="90">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding InputData.LongTermTuple.Nz, Converter={StaticResource MomentConverter}}" />
|
||||
<TextBlock Grid.Row="1" Text="{Binding InputData.ShortTermTuple.Nz, Converter={StaticResource ForceConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Crack width" Width="140">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="{Binding LongTermResult.CrackWidth, Converter={StaticResource LengthConverter}}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding LongTermResult.IsCrackLessThanUltimate}" Value="false">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="1" Text="{Binding ShortTermResult.CrackWidth, Converter={StaticResource LengthConverter}}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ShortTermResult.IsCrackLessThanUltimate}" Value="false">
|
||||
<Setter Property="Background" Value="Red" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="Description" Width="300" Binding="{Binding Description}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<TextBlock Grid.Row="1" Text="{Binding CrackResult.Description}"/>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Window>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using StructureHelperLogics.NdmCalculations.Cracking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -19,9 +20,17 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
/// </summary>
|
||||
public partial class CrackResultView : Window
|
||||
{
|
||||
public CrackResultView()
|
||||
private readonly CrackResultViewModel viewModel;
|
||||
|
||||
public CrackResultView(CrackResultViewModel viewModel)
|
||||
{
|
||||
this.viewModel = viewModel;
|
||||
InitializeComponent();
|
||||
this.DataContext = this.viewModel;
|
||||
}
|
||||
public CrackResultView(CrackResult result) : this(new CrackResultViewModel(result))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using StructureHelper.Infrastructure;
|
||||
using StructureHelperLogics.NdmCalculations.Cracking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -6,7 +8,17 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
{
|
||||
public class CrackResultViewModel
|
||||
public class CrackResultViewModel : ViewModelBase
|
||||
{
|
||||
CrackResult crackResult;
|
||||
public TupleCrackResult SelectedResult { get; set; }
|
||||
public List<TupleCrackResult> TupleResults => CrackResult.TupleResults;
|
||||
|
||||
public CrackResult CrackResult => crackResult;
|
||||
|
||||
public CrackResultViewModel(CrackResult crackResult)
|
||||
{
|
||||
this.crackResult = crackResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,8 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
||||
}
|
||||
else if (SelectedItem is CrackCalculator crackCalculator)
|
||||
{
|
||||
|
||||
var wnd = new CrackResultView(crackCalculator.Result as CrackResult);
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
const LimitStates limitState = LimitStates.SLS;
|
||||
const CalcTerms longTerm = CalcTerms.LongTerm;
|
||||
const CalcTerms shortTerm = CalcTerms.ShortTerm;
|
||||
|
||||
private const double maxSizeOfCrossSection = 1d;
|
||||
private CrackResult result;
|
||||
private IGetTupleInputDatasLogic datasLogic;
|
||||
private CrackCalculatorUpdateStrategy updateStrategy = new();
|
||||
@@ -67,6 +67,14 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
ShortTerm = shortTerm,
|
||||
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
|
||||
};
|
||||
var dx = InputData.Primitives.Max(x => x.GetValuePoints().Max(y => y.Point.X)) - InputData.Primitives.Min(x => x.GetValuePoints().Min(y => y.Point.X));
|
||||
var dy = InputData.Primitives.Max(x => x.GetValuePoints().Max(y => y.Point.Y)) - InputData.Primitives.Min(x => x.GetValuePoints().Min(y => y.Point.Y));
|
||||
if (dx > maxSizeOfCrossSection || dy > maxSizeOfCrossSection)
|
||||
{
|
||||
string message = $"At least one of size of cross-section is greater than ultimate size MaxSize = {maxSizeOfCrossSection}(m)";
|
||||
result.Description += "Warning! " + message;
|
||||
TraceLogger?.AddMessage(message, TraceLogStatuses.Warning);
|
||||
}
|
||||
var datas = datasLogic.GetTupleInputDatas();
|
||||
foreach (var data in datas)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
//Copyright (c) 2023 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackResult : IResult
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthRebarTupleResult : ICrackWidthTupleResult
|
||||
{
|
||||
public double CrackWidth { get; set; }
|
||||
public double UltimateCrackWidth { get; set; }
|
||||
public bool IsCrackLessThanUltimate => CrackWidth <= UltimateCrackWidth;
|
||||
public RebarStressResult RebarStressResult { get; set; }
|
||||
public double SofteningFactor { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -7,13 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthTupleResult
|
||||
public class CrackWidthTupleResult : ICrackWidthTupleResult
|
||||
{
|
||||
public IForceTuple? ForceTuple { get; set; }
|
||||
public double CrackWidth { get; set; }
|
||||
public double UltimateCrackWidth { get; set; }
|
||||
public bool IsCrackLessThanUltimate => CrackWidth <= UltimateCrackWidth;
|
||||
public RebarStressResult RebarStressResult { get; set; }
|
||||
public double SofteningFactor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
private const double longTermFactor = 1.4d;
|
||||
private const double shortTermFactor = 1d;
|
||||
private IStressStateFactorLogic stressStateFactorLogic;
|
||||
private ICrackSofteningLogic softeningLogic;
|
||||
|
||||
public double RebarStrain { get; set; }
|
||||
@@ -40,7 +41,11 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
|
||||
public ICrackWidthLogicInputData GetCrackWidthLogicInputData()
|
||||
{
|
||||
|
||||
stressStateFactorLogic = new StressStateFactorLogic()
|
||||
{
|
||||
ForceTuple = InputData.ForceTuple,
|
||||
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
|
||||
};
|
||||
CrackWidthLogicInputDataSP63 data = new();
|
||||
if (CalcTerm == CalcTerms.LongTerm)
|
||||
{
|
||||
@@ -51,7 +56,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
data.TermFactor = shortTermFactor;
|
||||
}
|
||||
data.PsiSFactor = softeningLogic.GetSofteningFactor();
|
||||
data.StressStateFactor = 1.0d;
|
||||
data.StressStateFactor = stressStateFactorLogic.GetStressStateFactor();
|
||||
data.BondFactor = 0.5d;
|
||||
data.Length = InputData.Length;
|
||||
data.ConcreteStrain = ConcreteStrain;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface ICrackWidthTupleResult
|
||||
{
|
||||
double CrackWidth { get; set; }
|
||||
bool IsCrackLessThanUltimate { get; }
|
||||
double UltimateCrackWidth { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface IStressStateFactorLogic : ILogic
|
||||
{
|
||||
double GetStressStateFactor();
|
||||
}
|
||||
}
|
||||
@@ -40,10 +40,10 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
GetSofteningLogic(InputData.LongRebarData);
|
||||
rebarStressResult = GetRebarStressResult(InputData.LongRebarData);
|
||||
var dataAcrc1 = GetCrackWidthInputData(InputData.LongRebarData, CalcTerms.LongTerm);
|
||||
var dataAcrc2 = GetCrackWidthInputData(InputData.LongRebarData, CalcTerms.ShortTerm);
|
||||
var dataAcrc3 = GetCrackWidthInputData(InputData.LongRebarData, CalcTerms.ShortTerm);
|
||||
crackWidthLogic.InputData = dataAcrc1;
|
||||
var acrc1 = crackWidthLogic.GetCrackWidth();
|
||||
var longRebarResult = new CrackWidthTupleResult()
|
||||
var longRebarResult = new CrackWidthRebarTupleResult()
|
||||
{
|
||||
CrackWidth = acrc1,
|
||||
UltimateCrackWidth = InputData.UserCrackInputData.UltimateLongCrackWidth,
|
||||
@@ -56,16 +56,16 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
|
||||
GetSofteningLogic(InputData.ShortRebarData);
|
||||
rebarStressResult = GetRebarStressResult(InputData.ShortRebarData);
|
||||
var dataAcrc3 = GetCrackWidthInputData(InputData.ShortRebarData, CalcTerms.ShortTerm);
|
||||
var dataAcrc2 = GetCrackWidthInputData(InputData.ShortRebarData, CalcTerms.ShortTerm);
|
||||
|
||||
crackWidthLogic.InputData = dataAcrc2;
|
||||
var acrc2 = crackWidthLogic.GetCrackWidth();
|
||||
crackWidthLogic.InputData = dataAcrc3;
|
||||
var acrc3 = crackWidthLogic.GetCrackWidth();
|
||||
crackWidthLogic.InputData = dataAcrc2;
|
||||
var acrc2 = crackWidthLogic.GetCrackWidth();
|
||||
|
||||
double acrcShort = acrc1 - acrc2 + acrc3;
|
||||
TraceLogger?.AddMessage($"Short crack width acrc = acrc,1 - acrc,2 + acrc,3 = {acrc1} - {acrc2} + {acrc3} = {acrcShort}(m)");
|
||||
var shortRebarResult = new CrackWidthTupleResult()
|
||||
double acrcShort = acrc1 + acrc2 - acrc3;
|
||||
TraceLogger?.AddMessage($"Short crack width acrc = acrc,1 + acrc,2 - acrc,3 = {acrc1} + {acrc2} - {acrc3} = {acrcShort}(m)");
|
||||
var shortRebarResult = new CrackWidthRebarTupleResult()
|
||||
{
|
||||
CrackWidth = acrcShort,
|
||||
UltimateCrackWidth = InputData.UserCrackInputData.UltimateShortCrackWidth,
|
||||
@@ -83,7 +83,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
result.RebarPrimitive = InputData.RebarPrimitive;
|
||||
}
|
||||
|
||||
private void TraceCrackResult(CrackWidthTupleResult rebarResult)
|
||||
private void TraceCrackResult(CrackWidthRebarTupleResult rebarResult)
|
||||
{
|
||||
if (rebarResult.IsCrackLessThanUltimate == false)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public bool IsValid { get; set; }
|
||||
public string Description { get; set; }
|
||||
public RebarPrimitive RebarPrimitive { get; set; }
|
||||
public CrackWidthTupleResult LongTermResult { get; set; }
|
||||
public CrackWidthTupleResult ShortTermResult { get; set; }
|
||||
public CrackWidthRebarTupleResult LongTermResult { get; set; }
|
||||
public CrackWidthRebarTupleResult ShortTermResult { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class StressStateFactorLogic : IStressStateFactorLogic
|
||||
{
|
||||
public ForceTuple ForceTuple { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public double GetStressStateFactor()
|
||||
{
|
||||
if (ForceTuple.Nz > 0d)
|
||||
{
|
||||
TraceLogger.AddMessage($"Cross-section is tensioned since Nz = {ForceTuple.Nz}(N)");
|
||||
return 1.2d;
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLogger.AddMessage($"Cross-section is bent or compressed since Nz = {ForceTuple.Nz}(N)");
|
||||
return 1d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
result = new()
|
||||
{
|
||||
IsValid = true,
|
||||
Description = string.Empty
|
||||
Description = string.Empty,
|
||||
InputData = InputData
|
||||
};
|
||||
}
|
||||
|
||||
@@ -96,6 +97,16 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
var rebarResult = calculator.Result as RebarCrackResult;
|
||||
result.RebarResults.Add(rebarResult);
|
||||
}
|
||||
result.LongTermResult = new()
|
||||
{
|
||||
CrackWidth = result.RebarResults.Max(x => x.LongTermResult.CrackWidth),
|
||||
UltimateCrackWidth = InputData.UserCrackInputData.UltimateLongCrackWidth
|
||||
};
|
||||
result.ShortTermResult = new()
|
||||
{
|
||||
CrackWidth = result.RebarResults.Max(x => x.ShortTermResult.CrackWidth),
|
||||
UltimateCrackWidth = InputData.UserCrackInputData.UltimateShortCrackWidth
|
||||
};
|
||||
}
|
||||
|
||||
private RebarCrackCalculatorInputData GetRebarCalculatorInputData(RebarPrimitive rebar)
|
||||
|
||||
@@ -12,12 +12,15 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public string Description { get; set; }
|
||||
public IForceTuple LongTermTuple { get; set; }
|
||||
public IForceTuple ShortTermTuple { get; set; }
|
||||
public TupleCrackInputData InputData { get; set; }
|
||||
public bool IsCracked { get; set; }
|
||||
public List<RebarCrackResult> RebarResults { get; private set; }
|
||||
public double MaxLongTermCrackWidth => IsCracked? RebarResults.Select(x => x.LongTermResult.CrackWidth).Max() : 0d;
|
||||
public double MaxShortTermCrackWidth => IsCracked? RebarResults.Select(x => x.ShortTermResult.CrackWidth).Max() : 0d;
|
||||
public CrackWidthRebarTupleResult LongTermResult { get; set; }
|
||||
public CrackWidthRebarTupleResult ShortTermResult { get; set; }
|
||||
//public double MaxLongTermCrackWidth => RebarResults.Select(x => x.LongTermResult.CrackWidth).Max();
|
||||
//public double MaxShortTermCrackWidth => RebarResults.Select(x => x.ShortTermResult.CrackWidth).Max();
|
||||
//public bool IsLongCrackLessThanUltimate => MaxLongTermCrackWidth <= InputData.UserCrackInputData.UltimateLongCrackWidth;
|
||||
//public bool IsShortCrackLessThanUltimate => MaxShortTermCrackWidth <= InputData.UserCrackInputData.UltimateShortCrackWidth;
|
||||
|
||||
public TupleCrackResult()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user