Fix beam shear force calculator

This commit is contained in:
Evgeny Redikultsev
2025-05-24 20:26:44 +05:00
parent d108c52cac
commit f127594b5c
53 changed files with 920 additions and 121 deletions

View File

@@ -0,0 +1,29 @@
using StructureHelperCommon.Infrastructures.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Materials.Libraries
{
public class MaterialFactorLogic : IMaterialFactorLogic
{
public List<IMaterialSafetyFactor> SafetyFactors { get; }
public (double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm)
{
double compressionVal = 1d;
double tensionVal = 1d;
foreach (var item in SafetyFactors.Where(x => x.Take == true))
{
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
}
return (compressionVal, tensionVal);
}
public MaterialFactorLogic(List<IMaterialSafetyFactor> safetyFactors)
{
SafetyFactors = safetyFactors;
}
}
}