Add cylinders to 3dLogic
This commit is contained in:
@@ -67,7 +67,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||
var exitMx = stiffness[0, 0] * strain.Kx + stiffness[0, 1] * strain.Ky + stiffness[0, 2] * strain.EpsZ;
|
||||
var exitMy = stiffness[1, 0] * strain.Kx + stiffness[1, 1] * strain.Ky + stiffness[1, 2] * strain.EpsZ;
|
||||
var exitNz = stiffness[2, 0] * strain.Kx + stiffness[2, 1] * strain.Ky + stiffness[2, 2] * strain.EpsZ;
|
||||
var PrestressMatrix = new ForceLogic()
|
||||
var PrestressMatrix = new CalculateForceMatrixLogic()
|
||||
.GetPrestressMatrix(new StiffnessLogic(), ndmCollection, strain);
|
||||
double mx = exitMx + PrestressMatrix.Mx;
|
||||
double my = exitMy + PrestressMatrix.My;
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
|
||||
public List<INdmPrimitive> Primitives { get; } = [];
|
||||
public IDeflectionFactor DeflectionFactor { get; set; } = new DeflectionFactor(Guid.NewGuid());
|
||||
public bool ConsiderSofteningFactor { get; set; } = false;
|
||||
|
||||
public CurvatureCalculatorInputData(Guid id)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
@@ -36,16 +38,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
PrepareResult();
|
||||
try
|
||||
{
|
||||
if (CheckForCracks(InputData.ForcePair.FullForceTuple, CalcTerms.ShortTerm) || CheckForCracks(InputData.ForcePair.LongForceTuple, CalcTerms.ShortTerm))
|
||||
{
|
||||
TraceLogger?.AddMessage($"Section is cracked");
|
||||
calculator = new CurvatureTermCrackedCalculator(TraceLogger) { InputData = InputData };
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLogger?.AddMessage($"Section is not cracked");
|
||||
calculator = new CurvatureTermUncrackedCalculator(TraceLogger) { InputData = InputData };
|
||||
}
|
||||
GetCaclculator();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -64,7 +57,26 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
result.SectionResult = calcResult;
|
||||
}
|
||||
|
||||
private bool CheckForCracks(IForceTuple forceTuple, CalcTerms calcTerm)
|
||||
private void GetCaclculator()
|
||||
{
|
||||
if (InputData.ConsiderSofteningFactor == false)
|
||||
{
|
||||
calculator = new CurvatureTermUncrackedCalculator(TraceLogger) { InputData = InputData };
|
||||
return;
|
||||
}
|
||||
if (IsSectionCracked(InputData.ForcePair.FullForceTuple, CalcTerms.ShortTerm) || IsSectionCracked(InputData.ForcePair.LongForceTuple, CalcTerms.ShortTerm))
|
||||
{
|
||||
TraceLogger?.AddMessage($"Section is cracked");
|
||||
calculator = new CurvatureTermCrackedCalculator(TraceLogger) { InputData = InputData };
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLogger?.AddMessage($"Section is not cracked");
|
||||
calculator = new CurvatureTermUncrackedCalculator(TraceLogger) { InputData = InputData };
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsSectionCracked(IForceTuple forceTuple, CalcTerms calcTerm)
|
||||
{
|
||||
var triangulateLogic = new TriangulatePrimitiveLogic()
|
||||
{
|
||||
@@ -74,6 +86,10 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
TraceLogger = TraceLogger
|
||||
};
|
||||
var ndms = triangulateLogic.GetNdms();
|
||||
if (!ndms.Where(x => x.Material is ICrackMaterial).Any())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var logic = new IsSectionCrackedByForceLogic()
|
||||
{
|
||||
ForceTuple = forceTuple,
|
||||
|
||||
@@ -8,5 +8,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
public IDesignForcePair ForcePair { get; set; }
|
||||
public List<INdmPrimitive> Primitives { get; set; } = [];
|
||||
public IDeflectionFactor DeflectionFactor { get; set; }
|
||||
public bool ConsiderSofteningFactor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
public interface ICurvatureCalculatorInputData : IInputData, ISaveable, IHasForceActions, IHasPrimitives
|
||||
{
|
||||
IDeflectionFactor DeflectionFactor { get; set; }
|
||||
bool ConsiderSofteningFactor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
{
|
||||
IDesignForcePair ForcePair {get;set;}
|
||||
IDeflectionFactor DeflectionFactor { get; set; }
|
||||
bool ConsiderSofteningFactor { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
|
||||
if (ReferenceEquals(target, source))
|
||||
return;
|
||||
|
||||
target.ConsiderSofteningFactor = source.ConsiderSofteningFactor;
|
||||
if (UpdateChildren)
|
||||
{
|
||||
ValidateChildProperties(target, source);
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.Curvatures
|
||||
{
|
||||
ForcePair = pair,
|
||||
Primitives = InputData.Primitives,
|
||||
DeflectionFactor = InputData.DeflectionFactor
|
||||
DeflectionFactor = InputData.DeflectionFactor,
|
||||
ConsiderSofteningFactor = InputData.ConsiderSofteningFactor,
|
||||
};
|
||||
ForceCalculator.InputData = forceInputData;
|
||||
ForceCalculator.Run();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator;
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
@@ -6,11 +7,6 @@ using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperLogics.Models.Materials;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
@@ -42,7 +38,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.RC
|
||||
{
|
||||
inputData.ReinforcementStress = inputData.ReinforcementStrength;
|
||||
}
|
||||
inputData.IsPrestressed = ndm.PrestrainLogic.GetByType(PrestrainTypes.Prestrain).Sum(x => x.PrestrainValue) > 0.0005d ? true : false;
|
||||
var prestrainLogic = new GetNdmPrestrainLogic();
|
||||
var prestrainValue = prestrainLogic.GetPrestrainValueAtCenter(ndm);
|
||||
inputData.IsPrestressed = prestrainValue > 0.0005d ? true : false;
|
||||
inputData.LappedCountRate = lappedCountRate;
|
||||
return inputData;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using System.Diagnostics.Eventing.Reader;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
@@ -46,7 +45,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
}
|
||||
var strainMatrix = calcResult.LoaderResults.ForceStrainPair.StrainMatrix;
|
||||
IEnumerable<INdm> checkedNdmCollection;
|
||||
var isSectionCracked = stressLogic.IsSectionCracked(strainMatrix, CheckedNdmCollection);
|
||||
var crackLogic = new CrackedSectionLogic();
|
||||
var isSectionCracked = crackLogic.IsSectionCracked(strainMatrix, CheckedNdmCollection);
|
||||
if (isSectionCracked == true)
|
||||
{
|
||||
TraceLogger?.AddMessage($"Cracks are appeared in cross-section for current force combination");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
@@ -9,6 +10,7 @@ using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||
using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
{
|
||||
@@ -63,7 +65,9 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
var strainMatrix = ForceTupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
|
||||
result.RebarStrain = stressLogic.GetSectionStrain(strainMatrix, rebarNdm);
|
||||
result.RebarStress = stressLogic.GetStress(strainMatrix, rebarNdm);
|
||||
result.ConcreteStrain = -concreteNdm.PrestrainLogic.GetAll().Sum(x => x.PrestrainValue);
|
||||
var prestrainLogic = new GetNdmPrestrainLogic();
|
||||
var prestrainValue = prestrainLogic.GetPrestrainValueAtCenter(concreteNdm);
|
||||
result.ConcreteStrain = - prestrainValue;
|
||||
}
|
||||
|
||||
private void PrepareNewResult()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Logics;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
@@ -13,6 +14,7 @@ using StructureHelperLogics.NdmCalculations.Triangulations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -107,10 +109,8 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
|
||||
rebarActualStrain = actualRebarResult.RebarStrain;
|
||||
rebarActualStress = actualRebarResult.RebarStress;
|
||||
TraceLogger?.AddMessage($"Actual strain of rebar EpsilonS = {rebarActualStrain}(dimensionless)");
|
||||
concreteStrainActual = concreteNdm
|
||||
.PrestrainLogic
|
||||
.GetAll()
|
||||
.Sum(x => x.PrestrainValue);
|
||||
var prestrainLogic = new GetNdmPrestrainLogic();
|
||||
concreteStrainActual = prestrainLogic.GetPrestrainValueAtCenter(concreteNdm);
|
||||
TraceLogger?.AddMessage($"Actual strain of concrete on the axis of rebar EpsilonC = {concreteStrainActual}(dimensionless)");
|
||||
if (crackResult.IsSectionCracked == false)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Data.Ndms.Transformations;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
|
||||
|
||||
@@ -1,17 +1,7 @@
|
||||
using LoaderCalculator.Data.Materials;
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Data.Ndms.Transformations;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using StructureHelperCommon.Services.Forces;
|
||||
using StructureHelperLogics.Models.Primitives;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Data.Ndms.Transformations;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator.Data.Ndms.Transformations;
|
||||
using StructureHelperCommon.Models.Forces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Windows.Forms.Design.AxImporter;
|
||||
|
||||
namespace StructureHelperLogics.NdmCalculations.Triangulations
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using LoaderCalculator;
|
||||
using LoaderCalculator.Data.Matrix;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using StructureHelperCommon.Infrastructures.Enums;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Models;
|
||||
@@ -38,11 +40,12 @@ namespace StructureHelperLogics.Services.NdmPrimitives
|
||||
var material = ndm.Material;
|
||||
var materialFunc = material.Diagram;
|
||||
var newMaterialFunc = (double strain) => strain * material.InitModulus;
|
||||
var existingPrestrain = ndm.PrestrainLogic.GetAll().Sum(x => x.PrestrainValue);
|
||||
var prestrainLogic = new GetNdmPrestrainLogic();
|
||||
var existingPrestrain = prestrainLogic.GetPrestrainValueAtCenter(ndm);
|
||||
var newPrestrain = materialFunc(existingPrestrain) / material.InitModulus;
|
||||
ndm.Material.Diagram = newMaterialFunc;
|
||||
ndm.PrestrainLogic.DeleteAll();
|
||||
ndm.PrestrainLogic.Add(PrestrainTypes.Prestrain, newPrestrain);
|
||||
ndm.PrestrainLogic.Add(PrestrainTypes.Prestrain, new StrainMatrix() { EpsZ = newPrestrain });
|
||||
}
|
||||
return ndms;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user