Add steel Material
This commit is contained in:
@@ -5,5 +5,6 @@
|
||||
SP63_2018,
|
||||
EuroCode_2_1990,
|
||||
SP164_2014,
|
||||
SP16_2017
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Codes.Factories
|
||||
{
|
||||
@@ -48,6 +45,12 @@ namespace StructureHelperCommon.Models.Codes.Factories
|
||||
FullName = "Reinforced steel low-relaxation 7-wire strands. Specifications"
|
||||
};
|
||||
codeEntities.Add(codeEntity);
|
||||
codeEntity = new CodeEntity(new Guid("2A43EDEC-8B1B-4B0B-B2E1-B7507518B8E7"), natSystem)
|
||||
{
|
||||
Name = "GOST 27772-2021",
|
||||
FullName = "Rolled products for structural steel constructions.General specifications"
|
||||
};
|
||||
codeEntities.Add(codeEntity);
|
||||
return (codeEntities, codeRevisions);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Codes
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Materials;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -33,6 +34,12 @@ namespace StructureHelperCommon.Models.Materials
|
||||
Name = "Curve",
|
||||
DiagramType = DiagramType.Curve
|
||||
},
|
||||
new SteelMaterialBuilderLogic(new Guid("C3BE4B92-DC61-43CF-A632-ADFC1AA57D8F"))
|
||||
{
|
||||
MaterialType = MaterialTypes.Steel,
|
||||
Name="Triplelinear",
|
||||
DiagramType = DiagramType.TripleLinear
|
||||
},
|
||||
};
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials
|
||||
{
|
||||
|
||||
@@ -11,16 +11,11 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
public ICodeEntity Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double MainStrength { get; set; }
|
||||
public double InitModulus { get; set; }
|
||||
public double InitialModulus { get; set; }
|
||||
|
||||
public ConcreteMaterialEntity(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
libMaterials.AddRange(GetConcreteSP63());
|
||||
libMaterials.AddRange(GetReinforcementSP63());
|
||||
libMaterials.AddRange(GetSteelSP16());
|
||||
}
|
||||
else if (ProgramSetting.NatSystem == NatSystems.EU)
|
||||
{
|
||||
@@ -30,6 +31,97 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
return libMaterials;
|
||||
}
|
||||
|
||||
private static IEnumerable<ILibMaterialEntity> GetSteelSP16()
|
||||
{
|
||||
var codeType = CodeTypes.SP16_2017;
|
||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||
libMaterials.AddRange(AddGOST2772(codeType));
|
||||
return libMaterials;
|
||||
}
|
||||
|
||||
private static IEnumerable<ILibMaterialEntity> AddGOST2772(CodeTypes codeType)
|
||||
{
|
||||
var code = ProgramSetting.CodesList
|
||||
.Where(x => x.Name == "GOST 27772-2021")
|
||||
.Single();
|
||||
List<ILibMaterialEntity> range = new List<ILibMaterialEntity>()
|
||||
{
|
||||
new SteelMaterialEntity(new Guid("14F7EEA1-E924-42A1-928A-076BC8EE34A8"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S245",
|
||||
PropertyType = SteelDiagramPropertyType.S245,
|
||||
InitialModulus = 2.06e11d,
|
||||
MainStrength = 245e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("69142AEF-BCC4-409A-8BAD-90390143516E"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S255",
|
||||
PropertyType = SteelDiagramPropertyType.S245,
|
||||
InitialModulus = 2.06e11d,
|
||||
MainStrength = 255e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("BAD0A2B6-CF02-4554-891D-BB34FC3B2430"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S345",
|
||||
PropertyType = SteelDiagramPropertyType.S345,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 345e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("C97AE177-872B-4B77-BCF6-6519AAAE1D54"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S355",
|
||||
PropertyType = SteelDiagramPropertyType.S345,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 355e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("73700688-08BA-4A35-8BE0-26CD971FE73F"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S390",
|
||||
PropertyType = SteelDiagramPropertyType.S390,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 390e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("39C0A796-9031-444C-BD3A-FFB236C9C85C"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S440",
|
||||
PropertyType = SteelDiagramPropertyType.S440,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 440e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("7EF0525A-9965-4C8E-B15B-F7BE493382D0"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S550",
|
||||
PropertyType = SteelDiagramPropertyType.S550,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 550e6
|
||||
},
|
||||
new SteelMaterialEntity(new Guid("C3BE4B92-DC61-43CF-A632-ADFC1AA57D8F"))
|
||||
{
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "S590",
|
||||
PropertyType = SteelDiagramPropertyType.S550,
|
||||
InitialModulus = 2.0e11d,
|
||||
MainStrength = 590e6
|
||||
},
|
||||
};
|
||||
return range;
|
||||
}
|
||||
|
||||
private static IEnumerable<ILibMaterialEntity> GetConcreteEurocode()
|
||||
{
|
||||
ICodeEntity code = ProgramSetting.CodesList.Where(x => x.Name == "EuroCode2-1990").Single();
|
||||
@@ -260,7 +352,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A240",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 240e6d
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("ea422282-3465-433c-9b93-c5bbfba5a904"))
|
||||
@@ -268,7 +360,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A400",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 390e6d
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("045b54b1-0bbf-41fd-a27d-aeb20f600bb4"))
|
||||
@@ -276,7 +368,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A500",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 500e6d
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("e3cfc6fb-fbd0-47dd-ab4a-79c030704acf"))
|
||||
@@ -284,7 +376,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A600",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 600e6d
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("6f0882ef-53bf-464e-acf7-da421a43a825"))
|
||||
@@ -292,7 +384,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A800",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 800e6d
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("509fbaae-a3de-43c2-aae6-33387908dc43"))
|
||||
@@ -300,7 +392,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "A1000",
|
||||
InitModulus = 2e11d,
|
||||
InitialModulus = 2e11d,
|
||||
MainStrength = 1000e6d
|
||||
}
|
||||
};
|
||||
@@ -318,7 +410,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1400/1670",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1400e6
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("93c48a27-ab37-4bd2-aeb8-2a7247e74a1b"))
|
||||
@@ -326,7 +418,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1500/1770",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1500e6
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("6e0df35e-4839-4cf1-9182-c7ad7f81a548"))
|
||||
@@ -334,7 +426,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1600/1860",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1600e6
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("29d7ef1b-bd30-471e-af0e-8b419eb9f043"))
|
||||
@@ -342,7 +434,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1700/1960",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1700e6
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("494b959f-0194-4f02-9dcf-ff313c5e352b"))
|
||||
@@ -350,7 +442,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1800/2060",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1800e6
|
||||
},
|
||||
new ReinforcementMaterialEntity(new Guid("02031332-fe1e-456d-b339-143eb9ca8293"))
|
||||
@@ -358,7 +450,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
CodeType = codeType,
|
||||
Code = code,
|
||||
Name = "K1900/2160",
|
||||
InitModulus = 1.95e11d,
|
||||
InitialModulus = 1.95e11d,
|
||||
MainStrength = 1900e6
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Forces.Logics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public enum SteelDiagramPropertyType
|
||||
{
|
||||
S245 = 0, //S245, S255
|
||||
S345 = 1, //S345, S345K, S355, S355-1, S355-P
|
||||
S390 = 2, //S390, S390-1
|
||||
S440 = 3, //S440
|
||||
S550 = 4, //S550, S590
|
||||
}
|
||||
public static class SteelDiagramPropertyFactory
|
||||
{
|
||||
public static ISteelDiagramRelativeProperty GetProperty(SteelDiagramPropertyType type)
|
||||
{
|
||||
if (type == SteelDiagramPropertyType.S245)
|
||||
{
|
||||
SteelDiagramRelativeProperty property = new()
|
||||
{
|
||||
StrainOfProportionality = 0.8,
|
||||
StrainOfStartOfYielding = 1.7,
|
||||
StrainOfEndOfYielding = 14.0,
|
||||
StrainOfUltimateStrength = 141.6,
|
||||
StrainOfFracture = 251,
|
||||
StressOfUltimateStrength = 1.653,
|
||||
StressOfFracture = 1.35
|
||||
};
|
||||
return property;
|
||||
}
|
||||
else if (type == SteelDiagramPropertyType.S345)
|
||||
{
|
||||
SteelDiagramRelativeProperty property = new()
|
||||
{
|
||||
StrainOfProportionality = 0.8,
|
||||
StrainOfStartOfYielding = 1.7,
|
||||
StrainOfEndOfYielding = 16.0,
|
||||
StrainOfUltimateStrength = 88.3,
|
||||
StrainOfFracture = 153,
|
||||
StressOfUltimateStrength = 1.415,
|
||||
StressOfFracture = 1.26
|
||||
};
|
||||
return property;
|
||||
}
|
||||
else if (type == SteelDiagramPropertyType.S390)
|
||||
{
|
||||
SteelDiagramRelativeProperty property = new()
|
||||
{
|
||||
StrainOfProportionality = 0.9,
|
||||
StrainOfStartOfYielding = 1.7,
|
||||
StrainOfEndOfYielding = 17.0,
|
||||
StrainOfUltimateStrength = 67.1,
|
||||
StrainOfFracture = 115,
|
||||
StressOfUltimateStrength = 1.345,
|
||||
StressOfFracture = 1.23
|
||||
};
|
||||
return property;
|
||||
}
|
||||
else if (type == SteelDiagramPropertyType.S440)
|
||||
{
|
||||
SteelDiagramRelativeProperty property = new()
|
||||
{
|
||||
StrainOfProportionality = 0.9,
|
||||
StrainOfStartOfYielding = 1.7,
|
||||
StrainOfEndOfYielding = 17.0,
|
||||
StrainOfUltimateStrength = 49.6,
|
||||
StrainOfFracture = 87.2,
|
||||
StressOfUltimateStrength = 1.33,
|
||||
StressOfFracture = 1.20
|
||||
};
|
||||
return property;
|
||||
}
|
||||
else if (type == SteelDiagramPropertyType.S550)
|
||||
{
|
||||
SteelDiagramRelativeProperty property = new()
|
||||
{
|
||||
StrainOfProportionality = 0.9,
|
||||
StrainOfStartOfYielding = 1.7,
|
||||
StrainOfEndOfYielding = 18.0,
|
||||
StrainOfUltimateStrength = 26.2,
|
||||
StrainOfFracture = 51.1,
|
||||
StressOfUltimateStrength = 1.16,
|
||||
StressOfFracture = 1.10
|
||||
};
|
||||
return property;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(type));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Codes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
internal class FiberMaterialEntity : IFiberMaterialEntity
|
||||
{
|
||||
///<inheritdoc/>
|
||||
public Guid Id { get; }
|
||||
public CodeTypes CodeType { get; }
|
||||
public ICodeEntity Code { get; set; }
|
||||
public string Name { get; }
|
||||
///<inheritdoc/>
|
||||
public double InitModulus { get; set; }
|
||||
///<inheritdoc/>
|
||||
public double MainStrength { get; }
|
||||
public FiberMaterialEntity(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
Name = "";
|
||||
}
|
||||
public void Save()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface IFiberMaterialEntity : ILibMaterialEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// Modulus of elasticity, Pa
|
||||
/// </summary>
|
||||
double InitModulus { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
/// <summary>
|
||||
/// Initial Young's Modulus, Pa
|
||||
/// </summary>
|
||||
double InitModulus { get; set; }
|
||||
double InitialModulus { get; set; }
|
||||
/// <summary>
|
||||
/// Strength of material, Pa
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface ISteelDiagramAbsoluteProperty : ISteelDiagramProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Initial modulus of elasticity (Young's modulus), Pa
|
||||
/// </summary>
|
||||
double InitialYoungsModulus { get; set; }
|
||||
/// <summary>
|
||||
/// Stress of yelding, Pa
|
||||
/// </summary>
|
||||
double BaseStrength { get; set; }
|
||||
/// <summary>
|
||||
/// Stress at point of limit of proportionality, Pa
|
||||
/// </summary>
|
||||
double StressOfProportionality { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface ISteelDiagramProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Limit strain of proportionality, dimensionless
|
||||
/// </summary>
|
||||
double StrainOfProportionality { get; set; }
|
||||
/// <summary>
|
||||
/// Strain at point of start of yelding, dimensionless
|
||||
/// </summary>
|
||||
double StrainOfStartOfYielding { get; set; }
|
||||
/// <summary>
|
||||
/// Strain at point of end of yelding, dimensionless
|
||||
/// </summary>
|
||||
double StrainOfEndOfYielding { get; set; }
|
||||
/// <summary>
|
||||
/// Strain at point of ultimate strength, dimensionless
|
||||
/// </summary>
|
||||
double StrainOfUltimateStrength { get; set; }
|
||||
/// <summary>
|
||||
/// Strain at point of fracture
|
||||
/// </summary>
|
||||
double StrainOfFracture { get; set; }
|
||||
/// <summary>
|
||||
/// Stress at point of ultimate strength, Pa for absolute value, dimensionless for relative value
|
||||
/// </summary>
|
||||
double StressOfUltimateStrength { get; set; }
|
||||
/// <summary>
|
||||
/// Stress at point of fracture, Pa for absolute value, dimensionless for relative value
|
||||
/// </summary>
|
||||
double StressOfFracture { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface ISteelDiagramRelativeProperty
|
||||
{
|
||||
double StrainOfProportionality { get; set; }
|
||||
double StrainOfStartOfYielding { get; set; }
|
||||
double StrainOfEndOfYielding { get; set; }
|
||||
double StrainOfUltimateStrength { get; set; }
|
||||
double StressOfUltimateStrength { get; set; }
|
||||
double StrainOfFracture { get; set; }
|
||||
double StressOfFracture { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface ISteelMaterialEntity : ILibMaterialEntity
|
||||
{
|
||||
SteelDiagramPropertyType PropertyType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
internal interface ISteelMaterialLogicOption : IMaterialLogicOptions
|
||||
{
|
||||
double MaxPlasticStrainRatio { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -36,5 +36,15 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
.ToList();
|
||||
return repository;
|
||||
}
|
||||
|
||||
public static List<ILibMaterialEntity> GetSteelRepository()
|
||||
{
|
||||
var natCodes = ProgramSetting.CodesList;
|
||||
var rep = GetRepository();
|
||||
var repository = rep
|
||||
.Where(x => natCodes.Contains(x.Code) & x is ISteelMaterialEntity)
|
||||
.ToList();
|
||||
return repository;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using LoaderCalculator.Data.Materials.DiagramTemplates;
|
||||
using LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class SteelMaterialBuilderLogic : IMaterialLogic
|
||||
{
|
||||
private const double safetyFactorForULS = 1.05;
|
||||
private const double safetyFactorforSLS = 1.0;
|
||||
private ISteelMaterialLogicOption option;
|
||||
IObjectConvertStrategy<ISteelDiagramAbsoluteProperty, ISteelDiagramRelativeProperty> convertStrategy;
|
||||
private IMaterialFactorLogic factorLogic;
|
||||
private double compressionStrength;
|
||||
private double tensionStrength;
|
||||
|
||||
public Guid Id { get; }
|
||||
public string Name { get; set; }
|
||||
public IMaterialLogicOptions Options { get; set; }
|
||||
public MaterialTypes MaterialType { get; set; }
|
||||
public DiagramType DiagramType { get; set; }
|
||||
|
||||
|
||||
public SteelMaterialBuilderLogic(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public IMaterial GetLoaderMaterial()
|
||||
{
|
||||
option = Options as ISteelMaterialLogicOption;
|
||||
if (DiagramType == DiagramType.TripleLinear)
|
||||
{
|
||||
factorLogic = new MaterialFactorLogic(Options.SafetyFactors);
|
||||
GetStrength();
|
||||
Material material = new()
|
||||
{
|
||||
InitModulus = option.MaterialEntity.InitialModulus,
|
||||
Diagram = GetDiagram(),
|
||||
LimitPositiveStrain = GetMaxStrain(tensionStrength),
|
||||
LimitNegativeStrain = -GetMaxStrain(compressionStrength),
|
||||
};
|
||||
return material;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(DiagramType));
|
||||
}
|
||||
}
|
||||
|
||||
private double GetMaxStrain(double strength)
|
||||
{
|
||||
double elasticCompressionStrain = strength / Options.MaterialEntity.InitialModulus;
|
||||
double fullCompressionStrain = elasticCompressionStrain * (1 + ((ISteelMaterialLogicOption)Options).MaxPlasticStrainRatio);
|
||||
return fullCompressionStrain;
|
||||
}
|
||||
|
||||
private Func<double, double> GetDiagram()
|
||||
{
|
||||
MultiLinearStressStrainDiagram compressionDiagram = GetMultiLinearDiagram(compressionStrength);
|
||||
MultiLinearStressStrainDiagram tensionDiagram = GetMultiLinearDiagram(tensionStrength);
|
||||
var posNegDiagram = new PosNegDigramDecorator(tensionDiagram, compressionDiagram);
|
||||
return posNegDiagram.GetStressByStrain;
|
||||
}
|
||||
|
||||
private MultiLinearStressStrainDiagram GetMultiLinearDiagram(double strength)
|
||||
{
|
||||
convertStrategy = new SteelRelativeToAbsoluteDiagramConvertLogic(Options.MaterialEntity.InitialModulus, strength);
|
||||
var diagramProperty = SteelDiagramPropertyFactory.GetProperty(((ISteelMaterialEntity)Options.MaterialEntity).PropertyType);
|
||||
var absoluteProperty = convertStrategy.Convert(diagramProperty);
|
||||
List<IStressStrainPair> stressStrainPairs = new()
|
||||
{
|
||||
new StressStrainPair() { Stress = 0, Strain = 0},
|
||||
new StressStrainPair() { Stress = absoluteProperty.StressOfProportionality, Strain = absoluteProperty.StrainOfProportionality},
|
||||
new StressStrainPair() { Stress = absoluteProperty.BaseStrength, Strain = absoluteProperty.StrainOfStartOfYielding},
|
||||
new StressStrainPair() { Stress = absoluteProperty.BaseStrength, Strain = absoluteProperty.StrainOfEndOfYielding},
|
||||
new StressStrainPair() { Stress = absoluteProperty.StressOfUltimateStrength, Strain = absoluteProperty.StrainOfUltimateStrength},
|
||||
new StressStrainPair() { Stress = absoluteProperty.StressOfFracture, Strain = absoluteProperty.StrainOfFracture},
|
||||
|
||||
};
|
||||
var multiDiagram = new MultiLinearStressStrainDiagram(stressStrainPairs);
|
||||
return multiDiagram;
|
||||
}
|
||||
|
||||
public void GetStrength()
|
||||
{
|
||||
double baseStength = Options.MaterialEntity.MainStrength;
|
||||
var factors = factorLogic.GetTotalFactor(Options.LimitState, Options.CalcTerm);
|
||||
double compressionFactor = 1d;
|
||||
double tensionFactor = 1d;
|
||||
compressionFactor *= factors.Compressive;
|
||||
tensionFactor *= factors.Tensile;
|
||||
double factor;
|
||||
if (Options.LimitState == Infrastructures.Enums.LimitStates.ULS)
|
||||
{
|
||||
factor = safetyFactorForULS;
|
||||
}
|
||||
else if (Options.LimitState == Infrastructures.Enums.LimitStates.SLS)
|
||||
{
|
||||
factor = safetyFactorforSLS;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(Options.LimitState));
|
||||
}
|
||||
double strength = baseStength / factor;
|
||||
compressionStrength = strength * compressionFactor;
|
||||
tensionStrength = strength * tensionFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class SteelRelativeToAbsoluteDiagramConvertLogic : IObjectConvertStrategy<ISteelDiagramAbsoluteProperty, ISteelDiagramRelativeProperty>
|
||||
{
|
||||
private readonly double initialYoungsModulus;
|
||||
private readonly double baseStrength;
|
||||
|
||||
/// <summary>
|
||||
/// Converts relatives properties of diagram of steel to absolute one
|
||||
/// </summary>
|
||||
/// <param name="initialYoungsModulus">Initial modulus of elasticity (Young's modulus), Pa</param>
|
||||
/// <param name="baseStrength">Stress of yelding, Pa</param>
|
||||
public SteelRelativeToAbsoluteDiagramConvertLogic(double initialYoungsModulus, double baseStrength)
|
||||
{
|
||||
this.initialYoungsModulus = initialYoungsModulus;
|
||||
this.baseStrength = baseStrength;
|
||||
}
|
||||
|
||||
public ISteelDiagramAbsoluteProperty Convert(ISteelDiagramRelativeProperty source)
|
||||
{
|
||||
CheckInputData(source);
|
||||
double absoluteYieldingStrain = baseStrength / initialYoungsModulus;
|
||||
SteelDiagramAbsoluteProperty result = new()
|
||||
{
|
||||
InitialYoungsModulus = initialYoungsModulus,
|
||||
BaseStrength = baseStrength,
|
||||
StressOfProportionality = baseStrength * source.StrainOfProportionality,
|
||||
StrainOfProportionality = absoluteYieldingStrain * source.StrainOfProportionality,
|
||||
StrainOfStartOfYielding = absoluteYieldingStrain * source.StrainOfStartOfYielding,
|
||||
StrainOfEndOfYielding = absoluteYieldingStrain * source.StrainOfEndOfYielding,
|
||||
StrainOfUltimateStrength = absoluteYieldingStrain * source.StrainOfUltimateStrength,
|
||||
StrainOfFracture = absoluteYieldingStrain * source.StrainOfFracture,
|
||||
StressOfUltimateStrength = baseStrength * source.StressOfUltimateStrength,
|
||||
StressOfFracture = baseStrength * source.StressOfFracture,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
private void CheckInputData(ISteelDiagramRelativeProperty source)
|
||||
{
|
||||
if (initialYoungsModulus <= 0.0)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Initial modulus is not correct, it must be positive, but was {initialYoungsModulus}");
|
||||
}
|
||||
if (baseStrength < 0.0)
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Stress of yelding is not correct, it must be positive, but was {baseStrength}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
public ICodeEntity Code { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double MainStrength { get; set; }
|
||||
public double InitModulus { get; set; }
|
||||
public double InitialModulus { get; set; }
|
||||
|
||||
public ReinforcementMaterialEntity(Guid id)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class SteelDiagramAbsoluteProperty : ISteelDiagramAbsoluteProperty
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public double InitialYoungsModulus { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double BaseStrength { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StrainOfProportionality { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StrainOfStartOfYielding { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StrainOfEndOfYielding { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StrainOfUltimateStrength { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StrainOfFracture { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StressOfProportionality { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StressOfUltimateStrength { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double StressOfFracture { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class SteelDiagramRelativeProperty : ISteelDiagramRelativeProperty
|
||||
{
|
||||
public double StrainOfProportionality { get; set; }
|
||||
public double StrainOfStartOfYielding { get; set; }
|
||||
public double StrainOfEndOfYielding { get; set; }
|
||||
public double StrainOfUltimateStrength { get; set; }
|
||||
public double StressOfUltimateStrength { get; set; }
|
||||
public double StrainOfFracture { get; set; }
|
||||
public double StressOfFracture { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Codes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class SteelMaterialEntity : ISteelMaterialEntity
|
||||
{
|
||||
public Guid Id { get; }
|
||||
public CodeTypes CodeType { get; set; }
|
||||
public SteelDiagramPropertyType PropertyType { get; set; }
|
||||
|
||||
public ICodeEntity Code { get; set; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public double InitialModulus { get; set; }
|
||||
|
||||
public double MainStrength { get; set; }
|
||||
|
||||
public SteelMaterialEntity(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class SteelMaterialLogicOption : ISteelMaterialLogicOption
|
||||
{
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
|
||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public bool WorkInCompression { get; set; } = true;
|
||||
public bool WorkInTension { get; set; } = true;
|
||||
public double MaxPlasticStrainRatio { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace StructureHelperCommon.Models.Materials
|
||||
|
||||
public void SetMaterialOptions(LCMB.IMaterialOptions materialOptions)
|
||||
{
|
||||
materialOptions.InitModulus = options.MaterialEntity.InitModulus;
|
||||
materialOptions.InitModulus = options.MaterialEntity.InitialModulus;
|
||||
materialOptions.Strength = options.MaterialEntity.MainStrength;
|
||||
ProcessCodeType(materialOptions);
|
||||
ProcessLimitState(materialOptions);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials
|
||||
{
|
||||
public class MaterialLogicOption : IMaterialLogicOptions
|
||||
{
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
|
||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public bool WorkInCompression { get; set; } = true;
|
||||
public bool WorkInTension { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user