Icons for calculators were changed
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
@@ -12,8 +13,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthCalculator : ICalculator
|
||||
{
|
||||
static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
|
||||
CrackWidthCalculatorResult result;
|
||||
private static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
|
||||
private CrackWidthCalculatorResult result;
|
||||
private IEnumerable<INdmPrimitive> ndmPrimitives;
|
||||
private List<RebarPrimitive>? rebarPrimitives;
|
||||
private IEnumerable<INdm> ndmCollection;
|
||||
@@ -24,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public CrackWidthCalculatorInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
@@ -54,17 +55,17 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
crackInputData.RebarPrimitive = item;
|
||||
calculator.Run();
|
||||
var rebarResult = calculator.Result as CrackWidthSimpleCalculatorResult;
|
||||
if (crackForceResult.IsSectionCracked == false)
|
||||
{
|
||||
rebarResult.CrackWidth = 0d;
|
||||
}
|
||||
//if (crackForceResult.IsSectionCracked == false)
|
||||
//{
|
||||
// rebarResult.CrackWidth = 0d;
|
||||
//}
|
||||
result.RebarResults.Add(rebarResult);
|
||||
}
|
||||
}
|
||||
|
||||
private void CalcStrainMatrix()
|
||||
{
|
||||
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = InputData.ForceTuple};
|
||||
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = InputData.LongTermTuple};
|
||||
IForceTupleCalculator calculator = new ForceTupleCalculator() { InputData = inputData };
|
||||
calculator.Run();
|
||||
var forceResult = calculator.Result as IForcesTupleResult;
|
||||
@@ -80,7 +81,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
PsiSFactor = crackForceResult.PsiS,
|
||||
Length = length,
|
||||
LimitState = InputData.LimitState,
|
||||
StrainTuple = strainTuple
|
||||
};
|
||||
return crackInputData;
|
||||
@@ -97,13 +97,13 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
rebarPrimitives.Add(item as RebarPrimitive);
|
||||
}
|
||||
}
|
||||
ndmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, InputData.LimitState, InputData.CalcTerm);
|
||||
ndmCollection = NdmPrimitivesService.GetNdms(ndmPrimitives, LimitStates.SLS, CalcTerms.ShortTerm);
|
||||
}
|
||||
|
||||
private void CalcCrackForce()
|
||||
{
|
||||
var calculator = new CrackForceCalculator();
|
||||
calculator.EndTuple = InputData.ForceTuple;
|
||||
calculator.EndTuple = InputData.LongTermTuple;
|
||||
calculator.NdmCollection = ndmCollection;
|
||||
calculator.Run();
|
||||
crackForceResult = calculator.Result as CrackForceResult;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using System;
|
||||
@@ -9,11 +10,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthCalculatorInputData
|
||||
public class CrackWidthCalculatorInputData : IInputData
|
||||
{
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public IForceTuple ForceTuple { get; set; }
|
||||
public IForceTuple LongTermTuple { get; set; }
|
||||
public IForceTuple ShortTermTuple { get; set; }
|
||||
public List<INdmPrimitive> NdmPrimitives {get;set;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -11,7 +12,12 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public bool IsValid { get; set; }
|
||||
public string Description { get; set; }
|
||||
public IForceTuple LongTermTuple { get; set; }
|
||||
public IForceTuple ShortTermTuple { get; set; }
|
||||
public bool IsCracked { get; set; }
|
||||
public List<CrackWidthSimpleCalculatorResult> RebarResults { get; set; }
|
||||
public double MaxLongTermCrackWidth => IsCracked? RebarResults.Select(x => x.LongTermResult.CrackWidth).Max() : 0d;
|
||||
public double MaxShortTermCrackWidth => IsCracked? RebarResults.Select(x => x.ShortTermResult.CrackWidth).Max() : 0d;
|
||||
|
||||
public CrackWidthCalculatorResult()
|
||||
{
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public ICrackWidthSimpleCalculatorInputData InputData { get; set; }
|
||||
public IResult Result => result;
|
||||
|
||||
public Action<IResult> ActionToOutputResults { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public IShiftTraceLogger? TraceLogger { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public Action<IResult> ActionToOutputResults { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public void Run()
|
||||
{
|
||||
@@ -31,9 +31,9 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
result.Description += "\n" + ex;
|
||||
}
|
||||
result.RebarPrimitive = InputData.RebarPrimitive;
|
||||
result.CrackWidth = crackWidth;
|
||||
result.RebarStrain = logicInputData.RebarStrain;
|
||||
result.ConcreteStrain = logicInputData.ConcreteStrain;
|
||||
//result.CrackWidth = crackWidth;
|
||||
//result.RebarStrain = logicInputData.RebarStrain;
|
||||
//result.ConcreteStrain = logicInputData.ConcreteStrain;
|
||||
}
|
||||
public object Clone()
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthSimpleCalculatorInputData : ICrackWidthSimpleCalculatorInputData
|
||||
{
|
||||
public LimitStates LimitState { get; set; }
|
||||
public CalcTerms CalcTerm { get; set; }
|
||||
public StrainTuple StrainTuple { get; set; }
|
||||
public double PsiSFactor { get; set; }
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
public bool IsValid { get; set; }
|
||||
public string Description { get; set; }
|
||||
public RebarPrimitive RebarPrimitive { get; set; }
|
||||
public double CrackWidth { get; set; }
|
||||
public double RebarStrain { get; set; }
|
||||
public double ConcreteStrain { get; set; }
|
||||
public CrackWidthTupleResult LongTermResult { get; set; }
|
||||
public CrackWidthTupleResult ShortTermResult { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public class CrackWidthTupleResult
|
||||
{
|
||||
public IForceTuple? ForceTuple { get; set; }
|
||||
public double CrackWidth { get; set; }
|
||||
public double RebarStrain { get; set; }
|
||||
public double ConcreteStrain { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
private static void ProcessBaseProps(ICrackWidthSimpleCalculatorInputData inputData, ICrackWidthLogicInputData data)
|
||||
{
|
||||
var strainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(inputData.StrainTuple);
|
||||
var triangulationOptions = new TriangulationOptions { LimiteState = inputData.LimitState, CalcTerm = inputData.CalcTerm };
|
||||
var triangulationOptions = new TriangulationOptions { LimiteState = LimitStates.SLS, CalcTerm = inputData.CalcTerm };
|
||||
var ndms = inputData.RebarPrimitive.GetNdms(triangulationOptions).ToArray();
|
||||
var concreteNdm = ndms[0];
|
||||
var rebarNdm = ndms[1];
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface ICrackWidthSimpleCalculatorInputData
|
||||
{
|
||||
LimitStates LimitState { get; set; }
|
||||
CalcTerms CalcTerm { get; set; }
|
||||
StrainTuple StrainTuple { get; set; }
|
||||
double PsiSFactor { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -8,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
public interface ILengthBetweenCracksLogic
|
||||
public interface ILengthBetweenCracksLogic : ILogic
|
||||
{
|
||||
IEnumerable<INdm> NdmCollection { get; set; }
|
||||
IStrainMatrix StrainMatrix { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -19,6 +20,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
readonly ITensileAreaLogic tensileAreaLogic;
|
||||
public IEnumerable<INdm> NdmCollection { get; set; }
|
||||
public IStrainMatrix StrainMatrix { get; set; }
|
||||
public IShiftTraceLogger? TraceLogger { get; set; }
|
||||
|
||||
public LengthBetweenCracksLogicSP63(IAverageDiameterLogic diameterLogic, ITensileAreaLogic tensileAreaLogic)
|
||||
{
|
||||
this.diameterLogic = diameterLogic;
|
||||
|
||||
Reference in New Issue
Block a user