Add test of rebar by density and rebar by inclined rebar
This commit is contained in:
@@ -13,10 +13,6 @@ namespace DataAccess.DTOs
|
|||||||
public double RelativeEffectiveDepthRangeValue { get; set; } = 3.3;
|
public double RelativeEffectiveDepthRangeValue { get; set; } = 3.3;
|
||||||
[JsonProperty("StepCount")]
|
[JsonProperty("StepCount")]
|
||||||
public int StepCount { get; set; } = 55;
|
public int StepCount { get; set; } = 55;
|
||||||
[JsonProperty("SectionLengthMaxValue")]
|
|
||||||
public double RelativeEffectiveDepthSectionLengthMaxValue { get; set; } = 3;
|
|
||||||
[JsonProperty("LengthMinValue")]
|
|
||||||
public double RelativeEffectiveDepthSectionLengthMinValue { get; set; } = 0;
|
|
||||||
|
|
||||||
public BeamShearDesignRangePropertyDTO(Guid id)
|
public BeamShearDesignRangePropertyDTO(Guid id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelper.Windows.UserControls;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -29,14 +30,16 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
public double SupportStartY => -SupportHeight;
|
public double SupportStartY => -SupportHeight;
|
||||||
public string SupportPathData => $"M 0 0 L {SupportWidth / 2} {-SupportHeight} L {-SupportWidth / 2} {-SupportHeight} Z";
|
public string SupportPathData => $"M 0 0 L {SupportWidth / 2} {-SupportHeight} L {-SupportWidth / 2} {-SupportHeight} Z";
|
||||||
|
|
||||||
public IPrimitiveVisualProperty VisualProperty => beamShearSection.VisualProperty;
|
|
||||||
|
|
||||||
public IBeamShearSection BeamShearSection => beamShearSection;
|
public IBeamShearSection BeamShearSection => beamShearSection;
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyViewModel VisualProperty {get;}
|
||||||
|
|
||||||
public BeamShearSectionPrimitive(IBeamShearSection beamShearSection, IInclinedSection inclinedSection)
|
public BeamShearSectionPrimitive(IBeamShearSection beamShearSection, IInclinedSection inclinedSection)
|
||||||
{
|
{
|
||||||
this.beamShearSection = beamShearSection;
|
this.beamShearSection = beamShearSection;
|
||||||
this.inclinedSection = inclinedSection;
|
this.inclinedSection = inclinedSection;
|
||||||
|
VisualProperty = new(beamShearSection.VisualProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using FieldVisualizer.Entities.Values.Primitives;
|
using FieldVisualizer.Entities.Values.Primitives;
|
||||||
|
using StructureHelper.Windows.UserControls;
|
||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -10,6 +11,6 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
{
|
{
|
||||||
public interface IGraphicalPrimitive : ICenter
|
public interface IGraphicalPrimitive : ICenter
|
||||||
{
|
{
|
||||||
IPrimitiveVisualProperty VisualProperty { get; }
|
PrimitiveVisualPropertyViewModel VisualProperty { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelper.Windows.UserControls;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
using PrimitiveVisualProperty = StructureHelperCommon.Models.VisualProperties.PrimitiveVisualProperty;
|
||||||
|
|
||||||
namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
||||||
{
|
{
|
||||||
public class InclinedSectionPrimitive : IGraphicalPrimitive
|
public class InclinedSectionPrimitive : IGraphicalPrimitive
|
||||||
{
|
{
|
||||||
private IBeamShearSectionLogicResult source;
|
private IBeamShearSectionLogicResult source;
|
||||||
private IInclinedSection inclinedSection => source.InputData.InclinedSection;
|
private IInclinedSection inclinedSection => source.ResultInputData.InclinedSection;
|
||||||
private IInclinedSection inclinedCrack => source.InputData.InclinedCrack;
|
private IInclinedSection inclinedCrack => source.ResultInputData.InclinedCrack;
|
||||||
|
|
||||||
public double SectionStartX => inclinedSection.StartCoord;
|
public double SectionStartX => inclinedSection.StartCoord;
|
||||||
public double SectionEndX => inclinedSection.EndCoord;
|
public double SectionEndX => inclinedSection.EndCoord;
|
||||||
@@ -27,7 +28,8 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
|
|
||||||
public double CenterX => 0;
|
public double CenterX => 0;
|
||||||
public double CenterY => 0;
|
public double CenterY => 0;
|
||||||
public IPrimitiveVisualProperty VisualProperty { get; private set; } = new PrimitiveVisualProperty(Guid.Empty);
|
|
||||||
|
public PrimitiveVisualPropertyViewModel VisualProperty { get; } = new(new PrimitiveVisualProperty(Guid.Empty));
|
||||||
|
|
||||||
public InclinedSectionPrimitive(IBeamShearSectionLogicResult source)
|
public InclinedSectionPrimitive(IBeamShearSectionLogicResult source)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelper.Windows.UserControls;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
|
||||||
namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
||||||
@@ -14,14 +15,16 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
public double TopPointY => InclinedSection.FullDepth;
|
public double TopPointY => InclinedSection.FullDepth;
|
||||||
public double Length => StirrupByDensity.EndCoordinate - StirrupByDensity.StartCoordinate;
|
public double Length => StirrupByDensity.EndCoordinate - StirrupByDensity.StartCoordinate;
|
||||||
public double Depth => InclinedSection.EffectiveDepth;
|
public double Depth => InclinedSection.EffectiveDepth;
|
||||||
public IPrimitiveVisualProperty VisualProperty => StirrupByDensity.VisualProperty;
|
|
||||||
|
|
||||||
public IInclinedSection InclinedSection { get; set; }
|
public IInclinedSection InclinedSection { get; set; }
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyViewModel VisualProperty { get; }
|
||||||
|
|
||||||
public StirrupByDensityPrimitive(IStirrupByDensity stirrupByDensity, IInclinedSection inclinedSection)
|
public StirrupByDensityPrimitive(IStirrupByDensity stirrupByDensity, IInclinedSection inclinedSection)
|
||||||
{
|
{
|
||||||
StirrupByDensity = stirrupByDensity;
|
StirrupByDensity = stirrupByDensity;
|
||||||
this.InclinedSection = inclinedSection;
|
this.InclinedSection = inclinedSection;
|
||||||
|
VisualProperty = new(stirrupByDensity.VisualProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelper.Windows.UserControls;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -19,11 +20,14 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
|
|
||||||
public double CenterX => 0;
|
public double CenterX => 0;
|
||||||
public double CenterY => 0;
|
public double CenterY => 0;
|
||||||
public IPrimitiveVisualProperty VisualProperty => StirrupByInclinedRebar.VisualProperty;
|
|
||||||
|
public PrimitiveVisualPropertyViewModel VisualProperty { get; }
|
||||||
|
|
||||||
public StirrupByInclinedRebarPrimitive(IStirrupByInclinedRebar stirrupByInclinedRebar, IInclinedSection inclinedSection)
|
public StirrupByInclinedRebarPrimitive(IStirrupByInclinedRebar stirrupByInclinedRebar, IInclinedSection inclinedSection)
|
||||||
{
|
{
|
||||||
StirrupByInclinedRebar = stirrupByInclinedRebar;
|
StirrupByInclinedRebar = stirrupByInclinedRebar;
|
||||||
this.inclinedSection = inclinedSection;
|
this.inclinedSection = inclinedSection;
|
||||||
|
VisualProperty = new(stirrupByInclinedRebar.VisualProperty);
|
||||||
}
|
}
|
||||||
private double GetRebarLengthX()
|
private double GetRebarLengthX()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Models.VisualProperties;
|
using StructureHelper.Windows.UserControls;
|
||||||
|
using StructureHelperCommon.Models.VisualProperties;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
@@ -18,17 +19,19 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
|||||||
public double Length => StirrupByRebar.EndCoordinate - StirrupByRebar.StartCoordinate;
|
public double Length => StirrupByRebar.EndCoordinate - StirrupByRebar.StartCoordinate;
|
||||||
public double Depth => InclinedSection.EffectiveDepth;
|
public double Depth => InclinedSection.EffectiveDepth;
|
||||||
public double Density => Math.Round(stirrupByDensity.StirrupDensity);
|
public double Density => Math.Round(stirrupByDensity.StirrupDensity);
|
||||||
public IPrimitiveVisualProperty VisualProperty => StirrupByRebar.VisualProperty;
|
|
||||||
|
|
||||||
|
|
||||||
public IInclinedSection InclinedSection => inclinedSection;
|
public IInclinedSection InclinedSection => inclinedSection;
|
||||||
|
|
||||||
|
public PrimitiveVisualPropertyViewModel VisualProperty { get; }
|
||||||
|
|
||||||
public StirrupByRebarPrimitive(IStirrupByRebar stirrupByRebar, IInclinedSection inclinedSection)
|
public StirrupByRebarPrimitive(IStirrupByRebar stirrupByRebar, IInclinedSection inclinedSection)
|
||||||
{
|
{
|
||||||
this.StirrupByRebar = stirrupByRebar;
|
this.StirrupByRebar = stirrupByRebar;
|
||||||
this.inclinedSection = inclinedSection;
|
this.inclinedSection = inclinedSection;
|
||||||
var logic = new StirrupByRebarToDensityConvertStrategy(null, inclinedSection);
|
var logic = new StirrupByRebarToDensityConvertStrategy(null, inclinedSection);
|
||||||
stirrupByDensity = logic.Convert(stirrupByRebar);
|
stirrupByDensity = logic.Convert(stirrupByRebar);
|
||||||
|
VisualProperty = new(stirrupByRebar.VisualProperty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
Width="{Binding PositiveLength}"
|
Width="{Binding PositiveLength}"
|
||||||
Height="{Binding FullDepth}"
|
Height="{Binding FullDepth}"
|
||||||
StrokeThickness="0.01"
|
StrokeThickness="0.01"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Rectangle.Stroke>
|
<Rectangle.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
||||||
@@ -47,6 +48,8 @@
|
|||||||
Y2="{Binding BottomCover}"
|
Y2="{Binding BottomCover}"
|
||||||
Stroke="Black"
|
Stroke="Black"
|
||||||
StrokeThickness="0.012"
|
StrokeThickness="0.012"
|
||||||
|
StrokeDashArray="0.1 0.05"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Line.ToolTip>
|
<Line.ToolTip>
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -93,6 +96,7 @@
|
|||||||
Y2="{Binding SectionEndY}"
|
Y2="{Binding SectionEndY}"
|
||||||
StrokeThickness="0.01"
|
StrokeThickness="0.01"
|
||||||
StrokeDashArray="0.05 0.02"
|
StrokeDashArray="0.05 0.02"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Line.Stroke>
|
<Line.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||||
@@ -131,17 +135,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Line.ToolTip>
|
</Line.ToolTip>
|
||||||
</Line>
|
</Line>
|
||||||
<Line
|
|
||||||
X1="{Binding SectionStartX}"
|
|
||||||
X2="{Binding SectionStartX}"
|
|
||||||
Y1="0"
|
|
||||||
Y2="{Binding SectionStartY}"
|
|
||||||
StrokeThickness="0.01"
|
|
||||||
>
|
|
||||||
<Line.Stroke>
|
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
|
||||||
</Line.Stroke>
|
|
||||||
</Line>
|
|
||||||
<!--InclinedCrack-->
|
<!--InclinedCrack-->
|
||||||
<Line
|
<Line
|
||||||
X1="{Binding CrackStartX}"
|
X1="{Binding CrackStartX}"
|
||||||
@@ -149,6 +142,7 @@
|
|||||||
Y1="{Binding SectionStartY}"
|
Y1="{Binding SectionStartY}"
|
||||||
Y2="{Binding SectionEndY}"
|
Y2="{Binding SectionEndY}"
|
||||||
StrokeThickness="0.02"
|
StrokeThickness="0.02"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Line.Stroke>
|
<Line.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||||
@@ -179,7 +173,7 @@
|
|||||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding ConcreteShearForce, Converter={StaticResource ForceConverter}}"/>
|
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding ConcreteShearForce, Converter={StaticResource ForceConverter}}"/>
|
||||||
<TextBlock Grid.Row="5" Text="Stirrup shear force: "/>
|
<TextBlock Grid.Row="5" Text="Stirrup shear force: "/>
|
||||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding StirrupShearForce, Converter={StaticResource ForceConverter}}"/>
|
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding StirrupShearForce, Converter={StaticResource ForceConverter}}"/>
|
||||||
<TextBlock Grid.Row="6" Text="Crack span c0/d ratio: "/>
|
<TextBlock Grid.Row="6" Text="Span c0/d ratio: "/>
|
||||||
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding CrackSpanRatio, Converter={StaticResource PlainDouble}}"/>
|
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding CrackSpanRatio, Converter={StaticResource PlainDouble}}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Line.ToolTip>
|
</Line.ToolTip>
|
||||||
@@ -196,6 +190,7 @@
|
|||||||
StrokeThickness="0.005"
|
StrokeThickness="0.005"
|
||||||
Canvas.Left="{Binding StartPoinX}"
|
Canvas.Left="{Binding StartPoinX}"
|
||||||
Canvas.Top="{Binding BottomPointY}"
|
Canvas.Top="{Binding BottomPointY}"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Rectangle.Stroke>
|
<Rectangle.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
||||||
@@ -244,6 +239,7 @@
|
|||||||
StrokeThickness="0.005"
|
StrokeThickness="0.005"
|
||||||
Canvas.Left="{Binding StartPoinX}"
|
Canvas.Left="{Binding StartPoinX}"
|
||||||
Canvas.Top="{Binding BottomPointY}"
|
Canvas.Top="{Binding BottomPointY}"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Rectangle.Stroke>
|
<Rectangle.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
||||||
@@ -279,6 +275,7 @@
|
|||||||
X2="{Binding EndPointX}"
|
X2="{Binding EndPointX}"
|
||||||
Y1="{Binding StartPointY}"
|
Y1="{Binding StartPointY}"
|
||||||
Y2="{Binding EndPointY}"
|
Y2="{Binding EndPointY}"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
||||||
>
|
>
|
||||||
<Line.Stroke>
|
<Line.Stroke>
|
||||||
@@ -319,6 +316,7 @@
|
|||||||
Y1="{Binding StartPointY}"
|
Y1="{Binding StartPointY}"
|
||||||
Y2="{Binding StartPointY}"
|
Y2="{Binding StartPointY}"
|
||||||
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Line.Stroke>
|
<Line.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||||
@@ -330,6 +328,7 @@
|
|||||||
Y1="{Binding EndPointY}"
|
Y1="{Binding EndPointY}"
|
||||||
Y2="{Binding EndPointY}"
|
Y2="{Binding EndPointY}"
|
||||||
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
StrokeThickness="{Binding StirrupByInclinedRebar.RebarSection.Diameter}"
|
||||||
|
Visibility="{Binding VisualProperty.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
>
|
>
|
||||||
<Line.Stroke>
|
<Line.Stroke>
|
||||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<Button.ToolTip>
|
<Button.ToolTip>
|
||||||
<uc:ButtonToolTipEh HeaderText="Show digram"
|
<uc:ButtonToolTipEh HeaderText="Show digram"
|
||||||
IconContent="{StaticResource MomentCurvatureDiagram}"
|
IconContent="{StaticResource MomentCurvatureDiagram}"
|
||||||
DescriptionText="Shows diagram for result where inclined section started from support (Note - the most dangerous combinations may be missed)"/>
|
DescriptionText="Shows diagram for result for inclined section where factor of using is maximum"/>
|
||||||
</Button.ToolTip>
|
</Button.ToolTip>
|
||||||
<Viewbox>
|
<Viewbox>
|
||||||
<ContentControl ContentTemplate="{StaticResource MomentCurvatureDiagram}"/>
|
<ContentControl ContentTemplate="{StaticResource MomentCurvatureDiagram}"/>
|
||||||
|
|||||||
@@ -61,8 +61,12 @@ namespace StructureHelper.Windows.BeamShears
|
|||||||
private void Show2DDiagram(object obj)
|
private void Show2DDiagram(object obj)
|
||||||
{
|
{
|
||||||
if (SelectedResult is null) { return; }
|
if (SelectedResult is null) { return; }
|
||||||
|
if (SelectedResult.SectionResults is null) { return; }
|
||||||
|
var sectionResult = SelectedResult.SectionResults
|
||||||
|
.OrderByDescending(x => x.FactorOfUsing)
|
||||||
|
.FirstOrDefault();
|
||||||
var logic = new ShearDiagramLogic(SelectedResult);
|
var logic = new ShearDiagramLogic(SelectedResult);
|
||||||
logic.ShowWindow(0.0);
|
logic.ShowWindow(sectionResult.ResultInputData.InclinedSection.StartCoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowSectionResults(object commandParameter)
|
private void ShowSectionResults(object commandParameter)
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
<ColumnDefinition Width="50"/>
|
<ColumnDefinition Width="50"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox Text="{Binding Opacity, Converter={StaticResource PlainDouble}, ValidatesOnExceptions=True}" Margin="1,2,3,4"/>
|
<TextBox Text="{Binding FactoredOpacity, Converter={StaticResource PlainDouble}, ValidatesOnExceptions=True}" Margin="1,2,3,4"/>
|
||||||
<Slider Grid.Column="1" Value="{Binding Opacity}" Maximum="100" TickPlacement="BottomRight" TickFrequency="10" IsSnapToTickEnabled="True" Margin="2"/>
|
<Slider Grid.Column="1" Value="{Binding FactoredOpacity}" Maximum="100" TickPlacement="BottomRight" TickFrequency="10" IsSnapToTickEnabled="True" Margin="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ namespace StructureHelper.Windows.UserControls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public double Opacity
|
public double Opacity
|
||||||
|
{
|
||||||
|
get => visualProperty.Opacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double FactoredOpacity
|
||||||
{
|
{
|
||||||
get => visualProperty.Opacity * 100d;
|
get => visualProperty.Opacity * 100d;
|
||||||
set
|
set
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
private double absoluteRangeValue = 0.0;
|
private double absoluteRangeValue = 0.0;
|
||||||
private double relativeEffectiveDepthRangeValue = 3.3;
|
private double relativeEffectiveDepthRangeValue = 3.3;
|
||||||
private int stepCount = 55;
|
private int stepCount = 55;
|
||||||
private double relativeEffectiveDepthSectionLengthMaxValue = 3;
|
|
||||||
private double relativeEffectiveDepthSectionLengthMinValue = 0;
|
|
||||||
|
|
||||||
/// <inheritdoc>
|
/// <inheritdoc>
|
||||||
public Guid Id { get; }
|
public Guid Id { get; }
|
||||||
@@ -59,32 +57,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double RelativeEffectiveDepthSectionLengthMaxValue
|
|
||||||
{
|
|
||||||
get => relativeEffectiveDepthSectionLengthMaxValue;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value <= 0)
|
|
||||||
{
|
|
||||||
throw new StructureHelperException($"Maximum inclined section factor must be greater than zero, but was {value}");
|
|
||||||
}
|
|
||||||
relativeEffectiveDepthSectionLengthMaxValue = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public double RelativeEffectiveDepthSectionLengthMinValue
|
|
||||||
{
|
|
||||||
get => relativeEffectiveDepthSectionLengthMinValue;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value < 0)
|
|
||||||
{
|
|
||||||
throw new StructureHelperException($"Maximum inclined section factor must be greater than zero, but was {value}");
|
|
||||||
}
|
|
||||||
relativeEffectiveDepthSectionLengthMinValue = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BeamShearDesignRangeProperty(Guid id)
|
public BeamShearDesignRangeProperty(Guid id)
|
||||||
{
|
{
|
||||||
Id = id;
|
Id = id;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
public bool IsValid { get; set; }
|
public bool IsValid { get; set; }
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
public IBeamShearSectionLogicInputData InputData { get; set; }
|
public IBeamShearSectionLogicInputData InputData { get; set; }
|
||||||
|
public IBeamShearSectionLogicInputData ResultInputData { get; set; }
|
||||||
public double ConcreteStrength { get; set; }
|
public double ConcreteStrength { get; set; }
|
||||||
public double StirrupStrength { get; set; }
|
public double StirrupStrength { get; set; }
|
||||||
public double TotalStrength { get; set; }
|
public double TotalStrength { get; set; }
|
||||||
|
|||||||
@@ -21,14 +21,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
double RelativeEffectiveDepthRangeValue { get; set; }
|
double RelativeEffectiveDepthRangeValue { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Relative value of inclination length as factor of effective depth of cross-section
|
|
||||||
/// </summary>
|
|
||||||
double RelativeEffectiveDepthSectionLengthMaxValue { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Relative value of inclination length as factor of effective depth of cross-section
|
|
||||||
/// </summary>
|
|
||||||
double RelativeEffectiveDepthSectionLengthMinValue { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Number of step of solvation
|
/// Number of step of solvation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
int StepCount { get; set; }
|
int StepCount { get; set; }
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
IBeamShearSectionLogicInputData InputData { get; set; }
|
IBeamShearSectionLogicInputData InputData { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// New Input data for calculating
|
||||||
|
/// </summary>
|
||||||
|
IBeamShearSectionLogicInputData ResultInputData { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// Ultimate shear force due to cocrete
|
/// Ultimate shear force due to cocrete
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double ConcreteStrength { get; set; }
|
public double ConcreteStrength { get; set; }
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
PrepareNewResult();
|
PrepareNewResult();
|
||||||
if (Check() == false) { return; }
|
if (Check() == false) { return; }
|
||||||
localTraceLogger?.AddMessage(sectionMessage);
|
localTraceLogger?.AddMessage(sectionMessage);
|
||||||
InitializeStrategies();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AddInclinedCrackToInputData();
|
PrepareResultData();
|
||||||
|
InitializeStrategies();
|
||||||
CalculateResult();
|
CalculateResult();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -53,18 +53,22 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddInclinedCrackToInputData()
|
private void PrepareResultData()
|
||||||
{
|
{
|
||||||
InclinedSection newSection = new();
|
InclinedSection crackSection = new();
|
||||||
var updateStrategy = new InclinedSectionUpdateStrategy();
|
var updateStrategy = new InclinedSectionUpdateStrategy();
|
||||||
updateStrategy.Update(newSection, InputData.InclinedSection);
|
updateStrategy.Update(crackSection, InputData.InclinedSection);
|
||||||
double crackLength = newSection.EndCoord - newSection.StartCoord;
|
BeamShearSectionLogicInputData resultData = new(Guid.Empty);
|
||||||
double maxCrackLength = 2 * newSection.EffectiveDepth;
|
var resultDataUpdateStrategy = new BeamShearSectionLogicInputDataUpdateStrategy();
|
||||||
|
resultDataUpdateStrategy.Update(resultData, InputData);
|
||||||
|
double crackLength = crackSection.EndCoord - crackSection.StartCoord;
|
||||||
|
double maxCrackLength = 2 * crackSection.EffectiveDepth;
|
||||||
if (crackLength > maxCrackLength)
|
if (crackLength > maxCrackLength)
|
||||||
{
|
{
|
||||||
newSection.StartCoord = newSection.EndCoord - maxCrackLength;
|
crackSection.StartCoord = crackSection.EndCoord - maxCrackLength;
|
||||||
}
|
}
|
||||||
InputData.InclinedCrack = newSection;
|
resultData.InclinedCrack = crackSection;
|
||||||
|
result.ResultInputData = resultData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool Check()
|
private bool Check()
|
||||||
@@ -104,7 +108,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
double totalStrength = concreteStrength + stirrupStrength;
|
double totalStrength = concreteStrength + stirrupStrength;
|
||||||
localTraceLogger?.AddMessage($"Total strength = {concreteStrength} + {stirrupStrength} = {totalStrength}(N)");
|
localTraceLogger?.AddMessage($"Total strength = {concreteStrength} + {stirrupStrength} = {totalStrength}(N)");
|
||||||
result.TotalStrength = totalStrength;
|
result.TotalStrength = totalStrength;
|
||||||
double actualShearForce = InputData.ForceTuple.Qy;
|
double actualShearForce = result.ResultInputData.ForceTuple.Qy;
|
||||||
if (actualShearForce > totalStrength)
|
if (actualShearForce > totalStrength)
|
||||||
{
|
{
|
||||||
result.IsValid = false;
|
result.IsValid = false;
|
||||||
@@ -125,38 +129,38 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
var logic = new StirrupBySearchLogic(localTraceLogger.GetSimilarTraceLogger(100))
|
var logic = new StirrupBySearchLogic(localTraceLogger.GetSimilarTraceLogger(100))
|
||||||
{
|
{
|
||||||
InputData = InputData,
|
InputData = result.ResultInputData,
|
||||||
SectionEffectiveness = sectionEffectiveness
|
SectionEffectiveness = sectionEffectiveness
|
||||||
};
|
};
|
||||||
double stirrupStrength = logic.GetShearStrength();
|
double stirrupStrength = logic.GetShearStrength();
|
||||||
localTraceLogger?.AddMessage($"Stirrup strength was restricted as Qsw,restricted = {stirrupStrength}(N)");
|
localTraceLogger?.AddMessage($"Stirrup strength was restricted as Qsw,restricted = {stirrupStrength}(N)");
|
||||||
InputData.InclinedCrack = logic.InclinedCrack;
|
result.ResultInputData.InclinedCrack = logic.InclinedCrack;
|
||||||
return stirrupStrength;
|
return stirrupStrength;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeStrategies()
|
private void InitializeStrategies()
|
||||||
{
|
{
|
||||||
if (InputData.InclinedSection.BeamShearSection.Shape is IRectangleShape)
|
if (result.ResultInputData.InclinedSection.BeamShearSection.Shape is IRectangleShape)
|
||||||
{
|
{
|
||||||
sectionEffectiveness = SectionEffectivenessFactory.GetShearEffectiveness(BeamShearSectionType.Rectangle);
|
sectionEffectiveness = SectionEffectivenessFactory.GetShearEffectiveness(BeamShearSectionType.Rectangle);
|
||||||
}
|
}
|
||||||
else if (InputData.InclinedSection.BeamShearSection.Shape is ICircleShape)
|
else if (result.ResultInputData.InclinedSection.BeamShearSection.Shape is ICircleShape)
|
||||||
{
|
{
|
||||||
sectionEffectiveness = SectionEffectivenessFactory.GetShearEffectiveness(BeamShearSectionType.Circle);
|
sectionEffectiveness = SectionEffectivenessFactory.GetShearEffectiveness(BeamShearSectionType.Circle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(InputData.InclinedSection.BeamShearSection.Shape));
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(result.ResultInputData.InclinedSection.BeamShearSection.Shape));
|
||||||
}
|
}
|
||||||
concreteLogic = new(sectionEffectiveness, InputData.InclinedSection, localTraceLogger);
|
concreteLogic = new(sectionEffectiveness, result.ResultInputData.InclinedSection, localTraceLogger);
|
||||||
stirrupLogic = new(InputData, localTraceLogger);
|
stirrupLogic = new(result.ResultInputData, localTraceLogger);
|
||||||
getLongitudinalForceFactorLogic = new GetLongitudinalForceFactorLogic(localTraceLogger?.GetSimilarTraceLogger(100));
|
getLongitudinalForceFactorLogic = new GetLongitudinalForceFactorLogic(localTraceLogger?.GetSimilarTraceLogger(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetLongitudinalForce()
|
private void SetLongitudinalForce()
|
||||||
{
|
{
|
||||||
getLongitudinalForceFactorLogic.LongitudinalForce = InputData.ForceTuple.Nz;
|
getLongitudinalForceFactorLogic.LongitudinalForce = result.ResultInputData.ForceTuple.Nz;
|
||||||
getLongitudinalForceFactorLogic.InclinedSection = InputData.InclinedSection;
|
getLongitudinalForceFactorLogic.InclinedSection = result.ResultInputData.InclinedSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PrepareNewResult()
|
private void PrepareNewResult()
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
public class GetInclinedSectionListLogic : IGetInclinedSectionListLogic
|
public class GetInclinedSectionListLogic : IGetInclinedSectionListLogic
|
||||||
{
|
{
|
||||||
|
private const int minimumInclinedSectionLengthFactor = 0;
|
||||||
|
private const int maximumInclinedSectionLengthFactor = 3;
|
||||||
private IGetInclinedSectionLogic inclinedSectionLogic;
|
private IGetInclinedSectionLogic inclinedSectionLogic;
|
||||||
private double depth;
|
private double depth;
|
||||||
private double effectiveDepth;
|
private double effectiveDepth;
|
||||||
@@ -28,8 +30,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
Check();
|
Check();
|
||||||
GetShapeParameters();
|
GetShapeParameters();
|
||||||
GetCoordinates();
|
GetCoordinates();
|
||||||
double minSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMinValue * effectiveDepth;
|
double minSectionLength = minimumInclinedSectionLengthFactor * effectiveDepth;
|
||||||
double maxSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMaxValue * effectiveDepth;
|
double maxSectionLength = maximumInclinedSectionLengthFactor * effectiveDepth;
|
||||||
foreach (var startCoord in coordinates)
|
foreach (var startCoord in coordinates)
|
||||||
{
|
{
|
||||||
var endCoordinates = coordinates.Where(x => x >= startCoord);
|
var endCoordinates = coordinates.Where(x => x >= startCoord);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public class StirrupByDensityStrengthLogic : IBeamShearStrenghLogic
|
public class StirrupByDensityStrengthLogic : IBeamShearStrenghLogic
|
||||||
{
|
{
|
||||||
//private const double minStirrupRatio = 0.25;
|
|
||||||
private readonly IStirrupEffectiveness stirrupEffectiveness;
|
private readonly IStirrupEffectiveness stirrupEffectiveness;
|
||||||
private readonly IStirrupByDensity stirrupByDensity;
|
private readonly IStirrupByDensity stirrupByDensity;
|
||||||
private readonly IInclinedSection inclinedSection;
|
private readonly IInclinedSection inclinedSection;
|
||||||
@@ -11,25 +11,42 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
const double stirrupEffectivenessFactor = 0.75;
|
const double stirrupEffectivenessFactor = 0.75;
|
||||||
private readonly IStirrupByInclinedRebar inclinedRebar;
|
private readonly IStirrupByInclinedRebar inclinedRebar;
|
||||||
private readonly IInclinedSection inclinedSection;
|
private readonly IInclinedSection inclinedSection;
|
||||||
private IRebarSectionStrengthLogic rebarSectionStrengthLogic;
|
|
||||||
private double angleInRad;
|
private double angleInRad;
|
||||||
private double rebarStartPoint;
|
private double rebarStartPoint;
|
||||||
private double rebarHeight;
|
private double rebarHeight;
|
||||||
private double rebarEndPoint;
|
private double rebarEndPoint;
|
||||||
private double rebarTrueStartPoint;
|
private double rebarTrueStartPoint;
|
||||||
private double rebarTrueEndPoint;
|
private double rebarTrueEndPoint;
|
||||||
|
private IRebarSectionStrengthLogic rebarSectionStrengthLogic;
|
||||||
private IInterpolateValueLogic interpolationLogic;
|
private IInterpolateValueLogic interpolationLogic;
|
||||||
|
|
||||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public StirrupByInclinedRebarStrengthLogic(IInclinedSection inclinedSection, IStirrupByInclinedRebar inclinedRebar, IShiftTraceLogger traceLogger)
|
public StirrupByInclinedRebarStrengthLogic(
|
||||||
|
IInclinedSection inclinedSection,
|
||||||
|
IStirrupByInclinedRebar inclinedRebar,
|
||||||
|
IShiftTraceLogger traceLogger) : this(
|
||||||
|
inclinedSection,
|
||||||
|
inclinedRebar,
|
||||||
|
new RebarSectionStrengthLogic(),
|
||||||
|
new InterpolateValueLogic(),
|
||||||
|
traceLogger
|
||||||
|
) { }
|
||||||
|
|
||||||
|
public StirrupByInclinedRebarStrengthLogic(
|
||||||
|
IInclinedSection inclinedSection,
|
||||||
|
IStirrupByInclinedRebar inclinedRebar,
|
||||||
|
IRebarSectionStrengthLogic rebarSectionStrengthLogic,
|
||||||
|
IInterpolateValueLogic interpolationLogic,
|
||||||
|
IShiftTraceLogger? traceLogger)
|
||||||
{
|
{
|
||||||
this.inclinedSection = inclinedSection;
|
this.inclinedSection = inclinedSection;
|
||||||
this.inclinedRebar = inclinedRebar;
|
this.inclinedRebar = inclinedRebar;
|
||||||
|
this.rebarSectionStrengthLogic = rebarSectionStrengthLogic;
|
||||||
|
this.interpolationLogic = interpolationLogic;
|
||||||
TraceLogger = traceLogger;
|
TraceLogger = traceLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public double GetShearStrength()
|
public double GetShearStrength()
|
||||||
{
|
{
|
||||||
GetGeometry();
|
GetGeometry();
|
||||||
@@ -48,7 +65,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
TraceLogger?.AddMessage($"Inclined section start point coordinate X = {inclinedSection.StartCoord} is in end transfer zone");
|
TraceLogger?.AddMessage($"Inclined section start point coordinate X = {inclinedSection.StartCoord} is in end transfer zone");
|
||||||
return GetEndTransferValue();
|
return GetEndTransferValue();
|
||||||
}
|
}
|
||||||
if (inclinedSection.EndCoord > rebarStartPoint & inclinedSection.EndCoord < rebarTrueStartPoint)
|
if (inclinedSection.EndCoord > rebarStartPoint && inclinedSection.EndCoord < rebarTrueStartPoint)
|
||||||
{
|
{
|
||||||
TraceLogger?.AddMessage($"Inclined section end point coordinate X = {inclinedSection.EndCoord} is in start transfer zone");
|
TraceLogger?.AddMessage($"Inclined section end point coordinate X = {inclinedSection.EndCoord} is in start transfer zone");
|
||||||
return GetStartTransferValue();
|
return GetStartTransferValue();
|
||||||
@@ -59,41 +76,33 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
private double GetStartTransferValue()
|
private double GetStartTransferValue()
|
||||||
{
|
{
|
||||||
interpolationLogic = new InterpolateValueLogic()
|
interpolationLogic.X1 = rebarStartPoint;
|
||||||
{
|
interpolationLogic.X2 = rebarTrueStartPoint;
|
||||||
X1 = rebarStartPoint,
|
interpolationLogic.Y1 = 0.0;
|
||||||
X2 = rebarTrueStartPoint,
|
interpolationLogic.Y2 = GetInclinedRebarStrength();
|
||||||
Y1 = 0.0,
|
interpolationLogic.KnownValueX = inclinedSection.EndCoord;
|
||||||
Y2 = GetInclinedRebarStrength(),
|
|
||||||
KnownValueX = inclinedSection.EndCoord
|
|
||||||
};
|
|
||||||
return interpolationLogic.GetValueY();
|
return interpolationLogic.GetValueY();
|
||||||
}
|
}
|
||||||
|
|
||||||
private double GetEndTransferValue()
|
private double GetEndTransferValue()
|
||||||
{
|
{
|
||||||
interpolationLogic = new InterpolateValueLogic()
|
interpolationLogic.X1 = rebarTrueEndPoint;
|
||||||
{
|
interpolationLogic.X2 = rebarEndPoint;
|
||||||
X1 = rebarTrueEndPoint,
|
interpolationLogic.Y1 = GetInclinedRebarStrength();
|
||||||
X2 = rebarEndPoint,
|
interpolationLogic.Y2 = 0.0;
|
||||||
Y1 = GetInclinedRebarStrength(),
|
interpolationLogic.KnownValueX = inclinedSection.StartCoord;
|
||||||
Y2 = 0.0,
|
|
||||||
KnownValueX = inclinedSection.StartCoord
|
|
||||||
};
|
|
||||||
return interpolationLogic.GetValueY();
|
return interpolationLogic.GetValueY();
|
||||||
}
|
}
|
||||||
|
|
||||||
private double GetInclinedRebarStrength()
|
private double GetInclinedRebarStrength()
|
||||||
{
|
{
|
||||||
rebarSectionStrengthLogic ??= new RebarSectionStrengthLogic()
|
rebarSectionStrengthLogic.RebarStrengthFactor = 0.8;
|
||||||
{
|
rebarSectionStrengthLogic.MaxRebarStrength = 3e8;
|
||||||
RebarStrengthFactor = 0.8,
|
rebarSectionStrengthLogic.LimitState = LimitStates.ULS;
|
||||||
MaxRebarStrength = 3e8,
|
rebarSectionStrengthLogic.CalcTerm = CalcTerms.ShortTerm;
|
||||||
LimitState = LimitStates.ULS,
|
rebarSectionStrengthLogic.TraceLogger = TraceLogger;
|
||||||
CalcTerm = CalcTerms.ShortTerm,
|
|
||||||
TraceLogger = TraceLogger,
|
|
||||||
};
|
|
||||||
rebarSectionStrengthLogic.RebarSection = inclinedRebar.RebarSection;
|
rebarSectionStrengthLogic.RebarSection = inclinedRebar.RebarSection;
|
||||||
|
|
||||||
double rebarStrength = rebarSectionStrengthLogic.GetRebarMaxTensileForce();
|
double rebarStrength = rebarSectionStrengthLogic.GetRebarMaxTensileForce();
|
||||||
double inclinedRebarStrength = stirrupEffectivenessFactor * rebarStrength * Math.Sin(angleInRad) * inclinedRebar.LegCount;
|
double inclinedRebarStrength = stirrupEffectivenessFactor * rebarStrength * Math.Sin(angleInRad) * inclinedRebar.LegCount;
|
||||||
TraceLogger?.AddMessage($"Inclined rebar Name = {inclinedRebar.Name}, start point {rebarStartPoint}(m), end point {rebarEndPoint}(m), angle of inclination {inclinedRebar.AngleOfInclination}(deg), number of legs {inclinedRebar.LegCount}");
|
TraceLogger?.AddMessage($"Inclined rebar Name = {inclinedRebar.Name}, start point {rebarStartPoint}(m), end point {rebarEndPoint}(m), angle of inclination {inclinedRebar.AngleOfInclination}(deg), number of legs {inclinedRebar.LegCount}");
|
||||||
@@ -113,7 +122,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
rebarTrueEndPoint = rebarEndPoint - transferLength;
|
rebarTrueEndPoint = rebarEndPoint - transferLength;
|
||||||
if (rebarTrueStartPoint >= rebarTrueEndPoint)
|
if (rebarTrueStartPoint >= rebarTrueEndPoint)
|
||||||
{
|
{
|
||||||
throw new StructureHelperException("Transfer aone in inclined rebar is too big");
|
throw new StructureHelperException("Transfer zone in inclined rebar is too big");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,8 +14,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
targetObject.AbsoluteRangeValue = sourceObject.AbsoluteRangeValue;
|
targetObject.AbsoluteRangeValue = sourceObject.AbsoluteRangeValue;
|
||||||
targetObject.RelativeEffectiveDepthRangeValue = sourceObject.RelativeEffectiveDepthRangeValue;
|
targetObject.RelativeEffectiveDepthRangeValue = sourceObject.RelativeEffectiveDepthRangeValue;
|
||||||
targetObject.StepCount = sourceObject.StepCount;
|
targetObject.StepCount = sourceObject.StepCount;
|
||||||
targetObject.RelativeEffectiveDepthSectionLengthMaxValue = sourceObject.RelativeEffectiveDepthSectionLengthMaxValue;
|
|
||||||
targetObject.RelativeEffectiveDepthSectionLengthMinValue = sourceObject.RelativeEffectiveDepthSectionLengthMinValue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
|
||||||
namespace StructureHelperLogics.Models.Materials
|
namespace StructureHelperLogics.Models.Materials
|
||||||
@@ -7,6 +8,10 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
IRebarSection RebarSection { get; set; }
|
IRebarSection RebarSection { get; set; }
|
||||||
IShiftTraceLogger? TraceLogger { get; set; }
|
IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
CalcTerms CalcTerm { get; set; }
|
||||||
|
LimitStates LimitState { get; set; }
|
||||||
|
double MaxRebarStrength { get; set; }
|
||||||
|
double RebarStrengthFactor { get; set; }
|
||||||
|
|
||||||
double GetRebarMaxTensileForce();
|
double GetRebarMaxTensileForce();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,21 +33,107 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[TestCase(0.2, 0.48)]
|
||||||
public void GetShearStrength_CalculatesCorrectly()
|
[TestCase(0.5, 1.2)]
|
||||||
|
[TestCase(1.1, 2.64)]
|
||||||
|
[TestCase(2.2, 2.64)]
|
||||||
|
public void GetShearStrength_CalculatesCorrectly_differentStirrupEnd(double stirrupEnd, double expectedStrength)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
_mockInclinedSection.Setup(s => s.StartCoord).Returns(1.0);
|
_mockInclinedSection.Setup(s => s.StartCoord).Returns(0);
|
||||||
_mockInclinedSection.Setup(s => s.EndCoord).Returns(3.0);
|
_mockInclinedSection.Setup(s => s.EndCoord).Returns(100);
|
||||||
_mockInclinedSection.Setup(s => s.EffectiveDepth).Returns(2.0);
|
_mockInclinedSection.Setup(s => s.EffectiveDepth).Returns(0.55);
|
||||||
|
|
||||||
_mockStirrupEffectiveness.Setup(s => s.MaxCrackLengthRatio).Returns(0.5);
|
_mockStirrupEffectiveness.Setup(s => s.MaxCrackLengthRatio).Returns(2.0);
|
||||||
_mockStirrupEffectiveness.Setup(s => s.StirrupShapeFactor).Returns(1.2);
|
_mockStirrupEffectiveness.Setup(s => s.StirrupShapeFactor).Returns(0.8);
|
||||||
_mockStirrupEffectiveness.Setup(s => s.StirrupPlacementFactor).Returns(1.1);
|
_mockStirrupEffectiveness.Setup(s => s.StirrupPlacementFactor).Returns(0.75);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MinimumStirrupRatio).Returns(0.25);
|
||||||
|
|
||||||
_mockStirrupByDensity.Setup(s => s.StirrupDensity).Returns(4.0);
|
_mockStirrupByDensity.Setup(s => s.StirrupDensity).Returns(4.0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StartCoordinate).Returns(0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.EndCoordinate).Returns(stirrupEnd);
|
||||||
|
|
||||||
double expectedStrength = 1.2 * 1.1 * 1.0 * 4.0; // Min(2.0, 1.0) = 1.0
|
// Act
|
||||||
|
double result = _beamShearStrength.GetShearStrength();
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.That(result, Is.EqualTo(expectedStrength).Within(1e-6));
|
||||||
|
_mockTraceLogger.Verify(t => t.AddMessage(It.IsAny<string>(), It.IsAny<TraceLogStatuses>()), Times.AtLeastOnce);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(0.20, 0.48)]
|
||||||
|
[TestCase(0.55, 1.32)]
|
||||||
|
[TestCase(1.1, 2.64)]
|
||||||
|
[TestCase(2.2, 2.64)]
|
||||||
|
public void GetShearStrength_CalculatesCorrectly_differentInclinedSectionEnd(double inclinedSectionEnd, double expectedStrength)
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
_mockInclinedSection.Setup(s => s.StartCoord).Returns(0);
|
||||||
|
_mockInclinedSection.Setup(s => s.EndCoord).Returns(inclinedSectionEnd);
|
||||||
|
_mockInclinedSection.Setup(s => s.EffectiveDepth).Returns(0.55);
|
||||||
|
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MaxCrackLengthRatio).Returns(2.0);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupShapeFactor).Returns(0.8);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupPlacementFactor).Returns(0.75);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MinimumStirrupRatio).Returns(0.25);
|
||||||
|
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StirrupDensity).Returns(4.0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StartCoordinate).Returns(0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.EndCoordinate).Returns(100);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
double result = _beamShearStrength.GetShearStrength();
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.That(result, Is.EqualTo(expectedStrength).Within(1e-6));
|
||||||
|
_mockTraceLogger.Verify(t => t.AddMessage(It.IsAny<string>(), It.IsAny<TraceLogStatuses>()), Times.AtLeastOnce);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(0.2, 0.66)]
|
||||||
|
[TestCase(0.5, 1.65)]
|
||||||
|
[TestCase(0.8, 2.64)]
|
||||||
|
public void GetShearStrength_CalculatesCorrectly_differentShapeFactor(double shapeFactor, double expectedStrength)
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
_mockInclinedSection.Setup(s => s.StartCoord).Returns(0);
|
||||||
|
_mockInclinedSection.Setup(s => s.EndCoord).Returns(1.1);
|
||||||
|
_mockInclinedSection.Setup(s => s.EffectiveDepth).Returns(0.55);
|
||||||
|
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MaxCrackLengthRatio).Returns(2.0);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupShapeFactor).Returns(shapeFactor);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupPlacementFactor).Returns(0.75);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MinimumStirrupRatio).Returns(0.25);
|
||||||
|
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StirrupDensity).Returns(4.0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StartCoordinate).Returns(0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.EndCoordinate).Returns(100);
|
||||||
|
|
||||||
|
// Act
|
||||||
|
double result = _beamShearStrength.GetShearStrength();
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
Assert.That(result, Is.EqualTo(expectedStrength).Within(1e-6));
|
||||||
|
_mockTraceLogger.Verify(t => t.AddMessage(It.IsAny<string>(), It.IsAny<TraceLogStatuses>()), Times.AtLeastOnce);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(0.2, 0.704)]
|
||||||
|
[TestCase(0.5, 1.76)]
|
||||||
|
[TestCase(0.8, 2.816)]
|
||||||
|
public void GetShearStrength_CalculatesCorrectly_differentPlacementFactor(double placementFactor, double expectedStrength)
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
_mockInclinedSection.Setup(s => s.StartCoord).Returns(0);
|
||||||
|
_mockInclinedSection.Setup(s => s.EndCoord).Returns(1.1);
|
||||||
|
_mockInclinedSection.Setup(s => s.EffectiveDepth).Returns(0.55);
|
||||||
|
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MaxCrackLengthRatio).Returns(2.0);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupShapeFactor).Returns(0.8);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.StirrupPlacementFactor).Returns(placementFactor);
|
||||||
|
_mockStirrupEffectiveness.Setup(s => s.MinimumStirrupRatio).Returns(0.25);
|
||||||
|
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StirrupDensity).Returns(4.0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.StartCoordinate).Returns(0);
|
||||||
|
_mockStirrupByDensity.Setup(s => s.EndCoordinate).Returns(100);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
double result = _beamShearStrength.GetShearStrength();
|
double result = _beamShearStrength.GetShearStrength();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Moq;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
using StructureHelperCommon.Models.Materials;
|
using StructureHelperCommon.Models.Materials;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
using StructureHelperLogics.Models.BeamShears;
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
using System;
|
||||||
@@ -36,6 +37,7 @@ namespace StructureHelperTests.UnitTests.BeamShearTests
|
|||||||
mockSection.Setup(s => s.ConcreteMaterial).Returns(mockConcreteMaterial.Object);
|
mockSection.Setup(s => s.ConcreteMaterial).Returns(mockConcreteMaterial.Object);
|
||||||
mockSection.Setup(s => s.ReinforcementMaterial).Returns(mockReinforcementMaterial.Object);
|
mockSection.Setup(s => s.ReinforcementMaterial).Returns(mockReinforcementMaterial.Object);
|
||||||
mockSection.Setup(s => s.ReinforcementArea).Returns(reinforcementArea);
|
mockSection.Setup(s => s.ReinforcementArea).Returns(reinforcementArea);
|
||||||
|
mockSection.Setup(s => s.Shape).Returns(new RectangleShape(){ Width = 1, Height =2 });
|
||||||
|
|
||||||
var mockInclSection = new Mock<IInclinedSection>();
|
var mockInclSection = new Mock<IInclinedSection>();
|
||||||
mockInclSection.Setup(s => s.WebWidth).Returns(width);
|
mockInclSection.Setup(s => s.WebWidth).Returns(width);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using StructureHelperCommon.Models;
|
|||||||
using StructureHelperLogics.Models.Primitives;
|
using StructureHelperLogics.Models.Primitives;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives.Logics;
|
using StructureHelperLogics.NdmCalculations.Primitives.Logics;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
|
||||||
|
|
||||||
namespace StructureHelperTests.UnitTests.Ndms
|
namespace StructureHelperTests.UnitTests.Ndms
|
||||||
@@ -13,7 +14,7 @@ namespace StructureHelperTests.UnitTests.Ndms
|
|||||||
public class CheckPrimitiveCollectionLogicTests
|
public class CheckPrimitiveCollectionLogicTests
|
||||||
{
|
{
|
||||||
private Mock<IShiftTraceLogger> _mockTraceLogger;
|
private Mock<IShiftTraceLogger> _mockTraceLogger;
|
||||||
private Mock<ICheckRebarPrimitiveLogic> _mockCheckRebarPrimitiveLogic;
|
private Mock<ICheckEntityLogic<IRebarNdmPrimitive>> _mockCheckRebarPrimitiveLogic;
|
||||||
private Mock<IHasPrimitives> _mockHasPrimitives;
|
private Mock<IHasPrimitives> _mockHasPrimitives;
|
||||||
private Mock<CheckPrimitiveCollectionLogic> _mockCheckPrimitiveCollectionLogic;
|
private Mock<CheckPrimitiveCollectionLogic> _mockCheckPrimitiveCollectionLogic;
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ namespace StructureHelperTests.UnitTests.Ndms
|
|||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
_mockTraceLogger = new Mock<IShiftTraceLogger>();
|
_mockTraceLogger = new Mock<IShiftTraceLogger>();
|
||||||
_mockCheckRebarPrimitiveLogic = new Mock<ICheckRebarPrimitiveLogic>();
|
_mockCheckRebarPrimitiveLogic = new Mock<ICheckEntityLogic<IRebarNdmPrimitive>>();
|
||||||
_mockHasPrimitives = new Mock<IHasPrimitives>();
|
_mockHasPrimitives = new Mock<IHasPrimitives>();
|
||||||
|
|
||||||
_mockCheckPrimitiveCollectionLogic = new Mock<CheckPrimitiveCollectionLogic>(_mockTraceLogger.Object, _mockCheckRebarPrimitiveLogic.Object)
|
_mockCheckPrimitiveCollectionLogic = new Mock<CheckPrimitiveCollectionLogic>(_mockTraceLogger.Object, _mockCheckRebarPrimitiveLogic.Object)
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
using Moq;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Services;
|
||||||
|
using StructureHelperLogics.Models.BeamShears;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperTests.UnitTests
|
||||||
|
{
|
||||||
|
|
||||||
|
[TestFixture]
|
||||||
|
public class StirrupByInclinedRebarStrengthLogicTests
|
||||||
|
{
|
||||||
|
private Mock<IInclinedSection> sectionMock;
|
||||||
|
private Mock<IStirrupByInclinedRebar> rebarMock;
|
||||||
|
private Mock<IRebarSectionStrengthLogic> rebarStrengthMock;
|
||||||
|
private Mock<IInterpolateValueLogic> interpolateMock;
|
||||||
|
private Mock<IShiftTraceLogger> loggerMock;
|
||||||
|
|
||||||
|
[SetUp]
|
||||||
|
public void SetUp()
|
||||||
|
{
|
||||||
|
sectionMock = new Mock<IInclinedSection>();
|
||||||
|
rebarMock = new Mock<IStirrupByInclinedRebar>();
|
||||||
|
rebarStrengthMock = new Mock<IRebarSectionStrengthLogic>();
|
||||||
|
interpolateMock = new Mock<IInterpolateValueLogic>();
|
||||||
|
loggerMock = new Mock<IShiftTraceLogger>();
|
||||||
|
|
||||||
|
// Default geometry
|
||||||
|
rebarMock.SetupGet(r => r.TransferLength).Returns(0.1);
|
||||||
|
rebarMock.SetupGet(r => r.StartCoordinate).Returns(0.0);
|
||||||
|
rebarMock.SetupGet(r => r.AngleOfInclination).Returns(45.0);
|
||||||
|
rebarMock.SetupGet(r => r.CompressedGap).Returns(0.0);
|
||||||
|
rebarMock.SetupGet(r => r.LegCount).Returns(2);
|
||||||
|
rebarMock.SetupGet(r => r.RebarSection).Returns(Mock.Of<IRebarSection>());
|
||||||
|
|
||||||
|
sectionMock.SetupGet(s => s.EffectiveDepth).Returns(1.0);
|
||||||
|
|
||||||
|
rebarStrengthMock.Setup(m => m.GetRebarMaxTensileForce()).Returns(1000.0);
|
||||||
|
interpolateMock.Setup(m => m.GetValueY()).Returns(123.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_RebarOutsideSectionStart_ReturnsZero()
|
||||||
|
{
|
||||||
|
sectionMock.SetupGet(s => s.StartCoord).Returns(10.0); // start is after rebar end
|
||||||
|
sectionMock.SetupGet(s => s.EndCoord).Returns(12.0);
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
var result = logic.GetShearStrength();
|
||||||
|
|
||||||
|
Assert.That(result, Is.EqualTo(0.0));
|
||||||
|
loggerMock.Verify(l => l.AddMessage(It.Is<string>(msg => msg.Contains("has been ignored"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_RebarOutsideSectionEnd_ReturnsZero()
|
||||||
|
{
|
||||||
|
sectionMock.SetupGet(s => s.StartCoord).Returns(-5.0);
|
||||||
|
sectionMock.SetupGet(s => s.EndCoord).Returns(-1.0);
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
var result = logic.GetShearStrength();
|
||||||
|
|
||||||
|
Assert.That(result, Is.EqualTo(0.0));
|
||||||
|
loggerMock.Verify(l => l.AddMessage(It.Is<string>(msg => msg.Contains("has been ignored"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_StartTransferZone_UsesInterpolation()
|
||||||
|
{
|
||||||
|
sectionMock.SetupGet(s => s.StartCoord).Returns(0.0);
|
||||||
|
sectionMock.SetupGet(s => s.EndCoord).Returns(0.05); // falls in start transfer zone
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
var result = logic.GetShearStrength();
|
||||||
|
|
||||||
|
Assert.That(result, Is.EqualTo(123.0)); // from interpolateMock
|
||||||
|
interpolateMock.Verify(m => m.GetValueY(), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_EndTransferZone_UsesInterpolation()
|
||||||
|
{
|
||||||
|
sectionMock.SetupGet(s => s.StartCoord).Returns(0.95); // falls in end transfer zone
|
||||||
|
sectionMock.SetupGet(s => s.EndCoord).Returns(2.0);
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
var result = logic.GetShearStrength();
|
||||||
|
|
||||||
|
Assert.That(result, Is.EqualTo(123.0));
|
||||||
|
interpolateMock.Verify(m => m.GetValueY(), Times.Once);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_MainZone_ComputesStrength()
|
||||||
|
{
|
||||||
|
sectionMock.SetupGet(s => s.StartCoord).Returns(0.2);
|
||||||
|
sectionMock.SetupGet(s => s.EndCoord).Returns(1.0);
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
var result = logic.GetShearStrength();
|
||||||
|
|
||||||
|
// Strength = 0.75 * 1000 * sin(45°) * 2
|
||||||
|
var expected = 0.75 * 1000.0 * Math.Sin(Math.PI / 4) * 2;
|
||||||
|
Assert.That(result, Is.EqualTo(expected).Within(1e-6));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetShearStrength_TransferZonesOverlap_ThrowsException()
|
||||||
|
{
|
||||||
|
rebarMock.SetupGet(r => r.TransferLength).Returns(5.0); // huge transfer length
|
||||||
|
|
||||||
|
var logic = CreateLogic();
|
||||||
|
Assert.Throws<StructureHelperException>(() => logic.GetShearStrength());
|
||||||
|
}
|
||||||
|
|
||||||
|
private StirrupByInclinedRebarStrengthLogic CreateLogic()
|
||||||
|
{
|
||||||
|
return new StirrupByInclinedRebarStrengthLogic(
|
||||||
|
sectionMock.Object,
|
||||||
|
rebarMock.Object,
|
||||||
|
rebarStrengthMock.Object,
|
||||||
|
interpolateMock.Object,
|
||||||
|
loggerMock.Object
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user