Settting for prestress has been fixed
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using LCMBML = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -21,12 +22,15 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public bool TensionForSLS { get; set; }
|
||||
|
||||
private IMaterialOptionLogic optionLogic;
|
||||
private LCMBML.ITrueStrengthLogic strengthLogic;
|
||||
|
||||
public ConcreteLibMaterial()
|
||||
{
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultConcreteSafetyFactors(ProgramSetting.CodeType));
|
||||
optionLogic = new MaterialOptionLogic(new LCMB.ConcreteOptions());
|
||||
TensionForULS = false;
|
||||
TensionForSLS = true;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
@@ -36,7 +40,26 @@ namespace StructureHelperLogics.Models.Materials
|
||||
|
||||
public LCM.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm) as LCMB.ConcreteOptions;
|
||||
materialOptions.WorkInTension = false;
|
||||
if (limitState == LimitStates.ULS & TensionForULS == true)
|
||||
{
|
||||
materialOptions.WorkInTension = true;
|
||||
}
|
||||
if (limitState == LimitStates.SLS & TensionForSLS == true)
|
||||
{
|
||||
materialOptions.WorkInTension = true;
|
||||
}
|
||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ConcreteBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrengthFactors(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
@@ -44,11 +67,14 @@ namespace StructureHelperLogics.Models.Materials
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
materialOptions.ExternalFactor.Compressive = compressionVal;
|
||||
materialOptions.ExternalFactor.Tensile = tensionVal;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ConcreteBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
strengthLogic = new LCMBML.TrueStrengthConcreteLogicSP63_2018(MaterialEntity.MainStrength);
|
||||
var strength = strengthLogic.GetTrueStrength();
|
||||
return (strength.Comressive, strength.Tensile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
ILibMaterialEntity MaterialEntity { get; set; }
|
||||
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
(double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,5 +87,10 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
return new LibMaterial(this.MaterialType, this.codeType, this.Name, this.MainStrength);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using LCM = LoaderCalculator.Data.Materials;
|
||||
using LCMB = LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using LCMBML = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -16,6 +17,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
|
||||
private IMaterialOptionLogic optionLogic;
|
||||
private LCMBML.ITrueStrengthLogic strengthLogic;
|
||||
|
||||
public ReinforcementLibMaterial()
|
||||
{
|
||||
@@ -31,6 +33,16 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public LCM.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ReinforcementBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrengthFactors(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
@@ -38,11 +50,14 @@ namespace StructureHelperLogics.Models.Materials
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
materialOptions.ExternalFactor.Compressive = compressionVal;
|
||||
materialOptions.ExternalFactor.Tensile = tensionVal;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ReinforcementBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
strengthLogic = new LCMBML.TrueStrengthReinforcementLogic(MaterialEntity.MainStrength);
|
||||
var strength = strengthLogic.GetTrueStrength();
|
||||
return (strength.Comressive, strength.Tensile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
Area = barArea,
|
||||
Name = "Left bottom point",
|
||||
HeadMaterial = reinforcementMaterial,
|
||||
SurroundingPrimitive=concreteBlock };
|
||||
HostPrimitive=concreteBlock };
|
||||
primitives.Add(point);
|
||||
}
|
||||
return primitives;
|
||||
|
||||
@@ -59,13 +59,13 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double[] ys = new double[] { -height / 2 + gap, height / 2 - gap };
|
||||
|
||||
List<INdmPrimitive> primitives = new List<INdmPrimitive>();
|
||||
var point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point", HeadMaterial = reinforcement, SurroundingPrimitive=concreteBlock };
|
||||
var point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0], Area = area1, Name = "Left bottom point", HeadMaterial = reinforcement, HostPrimitive=concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0], Area = area1, Name = "Right bottom point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[1], Area = area2, Name = "Left top point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[1], Area = area2, Name = "Right top point", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
return primitives;
|
||||
}
|
||||
@@ -83,9 +83,9 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (xs[1] - xs[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[0], Area = area1, Name = $"Bottom point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0] + dist * i, CenterY = ys[1], Area = area2, Name = $"Top point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
@@ -95,9 +95,9 @@ namespace StructureHelperLogics.Models.Templates.CrossSections.RCs
|
||||
double dist = (ys[1] - ys[0]) / count;
|
||||
for (int i = 1; i < count; i++)
|
||||
{
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[0], CenterY = ys[0] + dist * i, Area = area1, Name = $"Left point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}", HeadMaterial = reinforcement, SurroundingPrimitive = concreteBlock };
|
||||
point = new ReinforcementPrimitive() { CenterX = xs[1], CenterY = ys[0] + dist * i, Area = area1, Name = $"Right point {i}", HeadMaterial = reinforcement, HostPrimitive = concreteBlock };
|
||||
primitives.Add(point);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using LoaderCalculator.Logics.ConcreteCalculations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
public class AnchorageCalculator : IAnchorageCalculator
|
||||
{
|
||||
private IAnchorageInputData inputData;
|
||||
private IAnchorage anchorage;
|
||||
|
||||
public string Name { get; set; }
|
||||
public AnchorageCalculator(IAnchorageInputData inputData)
|
||||
{
|
||||
this.inputData = inputData;
|
||||
IAnchorageOptions anchorageOptions = GetAnchorageOptions();
|
||||
anchorage = new AnchorageSP632018Rev3(anchorageOptions);
|
||||
}
|
||||
|
||||
public double GetBaseDevLength()
|
||||
{
|
||||
return anchorage.GetBaseDevLength();
|
||||
}
|
||||
|
||||
public double GetDevLength()
|
||||
{
|
||||
return anchorage.GetDevLength();
|
||||
}
|
||||
|
||||
public double GetLapLength()
|
||||
{
|
||||
return anchorage.GetLapLength();
|
||||
}
|
||||
|
||||
private IAnchorageOptions GetAnchorageOptions()
|
||||
{
|
||||
var anchorageOptions = new AnchorageOptionsSP63();
|
||||
anchorageOptions.ConcreteStrength = inputData.ConcreteStrength;
|
||||
anchorageOptions.ReinforcementStrength = inputData.ReinforcementStrength;
|
||||
anchorageOptions.ReinforcementStress = inputData.ReinforcementStress;
|
||||
anchorageOptions.CrossSectionArea = inputData.CrossSectionArea;
|
||||
anchorageOptions.CrossSectionPerimeter = inputData.CrossSectionPerimeter;
|
||||
anchorageOptions.LappedCountRate = inputData.LappedCountRate;
|
||||
return anchorageOptions;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
public class AnchorageInputData : IAnchorageInputData
|
||||
{
|
||||
public double ConcreteStrength { get; set; }
|
||||
public double ReinforcementStrength { get; set; }
|
||||
public double CrossSectionArea { get; set; }
|
||||
public double CrossSectionPerimeter { get; set; }
|
||||
public double ReinforcementStress { get; set; }
|
||||
public double LappedCountRate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
public interface IAnchorageCalculator
|
||||
{
|
||||
double GetBaseDevLength();
|
||||
double GetDevLength();
|
||||
double GetLapLength();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
public interface IAnchorageInputData
|
||||
{
|
||||
double ConcreteStrength { get; set; }
|
||||
double ReinforcementStrength { get; set; }
|
||||
double CrossSectionArea { get; set; }
|
||||
double CrossSectionPerimeter { get; set; }
|
||||
double ReinforcementStress { get; set; }
|
||||
double LappedCountRate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
public interface IHasSurroundingPrimitive
|
||||
public interface IHasHostPrimitive
|
||||
{
|
||||
INdmPrimitive? SurroundingPrimitive { get; set; }
|
||||
INdmPrimitive? HostPrimitive { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ using System.Windows.Media.Media3D;
|
||||
namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class ReinforcementPrimitive : IPointPrimitive, IHasSurroundingPrimitive
|
||||
public class ReinforcementPrimitive : IPointPrimitive, IHasHostPrimitive
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; }
|
||||
@@ -36,7 +36,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
|
||||
public int Id { get; set; }
|
||||
public double Area { get; set; }
|
||||
public INdmPrimitive SurroundingPrimitive { get; set; }
|
||||
public INdmPrimitive HostPrimitive { get; set; }
|
||||
public ICrossSection? CrossSection { get; set; }
|
||||
|
||||
public ReinforcementPrimitive()
|
||||
@@ -54,7 +54,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
var primitive = new ReinforcementPrimitive();
|
||||
NdmPrimitivesService.CopyNdmProperties(this, primitive);
|
||||
primitive.Area = Area;
|
||||
primitive.SurroundingPrimitive = SurroundingPrimitive;
|
||||
primitive.HostPrimitive = HostPrimitive;
|
||||
return primitive;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
{
|
||||
public static void SetPrestrain(IEnumerable<INdm> ndmCollection, IStrainTuple strainTuple)
|
||||
{
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Kx, Ky = strainTuple.Kx, EpsZ = strainTuple.Kx });
|
||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Kx, Ky = strainTuple.Ky, EpsZ = strainTuple.EpsZ });
|
||||
}
|
||||
|
||||
public static void CommonTransform(IEnumerable<INdm> ndmCollection, IShapeTriangulationLogicOptions options)
|
||||
|
||||
Reference in New Issue
Block a user