Add check logics for beam shear
This commit is contained in:
@@ -0,0 +1,52 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||||
|
{
|
||||||
|
public class CheckBeamShearActionLogic : ICheckEntityLogic<IBeamShearAction>
|
||||||
|
{
|
||||||
|
private string checkResult;
|
||||||
|
private bool result;
|
||||||
|
|
||||||
|
public string CheckResult => checkResult;
|
||||||
|
public IBeamShearAction Entity { get; set; }
|
||||||
|
|
||||||
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
public CheckBeamShearActionLogic(IBeamShearAction entity, IShiftTraceLogger? traceLogger)
|
||||||
|
{
|
||||||
|
Entity = entity;
|
||||||
|
TraceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Check()
|
||||||
|
{
|
||||||
|
checkResult = string.Empty;
|
||||||
|
result = true;
|
||||||
|
if (Entity is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
string errorString = "\nInclined section is not assigned";
|
||||||
|
TraceMessage(errorString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Entity.ExternalForce is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nExternal force is null");
|
||||||
|
}
|
||||||
|
if (Entity.SupportAction is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nSupport action is null");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TraceMessage(string errorString)
|
||||||
|
{
|
||||||
|
checkResult += errorString;
|
||||||
|
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -129,7 +129,14 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
inclinedSection.ConcreteCompressionStrength = strength.Compressive;
|
inclinedSection.ConcreteCompressionStrength = strength.Compressive;
|
||||||
inclinedSection.ConcreteTensionStrength = strength.Tensile;
|
inclinedSection.ConcreteTensionStrength = strength.Tensile;
|
||||||
IForceTuple forceTuple = GetForceTupleByShearAction(beamShearAction, inclinedSection, CollapseLimitState, calcTerm);
|
DirectShearForceLogicInputData inputData = new()
|
||||||
|
{
|
||||||
|
BeamShearAction = beamShearAction,
|
||||||
|
InclinedSection = inclinedSection,
|
||||||
|
LimitState = CollapseLimitState,
|
||||||
|
CalcTerm = calcTerm,
|
||||||
|
};
|
||||||
|
IForceTuple forceTuple = GetForceTupleByShearAction(inputData);
|
||||||
BeamShearSectionLogicInputData newInputData = new(Guid.NewGuid())
|
BeamShearSectionLogicInputData newInputData = new(Guid.NewGuid())
|
||||||
{
|
{
|
||||||
InclinedSection = inclinedSection,
|
InclinedSection = inclinedSection,
|
||||||
@@ -166,10 +173,9 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
return getInclinedSectionListLogic.GetInclinedSections();
|
return getInclinedSectionListLogic.GetInclinedSections();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IForceTuple GetForceTupleByShearAction(IBeamShearAction beamShearAction, IInclinedSection inclinedSection, LimitStates limitState, CalcTerms calcTerm)
|
private IForceTuple GetForceTupleByShearAction(IDirectShearForceLogicInputData inputData)
|
||||||
{
|
{
|
||||||
//IGetDirectShearForceLogic getDirectShearForceLogic = new GetDirectShearForceLogic(beamShearAction, inclinedSection, limitState, calcTerm, TraceLogger);
|
IGetDirectShearForceLogic getDirectShearForceLogic = new GetDirectShearForceLogic(inputData, null);
|
||||||
IGetDirectShearForceLogic getDirectShearForceLogic = new GetDirectShearForceLogic(beamShearAction, inclinedSection, limitState, calcTerm, null);
|
|
||||||
return getDirectShearForceLogic.CalculateShearForceTuple();
|
return getDirectShearForceLogic.CalculateShearForceTuple();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperLogics.Models.BeamShears.Logics;
|
||||||
using StructureHelperLogics.NdmCalculations.Cracking;
|
using StructureHelperLogics.NdmCalculations.Cracking;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -14,6 +15,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
private bool result;
|
private bool result;
|
||||||
private string checkResult;
|
private string checkResult;
|
||||||
|
private ICheckEntityLogic<IBeamShearSection> checkSectionLogic;
|
||||||
|
|
||||||
public string CheckResult => checkResult;
|
public string CheckResult => checkResult;
|
||||||
public IBeamShearCalculatorInputData InputData { get; set; }
|
public IBeamShearCalculatorInputData InputData { get; set; }
|
||||||
@@ -34,19 +36,37 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
string errorString = ErrorStrings.ParameterIsNull + ": Input data";
|
string errorString = ErrorStrings.ParameterIsNull + ": Input data";
|
||||||
throw new StructureHelperException(errorString);
|
throw new StructureHelperException(errorString);
|
||||||
}
|
}
|
||||||
if (InputData.Actions is null || ! InputData.Actions.Any())
|
if (InputData.Actions is null || !InputData.Actions.Any())
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
string errorString = "Collection of actions does not contain any action";
|
string errorString = "Collection of actions does not contain any action";
|
||||||
TraceMessage(errorString);
|
TraceMessage(errorString);
|
||||||
}
|
}
|
||||||
if (InputData.Sections is null || ! InputData.Sections.Any())
|
CheckSections();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckSections()
|
||||||
|
{
|
||||||
|
if (InputData.Sections is null || !InputData.Sections.Any())
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
string errorString = "Collection of sections does not contain any section";
|
string errorString = "Collection of sections does not contain any section";
|
||||||
TraceMessage(errorString);
|
TraceMessage(errorString);
|
||||||
}
|
}
|
||||||
return result;
|
else
|
||||||
|
{
|
||||||
|
checkSectionLogic ??= new CheckBeamShearSectionLogic(TraceLogger);
|
||||||
|
foreach (var item in InputData.Sections)
|
||||||
|
{
|
||||||
|
checkSectionLogic.Entity = item;
|
||||||
|
if (checkSectionLogic.Check() == false)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
checkResult += checkSectionLogic.CheckResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TraceMessage(string errorString)
|
private void TraceMessage(string errorString)
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears.Logics
|
||||||
|
{
|
||||||
|
public class CheckBeamShearSectionLogic : ICheckEntityLogic<IBeamShearSection>
|
||||||
|
{
|
||||||
|
private const double minValueOfCenterCover = 0.01;
|
||||||
|
private const double minValueOfCrossSectionWidth = 0.05;
|
||||||
|
private const double minValueOfCrossSectionHeight = 0.05;
|
||||||
|
private bool result;
|
||||||
|
private string checkResult;
|
||||||
|
|
||||||
|
public CheckBeamShearSectionLogic(IShiftTraceLogger? traceLogger)
|
||||||
|
{
|
||||||
|
TraceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IBeamShearSection Entity { get; set; }
|
||||||
|
|
||||||
|
public string CheckResult => checkResult;
|
||||||
|
|
||||||
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
|
public bool Check()
|
||||||
|
{
|
||||||
|
checkResult = string.Empty;
|
||||||
|
result = true;
|
||||||
|
if (Entity is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
string errorString = "\nSection is not assigned";
|
||||||
|
TraceMessage(errorString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Entity.Material is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nMaterial of cross-section is not assigned");
|
||||||
|
}
|
||||||
|
if (Entity.CenterCover < minValueOfCenterCover)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nValue of center cover c = {Entity.CenterCover}(m) must not be less than cmin = {minValueOfCenterCover}(m)");
|
||||||
|
}
|
||||||
|
CheckShape();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckShape()
|
||||||
|
{
|
||||||
|
if (Entity.Shape is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nShape of cross-section is null");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Entity.Shape is IRectangleShape rectangle)
|
||||||
|
{
|
||||||
|
CheckRectangleShape(rectangle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nType of shape of cross-section is unknown");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckRectangleShape(IRectangleShape rectangle)
|
||||||
|
{
|
||||||
|
if (rectangle.Width < minValueOfCrossSectionWidth)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nValue of cross-section width b = {rectangle.Width}(m) must not be less than bmin = {minValueOfCrossSectionWidth}(m)");
|
||||||
|
}
|
||||||
|
if (rectangle.Height < minValueOfCrossSectionHeight)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nValue of cross-section height h = {rectangle.Height}(m) must not be less than hmin = {minValueOfCrossSectionHeight}(m)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TraceMessage(string errorString)
|
||||||
|
{
|
||||||
|
checkResult += errorString;
|
||||||
|
TraceLogger?.AddMessage(errorString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public class CheckDirectForceInputDataLogic : ICheckInputDataLogic<IDirectShearForceLogicInputData>
|
||||||
|
{
|
||||||
|
private string checkResult;
|
||||||
|
private bool result;
|
||||||
|
private ICheckEntityLogic<IInclinedSection> checkInclinedSectionLogic;
|
||||||
|
private ICheckEntityLogic<IBeamShearAction> checkBeamShearActionLogic;
|
||||||
|
|
||||||
|
public string CheckResult => checkResult;
|
||||||
|
|
||||||
|
public IDirectShearForceLogicInputData InputData { get; set; }
|
||||||
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
|
public CheckDirectForceInputDataLogic(IDirectShearForceLogicInputData inputData, IShiftTraceLogger? traceLogger)
|
||||||
|
{
|
||||||
|
InputData = inputData;
|
||||||
|
TraceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool Check()
|
||||||
|
{
|
||||||
|
InitializeStrategies();
|
||||||
|
result = true;
|
||||||
|
if (InputData is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
string errorString = "\nInput data is not assigned";
|
||||||
|
TraceMessage(errorString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CheckBeamShearAction();
|
||||||
|
CheckInclinedSection();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeStrategies()
|
||||||
|
{
|
||||||
|
checkInclinedSectionLogic ??= new CheckInclinedSectionLogic(InputData.InclinedSection, TraceLogger);
|
||||||
|
checkBeamShearActionLogic ??= new CheckBeamShearActionLogic(InputData.BeamShearAction, TraceLogger);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckBeamShearAction()
|
||||||
|
{
|
||||||
|
if (InputData.BeamShearAction is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nBeam shear action is not assigned");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (checkBeamShearActionLogic.Check() == false)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
checkResult += checkBeamShearActionLogic.CheckResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckInclinedSection()
|
||||||
|
{
|
||||||
|
if (InputData.InclinedSection is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nInclined section is not assigned");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (checkInclinedSectionLogic.Check() == false)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
checkResult += checkInclinedSectionLogic.CheckResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TraceMessage(string errorString)
|
||||||
|
{
|
||||||
|
checkResult += errorString;
|
||||||
|
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
|
using StructureHelperCommon.Models;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public class CheckInclinedSectionLogic : ICheckEntityLogic<IInclinedSection>
|
||||||
|
{
|
||||||
|
private const double minValueOfEffectiveDepth = 0.05;
|
||||||
|
private const double minValueOfWebWidth = 0.05;
|
||||||
|
private string checkResult;
|
||||||
|
private bool result;
|
||||||
|
|
||||||
|
public IInclinedSection Entity { get; set; }
|
||||||
|
public string CheckResult => checkResult;
|
||||||
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
public CheckInclinedSectionLogic(IInclinedSection entity, IShiftTraceLogger? traceLogger)
|
||||||
|
{
|
||||||
|
Entity = entity;
|
||||||
|
TraceLogger = traceLogger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Check()
|
||||||
|
{
|
||||||
|
checkResult = string.Empty;
|
||||||
|
result = true;
|
||||||
|
if (Entity is null)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
string errorString = "\nInclined section is not assigned";
|
||||||
|
TraceMessage(errorString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Entity.StartCoord < 0)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nCoordinate of start of inclined section Xstart = {Entity.StartCoord}(m) must not be less than zero");
|
||||||
|
}
|
||||||
|
if (Entity.EndCoord < Entity.StartCoord)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nCoordinate of end of inclined section Xend = {Entity.EndCoord}(m) must not be less than Xstart = {Entity.StartCoord}(m)");
|
||||||
|
}
|
||||||
|
if (Entity.EffectiveDepth < minValueOfEffectiveDepth)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nEffective depth of inclined section d = {Entity.EffectiveDepth}(m) must be grater than dmin = {minValueOfEffectiveDepth}(m)");
|
||||||
|
}
|
||||||
|
if (Entity.WebWidth < minValueOfWebWidth)
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
TraceMessage($"\nWidth of web of inclined section b = {Entity.WebWidth}(m) must be grater than bmin = {minValueOfWebWidth}(m)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TraceMessage(string errorString)
|
||||||
|
{
|
||||||
|
checkResult += errorString;
|
||||||
|
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
internal class DirectShearForceLogicInputData : IDirectShearForceLogicInputData
|
||||||
|
{
|
||||||
|
public IBeamShearAction BeamShearAction { get; set; }
|
||||||
|
public CalcTerms CalcTerm { get; set; }
|
||||||
|
public IInclinedSection InclinedSection { get; set; }
|
||||||
|
public LimitStates LimitState { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||||
using StructureHelperCommon.Models;
|
using StructureHelperCommon.Models;
|
||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Models.Forces;
|
||||||
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
using StructureHelperCommon.Models.Forces.BeamShearActions;
|
||||||
@@ -15,48 +17,25 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public class GetDirectShearForceLogic : IGetDirectShearForceLogic
|
public class GetDirectShearForceLogic : IGetDirectShearForceLogic
|
||||||
{
|
{
|
||||||
|
private IDirectShearForceLogicInputData inputData;
|
||||||
private ISumForceByShearLoadLogic summaryForceLogic;
|
private ISumForceByShearLoadLogic summaryForceLogic;
|
||||||
|
private ICheckInputDataLogic<IDirectShearForceLogicInputData> checkInputDataLogic;
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
public IBeamShearAction AxisAction { get; set; }
|
|
||||||
public IInclinedSection InclinedSection { get; set; }
|
|
||||||
public LimitStates LimitState { get; set; }
|
|
||||||
public CalcTerms CalcTerm { get; set; }
|
|
||||||
|
|
||||||
public GetDirectShearForceLogic(
|
public GetDirectShearForceLogic(IDirectShearForceLogicInputData inputData, IShiftTraceLogger? traceLogger)
|
||||||
IBeamShearAction axisAction,
|
|
||||||
IInclinedSection inclinedSection,
|
|
||||||
LimitStates limitState,
|
|
||||||
CalcTerms calcTerm,
|
|
||||||
IShiftTraceLogger? traceLogger)
|
|
||||||
{
|
{
|
||||||
AxisAction = axisAction;
|
this.inputData = inputData;
|
||||||
InclinedSection = inclinedSection;
|
|
||||||
LimitState = limitState;
|
|
||||||
CalcTerm = calcTerm;
|
|
||||||
TraceLogger = traceLogger;
|
TraceLogger = traceLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GetDirectShearForceLogic(
|
|
||||||
IBeamShearAction axisAction,
|
|
||||||
IInclinedSection inclinedSection,
|
|
||||||
LimitStates limitState,
|
|
||||||
CalcTerms calcTerm,
|
|
||||||
IShiftTraceLogger? traceLogger,
|
|
||||||
ISumForceByShearLoadLogic summaryForceLogic)
|
|
||||||
{
|
|
||||||
this.summaryForceLogic = summaryForceLogic;
|
|
||||||
AxisAction = axisAction;
|
|
||||||
InclinedSection = inclinedSection;
|
|
||||||
LimitState = limitState;
|
|
||||||
CalcTerm = calcTerm;
|
|
||||||
TraceLogger = traceLogger;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IForceTuple CalculateShearForceTuple()
|
public IForceTuple CalculateShearForceTuple()
|
||||||
{
|
{
|
||||||
|
Check();
|
||||||
IForceTuple externalTuple = CalculateExternalForceTuple();
|
IForceTuple externalTuple = CalculateExternalForceTuple();
|
||||||
IForceTuple internalTuple = CalculateInternalForceTuple();
|
IForceTuple internalTuple = CalculateInternalForceTuple();
|
||||||
IForceTuple totalTuple = ForceTupleService.SumTuples(internalTuple, externalTuple);
|
IForceTuple totalTuple = ForceTupleService.SumTuples(internalTuple, externalTuple);
|
||||||
@@ -65,13 +44,22 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
return totalTuple;
|
return totalTuple;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Check()
|
||||||
|
{
|
||||||
|
checkInputDataLogic = new CheckDirectForceInputDataLogic(inputData, TraceLogger);
|
||||||
|
if (checkInputDataLogic.Check() == false)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(checkInputDataLogic.CheckResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private IForceTuple CalculateExternalForceTuple()
|
private IForceTuple CalculateExternalForceTuple()
|
||||||
{
|
{
|
||||||
var forceTupleLogic = new GetForceTupleByFactoredTupleLogic()
|
var forceTupleLogic = new GetForceTupleByFactoredTupleLogic()
|
||||||
{
|
{
|
||||||
FactoredForceTuple = AxisAction.ExternalForce,
|
FactoredForceTuple = inputData.BeamShearAction.ExternalForce,
|
||||||
LimitState = LimitState,
|
LimitState = inputData.LimitState,
|
||||||
CalcTerm = CalcTerm
|
CalcTerm = inputData.CalcTerm
|
||||||
};
|
};
|
||||||
IForceTuple internalForceTuple = forceTupleLogic.GetForceTuple();
|
IForceTuple internalForceTuple = forceTupleLogic.GetForceTuple();
|
||||||
return internalForceTuple;
|
return internalForceTuple;
|
||||||
@@ -81,18 +69,18 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
{
|
{
|
||||||
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
|
||||||
InitializeStrategies();
|
InitializeStrategies();
|
||||||
IBeamShearAxisAction beamShearAxisAction = AxisAction.SupportAction;
|
IBeamShearAxisAction beamShearAxisAction = inputData.BeamShearAction.SupportAction;
|
||||||
var forceTupleLogic = new GetForceTupleByFactoredTupleLogic()
|
var forceTupleLogic = new GetForceTupleByFactoredTupleLogic()
|
||||||
{
|
{
|
||||||
FactoredForceTuple = beamShearAxisAction.SupportForce,
|
FactoredForceTuple = beamShearAxisAction.SupportForce,
|
||||||
LimitState = LimitState,
|
LimitState = inputData.LimitState,
|
||||||
CalcTerm = CalcTerm
|
CalcTerm = inputData.CalcTerm
|
||||||
};
|
};
|
||||||
IForceTuple supportShearForce = forceTupleLogic.GetForceTuple();
|
IForceTuple supportShearForce = forceTupleLogic.GetForceTuple();
|
||||||
|
|
||||||
TraceLogger?.AddMessage($"Shear force at support Qmax = {supportShearForce.Qy}(N)");
|
TraceLogger?.AddMessage($"Shear force at support Qmax = {supportShearForce.Qy}(N)");
|
||||||
TraceLogger?.AddMessage($"Start of inclined section a,start = {InclinedSection.StartCoord}(m)");
|
TraceLogger?.AddMessage($"Start of inclined section a,start = {inputData.InclinedSection.StartCoord}(m)");
|
||||||
TraceLogger?.AddMessage($"End of inclined section a,end = {InclinedSection.EndCoord}(m)");
|
TraceLogger?.AddMessage($"End of inclined section a,end = {inputData.InclinedSection.EndCoord}(m)");
|
||||||
ForceTuple summarySpanShearForce = GetSummarySpanShearForce(beamShearAxisAction.ShearLoads);
|
ForceTuple summarySpanShearForce = GetSummarySpanShearForce(beamShearAxisAction.ShearLoads);
|
||||||
TraceLogger?.AddMessage($"Summary span shear force deltaQ = {summarySpanShearForce.Qy}(N)");
|
TraceLogger?.AddMessage($"Summary span shear force deltaQ = {summarySpanShearForce.Qy}(N)");
|
||||||
IForceTuple shearForce = ForceTupleService.SumTuples(supportShearForce, summarySpanShearForce);
|
IForceTuple shearForce = ForceTupleService.SumTuples(supportShearForce, summarySpanShearForce);
|
||||||
@@ -105,7 +93,7 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
ForceTuple summarySpanShearForce = new(Guid.NewGuid());
|
ForceTuple summarySpanShearForce = new(Guid.NewGuid());
|
||||||
foreach (var spanLoad in spanLoads)
|
foreach (var spanLoad in spanLoads)
|
||||||
{
|
{
|
||||||
IForceTuple summarySpanLoad = summaryForceLogic.GetSumShearForce(spanLoad, InclinedSection.StartCoord, InclinedSection.EndCoord);
|
IForceTuple summarySpanLoad = summaryForceLogic.GetSumShearForce(spanLoad, inputData.InclinedSection.StartCoord, inputData.InclinedSection.EndCoord);
|
||||||
ForceTupleService.SumTupleToTarget(summarySpanLoad, summarySpanShearForce);
|
ForceTupleService.SumTupleToTarget(summarySpanLoad, summarySpanShearForce);
|
||||||
}
|
}
|
||||||
return summarySpanShearForce;
|
return summarySpanShearForce;
|
||||||
@@ -113,7 +101,11 @@ namespace StructureHelperLogics.Models.BeamShears
|
|||||||
|
|
||||||
private void InitializeStrategies()
|
private void InitializeStrategies()
|
||||||
{
|
{
|
||||||
summaryForceLogic ??= new SumForceByShearLoadLogic(TraceLogger) { LimitState = LimitState, CalcTerm = CalcTerm};
|
summaryForceLogic ??= new SumForceByShearLoadLogic(TraceLogger)
|
||||||
|
{
|
||||||
|
LimitState = inputData.LimitState,
|
||||||
|
CalcTerm = inputData.CalcTerm
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.BeamShears
|
||||||
|
{
|
||||||
|
public interface IDirectShearForceLogicInputData : IInputData
|
||||||
|
{
|
||||||
|
IBeamShearAction BeamShearAction { get; set; }
|
||||||
|
CalcTerms CalcTerm { get; set; }
|
||||||
|
IInclinedSection InclinedSection { get; set; }
|
||||||
|
LimitStates LimitState { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user