Anchoring isofields has been added

This commit is contained in:
Evgeny Redikultsev
2023-03-25 19:38:40 +05:00
parent a88fa40f29
commit 3d22c3440e
23 changed files with 599 additions and 112 deletions

View File

@@ -22,7 +22,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
public double GetBaseDevLength()
{
return anchorage.GetBaseDevLength();
var val = anchorage.GetBaseDevLength();
return val;
}
public double GetDevLength()
@@ -40,6 +41,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
var anchorageOptions = new AnchorageOptionsSP63();
anchorageOptions.ConcreteStrength = inputData.ConcreteStrength;
anchorageOptions.ReinforcementStrength = inputData.ReinforcementStrength;
anchorageOptions.FactorEta1 = inputData.FactorEta1;
anchorageOptions.ReinforcementStress = inputData.ReinforcementStress;
anchorageOptions.CrossSectionArea = inputData.CrossSectionArea;
anchorageOptions.CrossSectionPerimeter = inputData.CrossSectionPerimeter;

View File

@@ -14,5 +14,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
public double CrossSectionPerimeter { get; set; }
public double ReinforcementStress { get; set; }
public double LappedCountRate { get; set; }
public double FactorEta1 { get; set; }
public bool IsPrestressed { get; set; }
}
}

View File

@@ -10,10 +10,12 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
{
double ConcreteStrength { get; set; }
double ReinforcementStrength { get; set; }
double FactorEta1 { get; set; }
double CrossSectionArea { get; set; }
double CrossSectionPerimeter { get; set; }
double ReinforcementStress { get; set; }
double LappedCountRate { get; set; }
bool IsPrestressed { get; set; }
}
}

View File

@@ -0,0 +1,74 @@
using LoaderCalculator.Data.Matrix;
using LoaderCalculator.Logics;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Infrastructures.Strings;
using StructureHelperLogics.Models.Materials;
using StructureHelperLogics.NdmCalculations.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
{
public static class InputDataFactory
{
private static IStressLogic stressLogic => new StressLogic();
public static IAnchorageInputData GetInputData(ReinforcementPrimitive ndmPrimitive, IStrainMatrix strainMatrix, LimitStates limitState, CalcTerms calcTerm, double lappedCountRate)
{
var inputData = new AnchorageInputData();
inputData.ConcreteStrength = GetConcreteStrength(limitState, calcTerm, ndmPrimitive);
inputData.ReinforcementStrength = GetReinforcementStrength(limitState, calcTerm, ndmPrimitive);
inputData.FactorEta1 = 2.5d;
inputData.CrossSectionArea = ndmPrimitive.Area;
var diameter = Math.Sqrt(ndmPrimitive.Area / Math.PI) * 2d;
inputData.CrossSectionPerimeter = Math.PI * diameter;
if (ndmPrimitive.HeadMaterial is null)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": main material is incorrect or null");
}
var material = ndmPrimitive.HeadMaterial.GetLoaderMaterial(limitState, calcTerm);
var ndm = ndmPrimitive.GetNdms(material).Single();
if (strainMatrix is not null)
{
inputData.ReinforcementStress = stressLogic.GetStress(strainMatrix, ndm);
}
else
{
inputData.ReinforcementStress = inputData.ReinforcementStrength;
}
inputData.IsPrestressed = ndm.Prestrain > 0.0005d ? true : false;
inputData.LappedCountRate = lappedCountRate;
return inputData;
}
private static double GetConcreteStrength(LimitStates limitState, CalcTerms calcTerm, ReinforcementPrimitive primitive)
{
if (primitive.HostPrimitive is not null)
{
var host = primitive.HostPrimitive;
var hostMaterial = host.HeadMaterial.HelperMaterial;
if (hostMaterial is IConcreteLibMaterial)
{
var concreteMaterial = hostMaterial as IConcreteLibMaterial;
var concreteStrength = concreteMaterial.GetStrength(limitState, calcTerm).Tensile;
return concreteStrength;
}
}
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": host material is incorrect or null");
}
private static double GetReinforcementStrength(LimitStates limitState, CalcTerms calcTerm, ReinforcementPrimitive primitive)
{
if (primitive.HeadMaterial.HelperMaterial is IReinforcementLibMaterial)
{
var material = primitive.HeadMaterial.HelperMaterial as IReinforcementLibMaterial;
var strength = material.GetStrength(limitState, calcTerm).Tensile;
return strength;
}
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + ": host's material is incorrect or null");
}
}
}