Add test of rebar by density and rebar by inclined rebar
This commit is contained in:
@@ -40,10 +40,10 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
PrepareNewResult();
|
||||
if (Check() == false) { return; }
|
||||
localTraceLogger?.AddMessage(sectionMessage);
|
||||
InitializeStrategies();
|
||||
try
|
||||
{
|
||||
AddInclinedCrackToInputData();
|
||||
PrepareResultData();
|
||||
InitializeStrategies();
|
||||
CalculateResult();
|
||||
}
|
||||
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();
|
||||
updateStrategy.Update(newSection, InputData.InclinedSection);
|
||||
double crackLength = newSection.EndCoord - newSection.StartCoord;
|
||||
double maxCrackLength = 2 * newSection.EffectiveDepth;
|
||||
updateStrategy.Update(crackSection, InputData.InclinedSection);
|
||||
BeamShearSectionLogicInputData resultData = new(Guid.Empty);
|
||||
var resultDataUpdateStrategy = new BeamShearSectionLogicInputDataUpdateStrategy();
|
||||
resultDataUpdateStrategy.Update(resultData, InputData);
|
||||
double crackLength = crackSection.EndCoord - crackSection.StartCoord;
|
||||
double maxCrackLength = 2 * crackSection.EffectiveDepth;
|
||||
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()
|
||||
@@ -104,7 +108,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
double totalStrength = concreteStrength + stirrupStrength;
|
||||
localTraceLogger?.AddMessage($"Total strength = {concreteStrength} + {stirrupStrength} = {totalStrength}(N)");
|
||||
result.TotalStrength = totalStrength;
|
||||
double actualShearForce = InputData.ForceTuple.Qy;
|
||||
double actualShearForce = result.ResultInputData.ForceTuple.Qy;
|
||||
if (actualShearForce > totalStrength)
|
||||
{
|
||||
result.IsValid = false;
|
||||
@@ -125,38 +129,38 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
var logic = new StirrupBySearchLogic(localTraceLogger.GetSimilarTraceLogger(100))
|
||||
{
|
||||
InputData = InputData,
|
||||
InputData = result.ResultInputData,
|
||||
SectionEffectiveness = sectionEffectiveness
|
||||
};
|
||||
double stirrupStrength = logic.GetShearStrength();
|
||||
localTraceLogger?.AddMessage($"Stirrup strength was restricted as Qsw,restricted = {stirrupStrength}(N)");
|
||||
InputData.InclinedCrack = logic.InclinedCrack;
|
||||
result.ResultInputData.InclinedCrack = logic.InclinedCrack;
|
||||
return stirrupStrength;
|
||||
}
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
if (InputData.InclinedSection.BeamShearSection.Shape is IRectangleShape)
|
||||
if (result.ResultInputData.InclinedSection.BeamShearSection.Shape is IRectangleShape)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
stirrupLogic = new(InputData, localTraceLogger);
|
||||
concreteLogic = new(sectionEffectiveness, result.ResultInputData.InclinedSection, localTraceLogger);
|
||||
stirrupLogic = new(result.ResultInputData, localTraceLogger);
|
||||
getLongitudinalForceFactorLogic = new GetLongitudinalForceFactorLogic(localTraceLogger?.GetSimilarTraceLogger(100));
|
||||
}
|
||||
|
||||
private void SetLongitudinalForce()
|
||||
{
|
||||
getLongitudinalForceFactorLogic.LongitudinalForce = InputData.ForceTuple.Nz;
|
||||
getLongitudinalForceFactorLogic.InclinedSection = InputData.InclinedSection;
|
||||
getLongitudinalForceFactorLogic.LongitudinalForce = result.ResultInputData.ForceTuple.Nz;
|
||||
getLongitudinalForceFactorLogic.InclinedSection = result.ResultInputData.InclinedSection;
|
||||
}
|
||||
|
||||
private void PrepareNewResult()
|
||||
|
||||
@@ -7,6 +7,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
{
|
||||
public class GetInclinedSectionListLogic : IGetInclinedSectionListLogic
|
||||
{
|
||||
private const int minimumInclinedSectionLengthFactor = 0;
|
||||
private const int maximumInclinedSectionLengthFactor = 3;
|
||||
private IGetInclinedSectionLogic inclinedSectionLogic;
|
||||
private double depth;
|
||||
private double effectiveDepth;
|
||||
@@ -28,8 +30,8 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
Check();
|
||||
GetShapeParameters();
|
||||
GetCoordinates();
|
||||
double minSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMinValue * effectiveDepth;
|
||||
double maxSectionLength = DesignRangeProperty.RelativeEffectiveDepthSectionLengthMaxValue * effectiveDepth;
|
||||
double minSectionLength = minimumInclinedSectionLengthFactor * effectiveDepth;
|
||||
double maxSectionLength = maximumInclinedSectionLengthFactor * effectiveDepth;
|
||||
foreach (var startCoord in coordinates)
|
||||
{
|
||||
var endCoordinates = coordinates.Where(x => x >= startCoord);
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
/// <inheritdoc/>
|
||||
public class StirrupByDensityStrengthLogic : IBeamShearStrenghLogic
|
||||
{
|
||||
//private const double minStirrupRatio = 0.25;
|
||||
private readonly IStirrupEffectiveness stirrupEffectiveness;
|
||||
private readonly IStirrupByDensity stirrupByDensity;
|
||||
private readonly IInclinedSection inclinedSection;
|
||||
@@ -11,25 +11,42 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
const double stirrupEffectivenessFactor = 0.75;
|
||||
private readonly IStirrupByInclinedRebar inclinedRebar;
|
||||
private readonly IInclinedSection inclinedSection;
|
||||
private IRebarSectionStrengthLogic rebarSectionStrengthLogic;
|
||||
private double angleInRad;
|
||||
private double rebarStartPoint;
|
||||
private double rebarHeight;
|
||||
private double rebarEndPoint;
|
||||
private double rebarTrueStartPoint;
|
||||
private double rebarTrueEndPoint;
|
||||
private IRebarSectionStrengthLogic rebarSectionStrengthLogic;
|
||||
private IInterpolateValueLogic interpolationLogic;
|
||||
|
||||
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.inclinedRebar = inclinedRebar;
|
||||
this.rebarSectionStrengthLogic = rebarSectionStrengthLogic;
|
||||
this.interpolationLogic = interpolationLogic;
|
||||
TraceLogger = traceLogger;
|
||||
}
|
||||
|
||||
|
||||
public double GetShearStrength()
|
||||
{
|
||||
GetGeometry();
|
||||
@@ -48,7 +65,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
TraceLogger?.AddMessage($"Inclined section start point coordinate X = {inclinedSection.StartCoord} is in end transfer zone");
|
||||
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");
|
||||
return GetStartTransferValue();
|
||||
@@ -59,41 +76,33 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
|
||||
private double GetStartTransferValue()
|
||||
{
|
||||
interpolationLogic = new InterpolateValueLogic()
|
||||
{
|
||||
X1 = rebarStartPoint,
|
||||
X2 = rebarTrueStartPoint,
|
||||
Y1 = 0.0,
|
||||
Y2 = GetInclinedRebarStrength(),
|
||||
KnownValueX = inclinedSection.EndCoord
|
||||
};
|
||||
interpolationLogic.X1 = rebarStartPoint;
|
||||
interpolationLogic.X2 = rebarTrueStartPoint;
|
||||
interpolationLogic.Y1 = 0.0;
|
||||
interpolationLogic.Y2 = GetInclinedRebarStrength();
|
||||
interpolationLogic.KnownValueX = inclinedSection.EndCoord;
|
||||
return interpolationLogic.GetValueY();
|
||||
}
|
||||
|
||||
private double GetEndTransferValue()
|
||||
{
|
||||
interpolationLogic = new InterpolateValueLogic()
|
||||
{
|
||||
X1 = rebarTrueEndPoint,
|
||||
X2 = rebarEndPoint,
|
||||
Y1 = GetInclinedRebarStrength(),
|
||||
Y2 = 0.0,
|
||||
KnownValueX = inclinedSection.StartCoord
|
||||
};
|
||||
interpolationLogic.X1 = rebarTrueEndPoint;
|
||||
interpolationLogic.X2 = rebarEndPoint;
|
||||
interpolationLogic.Y1 = GetInclinedRebarStrength();
|
||||
interpolationLogic.Y2 = 0.0;
|
||||
interpolationLogic.KnownValueX = inclinedSection.StartCoord;
|
||||
return interpolationLogic.GetValueY();
|
||||
}
|
||||
|
||||
private double GetInclinedRebarStrength()
|
||||
{
|
||||
rebarSectionStrengthLogic ??= new RebarSectionStrengthLogic()
|
||||
{
|
||||
RebarStrengthFactor = 0.8,
|
||||
MaxRebarStrength = 3e8,
|
||||
LimitState = LimitStates.ULS,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
TraceLogger = TraceLogger,
|
||||
};
|
||||
rebarSectionStrengthLogic.RebarStrengthFactor = 0.8;
|
||||
rebarSectionStrengthLogic.MaxRebarStrength = 3e8;
|
||||
rebarSectionStrengthLogic.LimitState = LimitStates.ULS;
|
||||
rebarSectionStrengthLogic.CalcTerm = CalcTerms.ShortTerm;
|
||||
rebarSectionStrengthLogic.TraceLogger = TraceLogger;
|
||||
rebarSectionStrengthLogic.RebarSection = inclinedRebar.RebarSection;
|
||||
|
||||
double rebarStrength = rebarSectionStrengthLogic.GetRebarMaxTensileForce();
|
||||
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}");
|
||||
@@ -113,7 +122,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
||||
rebarTrueEndPoint = rebarEndPoint - transferLength;
|
||||
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.RelativeEffectiveDepthRangeValue = sourceObject.RelativeEffectiveDepthRangeValue;
|
||||
targetObject.StepCount = sourceObject.StepCount;
|
||||
targetObject.RelativeEffectiveDepthSectionLengthMaxValue = sourceObject.RelativeEffectiveDepthSectionLengthMaxValue;
|
||||
targetObject.RelativeEffectiveDepthSectionLengthMinValue = sourceObject.RelativeEffectiveDepthSectionLengthMinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user