Extract sum shear force logic
This commit is contained in:
14
StructureHelperCommon/Models/Forces/IFactoredForceTuple.cs
Normal file
14
StructureHelperCommon/Models/Forces/IFactoredForceTuple.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IFactoredForceTuple
|
||||
{
|
||||
IForceTuple ForceTuple { get; set; }
|
||||
IFactoredCombinationProperty CombinationProperty { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
|
||||
//Copyright (c) 2025 Redikultsev Evgeny, Ekaterinburg, Russia
|
||||
//All rights reserved.
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces.Logics
|
||||
{
|
||||
public class GetFactorByFactoredCombinationProperty : IGetLoadFactor
|
||||
{
|
||||
private const double defaultSLSfactor = 1d;
|
||||
private const double defaultShortTermFactor = 1d;
|
||||
|
||||
public IFactoredCombinationProperty CombinationProperty { get; set; }
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
|
||||
public double GetFactor()
|
||||
{
|
||||
double stateFactor = CombinationProperty.LimitState is LimitStates.SLS ? defaultSLSfactor : (1d / CombinationProperty.ULSFactor);
|
||||
double termFactor = CombinationProperty.CalcTerm is CalcTerms.ShortTerm ? defaultShortTermFactor : (1d / CombinationProperty.LongTermFactor);
|
||||
double shortSlsFactor = stateFactor * termFactor;
|
||||
stateFactor = LimitState is LimitStates.SLS ? 1d : CombinationProperty.ULSFactor;
|
||||
termFactor = CalcTerm is CalcTerms.ShortTerm ? 1d : CombinationProperty.LongTermFactor;
|
||||
double factor = shortSlsFactor * stateFactor * termFactor;
|
||||
return factor;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
13
StructureHelperCommon/Models/Forces/Logics/IGetLoadFactor.cs
Normal file
13
StructureHelperCommon/Models/Forces/Logics/IGetLoadFactor.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements logic for calculating factor of load
|
||||
/// </summary>
|
||||
public interface IGetLoadFactor
|
||||
{
|
||||
double GetFactor();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user