Add logic for converting beam shear calculator input data

This commit is contained in:
Evgeny Redikultsev
2025-03-30 17:34:00 +05:00
parent a0a25f183a
commit cefe30f103
41 changed files with 346 additions and 162 deletions

View File

@@ -1,6 +1,7 @@
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Services.Forces;
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
//All rights reserved.
@@ -40,19 +41,23 @@ namespace StructureHelperLogics.Models.BeamShears
}
/// <inheritdoc/>
public double CalculateShearForce()
public IForceTuple CalculateShearForce()
{
TraceLogger?.AddMessage(LoggerStrings.LogicType(this), TraceLogStatuses.Service);
InitializeStrategies();
double supportShearForce = AxisAction.SupportForce.ForceTuple.Qx;
IForceTuple supportShearForce = AxisAction.SupportForce.ForceTuple;
TraceLogger?.AddMessage($"Shear force at support Qmax = {supportShearForce}(N)");
TraceLogger?.AddMessage($"Start of inclined section a,start = {InclinedSection.StartCoord}(m)");
TraceLogger?.AddMessage($"End of inclined section a,end = {InclinedSection.EndCoord}(m)");
double summarySpanShearForce = AxisAction.ShearLoads
.Sum(load => summaryForceLogic.GetSumShearForce(load, InclinedSection.StartCoord, InclinedSection.EndCoord));
TraceLogger?.AddMessage($"Summary span force deltaQ = {summarySpanShearForce}(N)");
double shearForce = supportShearForce + summarySpanShearForce;
TraceLogger?.AddMessage($"Summary shear force at the end of inclined section Q = {shearForce}(N)");
ForceTuple summarySpanShearForce = new (Guid.NewGuid());
foreach (var item in AxisAction.ShearLoads)
{
IForceTuple summarySpanLoad = summaryForceLogic.GetSumShearForce(item, InclinedSection.StartCoord, InclinedSection.EndCoord);
ForceTupleService.SumTupleToTarget(summarySpanLoad, summarySpanShearForce);
}
TraceLogger?.AddMessage($"Summary span force deltaQ = {summarySpanShearForce.Qy}(N)");
IForceTuple shearForce = ForceTupleService.SumTuples(supportShearForce,summarySpanShearForce);
TraceLogger?.AddMessage($"Summary shear force at the end of inclined section Q = {shearForce.Qy}(N)");
return shearForce;
}