Tuple crack calculator was changed

This commit is contained in:
Evgeny Redikultsev
2024-05-10 20:27:57 +05:00
parent e75521dc20
commit 871355e07b
29 changed files with 745 additions and 148 deletions

View File

@@ -1,5 +1,7 @@
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Models;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,22 +13,30 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
public class AverageDiameterLogic : IAverageDiameterLogic
{
public IEnumerable<RebarNdm> Rebars { get; set; }
public IShiftTraceLogger? TraceLogger { get; set; }
public double GetAverageDiameter()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
Check();
var rebarArea = Rebars
.Sum(x => x.Area);
TraceLogger?.AddMessage($"Summary rebar area As = {rebarArea}");
var rebarCount = Rebars.Count();
TraceLogger?.AddMessage($"Rebar count n = {rebarCount}");
var averageArea = rebarArea / rebarCount;
TraceLogger?.AddMessage($"Average rebar area As = {averageArea}");
var diameter = Math.Sqrt(averageArea / Math.PI);
TraceLogger?.AddMessage($"Average rebar diameter ds = {diameter}");
return diameter;
}
private void Check()
{
if (!Rebars.Any())
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": rebars count must be greater then zero");
string errorString = ErrorStrings.DataIsInCorrect + $": rebars count must be greater then zero";
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
throw new StructureHelperException(errorString);
}
}
}

View File

@@ -1,4 +1,6 @@
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Loggers;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,9 +13,12 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
{
CrackWidthLogicInputDataSP63 inputData;
public ICrackWidthLogicInputData InputData {get;set;}
public IShiftTraceLogger? TraceLogger { get; set; }
public double GetCrackWidth()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
TraceLogger?.AddMessage("Method of crack width calculation based on SP 63.13330.2018");
CheckOptions();
//check if strain of concrete greater than strain of rebar
if (inputData.ConcreteStrain > inputData.RebarStrain) { return 0d; }
@@ -24,31 +29,42 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
private void CheckOptions()
{
string errorString = string.Empty;
if (InputData is not CrackWidthLogicInputDataSP63)
{
throw new StructureHelperException(ErrorStrings.ExpectedWas(typeof(CrackWidthLogicInputDataSP63), InputData.GetType()));
errorString = ErrorStrings.ExpectedWas(typeof(CrackWidthLogicInputDataSP63), InputData.GetType());
}
inputData = InputData as CrackWidthLogicInputDataSP63;
if (inputData.Length <=0d)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": length between cracks L={inputData.Length} must be greate than zero");
errorString = ErrorStrings.DataIsInCorrect + $": length between cracks L={inputData.Length} must be greate than zero";
}
if (inputData.TermFactor <= 0d)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Term factor {inputData.TermFactor} must be greate than zero");
errorString = ErrorStrings.DataIsInCorrect + $": Term factor {inputData.TermFactor} must be greate than zero";
}
if (inputData.BondFactor <= 0d)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Bond factor {inputData.BondFactor} must be greate than zero");
errorString = ErrorStrings.DataIsInCorrect + $": Bond factor {inputData.BondFactor} must be greate than zero";
}
if (inputData.StressStateFactor <= 0d)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Bond factor {inputData.StressStateFactor} must be greate than zero");
errorString = ErrorStrings.DataIsInCorrect + $": Bond factor {inputData.StressStateFactor} must be greate than zero";
}
if (inputData.PsiSFactor <= 0d)
{
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": PsiS factor {inputData.PsiSFactor} must be greate than zero");
errorString = ErrorStrings.DataIsInCorrect + $": PsiS factor {inputData.PsiSFactor} must be greate than zero";
}
if (errorString != string.Empty)
{
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
throw new StructureHelperException(errorString);
}
}
}
}

View File

@@ -0,0 +1,82 @@
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Loggers;
using StructureHelperLogics.Models.Primitives;
using StructureHelperLogics.NdmCalculations.Primitives;
using StructureHelperLogics.Services.NdmPrimitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Cracking
{
public class CrackedSectionTriangulationLogic : ICrackedSectionTriangulationLogic
{
const LimitStates limitState = LimitStates.SLS;
const CalcTerms shortTerm = CalcTerms.ShortTerm;
private ITriangulatePrimitiveLogic triangulateLogic;
private string ndmPrimitiveCountMessage;
public IEnumerable<INdmPrimitive> NdmPrimitives { get; private set; }
public IShiftTraceLogger? TraceLogger { get; set; }
public CrackedSectionTriangulationLogic(IEnumerable<INdmPrimitive> ndmPrimitives)
{
NdmPrimitives = ndmPrimitives;
ndmPrimitiveCountMessage = $"Source collection containes {NdmPrimitives.Count()} primitives";
triangulateLogic = new TriangulatePrimitiveLogic
{
Primitives = NdmPrimitives,
LimitState = limitState,
CalcTerm = shortTerm,
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
};
}
public List<INdm> GetNdmCollection()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
triangulateLogic = new TriangulatePrimitiveLogic()
{
LimitState = limitState,
CalcTerm = shortTerm,
Primitives = NdmPrimitives,
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
};
return triangulateLogic.GetNdms();
}
public List<INdm> GetCrackedNdmCollection()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
triangulateLogic = new TriangulatePrimitiveLogic(new MeshCrackedConcreteLogic())
{
LimitState = limitState,
CalcTerm = shortTerm,
Primitives = NdmPrimitives,
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
};
return triangulateLogic.GetNdms();
}
public List<RebarPrimitive> GetRebarPrimitives()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
TraceLogger?.AddMessage(ndmPrimitiveCountMessage, TraceLogStatuses.Debug);
List<RebarPrimitive> rebarPrimitives = new();
foreach (var item in NdmPrimitives)
{
if (item is RebarPrimitive rebar)
{
TraceLogger?.AddMessage($"Primitive {rebar.Name} is rebar primitive", TraceLogStatuses.Service);
rebarPrimitives.Add(rebar);
}
}
TraceLogger?.AddMessage($"Obtained {rebarPrimitives.Count} rebar primitives");
return rebarPrimitives;
}
}
}

View File

@@ -1,4 +1,5 @@
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,7 +8,7 @@ using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Cracking
{
public interface IAverageDiameterLogic
public interface IAverageDiameterLogic : ILogic
{
IEnumerable<RebarNdm> Rebars { get; set; }
double GetAverageDiameter();

View File

@@ -1,4 +1,5 @@
using System;
using StructureHelperCommon.Infrastructures.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -9,7 +10,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
/// <summary>
/// Logic for calculating width of crack
/// </summary>
public interface ICrackWidthLogic
public interface ICrackWidthLogic : ILogic
{
ICrackWidthLogicInputData InputData { get; set; }
/// <summary>

View File

@@ -0,0 +1,37 @@
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperLogics.NdmCalculations.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperLogics.NdmCalculations.Cracking
{
/// <summary>
/// Logic for obtaining of collection of nms elementary part for regular and fully cracked section
/// </summary>
public interface ICrackedSectionTriangulationLogic : ILogic
{
/// <summary>
/// Source collection of ndm primitives
/// </summary>
IEnumerable<INdmPrimitive> NdmPrimitives { get; }
/// <summary>
/// Returns collection of ndm elementary parts
/// </summary>
/// <returns></returns>
List<INdm> GetNdmCollection();
/// <summary>
/// Returns collection of ndm elementary parts where concrete doesn't work in tension
/// </summary>
/// <returns></returns>
List<INdm> GetCrackedNdmCollection();
/// <summary>
/// Return collection of primitives which contain only rebars
/// </summary>
/// <returns></returns>
List<RebarPrimitive> GetRebarPrimitives();
}
}

View File

@@ -1,5 +1,6 @@
using LoaderCalculator.Data.Matrix;
using LoaderCalculator.Data.Ndms;
using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Models.Forces;
using System;
using System.Collections.Generic;
@@ -12,7 +13,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
/// <summary>
/// Logic fo calculating of tensile area of RC crosssection
/// </summary>
public interface ITensileAreaLogic
public interface ITensileAreaLogic : ILogic
{
IEnumerable<INdm> NdmCollection { get; set; }
IStrainMatrix StrainMatrix { get; set; }

View File

@@ -1,6 +1,10 @@
using LoaderCalculator.Data.Matrix;
using LoaderCalculator.Data.Ndms;
using LoaderCalculator.Logics;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Loggers;
using StructureHelperLogics.Services;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,6 +22,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
readonly IAverageDiameterLogic diameterLogic;
readonly ITensileAreaLogic tensileAreaLogic;
IStressLogic stressLogic;
public IEnumerable<INdm> NdmCollection { get; set; }
public IStrainMatrix StrainMatrix { get; set; }
public IShiftTraceLogger? TraceLogger { get; set; }
@@ -26,6 +31,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
{
this.diameterLogic = diameterLogic;
this.tensileAreaLogic = tensileAreaLogic;
stressLogic = new StressLogic();
}
public LengthBetweenCracksLogicSP63() :
this
@@ -34,18 +40,43 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
{ }
public double GetLength()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
var rebars = NdmCollection
.Where(x => x is RebarNdm)
.Where(x => x is RebarNdm & stressLogic.GetTotalStrain(StrainMatrix, x) > 0d)
.Select(x => x as RebarNdm);
if (! rebars.Any())
{
string errorString = ErrorStrings.DataIsInCorrect + ": Collection of rebars does not contain any tensile rebars";
TraceLogger?.AddMessage(errorString, TraceLogStatuses.Error);
throw new StructureHelperException(errorString);
}
if (TraceLogger is not null)
{
TraceService.TraceNdmCollection(TraceLogger, rebars);
}
var rebarArea = rebars.Sum(x => x.Area * x.StressScale);
TraceLogger?.AddMessage($"Summary rebar area As = {rebarArea}");
diameterLogic.TraceLogger = TraceLogger?.GetSimilarTraceLogger(50);
diameterLogic.Rebars = rebars;
var rebarDiameter = diameterLogic.GetAverageDiameter();
TraceLogger?.AddMessage($"Average rebar diameter ds = {rebarDiameter}");
tensileAreaLogic.TraceLogger = TraceLogger?.GetSimilarTraceLogger(50);
tensileAreaLogic.NdmCollection = NdmCollection;
tensileAreaLogic.StrainMatrix = StrainMatrix;
var concreteArea = tensileAreaLogic.GetTensileArea();
TraceLogger?.AddMessage($"Concrete effective area Ac,eff = {concreteArea}(m^2)");
var length = concreteArea / rebarArea * rebarDiameter;
length = new List<double> { length, minDiameterFactor * rebarDiameter, minLength }.Max();
length = new List<double> { length, maxDiameterFactor * rebarDiameter, maxLength }.Min();
TraceLogger?.AddMessage($"Base length between cracks Lcrc = {concreteArea} / {rebarArea} * {rebarDiameter} = {length}(m)");
double minLengthByDiameter = minDiameterFactor * rebarDiameter;
TraceLogger?.AddMessage($"Minimum length by diameter Lcrc = {minDiameterFactor} * {rebarDiameter} = {minLengthByDiameter}(m)");
TraceLogger?.AddMessage($"Minimum length Lcrc = {minLength}");
length = new List<double> { length, minLengthByDiameter, minLength }.Max();
TraceLogger?.AddMessage($"Minimum length Lcrc = max({length}, {minLengthByDiameter}, {minLength}) = {length}(m)");
double maxLengthByDiameter = maxDiameterFactor * rebarDiameter;
TraceLogger?.AddMessage($"Maximum length by diameter Lcrc = {maxDiameterFactor} * {rebarDiameter} = {maxLengthByDiameter}(m)");
TraceLogger?.AddMessage($"Maximum length Lcrc = {maxLength}");
length = new List<double> { length, maxLengthByDiameter, maxLength }.Min();
TraceLogger?.AddMessage($"Maximun length Lcrc = min({length}, {maxLengthByDiameter}, {maxLength}) = {length}(m)");
return length;
}
}

View File

@@ -2,7 +2,9 @@
using LoaderCalculator.Data.Matrix;
using LoaderCalculator.Data.Ndms;
using LoaderCalculator.Logics;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Forces;
using StructureHelperCommon.Models.Loggers;
using StructureHelperCommon.Services.Forces;
using System;
using System.Collections.Generic;
@@ -16,29 +18,44 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
{
const double maxConcreteFactor = 0.5d;
const double minConcreteFactor = 0.1d;
const double minRebarFactor = 3d;
const double minRebarFactor = 9d;
private static IStressLogic stressLogic => new StressLogic();
public IEnumerable<INdm> NdmCollection { get; set; }
public IStrainMatrix StrainMatrix { get; set; }
public IShiftTraceLogger? TraceLogger { get; set; }
public double GetTensileArea()
{
TraceLogger?.AddMessage(LoggerStrings.CalculatorType(this), TraceLogStatuses.Service);
var rebarCollection = NdmCollection
.Where(x => x is RebarNdm);
.Where(x => x is RebarNdm & stressLogic.GetTotalStrain(StrainMatrix, x) > 0d);
var rebarArea = rebarCollection.
Sum(x => x.Area * x.StressScale);
TraceLogger?.AddMessage($"Summary rebar area As = {rebarArea}");
var concreteCollection = NdmCollection
.Where(x => x.Material is ConcreteMaterial);
var concreteArea = concreteCollection
.Sum(x => x.Area * x.StressScale);
TraceLogger?.AddMessage($"Concrete area Ac = {concreteArea}");
var concreteTensileArea = concreteCollection
.Where(x => stressLogic.GetTotalStrainWithPrestrain(StrainMatrix, x) > 0d)
.Sum(x => x.Area * x.StressScale);
concreteTensileArea = Math.Max(concreteTensileArea, rebarArea * minRebarFactor);
concreteTensileArea = Math.Max(concreteTensileArea, concreteArea * minConcreteFactor);
concreteTensileArea = Math.Min(concreteTensileArea, concreteArea * maxConcreteFactor);
TraceLogger?.AddMessage($"Concrete tensile area Ac,t = {concreteTensileArea}");
double areaByRebar = rebarArea * minRebarFactor;
TraceLogger?.AddMessage($"Concrete area is considered not less than {minRebarFactor} of area of rebars");
TraceLogger?.AddMessage($"Minimum concrete effective area from area of rebar Ac,eff = {rebarArea} * {minRebarFactor} = {areaByRebar}");
concreteTensileArea = Math.Max(concreteTensileArea, areaByRebar);
double areaByMinConcreteFactor = concreteArea * minConcreteFactor;
TraceLogger?.AddMessage($"Concrete area is considered not less than {minConcreteFactor} of area of rebars");
TraceLogger?.AddMessage($"Minimum concrete effective area Ac,eff = {concreteArea} * {minConcreteFactor} = {areaByMinConcreteFactor}");
concreteTensileArea = Math.Max(concreteTensileArea, areaByMinConcreteFactor);
double areaByMaxConcreteFactor = concreteArea * maxConcreteFactor;
TraceLogger?.AddMessage($"Concrete area is considered not greater than {maxConcreteFactor} of area of rebars");
TraceLogger?.AddMessage($"Maximum concrete effective area Ac,eff = {concreteArea} * {maxConcreteFactor} = {areaByMaxConcreteFactor}");
concreteTensileArea = Math.Min(concreteTensileArea, areaByMaxConcreteFactor);
TraceLogger?.AddMessage($"Concrete effective area Ac,eff = {concreteTensileArea}");
return concreteTensileArea;
}
}

View File

@@ -17,11 +17,13 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
private static readonly ILengthBetweenCracksLogic lengthLogic = new LengthBetweenCracksLogicSP63();
private TupleCrackResult result;
private IEnumerable<INdmPrimitive> ndmPrimitives;
private ICrackedSectionTriangulationLogic triangulationLogic;
private List<RebarPrimitive>? rebarPrimitives;
private IEnumerable<INdm> defaultNdm;
private IEnumerable<INdm> fulyCrackedNdm;
private IEnumerable<INdm> defaultNdms;
private IEnumerable<INdm> fulyCrackedNdms;
private CrackForceResult crackForceResult;
private StrainTuple strainTuple;
private StrainTuple longDefaultStrainTuple;
private StrainTuple shortDefaultStrainTuple;
private ITriangulatePrimitiveLogic triangulateLogic;
public string Name { get; set; }
@@ -37,6 +39,7 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
try
{
TraceLogger?.AddMessage($"Calculation of crack width by force combination");
ProcessCalculations();
TraceLogger?.AddMessage(LoggerStrings.CalculationHasDone);
@@ -46,7 +49,6 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
result.IsValid = false;
result.Description += ex;
TraceLogger?.AddMessage(LoggerStrings.CalculationError + ex, TraceLogStatuses.Error);
}
}
@@ -64,7 +66,10 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
{
CheckInputData();
Triangulate();
CalcStrainMatrix();
longDefaultStrainTuple = CalcStrainMatrix(InputData.LongTermTuple, defaultNdms);
shortDefaultStrainTuple = CalcStrainMatrix(InputData.LongTermTuple, defaultNdms);
var longLength = GetLengthBetweenCracks(longDefaultStrainTuple);
var shortLength = GetLengthBetweenCracks(shortDefaultStrainTuple);
CalcCrackForce();
var crackInputData = GetCrackInputData();
var calculator = new RebarCrackCalculator
@@ -77,63 +82,69 @@ namespace StructureHelperLogics.NdmCalculations.Cracking
crackInputData.RebarPrimitive = item;
calculator.Run();
var rebarResult = calculator.Result as RebarCrackResult;
//if (crackForceResult.IsSectionCracked == false)
//{
// rebarResult.CrackWidth = 0d;
//}
result.RebarResults.Add(rebarResult);
}
}
private void CalcStrainMatrix()
private StrainTuple CalcStrainMatrix(IForceTuple forceTuple, IEnumerable<INdm> ndms)
{
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = defaultNdm, Tuple = InputData.LongTermTuple};
IForceTupleCalculator calculator = new ForceTupleCalculator() { InputData = inputData };
IForceTupleInputData inputData = new ForceTupleInputData()
{
NdmCollection = ndms,
Tuple = forceTuple
};
IForceTupleCalculator calculator = new ForceTupleCalculator()
{
InputData = inputData,
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
};
calculator.Run();
var forceResult = calculator.Result as IForcesTupleResult;
strainTuple = TupleConverter.ConvertToStrainTuple(forceResult.LoaderResults.StrainMatrix);
var strain = TupleConverter.ConvertToStrainTuple(forceResult.LoaderResults.StrainMatrix);
return strain;
}
private RebarCrackInputData GetCrackInputData()
{
lengthLogic.NdmCollection = defaultNdm;
lengthLogic.StrainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
lengthLogic.NdmCollection = defaultNdms;
lengthLogic.StrainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(longDefaultStrainTuple);
var length = lengthLogic.GetLength();
var crackInputData = new RebarCrackInputData
{
PsiSFactor = crackForceResult.PsiS,
Length = length,
StrainTuple = strainTuple
StrainTuple = longDefaultStrainTuple
};
return crackInputData;
}
private double GetLengthBetweenCracks(StrainTuple strainTuple)
{
var logic = new LengthBetweenCracksLogicSP63()
{
NdmCollection = defaultNdms,
TraceLogger = TraceLogger
};
logic.StrainMatrix = TupleConverter.ConvertToLoaderStrainMatrix(strainTuple);
return logic.GetLength();
}
private void Triangulate()
{
ndmPrimitives = InputData.NdmPrimitives;
rebarPrimitives = new List<RebarPrimitive>();
foreach (var item in ndmPrimitives)
triangulationLogic = new CrackedSectionTriangulationLogic(InputData.NdmPrimitives)
{
if (item is RebarPrimitive)
{
rebarPrimitives.Add(item as RebarPrimitive);
}
}
triangulateLogic = new TriangulatePrimitiveLogic()
{
Primitives = ndmPrimitives,
LimitState = LimitStates.SLS,
CalcTerm = CalcTerms.ShortTerm,
TraceLogger = TraceLogger?.GetSimilarTraceLogger(50)
};
defaultNdm = triangulateLogic.GetNdms();
};
rebarPrimitives = triangulationLogic.GetRebarPrimitives();
defaultNdms = triangulationLogic.GetNdmCollection();
fulyCrackedNdms = triangulationLogic.GetCrackedNdmCollection();
}
private void CalcCrackForce()
{
var calculator = new CrackForceCalculator();
calculator.EndTuple = InputData.LongTermTuple;
calculator.NdmCollection = defaultNdm;
calculator.NdmCollection = defaultNdms;
calculator.Run();
crackForceResult = calculator.Result as CrackForceResult;
}