Add beam shear calculator view
This commit is contained in:
@@ -28,17 +28,17 @@ namespace StructureHelperLogics.Models.Materials
|
||||
/// <inheritdoc/>
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public bool TensionForULS { get ; set; }
|
||||
public bool TensionForULS { get; set; } = false;
|
||||
/// <inheritdoc/>
|
||||
public bool TensionForSLS { get; set; }
|
||||
public bool TensionForSLS { get; set; } = true;
|
||||
/// <inheritdoc/>
|
||||
public double RelativeHumidity { get; set; }
|
||||
public double RelativeHumidity { get; set; } = 0.55d;
|
||||
/// <inheritdoc/>
|
||||
public IMaterialLogic MaterialLogic { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double MinAge { get; set; }
|
||||
public double MinAge { get; set; } = 0d;
|
||||
/// <inheritdoc/>
|
||||
public double MaxAge { get; set; }
|
||||
public double MaxAge { get; set; } = maxAge;
|
||||
/// <inheritdoc/>
|
||||
public List<IMaterialLogic> MaterialLogics => materialLogics;
|
||||
|
||||
@@ -51,11 +51,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
lmOptions = new LMBuilders.ConcreteOptions();
|
||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultConcreteSafetyFactors(ProgramSetting.CodeType));
|
||||
TensionForULS = false;
|
||||
TensionForSLS = true;
|
||||
RelativeHumidity = 0.55d;
|
||||
MinAge = 0d;
|
||||
MaxAge = maxAge;
|
||||
}
|
||||
|
||||
public ConcreteLibMaterial() : this (Guid.NewGuid())
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public enum ConcreteLibTypes
|
||||
{
|
||||
Concrete15,
|
||||
Concrete20,
|
||||
Concrete25,
|
||||
Concrete30,
|
||||
Concrete35,
|
||||
Concrete40,
|
||||
}
|
||||
public static class ConcreteLibMaterialFactory
|
||||
{
|
||||
private static IEnumerable<ILibMaterialEntity> LibConcreteMaterials => LibMaterialPepository.GetConcreteRepository();
|
||||
public static IConcreteLibMaterial GetConcreteLibMaterial(ConcreteLibTypes concreteLibTypes)
|
||||
{
|
||||
if (concreteLibTypes == ConcreteLibTypes.Concrete25)
|
||||
{
|
||||
return GetConcrete(25);
|
||||
}
|
||||
if (concreteLibTypes == ConcreteLibTypes.Concrete40)
|
||||
{
|
||||
return GetConcrete(40);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(concreteLibTypes));
|
||||
}
|
||||
}
|
||||
|
||||
private static IConcreteLibMaterial GetConcrete(double strength)
|
||||
{
|
||||
string stringStrength = Convert.ToString(strength);
|
||||
var libMaterial = LibConcreteMaterials
|
||||
.Where(x => x.Name.Contains(stringStrength))
|
||||
.First();
|
||||
var libMat = new ConcreteLibMaterial
|
||||
{
|
||||
MaterialEntity = libMaterial,
|
||||
TensionForULS = false,
|
||||
TensionForSLS = true
|
||||
};
|
||||
return libMat;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,7 @@
|
||||
using StructureHelper.Models.Materials;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using StructureHelperCommon.Models.Codes;
|
||||
using StructureHelperCommon.Models.Materials.Libraries;
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -17,7 +9,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
Concrete40,
|
||||
Reinforcement400,
|
||||
Reinforecement500,
|
||||
Reinforcement500,
|
||||
Elastic200,
|
||||
Carbon1400,
|
||||
Glass1200
|
||||
@@ -33,7 +25,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
if (type == HeadmaterialType.Concrete40) { return GetConcrete40(); }
|
||||
if (type == HeadmaterialType.Reinforcement400) { return GetReinforcement400(); }
|
||||
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
||||
if (type == HeadmaterialType.Reinforcement500) { return GetReinforcement500(); }
|
||||
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
||||
if (type == HeadmaterialType.Carbon1400) { return GetCarbon1400(); }
|
||||
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
||||
@@ -94,12 +86,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
private static IHeadMaterial GetConcrete40()
|
||||
{
|
||||
var material = new HeadMaterial();
|
||||
var libMaterial = LibConcreteMaterials.Where(x => x.Name.Contains("40")).First();
|
||||
var libMat = new ConcreteLibMaterial();
|
||||
libMat.MaterialEntity = libMaterial;
|
||||
libMat.TensionForULS = false;
|
||||
libMat.TensionForSLS = true;
|
||||
material.HelperMaterial = libMat;
|
||||
material.HelperMaterial = ConcreteLibMaterialFactory.GetConcreteLibMaterial(ConcreteLibTypes.Concrete40);
|
||||
return material;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user