Change beam shear calculator
This commit is contained in:
@@ -6,7 +6,7 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
internal class PrimitiveVisualPropertyFromDTOConvertStrategy : ConvertStrategy<PrimitiveVisualProperty, PrimitiveVisualPropertyDTO>
|
||||
{
|
||||
private IUpdateStrategy<IPrimitiveVisualProperty> _updateStrategy;
|
||||
private IUpdateStrategy<IPrimitiveVisualProperty> updateStrategy;
|
||||
|
||||
public PrimitiveVisualPropertyFromDTOConvertStrategy(Dictionary<(Guid id, Type type), ISaveable> referenceDictionary, IShiftTraceLogger traceLogger) : base(referenceDictionary, traceLogger)
|
||||
{
|
||||
@@ -14,9 +14,10 @@ namespace DataAccess.DTOs
|
||||
|
||||
public override PrimitiveVisualProperty GetNewItem(PrimitiveVisualPropertyDTO source)
|
||||
{
|
||||
_updateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||
updateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||
ChildClass = this;
|
||||
NewItem = new(source.Id);
|
||||
updateStrategy.Update(NewItem, source);
|
||||
return NewItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace DataAccess.DTOs
|
||||
_updateStrategy ??= new PrimitiveVisualPropertyUpdateStrategy();
|
||||
ChildClass = this;
|
||||
NewItem = new(source.Id);
|
||||
_updateStrategy.Update(NewItem, source);
|
||||
return NewItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,10 @@ namespace DataAccess.DTOs
|
||||
public double RelativeEffectiveDepthRangeValue { get; set; } = 3.3;
|
||||
[JsonProperty("StepCount")]
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -9,16 +9,21 @@ namespace StructureHelper.Infrastructure.UI.GraphicalPrimitives
|
||||
{
|
||||
private IBeamShearSectionLogicResult source;
|
||||
private IInclinedSection inclinedSection => source.InputData.InclinedSection;
|
||||
private IInclinedSection inclinedCrack => source.InputData.InclinedCrack;
|
||||
|
||||
public double SectionStartX => inclinedSection.StartCoord;
|
||||
public double SectionEndX => inclinedSection.EndCoord;
|
||||
public double SectionStartY => inclinedSection.FullDepth - inclinedSection.EffectiveDepth;
|
||||
public double SectionEndY => inclinedSection.FullDepth;
|
||||
public double CrackStartX => inclinedCrack.StartCoord;
|
||||
public double FactorOfUsing => Math.Round(source.FactorOfUsing, 4);
|
||||
public double EffectiveDepth => Math.Round(inclinedSection.EffectiveDepth, 3);
|
||||
public double SpanRatio => (inclinedSection.EndCoord - inclinedSection.StartCoord) / inclinedSection.EffectiveDepth;
|
||||
public double CrackSpanRatio => (inclinedCrack.EndCoord - inclinedCrack.StartCoord) / inclinedSection.EffectiveDepth;
|
||||
public double ActualShearForce => Math.Round(source.InputData.ForceTuple.Qy);
|
||||
public double UltimateShearForce => Math.Round(source.TotalStrength);
|
||||
public double ConcreteShearForce => Math.Round(source.ConcreteStrength);
|
||||
public double StirrupShearForce => Math.Round(source.StirrupStrength);
|
||||
|
||||
public double CenterX => 0;
|
||||
public double CenterY => 0;
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Beam shear section: "/>
|
||||
<TextBlock Margin="0,0,0,2" Text="Beam shear section: "/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding BeamShearSection.Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Depth: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding FullDepth, Converter={StaticResource LengthConverter}}"/>
|
||||
@@ -85,12 +85,14 @@
|
||||
<DataTemplate x:Key="InclinedSectionPrimitiveTemplate"
|
||||
DataType="primitives:InclinedSectionPrimitive">
|
||||
<Canvas>
|
||||
<!--InclinedSection-->
|
||||
<Line
|
||||
X1="{Binding SectionStartX}"
|
||||
X2="{Binding SectionEndX}"
|
||||
Y1="{Binding SectionStartY}"
|
||||
Y2="{Binding SectionEndY}"
|
||||
StrokeThickness="0.01"
|
||||
StrokeDashArray="0.05 0.02"
|
||||
>
|
||||
<Line.Stroke>
|
||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||
@@ -102,16 +104,16 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Inclinated section"/>
|
||||
<TextBlock Margin="0,0,0,2" Text="Inclined section"/>
|
||||
<TextBlock Grid.Row="1" Text="Start coordinate: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding SectionStartX, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="2" Text="End coordinate: "/>
|
||||
@@ -126,7 +128,6 @@
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding EffectiveDepth, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="7" Text="Span c/d ratio: "/>
|
||||
<TextBlock Grid.Row="7" Grid.Column="1" Text="{Binding SpanRatio, Converter={StaticResource PlainDouble}}"/>
|
||||
|
||||
</Grid>
|
||||
</Line.ToolTip>
|
||||
</Line>
|
||||
@@ -141,6 +142,48 @@
|
||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||
</Line.Stroke>
|
||||
</Line>
|
||||
<!--InclinedCrack-->
|
||||
<Line
|
||||
X1="{Binding CrackStartX}"
|
||||
X2="{Binding SectionEndX}"
|
||||
Y1="{Binding SectionStartY}"
|
||||
Y2="{Binding SectionEndY}"
|
||||
StrokeThickness="0.02"
|
||||
>
|
||||
<Line.Stroke>
|
||||
<SolidColorBrush Color="{Binding VisualProperty.Color}" Opacity="{Binding VisualProperty.Opacity}"/>
|
||||
</Line.Stroke>
|
||||
<Line.ToolTip>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Margin="0,0,0,2" Text="Inclined crack"/>
|
||||
<TextBlock Grid.Row="1" Text="Start coordinate: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding CrackStartX, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="2" Text="End coordinate: "/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding SectionEndX, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="3" Text="Ultimate shear force: "/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding UltimateShearForce, Converter={StaticResource ForceConverter}}"/>
|
||||
<TextBlock Grid.Row="4" Text="Concrete shear force: "/>
|
||||
<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" Grid.Column="1" Text="{Binding StirrupShearForce, Converter={StaticResource ForceConverter}}"/>
|
||||
<TextBlock Grid.Row="6" Text="Crack span c0/d ratio: "/>
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Text="{Binding CrackSpanRatio, Converter={StaticResource PlainDouble}}"/>
|
||||
</Grid>
|
||||
</Line.ToolTip>
|
||||
</Line>
|
||||
</Canvas>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -167,14 +210,14 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Stirrup by rebar: "/>
|
||||
<TextBlock Margin="0,0,0,2" Text="Stirrup by rebar: "/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding StirrupByRebar.Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Diameter: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding StirrupByRebar.Diameter, Converter={StaticResource LengthConverter}}"/>
|
||||
@@ -215,10 +258,10 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition Height="23"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Stirrup by density: "/>
|
||||
<TextBlock Margin="0,0,0,2" Text="Stirrup by density: "/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding StirrupByDensity.Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Density: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding StirrupByDensity.StirrupDensity, Converter={StaticResource DistributedLoadConverter}}"/>
|
||||
@@ -248,13 +291,14 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Inclinated rebar: "/>
|
||||
<TextBlock Margin="0,0,0,2" Text="Inclinated rebar: "/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding StirrupByInclinedRebar.Name}"/>
|
||||
<TextBlock Grid.Row="1" Text="Diameter: "/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding StirrupByInclinedRebar.RebarSection.Diameter, Converter={StaticResource LengthConverter}}"/>
|
||||
@@ -262,8 +306,10 @@
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding StirrupByInclinedRebar.RebarSection.Material.MaterialEntity.Name}"/>
|
||||
<TextBlock Grid.Row="3" Text="Start coordinate: "/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding StirrupByInclinedRebar.StartCoordinate, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="4" Text="Angle of inclination: "/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding StirrupByInclinedRebar.AngleOfInclination, Converter={StaticResource PlainDouble}}"/>
|
||||
<TextBlock Grid.Row="4" Text="End coordinate: "/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding EndPointX, Converter={StaticResource LengthConverter}}"/>
|
||||
<TextBlock Grid.Row="5" Text="Angle of inclination: "/>
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding StirrupByInclinedRebar.AngleOfInclination, Converter={StaticResource PlainDouble}}"/>
|
||||
</Grid>
|
||||
</Line.ToolTip>
|
||||
</Line>
|
||||
|
||||
@@ -12,7 +12,15 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
{
|
||||
public class FindParameterCalculator : IFindParameterCalculator
|
||||
{
|
||||
FindParameterResult result;
|
||||
private double start, end;
|
||||
private Predicate<double> predicate;
|
||||
private FindParameterResult result;
|
||||
private double precision;
|
||||
private int maxIterationCount;
|
||||
private double current;
|
||||
private double step;
|
||||
private int iterationNum;
|
||||
|
||||
public string Name { get; set; }
|
||||
public IFindParameterCalculatorInputData InputData { get; set; }
|
||||
public IAccuracy Accuracy { get; set; }
|
||||
@@ -43,7 +51,10 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
result = new();
|
||||
try
|
||||
{
|
||||
FindMinimumValue(InputData.StartValue, InputData.EndValue, InputData.Predicate);
|
||||
start = InputData.StartValue;
|
||||
end = InputData.EndValue;
|
||||
predicate = InputData.Predicate;
|
||||
FindMinimumValue();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -56,7 +67,7 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void FindMinimumValue(double start, double end, Predicate<double> predicate)
|
||||
private void FindMinimumValue()
|
||||
{
|
||||
TraceLogger?.AddMessage($"Calculating parameter by iterations is started,\nrequired precision {Accuracy.IterationAccuracy}");
|
||||
if (predicate(end) == false)
|
||||
@@ -64,12 +75,23 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
TraceLogger?.AddMessage($"Predicate for end value must be true", TraceLogStatuses.Error);
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": predicate for end value must be true");
|
||||
}
|
||||
double precision = Accuracy.IterationAccuracy;
|
||||
int maxIterationCount = Accuracy.MaxIterationCount;
|
||||
double current = start;
|
||||
double step = (end - start) / 2d;
|
||||
int iterationNum = 0;
|
||||
precision = Accuracy.IterationAccuracy;
|
||||
maxIterationCount = Accuracy.MaxIterationCount;
|
||||
current = start;
|
||||
step = (end - start) / 2d;
|
||||
iterationNum = 0;
|
||||
while (step > precision)
|
||||
{
|
||||
ProcessIteration();
|
||||
}
|
||||
TraceLogger?.AddMessage($"Parameter value Cur={current} was found,\nCalculation has finished succefully");
|
||||
result.Parameter = current;
|
||||
result.Description = "Parameter was found succefully";
|
||||
result.IsValid = true;
|
||||
ActionToOutputResults?.Invoke(result);
|
||||
}
|
||||
|
||||
private void ProcessIteration()
|
||||
{
|
||||
TraceLogger?.AddMessage($"Iteration number {iterationNum} is started", TraceLogStatuses.Debug);
|
||||
if (predicate(current) == true)
|
||||
@@ -100,11 +122,5 @@ namespace StructureHelperCommon.Models.Calculators
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": violation of iteration count");
|
||||
}
|
||||
}
|
||||
TraceLogger?.AddMessage($"Parameter value Cur={current} was found,\nCalculation has finished succefully");
|
||||
result.Parameter = current;
|
||||
result.Description = "Parameter was found succefully";
|
||||
result.IsValid = true;
|
||||
ActionToOutputResults?.Invoke(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private double absoluteRangeValue = 0.0;
|
||||
private double relativeEffectiveDepthRangeValue = 3.3;
|
||||
private int stepCount = 55;
|
||||
private double relativeEffectiveDepthSectionLengthMaxValue = 3;
|
||||
private double relativeEffectiveDepthSectionLengthMinValue = 0;
|
||||
|
||||
/// <inheritdoc>
|
||||
public Guid Id { get; }
|
||||
@@ -56,6 +58,33 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
stepCount = value;
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
Id = id;
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <inheritdoc/>
|
||||
public IInclinedSection InclinedSection { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IInclinedSection InclinedCrack { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IStirrup Stirrup { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public LimitStates LimitState { get; set; }
|
||||
@@ -21,6 +23,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IForceTuple ForceTuple { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IBeamShearAction BeamShearAction { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public IBeamShearSection BeamShearSection { get; set; }
|
||||
|
||||
public BeamShearSectionLogicInputData(Guid id)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,14 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// </summary>
|
||||
double RelativeEffectiveDepthRangeValue { get; set; }
|
||||
/// <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
|
||||
/// </summary>
|
||||
int StepCount { get; set; }
|
||||
|
||||
@@ -13,10 +13,13 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// </summary>
|
||||
public interface IBeamShearSectionLogicInputData : IInputData, ISaveable
|
||||
{
|
||||
IBeamShearAction BeamShearAction { get; set; }
|
||||
IBeamShearSection BeamShearSection { get; set; }
|
||||
/// <summary>
|
||||
/// Properties of RC cross-section
|
||||
/// </summary>
|
||||
IInclinedSection InclinedSection { get; set; }
|
||||
IInclinedSection InclinedCrack { get; set; }
|
||||
/// <summary>
|
||||
/// Properties of stirrups in cross-section
|
||||
/// </summary>
|
||||
|
||||
@@ -2,22 +2,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Loggers;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public class BeamShearCalculatorLogic : IGetResultByInputDataLogic<IBeamShearCalculatorInputData, IBeamShearCalculatorResult>
|
||||
{
|
||||
private const LimitStates CollapseLimitState = LimitStates.ULS;
|
||||
private readonly List<CalcTerms> calcTerms = new() { CalcTerms.LongTerm, CalcTerms.ShortTerm };
|
||||
private IBeamShearCalculatorResult result;
|
||||
private IBeamShearSectionLogic beamShearSectionLogic;
|
||||
private List<IBeamShearActionResult> actionResults;
|
||||
private IBeamShearCalculatorInputData inputData;
|
||||
private readonly List<CalcTerms> calcTerms = new() { CalcTerms.LongTerm, CalcTerms.ShortTerm };
|
||||
private List<IInclinedSection> inclinedSections;
|
||||
private IBeamShearSectionLogic beamShearSectionLogic;
|
||||
private IGetBeamShearSectionIputDatasLogic getBeamShearSectionIputDatasLogic;
|
||||
private IGetInclinedSectionListLogic getInclinedSectionListLogic;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
@@ -36,7 +37,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
InitializeStrategies();
|
||||
try
|
||||
{
|
||||
GetSections();
|
||||
GetActionResults();
|
||||
result.ActionResults = actionResults;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -82,6 +83,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
beamShearSectionLogic ??= new BeamShearSectionLogic(TraceLogger);
|
||||
getInclinedSectionListLogic ??= new GetInclinedSectionListLogic(null);
|
||||
getBeamShearSectionIputDatasLogic ??= new GetBeamShearSectionIputDatasLogic();
|
||||
}
|
||||
|
||||
private void PrepareNewResult()
|
||||
@@ -93,7 +96,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
};
|
||||
}
|
||||
|
||||
private void GetSections()
|
||||
private void GetActionResults()
|
||||
{
|
||||
actionResults = new();
|
||||
List<IStirrup> stirrups = inputData.Stirrups.ToList();
|
||||
@@ -103,17 +106,24 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
}
|
||||
foreach (var beamShearAction in inputData.Actions)
|
||||
{
|
||||
getBeamShearSectionIputDatasLogic.Action = beamShearAction;
|
||||
foreach (var calcTerm in calcTerms)
|
||||
{
|
||||
getBeamShearSectionIputDatasLogic.CalcTerm = calcTerm;
|
||||
foreach (var section in inputData.Sections)
|
||||
{
|
||||
getInclinedSectionListLogic.BeamShearSection = section;
|
||||
getInclinedSectionListLogic.DesignRangeProperty = inputData.DesignRangeProperty;
|
||||
inclinedSections = getInclinedSectionListLogic.GetInclinedSections();
|
||||
getBeamShearSectionIputDatasLogic.Section = section;
|
||||
getBeamShearSectionIputDatasLogic.InclinedSectionList = inclinedSections;
|
||||
TraceLogger?.AddMessage($"Analysis for action: {beamShearAction.Name}, section: {section.Name}, calc turm {calcTerm} has been started");
|
||||
TraceSection(section);
|
||||
foreach (var stirrup in stirrups)
|
||||
{
|
||||
List<IInclinedSection> inclinedSections = GetInclinedSections(section);
|
||||
List<IBeamShearSectionLogicInputData> sectionInputDatas = GetSectionInputDatas(beamShearAction, calcTerm, section, stirrup, inclinedSections);
|
||||
List<IBeamShearSectionLogicResult> sectionResults = GetSectionResults(sectionInputDatas);
|
||||
getBeamShearSectionIputDatasLogic.Stirrup = stirrup;
|
||||
List<IBeamShearSectionLogicInputData> sectionInputDatas = getBeamShearSectionIputDatasLogic.GetBeamShearSectionInputDatas();
|
||||
List<IBeamShearSectionLogicResult> sectionResults = GetInclinedSectionResults(sectionInputDatas);
|
||||
BeamShearActionResult actionResult = GetActionResult(beamShearAction, calcTerm, section, stirrup, sectionResults);
|
||||
actionResults.Add(actionResult);
|
||||
}
|
||||
@@ -139,7 +149,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
return actionResult;
|
||||
}
|
||||
|
||||
private List<IBeamShearSectionLogicResult> GetSectionResults(List<IBeamShearSectionLogicInputData> sectionInputDatas)
|
||||
private List<IBeamShearSectionLogicResult> GetInclinedSectionResults(List<IBeamShearSectionLogicInputData> sectionInputDatas)
|
||||
{
|
||||
List<IBeamShearSectionLogicResult> sectionResults = new();
|
||||
foreach (var item in sectionInputDatas)
|
||||
@@ -147,42 +157,9 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
IBeamShearSectionLogicResult sectionResult = CalculateInclinedSectionResult(item);
|
||||
sectionResults.Add(sectionResult);
|
||||
}
|
||||
|
||||
return sectionResults;
|
||||
}
|
||||
|
||||
private List<IBeamShearSectionLogicInputData> GetSectionInputDatas(IBeamShearAction beamShearAction, CalcTerms calcTerm, IBeamShearSection section, IStirrup stirrup, List<IInclinedSection> inclinedSections)
|
||||
{
|
||||
List<IBeamShearSectionLogicInputData> sectionInputDatas = new();
|
||||
var material = section.ConcreteMaterial;
|
||||
var strength = material.GetStrength(CollapseLimitState, calcTerm);
|
||||
foreach (var inclinedSection in inclinedSections)
|
||||
{
|
||||
inclinedSection.LimitState = CollapseLimitState;
|
||||
inclinedSection.CalcTerm = calcTerm;
|
||||
inclinedSection.ConcreteCompressionStrength = strength.Compressive;
|
||||
inclinedSection.ConcreteTensionStrength = strength.Tensile;
|
||||
DirectShearForceLogicInputData inputData = new()
|
||||
{
|
||||
BeamShearAction = beamShearAction,
|
||||
InclinedSection = inclinedSection,
|
||||
LimitState = CollapseLimitState,
|
||||
CalcTerm = calcTerm,
|
||||
};
|
||||
IForceTuple forceTuple = GetForceTupleByShearAction(inputData);
|
||||
BeamShearSectionLogicInputData newInputData = new(Guid.NewGuid())
|
||||
{
|
||||
InclinedSection = inclinedSection,
|
||||
Stirrup = stirrup,
|
||||
ForceTuple = forceTuple,
|
||||
LimitState = CollapseLimitState,
|
||||
CalcTerm = calcTerm
|
||||
};
|
||||
sectionInputDatas.Add(newInputData);
|
||||
}
|
||||
|
||||
return sectionInputDatas;
|
||||
}
|
||||
|
||||
private static BeamShearActionResult PrepareNewActionResult(IBeamShearAction beamShearAction, CalcTerms calcTerm, IBeamShearSection section, IStirrup stirrup)
|
||||
{
|
||||
@@ -197,19 +174,5 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
Stirrup = stirrup
|
||||
};
|
||||
}
|
||||
|
||||
private List<IInclinedSection> GetInclinedSections(IBeamShearSection beamShearSection)
|
||||
{
|
||||
IGetInclinedSectionListInputData inclinedSectionInputDataLogic = new GetInclinedSectionListInputData(inputData.DesignRangeProperty, beamShearSection);
|
||||
//IGetInclinedSectionListLogic getInclinedSectionListLogic = new GetInclinedSectionListLogic(inclinedSectionInputDataLogic, TraceLogger);
|
||||
IGetInclinedSectionListLogic getInclinedSectionListLogic = new GetInclinedSectionListLogic(inclinedSectionInputDataLogic, null);
|
||||
return getInclinedSectionListLogic.GetInclinedSections();
|
||||
}
|
||||
|
||||
private IForceTuple GetForceTupleByShearAction(IDirectShearForceLogicInputData inputData)
|
||||
{
|
||||
IGetDirectShearForceLogic getDirectShearForceLogic = new GetDirectShearForceLogic(inputData, null);
|
||||
return getDirectShearForceLogic.CalculateShearForceTuple();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private IGetLongitudinalForceFactorLogic getLongitudinalForceFactorLogic;
|
||||
private string sectionMessage;
|
||||
private ICheckInputDataLogic<IBeamShearSectionLogicInputData> checkInputDataLogic;
|
||||
private double concreteStrength;
|
||||
private double stirrupStrength;
|
||||
|
||||
private ShiftTraceLogger? localTraceLogger { get; set; }
|
||||
|
||||
@@ -41,6 +43,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
InitializeStrategies();
|
||||
try
|
||||
{
|
||||
AddInclinedCrackToInputData();
|
||||
CalculateResult();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -50,6 +53,20 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
}
|
||||
}
|
||||
|
||||
private void AddInclinedCrackToInputData()
|
||||
{
|
||||
InclinedSection newSection = new();
|
||||
var updateStrategy = new InclinedSectionUpdateStrategy();
|
||||
updateStrategy.Update(newSection, InputData.InclinedSection);
|
||||
double crackLength = newSection.EndCoord - newSection.StartCoord;
|
||||
double maxCrackLength = 2 * newSection.EffectiveDepth;
|
||||
if (crackLength > maxCrackLength)
|
||||
{
|
||||
newSection.StartCoord = newSection.EndCoord - maxCrackLength;
|
||||
}
|
||||
InputData.InclinedCrack = newSection;
|
||||
}
|
||||
|
||||
private bool Check()
|
||||
{
|
||||
bool checkResult = true;
|
||||
@@ -71,8 +88,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
SetLongitudinalForce();
|
||||
double factorOfLongitudinalForce = getLongitudinalForceFactorLogic.GetFactor();
|
||||
localTraceLogger?.AddMessage($"Factor of longitudinal force = {factorOfLongitudinalForce}, (dimensionless)");
|
||||
double concreteStrength = concreteLogic.GetShearStrength();
|
||||
double stirrupStrength = stirrupLogic.GetShearStrength();
|
||||
concreteStrength = concreteLogic.GetShearStrength();
|
||||
stirrupStrength = stirrupLogic.GetShearStrength();
|
||||
if (stirrupStrength > concreteStrength)
|
||||
{
|
||||
localTraceLogger?.AddMessage($"Shear reinforcement strength Qsw = {stirrupStrength} is greater than concrete strength for shear Qb = {concreteStrength}, shear reinforcement strength has to be restricted.");
|
||||
@@ -113,6 +130,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
};
|
||||
double stirrupStrength = logic.GetShearStrength();
|
||||
localTraceLogger?.AddMessage($"Stirrup strength was restricted as Qsw,restricted = {stirrupStrength}(N)");
|
||||
InputData.InclinedCrack = logic.InclinedCrack;
|
||||
return stirrupStrength;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public class GetBeamShearSectionIputDatasLogic : IGetBeamShearSectionIputDatasLogic
|
||||
{
|
||||
private const LimitStates CollapseLimitState = LimitStates.ULS;
|
||||
private IDirectShearForceLogicInputData directShearForceLogicInputData;
|
||||
private (double Compressive, double Tensile) strength;
|
||||
|
||||
public IBeamShearAction Action { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public IBeamShearSection Section { get; set; }
|
||||
public IStirrup Stirrup { get; set; }
|
||||
public List<IInclinedSection> InclinedSectionList { get; set; }
|
||||
|
||||
public List<IBeamShearSectionLogicInputData> GetBeamShearSectionInputDatas()
|
||||
{
|
||||
List<IBeamShearSectionLogicInputData> sectionInputDatas = new();
|
||||
var material = Section.ConcreteMaterial;
|
||||
strength = material.GetStrength(CollapseLimitState, CalcTerm);
|
||||
foreach (var inclinedSection in InclinedSectionList)
|
||||
{
|
||||
PrepareInclinedSection(inclinedSection);
|
||||
BeamShearSectionLogicInputData newInputData = GetNewInputData(inclinedSection);
|
||||
sectionInputDatas.Add(newInputData);
|
||||
}
|
||||
|
||||
return sectionInputDatas;
|
||||
}
|
||||
|
||||
private void PrepareInclinedSection(IInclinedSection inclinedSection)
|
||||
{
|
||||
inclinedSection.LimitState = CollapseLimitState;
|
||||
inclinedSection.CalcTerm = CalcTerm;
|
||||
inclinedSection.ConcreteCompressionStrength = strength.Compressive;
|
||||
inclinedSection.ConcreteTensionStrength = strength.Tensile;
|
||||
}
|
||||
|
||||
private BeamShearSectionLogicInputData GetNewInputData(IInclinedSection inclinedSection)
|
||||
{
|
||||
IForceTuple forceTuple = GetForceTupleByShearAction(inclinedSection);
|
||||
BeamShearSectionLogicInputData beamShearSectionLogicInputData = new(Guid.NewGuid())
|
||||
{
|
||||
InclinedSection = inclinedSection,
|
||||
BeamShearAction = Action,
|
||||
BeamShearSection = Section,
|
||||
Stirrup = Stirrup,
|
||||
ForceTuple = forceTuple,
|
||||
LimitState = CollapseLimitState,
|
||||
CalcTerm = CalcTerm
|
||||
};
|
||||
BeamShearSectionLogicInputData newInputData = beamShearSectionLogicInputData;
|
||||
return newInputData;
|
||||
}
|
||||
|
||||
private IForceTuple GetForceTupleByShearAction(IInclinedSection inclinedSection)
|
||||
{
|
||||
directShearForceLogicInputData = new DirectShearForceLogicInputData()
|
||||
{
|
||||
BeamShearAction = Action,
|
||||
InclinedSection = inclinedSection,
|
||||
LimitState = CollapseLimitState,
|
||||
CalcTerm = CalcTerm,
|
||||
};
|
||||
IGetDirectShearForceLogic getDirectShearForceLogic = new GetDirectShearForceLogic(directShearForceLogicInputData, null);
|
||||
return getDirectShearForceLogic.CalculateShearForceTuple();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class GetInclinedSectionListInputData : IGetInclinedSectionListInputData
|
||||
{
|
||||
public IBeamShearDesignRangeProperty DesignRangeProperty { get; }
|
||||
public IGetInclinedSectionLogic? GetInclinedSectionLogic { get; set; }
|
||||
public IBeamShearSection BeamShearSection { get; set; }
|
||||
|
||||
public GetInclinedSectionListInputData(IBeamShearDesignRangeProperty designRangeProperty, IBeamShearSection beamShearSection)
|
||||
{
|
||||
DesignRangeProperty = designRangeProperty;
|
||||
BeamShearSection = beamShearSection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,19 +7,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public class GetInclinedSectionListLogic : IGetInclinedSectionListLogic
|
||||
{
|
||||
private readonly IGetInclinedSectionListInputData inputData;
|
||||
private IGetInclinedSectionLogic inclinedSectionLogic;
|
||||
private double depth;
|
||||
private double effectiveDepth;
|
||||
private List<IInclinedSection> inclinedSections;
|
||||
private List<double> coordinates;
|
||||
|
||||
public IBeamShearDesignRangeProperty DesignRangeProperty { get; set; }
|
||||
public IBeamShearSection BeamShearSection { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public GetInclinedSectionListLogic(
|
||||
IGetInclinedSectionListInputData inputData,
|
||||
IShiftTraceLogger? traceLogger)
|
||||
public GetInclinedSectionListLogic(IShiftTraceLogger? traceLogger)
|
||||
{
|
||||
this.inputData = inputData;
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
@@ -29,23 +28,29 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
Check();
|
||||
GetShapeParameters();
|
||||
GetCoordinates();
|
||||
double minSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMinValue * effectiveDepth;
|
||||
double maxSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMaxValue * effectiveDepth;
|
||||
foreach (var startCoord in coordinates)
|
||||
{
|
||||
var endCoordinates = coordinates.Where(x => x >= startCoord);
|
||||
foreach (var endCoord in endCoordinates)
|
||||
{
|
||||
inclinedSectionLogic = InitializeInclinedSectionLogic(startCoord, endCoord);
|
||||
double sectionLength = endCoord - startCoord;
|
||||
if (sectionLength >= minSectionLength & sectionLength <= maxSectionLength)
|
||||
{
|
||||
inclinedSectionLogic = new GetInclinedSectionLogic(BeamShearSection, startCoord, endCoord, TraceLogger);
|
||||
IInclinedSection inclinedSection = inclinedSectionLogic.GetInclinedSection();
|
||||
inclinedSections.Add(inclinedSection);
|
||||
}
|
||||
}
|
||||
}
|
||||
return inclinedSections;
|
||||
}
|
||||
|
||||
private void GetCoordinates()
|
||||
{
|
||||
double maxSectionLength = GetMaxSectionLength();
|
||||
int stepCount = inputData.DesignRangeProperty.StepCount;
|
||||
double maxSectionLength = GetMaxLengthOfInclinedSection();
|
||||
int stepCount = DesignRangeProperty.StepCount;
|
||||
double step = maxSectionLength / stepCount;
|
||||
inclinedSections = new();
|
||||
coordinates = new();
|
||||
@@ -57,41 +62,36 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
}
|
||||
}
|
||||
|
||||
private double GetMaxSectionLength()
|
||||
private double GetMaxLengthOfInclinedSection()
|
||||
{
|
||||
double relativeLength = inputData.DesignRangeProperty.RelativeEffectiveDepthRangeValue * effectiveDepth;
|
||||
double length = Math.Max(relativeLength, inputData.DesignRangeProperty.AbsoluteRangeValue);
|
||||
double minimumRelativeLength = DesignRangeProperty.RelativeEffectiveDepthRangeValue * effectiveDepth;
|
||||
double minimumAbsoluteLength = DesignRangeProperty.AbsoluteRangeValue;
|
||||
double length = Math.Max(minimumRelativeLength, minimumAbsoluteLength);
|
||||
return length;
|
||||
}
|
||||
|
||||
private void Check()
|
||||
{
|
||||
CheckObject.IsNull(inputData);
|
||||
CheckObject.IsNull(inputData.BeamShearSection);
|
||||
}
|
||||
private IGetInclinedSectionLogic InitializeInclinedSectionLogic(double startCoord, double endCoord)
|
||||
{
|
||||
if (inputData.GetInclinedSectionLogic is not null)
|
||||
{
|
||||
return inputData.GetInclinedSectionLogic;
|
||||
}
|
||||
return new GetInclinedSectionLogic(inputData.BeamShearSection, startCoord, endCoord, TraceLogger);
|
||||
CheckObject.IsNull(BeamShearSection);
|
||||
CheckObject.IsNull(DesignRangeProperty);
|
||||
}
|
||||
|
||||
private void GetShapeParameters()
|
||||
{
|
||||
if (inputData.BeamShearSection.Shape is IRectangleShape rectangle)
|
||||
if (BeamShearSection.Shape is IRectangleShape rectangle)
|
||||
{
|
||||
depth = rectangle.Height;
|
||||
}
|
||||
else if (inputData.BeamShearSection.Shape is ICircleShape circle)
|
||||
else if (BeamShearSection.Shape is ICircleShape circle)
|
||||
{
|
||||
depth = circle.Diameter;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(inputData.BeamShearSection.Shape));
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(BeamShearSection.Shape));
|
||||
}
|
||||
effectiveDepth = depth - inputData.BeamShearSection.CenterCover;
|
||||
double coverLayerOfConcrete = BeamShearSection.CenterCover;
|
||||
effectiveDepth = depth - coverLayerOfConcrete;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public interface IGetBeamShearSectionIputDatasLogic
|
||||
{
|
||||
public IBeamShearAction Action { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public IBeamShearSection Section { get; set; }
|
||||
public IStirrup Stirrup { get; set; }
|
||||
public List<IInclinedSection> InclinedSectionList { get; set; }
|
||||
List<IBeamShearSectionLogicInputData> GetBeamShearSectionInputDatas();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
|
||||
namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public interface IGetInclinedSectionListInputData : IInputData
|
||||
{
|
||||
IBeamShearDesignRangeProperty DesignRangeProperty { get; }
|
||||
IGetInclinedSectionLogic? GetInclinedSectionLogic { get; set; }
|
||||
IBeamShearSection BeamShearSection { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// </summary>
|
||||
public interface IGetInclinedSectionListLogic : ILogic
|
||||
{
|
||||
public IBeamShearDesignRangeProperty DesignRangeProperty { get; set; }
|
||||
public IBeamShearSection BeamShearSection { get; set; }
|
||||
List<IInclinedSection> GetInclinedSections();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
private ConcreteStrengthLogic concreteLogic;
|
||||
private StirrupStrengthLogic stirrupLogic;
|
||||
private IFindParameterCalculator parameterCalculator;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
public IInclinedSection InclinedCrack { get; private set; }
|
||||
public IBeamShearSectionLogicInputData InputData { get; internal set; }
|
||||
public ISectionEffectiveness SectionEffectiveness { get; internal set; }
|
||||
public StirrupBySearchLogic(IShiftTraceLogger? traceLogger)
|
||||
@@ -20,6 +23,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
double parameter = GetCrackLengthRatio();
|
||||
BeamShearSectionLogicInputData newInputData = GetNewInputDataByCrackLengthRatio(parameter);
|
||||
InclinedCrack = newInputData.InclinedCrack;
|
||||
TraceLogger?.AddMessage($"New value of dangerous inclinated crack has been obtained: start point Xstart = {newInputData.InclinedSection.StartCoord}(m), end point Xend = {newInputData.InclinedSection.EndCoord}(m)");
|
||||
stirrupLogic = new(newInputData, TraceLogger);
|
||||
double stirrupStrength = stirrupLogic.GetShearStrength();
|
||||
@@ -33,14 +37,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <exception cref="StructureHelperException"></exception>
|
||||
private double GetCrackLengthRatio()
|
||||
{
|
||||
var parameterCalculator = new FindParameterCalculator();
|
||||
if (GetPredicate(1) == false)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
parameterCalculator = new FindParameterCalculator();
|
||||
parameterCalculator.InputData.Predicate = GetPredicate;
|
||||
parameterCalculator.Accuracy.IterationAccuracy = 0.0001d;
|
||||
parameterCalculator.Accuracy.MaxIterationCount = 1000;
|
||||
parameterCalculator.Run();
|
||||
if (parameterCalculator.Result.IsValid == false)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": predicate error");
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Binary search error {parameterCalculator.Result.Description}");
|
||||
}
|
||||
var result = parameterCalculator.Result as FindParameterResult;
|
||||
var crackLengthRatio = result.Parameter;
|
||||
@@ -59,25 +67,32 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
private bool GetPredicate(double crackLengthRatio)
|
||||
{
|
||||
BeamShearSectionLogicInputData newInputData = GetNewInputDataByCrackLengthRatio(crackLengthRatio);
|
||||
concreteLogic = new(SectionEffectiveness, newInputData.InclinedSection, null);
|
||||
concreteLogic = new(SectionEffectiveness, newInputData.InclinedCrack, null);
|
||||
stirrupLogic = new(newInputData, null);
|
||||
double concreteStrength = concreteLogic.GetShearStrength();
|
||||
double stirrupStrength = stirrupLogic.GetShearStrength();
|
||||
return stirrupStrength > concreteStrength;
|
||||
bool predicateResult = stirrupStrength > concreteStrength;
|
||||
if (crackLengthRatio == 1 & predicateResult == false)
|
||||
{
|
||||
|
||||
}
|
||||
return predicateResult;
|
||||
}
|
||||
|
||||
private BeamShearSectionLogicInputData GetNewInputDataByCrackLengthRatio(double crackLengthRatio)
|
||||
{
|
||||
double sourceCrackLength = InputData.InclinedSection.EndCoord - InputData.InclinedSection.StartCoord;
|
||||
IInclinedSection inclinedSection = InputData.InclinedCrack;
|
||||
double sourceCrackLength = inclinedSection.EndCoord - inclinedSection.StartCoord;
|
||||
double newCrackLength = sourceCrackLength * crackLengthRatio;
|
||||
double newStartCoord = InputData.InclinedSection.EndCoord - newCrackLength;
|
||||
double newStartCoord = inclinedSection.EndCoord - newCrackLength;
|
||||
InclinedSection newSection = new();
|
||||
var updateStrategy = new InclinedSectionUpdateStrategy();
|
||||
updateStrategy.Update(newSection, InputData.InclinedSection);
|
||||
updateStrategy.Update(newSection, inclinedSection);
|
||||
newSection.StartCoord = newStartCoord;
|
||||
BeamShearSectionLogicInputData newInputData = new(Guid.Empty)
|
||||
{
|
||||
InclinedSection = newSection,
|
||||
InclinedCrack = newSection,
|
||||
LimitState = InputData.LimitState,
|
||||
CalcTerm = InputData.CalcTerm,
|
||||
Stirrup = InputData.Stirrup,
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
private readonly IBeamShearSectionLogicInputData inputData;
|
||||
private IStirrup stirrup => inputData.Stirrup;
|
||||
private IInclinedSection inclinedSection => inputData.InclinedSection;
|
||||
private IInclinedSection inclinedSection => inputData.InclinedCrack;
|
||||
private IBeamShearStrenghLogic stirrupByDensityStrengthLogic;
|
||||
private IBeamShearStrenghLogic stirrupGroupStrengthLogic;
|
||||
private IBeamShearStrenghLogic stirrupByInclinedRebarStrengthLogic;
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
targetObject.AbsoluteRangeValue = sourceObject.AbsoluteRangeValue;
|
||||
targetObject.RelativeEffectiveDepthRangeValue = sourceObject.RelativeEffectiveDepthRangeValue;
|
||||
targetObject.StepCount = sourceObject.StepCount;
|
||||
targetObject.RelativeEffectiveDepthSectionLengthMaxValue = sourceObject.RelativeEffectiveDepthSectionLengthMaxValue;
|
||||
targetObject.RelativeEffectiveDepthSectionLengthMinValue = sourceObject.RelativeEffectiveDepthSectionLengthMinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
CheckObject.IsNull(targetObject, ErrorStrings.TargetObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.InclinedSection = sourceObject.InclinedSection;
|
||||
targetObject.InclinedCrack = sourceObject.InclinedCrack;
|
||||
targetObject.Stirrup = sourceObject.Stirrup;
|
||||
targetObject.LimitState = sourceObject.LimitState;
|
||||
targetObject.CalcTerm = sourceObject.CalcTerm;
|
||||
|
||||
Reference in New Issue
Block a user