Change shear calculator add crack export to excel

This commit is contained in:
Evgeny Redikultsev
2025-06-21 21:34:20 +05:00
parent 4fbb3f3658
commit 1ebe1bbcd1
47 changed files with 980 additions and 378 deletions

View File

@@ -6,9 +6,8 @@ namespace StructureHelperLogics.Models.BeamShears
{
public class StirrupByRebarToDensityConvertStrategy : IConvertStrategy<IStirrupByDensity, IStirrupByRebar>
{
private const double stirrupStrengthFactor = 1d;
private const double stirrupStrengthFactor = 0.8d;
private const double maxStirrupStrength = 3e8;
private IUpdateStrategy<IStirrup> updateStrategy;
public Dictionary<(Guid id, Type type), ISaveable> ReferenceDictionary { get; set; }
public IShiftTraceLogger TraceLogger { get; set; }
@@ -36,12 +35,15 @@ namespace StructureHelperLogics.Models.BeamShears
private double GetStirrupDensity(IStirrupByRebar source)
{
double area = Math.PI * source.Diameter * source.Diameter / 4d;
TraceLogger?.AddMessage($"Area of rebar = {Math.PI} * ({source.Diameter})^2 / 4 = {area}, m^2");
double strength = stirrupStrengthFactor * source.Material.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm).Tensile;
TraceLogger?.AddMessage($"Strength of rebar = {strength}, Pa");
strength = Math.Min(strength, maxStirrupStrength);
double density = strength * area * source.LegCount / source.Spacing;
TraceLogger?.AddMessage($"Density of stirrups = {strength} * {area} * {source.LegCount} / {source.Spacing} = {density}, N/m");
TraceLogger?.AddMessage($"Area of rebar = {Math.PI} * ({source.Diameter})^2 / 4 = {area}(m^2)");
double materialStrength = source.Material.GetStrength(LimitStates.ULS, CalcTerms.ShortTerm).Tensile;
TraceLogger?.AddMessage($"Stirrup material strength Rsw = {materialStrength}");
double stirrupStrength = stirrupStrengthFactor * materialStrength;
TraceLogger?.AddMessage($"Strength of rebar Rsw = {stirrupStrengthFactor} * {materialStrength} = {stirrupStrength}(Pa)");
double minimizedStrength = Math.Min(stirrupStrength, maxStirrupStrength);
TraceLogger?.AddMessage($"Strength of rebar Rsw = Min({stirrupStrength}, {maxStirrupStrength})= {minimizedStrength}(Pa)");
double density = minimizedStrength * area * source.LegCount / source.Spacing;
TraceLogger?.AddMessage($"Density of stirrups = {minimizedStrength} * {area} * {source.LegCount} / {source.Spacing} = {density}(N/m)");
return density;
}
}