Tuple cracl calculator was changed
This commit is contained in:
@@ -35,6 +35,10 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
CalcTerm = shortTerm,
|
CalcTerm = shortTerm,
|
||||||
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
|
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
public CrackedSectionTriangulationLogic()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<INdm> GetNdmCollection()
|
public List<INdm> GetNdmCollection()
|
||||||
@@ -66,14 +70,14 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<RebarPrimitive> GetRebarPrimitives()
|
public List<IRebarPrimitive> GetRebarPrimitives()
|
||||||
{
|
{
|
||||||
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
|
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
|
||||||
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
|
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
|
||||||
List<RebarPrimitive> rebarPrimitives = new();
|
List<IRebarPrimitive> rebarPrimitives = new();
|
||||||
foreach (var item in NdmPrimitives)
|
foreach (var item in NdmPrimitives)
|
||||||
{
|
{
|
||||||
if (item is RebarPrimitive rebar)
|
if (item is IRebarPrimitive rebar)
|
||||||
{
|
{
|
||||||
TraceLogger?.AddMessage($"Primitive {rebar.Name} is rebar primitive", TraceLogStatuses.Service);
|
TraceLogger?.AddMessage($"Primitive {rebar.Name} is rebar primitive", TraceLogStatuses.Service);
|
||||||
rebarPrimitives.Add(rebar);
|
rebarPrimitives.Add(rebar);
|
||||||
@@ -86,7 +90,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public List<INdm> GetElasticNdmCollection()
|
public List<INdm> GetElasticNdmCollection()
|
||||||
{
|
{
|
||||||
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
|
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
|
||||||
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
|
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
|
||||||
triangulateLogic = new TriangulatePrimitiveLogic(new MeshElasticLogic())
|
triangulateLogic = new TriangulatePrimitiveLogic(new MeshElasticLogic())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
/// Return collection of primitives which contain only rebars
|
/// Return collection of primitives which contain only rebars
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
List<RebarPrimitive> GetRebarPrimitives();
|
List<IRebarPrimitive> GetRebarPrimitives();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ILengthBetweenCracksLogic : ILogic
|
public interface ILengthBetweenCracksLogic : ILogic
|
||||||
{
|
{
|
||||||
|
#error
|
||||||
|
//to do change to primitive collection since it is required to gain difference rebar strain and concrete strain
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Full collection of ndm parts of cross-section
|
/// Full collection of ndm parts of cross-section
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
TupleCrackInputData InputData { get; set; }
|
TupleCrackInputData InputData { get; set; }
|
||||||
double LongLength { get; set; }
|
double LongLength { get; set; }
|
||||||
IEnumerable<RebarPrimitive> Rebars { get; set; }
|
IEnumerable<IRebarPrimitive> Rebars { get; set; }
|
||||||
double ShortLength { get; set; }
|
double ShortLength { get; set; }
|
||||||
|
|
||||||
List<IRebarCrackCalculator> GetCalculators();
|
List<IRebarCrackCalculator> GetCalculators();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
public interface IRebarCrackInputDataFactory
|
public interface IRebarCrackInputDataFactory
|
||||||
{
|
{
|
||||||
RebarPrimitive Rebar { get; set; }
|
IRebarPrimitive Rebar { get; set; }
|
||||||
TupleCrackInputData InputData { get; set; }
|
TupleCrackInputData InputData { get; set; }
|
||||||
double LongLength { get; set; }
|
double LongLength { get; set; }
|
||||||
double ShortLength { get; set; }
|
double ShortLength { get; set; }
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
TupleCrackInputData InputData { get; set; }
|
TupleCrackInputData InputData { get; set; }
|
||||||
bool IsResultValid { get; }
|
bool IsResultValid { get; }
|
||||||
double LongLength { get; set; }
|
double LongLength { get; set; }
|
||||||
IEnumerable<RebarPrimitive> Rebars { get; set; }
|
IEnumerable<IRebarPrimitive> Rebars { get; set; }
|
||||||
List<RebarCrackResult> Result { get; }
|
List<RebarCrackResult> Result { get; }
|
||||||
double ShortLength { get; set; }
|
double ShortLength { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public LengthBetweenCracksLogicSP63(IAverageDiameterLogic diameterLogic, ITensileConcreteAreaLogic concreteAreaLogic, ITensionRebarAreaLogic rebarAreaLogic)
|
public LengthBetweenCracksLogicSP63(IAverageDiameterLogic diameterLogic,
|
||||||
|
ITensileConcreteAreaLogic concreteAreaLogic,
|
||||||
|
ITensionRebarAreaLogic rebarAreaLogic)
|
||||||
{
|
{
|
||||||
this.diameterLogic = diameterLogic;
|
this.diameterLogic = diameterLogic;
|
||||||
this.concreteAreaLogic = concreteAreaLogic;
|
this.concreteAreaLogic = concreteAreaLogic;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
private IRebarCrackInputDataFactory inputFactory;
|
private IRebarCrackInputDataFactory inputFactory;
|
||||||
|
|
||||||
public IEnumerable<RebarPrimitive> Rebars { get; set; }
|
public IEnumerable<IRebarPrimitive> Rebars { get; set; }
|
||||||
public TupleCrackInputData InputData { get; set; }
|
public TupleCrackInputData InputData { get; set; }
|
||||||
public double LongLength { get; set; }
|
public double LongLength { get; set; }
|
||||||
public double ShortLength { get; set; }
|
public double ShortLength { get; set; }
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RebarPrimitive Rebar { get; set; }
|
public IRebarPrimitive Rebar { get; set; }
|
||||||
public TupleCrackInputData InputData { get; set; }
|
public TupleCrackInputData InputData { get; set; }
|
||||||
public double LongLength { get; set; }
|
public double LongLength { get; set; }
|
||||||
public double ShortLength { get; set; }
|
public double ShortLength { get; set; }
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
}
|
}
|
||||||
public double GetTensionRebarArea()
|
public double GetTensionRebarArea()
|
||||||
{
|
{
|
||||||
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
|
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Debug);
|
||||||
TraceLogger?.AddMessage("Method of obtaining of summary area of rebars in tension based on areas which are proportional by maximum strain");
|
TraceLogger?.AddMessage("Method of obtaining of summary area of rebars in tension based on areas which are proportional by maximum strain");
|
||||||
var rebars = Rebars
|
var rebars = Rebars
|
||||||
.Where(x => stressLogic.GetSectionStrain(StrainMatrix, x) > 0d);
|
.Where(x => stressLogic.GetSectionStrain(StrainMatrix, x) > 0d);
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
private const CalcTerms crackingTerm = CalcTerms.ShortTerm;
|
private const CalcTerms crackingTerm = CalcTerms.ShortTerm;
|
||||||
private const LimitStates crackingLimitState = LimitStates.SLS;
|
private const LimitStates crackingLimitState = LimitStates.SLS;
|
||||||
private static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
|
private ILengthBetweenCracksLogic lengthLogic;
|
||||||
private TupleCrackResult result;
|
private TupleCrackResult result;
|
||||||
private ICrackedSectionTriangulationLogic triangulationLogic;
|
private ICrackedSectionTriangulationLogic triangulationLogic;
|
||||||
private List<RebarPrimitive>? rebarPrimitives;
|
private ITupleRebarsCrackSolver solver;
|
||||||
|
private List<IRebarPrimitive>? rebarPrimitives;
|
||||||
private IEnumerable<INdm> crackableNdms;
|
private IEnumerable<INdm> crackableNdms;
|
||||||
private IEnumerable<INdm> crackedNdms;
|
private IEnumerable<INdm> crackedNdms;
|
||||||
private IEnumerable<INdm> elasticNdms;
|
private IEnumerable<INdm> elasticNdms;
|
||||||
@@ -42,12 +43,19 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
|
|
||||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||||
|
|
||||||
public TupleCrackCalculator(ICheckInputDataLogic<TupleCrackInputData> checkInputDataLogic)
|
public TupleCrackCalculator(ICheckInputDataLogic<TupleCrackInputData> checkInputDataLogic,
|
||||||
|
ILengthBetweenCracksLogic lengthLogic, ICrackedSectionTriangulationLogic triangulationLogic, ITupleRebarsCrackSolver solver)
|
||||||
{
|
{
|
||||||
this.checkInputDataLogic = checkInputDataLogic;
|
this.checkInputDataLogic = checkInputDataLogic;
|
||||||
|
this.lengthLogic = lengthLogic;
|
||||||
|
this.triangulationLogic = triangulationLogic;
|
||||||
|
this.solver = solver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TupleCrackCalculator() : this (new CheckTupleCalculatorInputDataLogic())
|
public TupleCrackCalculator() : this (new CheckTupleCalculatorInputDataLogic(),
|
||||||
|
new LengthBetweenCracksLogicSP63(),
|
||||||
|
new CrackedSectionTriangulationLogic(),
|
||||||
|
new TupleRebarsCrackSolver())
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -134,7 +142,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
private void SolveRebarResult()
|
private void SolveRebarResult()
|
||||||
{
|
{
|
||||||
result.RebarResults.Clear();
|
result.RebarResults.Clear();
|
||||||
ITupleRebarsCrackSolver solver = new TupleRebarsCrackSolver();
|
|
||||||
solver.Rebars = rebarPrimitives;
|
solver.Rebars = rebarPrimitives;
|
||||||
solver.InputData = InputData;
|
solver.InputData = InputData;
|
||||||
solver.LongLength = longLength;
|
solver.LongLength = longLength;
|
||||||
@@ -177,13 +184,10 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
|
|
||||||
private double GetLengthBetweenCracks(StrainTuple strainTuple)
|
private double GetLengthBetweenCracks(StrainTuple strainTuple)
|
||||||
{
|
{
|
||||||
var logic = new LengthBetweenCracksLogicSP63()
|
lengthLogic.NdmCollection = elasticNdms;
|
||||||
{
|
lengthLogic.TraceLogger = TraceLogger;
|
||||||
NdmCollection = elasticNdms,
|
lengthLogic.StrainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
|
||||||
TraceLogger = TraceLogger
|
return lengthLogic.GetLength();
|
||||||
};
|
|
||||||
logic.StrainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
|
|
||||||
return logic.GetLength();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Triangulate()
|
private void Triangulate()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
|||||||
{
|
{
|
||||||
private IRebarCalulatorsFactory calculatorsFactory;
|
private IRebarCalulatorsFactory calculatorsFactory;
|
||||||
|
|
||||||
public IEnumerable<RebarPrimitive> Rebars { get; set; }
|
public IEnumerable<IRebarPrimitive> Rebars { get; set; }
|
||||||
public TupleCrackInputData InputData { get; set; }
|
public TupleCrackInputData InputData { get; set; }
|
||||||
public double LongLength { get; set; }
|
public double LongLength { get; set; }
|
||||||
public double ShortLength { get; set; }
|
public double ShortLength { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user