Carbon Fiber Material was Added
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public class FactorLogic : IFactorLogic
|
||||
{
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
public (double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
{
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
public FactorLogic(List<IMaterialSafetyFactor> safetyFactors)
|
||||
{
|
||||
SafetyFactors = safetyFactors;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using StructureHelperCommon.Infrastructures.Strings;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public enum FactorType
|
||||
public enum ConcreteFactorType
|
||||
{
|
||||
LongTermFactor,
|
||||
BleedingFactor,
|
||||
@@ -13,11 +13,11 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
|
||||
public static class ConcreteFactorsFactory
|
||||
{
|
||||
public static IMaterialSafetyFactor GetFactor(FactorType factorType)
|
||||
public static IMaterialSafetyFactor GetFactor(ConcreteFactorType factorType)
|
||||
{
|
||||
if (factorType == FactorType.LongTermFactor) { return LongTerm(); }
|
||||
else if (factorType == FactorType.BleedingFactor) { return Bleeding(); }
|
||||
else if (factorType == FactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
||||
if (factorType == ConcreteFactorType.LongTermFactor) { return LongTerm(); }
|
||||
else if (factorType == ConcreteFactorType.BleedingFactor) { return Bleeding(); }
|
||||
else if (factorType == ConcreteFactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Strings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public enum FRFactorType
|
||||
{
|
||||
ConditionFactor,
|
||||
CohesionFactor,
|
||||
LongTermFactor,
|
||||
}
|
||||
public static class FRFactorsFactory
|
||||
{
|
||||
const string gammaf1Name = "Gamma_f1";
|
||||
const string gammaf1Description = "Coefficient for considering environment";
|
||||
const string gammaf2Name = "Gamma_f2";
|
||||
const string gammaf2Description = "Coefficient for considering cohesion";
|
||||
const string gammaf3Name = "Gamma_f3";
|
||||
const string gammaf3Description = "Coefficient for considering long term calculations";
|
||||
public static IMaterialSafetyFactor GetCarbonFactor(FRFactorType factorType)
|
||||
{
|
||||
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.2d,0.8d); }
|
||||
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description , 0.9d); }
|
||||
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
public static IMaterialSafetyFactor GetGlassFactor(FRFactorType factorType)
|
||||
{
|
||||
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.8d, 0.3d); }
|
||||
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description, 0.7d); }
|
||||
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||
}
|
||||
|
||||
private static IMaterialSafetyFactor Condition(string name, string description, double value)
|
||||
{
|
||||
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||
{
|
||||
Name = name,
|
||||
Description = description,
|
||||
};
|
||||
IMaterialPartialFactor partialFactor;
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = value
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
return safetyFactor;
|
||||
}
|
||||
|
||||
private static IMaterialSafetyFactor LongTerm(double shortValue, double longValue)
|
||||
{
|
||||
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||
{
|
||||
Name = gammaf3Name,
|
||||
Description = gammaf3Description,
|
||||
};
|
||||
IMaterialPartialFactor partialFactor;
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = shortValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.ShortTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = shortValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Tension,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = longValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
partialFactor = new MaterialPartialFactor
|
||||
{
|
||||
StressState = StressStates.Compression,
|
||||
CalcTerm = CalcTerms.LongTerm,
|
||||
LimitState = LimitStates.ULS,
|
||||
FactorValue = longValue
|
||||
};
|
||||
safetyFactor.PartialFactors.Add(partialFactor);
|
||||
return safetyFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
}
|
||||
private static IEnumerable<ILibMaterialEntity> GetConcreteSP63()
|
||||
{
|
||||
var code = CodeTypes.SP63_13330_2018;
|
||||
var code = CodeTypes.SP63_2018;
|
||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B5", MainStrength = 5e6 });
|
||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B7,5", MainStrength = 7.5e6 });
|
||||
@@ -57,7 +57,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
}
|
||||
private static IEnumerable<ILibMaterialEntity> GetReinforcementSP63()
|
||||
{
|
||||
var code = CodeTypes.SP63_13330_2018;
|
||||
var code = CodeTypes.SP63_2018;
|
||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A240", MainStrength = 240e6 });
|
||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A400", MainStrength = 400e6 });
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||
{
|
||||
public interface IFactorLogic
|
||||
{
|
||||
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
(double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user