Carbon Fiber Material was Added

This commit is contained in:
Evgeny Redikultsev
2023-06-10 22:26:15 +05:00
parent 79c24f2cd5
commit 90843ea409
67 changed files with 815 additions and 276 deletions

View File

@@ -0,0 +1,36 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Shapes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Forces
{
public class DesignForcePair : IDesignForcePair
{
public string Name { get; set; }
public IPoint2D ForcePoint { get; set; }
public bool SetInGravityCenter { get; set; }
public LimitStates LimitState { get; set; }
public IForceTuple LongForceTuple { get; set; }
public IForceTuple FullForceTuple { get; set; }
public DesignForcePair()
{
LongForceTuple = new ForceTuple();
FullForceTuple = new ForceTuple();
}
public IForceCombinationList GetCombinations()
{
throw new NotImplementedException();
}
public object Clone()
{
throw new NotImplementedException();
}
}
}

View File

@@ -6,7 +6,7 @@ namespace StructureHelperCommon.Models.Forces
{
public LimitStates LimitState { get; set; }
public CalcTerms CalcTerm { get; set; }
public IForceTuple ForceTuple { get; set; }
public ForceTuple ForceTuple { get; set; }
public DesignForceTuple(LimitStates limitState, CalcTerms calcTerm) : this()
{
@@ -22,7 +22,7 @@ namespace StructureHelperCommon.Models.Forces
public object Clone()
{
var newTuple = new DesignForceTuple(this.LimitState, this.CalcTerm);
newTuple.ForceTuple = this.ForceTuple.Clone() as IForceTuple;
newTuple.ForceTuple = this.ForceTuple.Clone() as ForceTuple;
return newTuple;
}
}

View File

@@ -47,7 +47,7 @@ namespace StructureHelperCommon.Models.Forces
{
var termFactor = calcTerm is CalcTerms.ShortTerm ? 1d : LongTermFactor;
var designForceTuple = new DesignForceTuple() { LimitState = limitState, CalcTerm = calcTerm };
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor);
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor) as ForceTuple;
result.DesignForces.Add(designForceTuple);
}
}

View File

@@ -59,7 +59,7 @@ namespace StructureHelperCommon.Models.Forces
var forceTupleList = DesignForces.Where(x => x.LimitState == limitState & x.CalcTerm == calcTerm);
foreach (var item in forceTupleList)
{
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple);
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple) as ForceTuple;
}
result.DesignForces.Add(designForceTuple);
}

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using StructureHelperCommon.Services.Forces;
using System.ComponentModel.DataAnnotations;
namespace StructureHelperCommon.Models.Forces
{
@@ -21,20 +22,13 @@ namespace StructureHelperCommon.Models.Forces
/// <inheritdoc/>
public object Clone()
{
IForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
ForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
return forceTuple;
}
public static ForceTuple operator +(ForceTuple first) => first;
public static ForceTuple operator +(ForceTuple first, ForceTuple second)
{
var result = new ForceTuple();
result.Mx += first.Mx + second.Mx;
result.My += first.My + second.My;
result.Mz += first.Mz + second.Mz;
result.Qx += first.Qx + second.Qx;
result.Qy += first.Qy + second.Qy;
result.Nz += first.Nz + second.Nz;
return result;
return ForceTupleService.SumTuples(first, second) as ForceTuple;
}
}
}

View File

@@ -0,0 +1,16 @@
using StructureHelperCommon.Infrastructures.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Forces
{
public interface IDesignForcePair : IForceAction
{
LimitStates LimitState { get; set; }
IForceTuple LongForceTuple { get; set; }
IForceTuple FullForceTuple { get; set; }
}
}

View File

@@ -8,7 +8,6 @@ namespace StructureHelperCommon.Models.Forces
{
LimitStates LimitState { get; set; }
CalcTerms CalcTerm { get; set; }
IForceTuple ForceTuple { get; set; }
ForceTuple ForceTuple { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using StructureHelperCommon.Services.Forces;
namespace StructureHelperCommon.Models.Forces
{
/// <inheritdoc/>
public class StrainTuple : IForceTuple
{
/// <inheritdoc/>
public double Mx { get; set; }
/// <inheritdoc/>
public double My { get; set; }
/// <inheritdoc/>
public double Nz { get; set; }
/// <inheritdoc/>
public double Qx { get; set; }
/// <inheritdoc/>
public double Qy { get; set; }
/// <inheritdoc/>
public double Mz { get; set; }
/// <inheritdoc/>
public object Clone()
{
StrainTuple forceTuple = new StrainTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz };
return forceTuple;
}
public static StrainTuple operator +(StrainTuple first) => first;
public static StrainTuple operator +(StrainTuple first, ForceTuple second)
{
return ForceTupleService.SumTuples(first, second) as StrainTuple;
}
}
}

View File

@@ -1,35 +0,0 @@
using System;
namespace StructureHelperCommon.Models.Forces
{
/// <summary>
/// Interface for generic curvature for beams
/// </summary>
public interface IStrainTuple : ICloneable
{
/// <summary>
/// Curvature about x-axis
/// </summary>
double Kx { get; set; }
/// <summary>
/// Curvature about y-axis
/// </summary>
double Ky { get; set; }
/// <summary>
/// Strain along z-axis
/// </summary>
double EpsZ { get; set; }
/// <summary>
/// Screw along x-axis
/// </summary>
double Gx { get; set; }
/// <summary>
/// Screw along y-axis
/// </summary>
double Gy { get; set; }
/// <summary>
/// Twisting about z-axis
/// </summary>
double Gz { get; set; }
}
}

View File

@@ -1,29 +0,0 @@
using StructureHelperCommon.Services.Forces;
namespace StructureHelperCommon.Models.Forces
{
/// <inheritdoc/>
public class StrainTuple : IStrainTuple
{
/// <inheritdoc/>
public double Kx { get; set; }
/// <inheritdoc/>
public double Ky { get; set; }
/// <inheritdoc/>
public double EpsZ { get; set; }
/// <inheritdoc/>
public double Gx { get; set; }
/// <inheritdoc/>
public double Gy { get; set; }
/// <inheritdoc/>
public double Gz { get; set; }
/// <inheritdoc/>
public object Clone()
{
var target = new StrainTuple();
StrainTupleService.CopyProperties(this, target);
return target;
}
}
}

View File

@@ -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;
}
}
}

View File

@@ -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);
}

View File

@@ -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;
}
}
}

View File

@@ -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 });

View File

@@ -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);
}
}

View File

@@ -1,10 +1,12 @@
namespace StructureHelperCommon.Models.Shapes
using System;
namespace StructureHelperCommon.Models.Shapes
{
/// <summary>
/// Interface for point of center of some shape
/// Интерфейс для точки центра некоторой формы
/// </summary>
public interface IPoint2D
public interface IPoint2D : ICloneable
{
/// <summary>
/// Coordinate of center of rectangle by local axis X, m

View File

@@ -7,5 +7,11 @@
public double X { get; set; }
/// <inheritdoc />
public double Y { get; set; }
public object Clone()
{
var point = new Point2D() { X = X, Y = Y };
return point;
}
}
}