TripleLinear Material Diagram was added

This commit is contained in:
Evgeny Redikultsev
2023-11-25 20:05:49 +05:00
parent 4a8cf2d42a
commit b4b1720c70
23 changed files with 225 additions and 25 deletions

View File

@@ -1,5 +1,6 @@
using LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
namespace StructureHelperCommon.Models.Materials
@@ -25,6 +26,9 @@ namespace StructureHelperCommon.Models.Materials
}
}
public MaterialTypes MaterialType { get; set; }
public DiagramType DiagramType { get; set; }
public IMaterial GetLoaderMaterial()
{
GetLoaderOptions();

View File

@@ -0,0 +1,25 @@
using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Materials;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Materials
{
internal static class MaterialLogicsFactory
{
public static List<IMaterialLogic> GetMaterialLogics()
{
var items = new List<IMaterialLogic>()
{
new ReinforcementByBuilderLogic() { MaterialType = MaterialTypes.Reinforcement, Name="Bilinear", DiagramType = DiagramType.Bilinear},
new ReinforcementByBuilderLogic() { MaterialType = MaterialTypes.Reinforcement, Name="Triplelinear", DiagramType = DiagramType.TripleLinear},
new ConcreteCurveLogic() { MaterialType = MaterialTypes.Concrete, Name = "Curve", DiagramType = DiagramType.Curve},
};
return items;
}
}
}

View File

@@ -1,4 +1,5 @@
using LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using System;
using System.Collections.Generic;
@@ -13,5 +14,7 @@ namespace StructureHelperCommon.Models.Materials
string Name { get; set; }
IMaterialLogicOptions Options { get; set; }
IMaterial GetLoaderMaterial();
MaterialTypes MaterialType { get; set; }
DiagramType DiagramType { get; set; }
}
}

View File

@@ -11,6 +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 ConcreteMaterialEntity(Guid id)
{

View File

@@ -231,21 +231,48 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "A240",
MainStrength = 240e6
InitModulus = 2e11d,
MainStrength = 240e6d
},
new ReinforcementMaterialEntity(new Guid("ea422282-3465-433c-9b93-c5bbfba5a904"))
{
CodeType = codeType,
Code = code,
Name = "A400",
MainStrength = 400e6
InitModulus = 2e11d,
MainStrength = 400e6d
},
new ReinforcementMaterialEntity(new Guid("045b54b1-0bbf-41fd-a27d-aeb20f600bb4"))
{
CodeType = codeType,
Code = code,
Name = "A500",
MainStrength = 500e6
InitModulus = 2e11d,
MainStrength = 500e6d
},
new ReinforcementMaterialEntity(new Guid("e3cfc6fb-fbd0-47dd-ab4a-79c030704acf"))
{
CodeType = codeType,
Code = code,
Name = "A600",
InitModulus = 2e11d,
MainStrength = 600e6d
},
new ReinforcementMaterialEntity(new Guid("6f0882ef-53bf-464e-acf7-da421a43a825"))
{
CodeType = codeType,
Code = code,
Name = "A800",
InitModulus = 2e11d,
MainStrength = 800e6d
},
new ReinforcementMaterialEntity(new Guid("509fbaae-a3de-43c2-aae6-33387908dc43"))
{
CodeType = codeType,
Code = code,
Name = "A1000",
InitModulus = 2e11d,
MainStrength = 1000e6d
}
};
return range;
@@ -262,6 +289,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1400/1670",
InitModulus = 1.95e11d,
MainStrength = 1400e6
},
new ReinforcementMaterialEntity(new Guid("93c48a27-ab37-4bd2-aeb8-2a7247e74a1b"))
@@ -269,6 +297,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1500/1770",
InitModulus = 1.95e11d,
MainStrength = 1500e6
},
new ReinforcementMaterialEntity(new Guid("6e0df35e-4839-4cf1-9182-c7ad7f81a548"))
@@ -276,6 +305,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1600/1860",
InitModulus = 1.95e11d,
MainStrength = 1600e6
},
new ReinforcementMaterialEntity(new Guid("29d7ef1b-bd30-471e-af0e-8b419eb9f043"))
@@ -283,6 +313,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1700/1960",
InitModulus = 1.95e11d,
MainStrength = 1700e6
},
new ReinforcementMaterialEntity(new Guid("494b959f-0194-4f02-9dcf-ff313c5e352b"))
@@ -290,6 +321,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1800/2060",
InitModulus = 1.95e11d,
MainStrength = 1800e6
},
new ReinforcementMaterialEntity(new Guid("02031332-fe1e-456d-b339-143eb9ca8293"))
@@ -297,6 +329,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
CodeType = codeType,
Code = code,
Name = "K1900/2160",
InitModulus = 1.95e11d,
MainStrength = 1900e6
}
};

View File

@@ -16,7 +16,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
public ICodeEntity Code { get; set; }
public string Name { get; }
///<inheritdoc/>
public double YoungsModulus { get; set; }
public double InitModulus { get; set; }
///<inheritdoc/>
public double MainStrength { get; }
public FiberMaterialEntity(Guid id)

View File

@@ -11,6 +11,6 @@ namespace StructureHelperCommon.Models.Materials.Libraries
/// <summary>
/// Modulus of elasticity, Pa
/// </summary>
double YoungsModulus { get; set; }
double InitModulus { get; set; }
}
}

View File

@@ -10,6 +10,10 @@ namespace StructureHelperCommon.Models.Materials.Libraries
ICodeEntity Code { get; set; }
string Name { get; }
/// <summary>
/// Initial Young's Modulus, Pa
/// </summary>
double InitModulus { get; set; }
/// <summary>
/// Strength of material, Pa
/// </summary>
double MainStrength { get; }

View File

@@ -11,6 +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 ReinforcementMaterialEntity(Guid id)
{

View File

@@ -15,6 +15,7 @@ namespace StructureHelperCommon.Models.Materials
public void SetMaterialOptions(LCMB.IMaterialOptions materialOptions)
{
materialOptions.InitModulus = options.MaterialEntity.InitModulus;
materialOptions.Strength = options.MaterialEntity.MainStrength;
if (options.MaterialEntity.CodeType == CodeTypes.EuroCode_2_1990)
{

View File

@@ -1,30 +1,31 @@
using LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Services;
namespace StructureHelperCommon.Models.Materials
{
public class ReinforcementBiLinearLogic : IMaterialLogic
public class ReinforcementByBuilderLogic : IMaterialLogic
{
private ReinforcementLogicOptions options;
private ReinforcementOptions materialOptions;
private IMaterialOptionLogic optionLogic;
private ReinforcementLogicOptions options;
private IMaterialLogicOptions options1;
public string Name { get; set; }
public DiagramType DiagramType { get; set; }
public IMaterialLogicOptions Options
{
get => options;
set
{
if (value is not ReinforcementLogicOptions)
{
throw new StructureHelperException($"{ErrorStrings.ExpectedWas(typeof(ReinforcementLogicOptions), value)}");
}
CheckObject.CheckType(value, typeof(ReinforcementLogicOptions));
options = (ReinforcementLogicOptions)value;
}
}
public MaterialTypes MaterialType { get; set; }
public IMaterial GetLoaderMaterial()
{
GetLoaderOptions();
@@ -42,7 +43,7 @@ namespace StructureHelperCommon.Models.Materials
private void GetLoaderOptions()
{
materialOptions = new ReinforcementOptions();
materialOptions = new ReinforcementOptions() { DiagramType = DiagramType};
optionLogic = new MaterialCommonOptionLogic(options);
optionLogic.SetMaterialOptions(materialOptions);
}