ConcreteBucklingCalculator was added
This commit is contained in:
Binary file not shown.
15
StructureHelperCommon/Infrastructures/Enums/Directions.cs
Normal file
15
StructureHelperCommon/Infrastructures/Enums/Directions.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Infrastructures.Enums
|
||||||
|
{
|
||||||
|
public enum Directions
|
||||||
|
{
|
||||||
|
X,
|
||||||
|
Y,
|
||||||
|
Z
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,5 +20,8 @@ namespace StructureHelperCommon.Infrastructures.Strings
|
|||||||
public static string FileCantBeSaved => "#0009: File can't be saved";
|
public static string FileCantBeSaved => "#0009: File can't be saved";
|
||||||
public static string VisualPropertyIsNotRight => "#0010: VisualPropertyIsNotRight";
|
public static string VisualPropertyIsNotRight => "#0010: VisualPropertyIsNotRight";
|
||||||
public static string FactorMustBeGraterThanZero => "#0011: Partial factor must not be less than zero";
|
public static string FactorMustBeGraterThanZero => "#0011: Partial factor must not be less than zero";
|
||||||
|
public static string LongitudinalForceMustBeLessThanZero => "#0012: Longitudinal force must be less than zero";
|
||||||
|
public static string LongitudinalForceMustBeLessThanCriticalForce => "#0013: Absolute value of longitudinal force must be greater than critical force";
|
||||||
|
public static string SizeMustBeGreaterThanZero => "#0014: Size must be greater than zero";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Infrastructures\Enums\CalcTerms.cs" />
|
<Compile Include="Infrastructures\Enums\CalcTerms.cs" />
|
||||||
<Compile Include="Infrastructures\Enums\CodeTypes.cs" />
|
<Compile Include="Infrastructures\Enums\CodeTypes.cs" />
|
||||||
|
<Compile Include="Infrastructures\Enums\Directions.cs" />
|
||||||
<Compile Include="Infrastructures\Enums\LimitStates.cs" />
|
<Compile Include="Infrastructures\Enums\LimitStates.cs" />
|
||||||
<Compile Include="Infrastructures\Enums\StressStates.cs" />
|
<Compile Include="Infrastructures\Enums\StressStates.cs" />
|
||||||
<Compile Include="Infrastructures\Enums\UnitTypes.cs" />
|
<Compile Include="Infrastructures\Enums\UnitTypes.cs" />
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ using StructureHelperCommon.Models.Shapes;
|
|||||||
using StructureHelperCommon.Services.Calculations;
|
using StructureHelperCommon.Services.Calculations;
|
||||||
using StructureHelperCommon.Services.Forces;
|
using StructureHelperCommon.Services.Forces;
|
||||||
using StructureHelperCommon.Services.Sections;
|
using StructureHelperCommon.Services.Sections;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Buckling;
|
||||||
using StructureHelperLogics.NdmCalculations.Primitives;
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
using StructureHelperLogics.Services.NdmPrimitives;
|
using StructureHelperLogics.Services.NdmPrimitives;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
@@ -27,7 +29,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
public List<INdmPrimitive> Primitives { get; }
|
public List<INdmPrimitive> Primitives { get; }
|
||||||
public INdmResult Result { get; private set; }
|
public INdmResult Result { get; private set; }
|
||||||
public ICompressedMember CompressedMember { get; }
|
public ICompressedMember CompressedMember { get; }
|
||||||
public IAccuracy Accuracy { get; }
|
public IAccuracy Accuracy { get; set; }
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
@@ -56,11 +58,42 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
if (combination.SetInGravityCenter == true)
|
if (combination.SetInGravityCenter == true)
|
||||||
{
|
{
|
||||||
var loaderPoint = LoaderCalculator.Logics.Geometry.GeometryOperations.GetGravityCenter(ndms);
|
var loaderPoint = LoaderCalculator.Logics.Geometry.GeometryOperations.GetGravityCenter(ndms);
|
||||||
point2D = new Point2D() { X = loaderPoint[0], Y = loaderPoint[1] };
|
point2D = new Point2D() { X = loaderPoint.CenterX, Y = loaderPoint.CenterY };
|
||||||
}
|
}
|
||||||
else point2D = combination.ForcePoint;
|
else point2D = combination.ForcePoint;
|
||||||
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
||||||
var result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
var result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
||||||
|
if (CompressedMember.Buckling == true)
|
||||||
|
{
|
||||||
|
IForceTuple longTuple;
|
||||||
|
if (calcTerm == CalcTerms.LongTerm)
|
||||||
|
{
|
||||||
|
longTuple = newTuple;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
longTuple = GetLongTuple(combination.DesignForces, limitState);
|
||||||
|
}
|
||||||
|
var bucklingCalculator = GetBucklingCalculator(CompressedMember, limitState, calcTerm, newTuple, longTuple);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
bucklingCalculator.Run();
|
||||||
|
var bucklingResult = bucklingCalculator.Result as IConcreteBucklingResult;
|
||||||
|
if (bucklingResult.IsValid != true)
|
||||||
|
{
|
||||||
|
result.IsValid = false;
|
||||||
|
result.Desctription += $"Buckling result:\n{bucklingResult.Desctription}\n";
|
||||||
|
}
|
||||||
|
newTuple = CalculateBuckling(newTuple, bucklingResult);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.IsValid = false;
|
||||||
|
result.Desctription = $"Buckling error:\n{ex}\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
result.DesignForceTuple.LimitState = limitState;
|
result.DesignForceTuple.LimitState = limitState;
|
||||||
result.DesignForceTuple.CalcTerm = calcTerm;
|
result.DesignForceTuple.CalcTerm = calcTerm;
|
||||||
result.DesignForceTuple.ForceTuple = newTuple;
|
result.DesignForceTuple.ForceTuple = newTuple;
|
||||||
@@ -71,6 +104,42 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
Result = ndmResult;
|
Result = ndmResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IForceTuple GetLongTuple(List<IDesignForceTuple> designForces, LimitStates limitState)
|
||||||
|
{
|
||||||
|
IForceTuple longTuple;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
longTuple = designForces.Where(x => x.LimitState == limitState & x.CalcTerm == CalcTerms.LongTerm).First().ForceTuple;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
longTuple = new ForceTuple();
|
||||||
|
}
|
||||||
|
return longTuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IConcreteBucklingCalculator GetBucklingCalculator(ICompressedMember compressedMember, LimitStates limitStates, CalcTerms calcTerms, IForceTuple calcTuple, IForceTuple longTuple)
|
||||||
|
{
|
||||||
|
IConcreteBucklingOptions options = new ConcreteBucklingOptions()
|
||||||
|
{ CompressedMember = compressedMember,
|
||||||
|
LimitState = limitStates,
|
||||||
|
CalcTerm = calcTerms,
|
||||||
|
CalcForceTuple = calcTuple,
|
||||||
|
LongTermTuple = longTuple,
|
||||||
|
Primitives = Primitives };
|
||||||
|
IConcreteBucklingCalculator bucklingCalculator = new ConcreteBucklingCalculator(options, Accuracy);
|
||||||
|
return bucklingCalculator;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IForceTuple CalculateBuckling(IForceTuple calcTuple, IConcreteBucklingResult bucklingResult)
|
||||||
|
{
|
||||||
|
var newTuple = calcTuple.Clone() as IForceTuple;
|
||||||
|
newTuple.Mx *= bucklingResult.EtaFactorAlongY;
|
||||||
|
newTuple.My *= bucklingResult.EtaFactorAlongX;
|
||||||
|
return newTuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private string CheckInputData()
|
private string CheckInputData()
|
||||||
{
|
{
|
||||||
string result = "";
|
string result = "";
|
||||||
@@ -85,51 +154,18 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
{
|
{
|
||||||
ForceCombinationLists = new List<IForceCombinationList>();
|
ForceCombinationLists = new List<IForceCombinationList>();
|
||||||
Primitives = new List<INdmPrimitive>();
|
Primitives = new List<INdmPrimitive>();
|
||||||
CompressedMember = new CompressedMember();
|
CompressedMember = new CompressedMember() { Buckling = false };
|
||||||
Accuracy = new Accuracy() { IterationAccuracy = 0.001d, MaxIterationCount = 1000 };
|
Accuracy = new Accuracy() { IterationAccuracy = 0.001d, MaxIterationCount = 1000 };
|
||||||
LimitStatesList = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
LimitStatesList = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||||
CalcTermsList = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
CalcTermsList = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||||
}
|
}
|
||||||
|
|
||||||
private ForcesResult GetPrimitiveStrainMatrix(IEnumerable<INdm> ndmCollection, IForceTuple tuple)
|
private IForcesTupleResult GetPrimitiveStrainMatrix(IEnumerable<INdm> ndmCollection, IForceTuple tuple)
|
||||||
{
|
{
|
||||||
var mx = tuple.Mx;
|
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = tuple, Accuracy = Accuracy };
|
||||||
var my = tuple.My;
|
IForceTupleCalculator calculator = new ForceTupleCalculator(inputData);
|
||||||
var nz = tuple.Nz;
|
calculator.Run();
|
||||||
|
return calculator.Result as IForcesTupleResult;
|
||||||
try
|
|
||||||
{
|
|
||||||
var loaderData = new LoaderOptions
|
|
||||||
{
|
|
||||||
Preconditions = new Preconditions
|
|
||||||
{
|
|
||||||
ConditionRate = Accuracy.IterationAccuracy,
|
|
||||||
MaxIterationCount = Accuracy.MaxIterationCount,
|
|
||||||
StartForceMatrix = new ForceMatrix { Mx = mx, My = my, Nz = nz }
|
|
||||||
},
|
|
||||||
NdmCollection = ndmCollection
|
|
||||||
};
|
|
||||||
var calculator = new Calculator();
|
|
||||||
calculator.Run(loaderData, new CancellationToken());
|
|
||||||
var calcResult = calculator.Result;
|
|
||||||
if (calcResult.AccuracyRate <= Accuracy.IterationAccuracy)
|
|
||||||
{
|
|
||||||
return new ForcesResult() { IsValid = true, Desctription = "Analysis is done succsefully", LoaderResults = calcResult };
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new ForcesResult() { IsValid = false, Desctription = "Required accuracy rate has not achived", LoaderResults = calcResult };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
var result = new ForcesResult() { IsValid = false };
|
|
||||||
if (ex.Message == "Calculation result is not valid: stiffness matrix is equal to zero") { result.Desctription = "Stiffness matrix is equal to zero \nProbably section was collapsed"; }
|
|
||||||
else { result.Desctription = $"Error is appeared due to analysis. Error: {ex}"; }
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
using LoaderCalculator.Data.Matrix;
|
||||||
|
using LoaderCalculator.Data.SourceData;
|
||||||
|
using LoaderCalculator;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
|
{
|
||||||
|
public class ForceTupleCalculator : IForceTupleCalculator
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public INdmResult Result { get; private set; }
|
||||||
|
|
||||||
|
private IForceTupleInputData inputData;
|
||||||
|
|
||||||
|
public ForceTupleCalculator(IForceTupleInputData inputData)
|
||||||
|
{
|
||||||
|
this.inputData = inputData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
Result = CalculateResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
private IForcesTupleResult CalculateResult()
|
||||||
|
{
|
||||||
|
var ndmCollection = inputData.NdmCollection;
|
||||||
|
var tuple = inputData.Tuple;
|
||||||
|
var accuracy = inputData.Accuracy;
|
||||||
|
|
||||||
|
|
||||||
|
var mx = tuple.Mx;
|
||||||
|
var my = tuple.My;
|
||||||
|
var nz = tuple.Nz;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var loaderData = new LoaderOptions
|
||||||
|
{
|
||||||
|
Preconditions = new Preconditions
|
||||||
|
{
|
||||||
|
ConditionRate = accuracy.IterationAccuracy,
|
||||||
|
MaxIterationCount = accuracy.MaxIterationCount,
|
||||||
|
StartForceMatrix = new ForceMatrix { Mx = mx, My = my, Nz = nz }
|
||||||
|
},
|
||||||
|
NdmCollection = ndmCollection
|
||||||
|
};
|
||||||
|
var calculator = new Calculator();
|
||||||
|
calculator.Run(loaderData, new CancellationToken());
|
||||||
|
var calcResult = calculator.Result;
|
||||||
|
if (calcResult.AccuracyRate <= accuracy.IterationAccuracy)
|
||||||
|
{
|
||||||
|
return new ForcesTupleResult() { IsValid = true, Desctription = "Analysis is done succsefully", LoaderResults = calcResult };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ForcesTupleResult() { IsValid = false, Desctription = "Required accuracy rate has not achived", LoaderResults = calcResult };
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
var result = new ForcesTupleResult() { IsValid = false };
|
||||||
|
if (ex.Message == "Calculation result is not valid: stiffness matrix is equal to zero") { result.Desctription = "Stiffness matrix is equal to zero \nProbably section was collapsed"; }
|
||||||
|
else { result.Desctription = $"Error is appeared due to analysis. Error: {ex}"; }
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
|
{
|
||||||
|
public class ForceTupleInputData : IForceTupleInputData
|
||||||
|
{
|
||||||
|
public IEnumerable<INdm> NdmCollection { get; set; }
|
||||||
|
public IForceTuple Tuple { get; set; }
|
||||||
|
public IAccuracy Accuracy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,12 +9,12 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
public class ForcesResults : IForcesResults
|
public class ForcesResults : IForcesResults
|
||||||
{
|
{
|
||||||
public bool IsValid { get; set; }
|
public bool IsValid { get; set; }
|
||||||
public List<ForcesResult> ForcesResultList { get; }
|
public List<IForcesTupleResult> ForcesResultList { get; }
|
||||||
public string Desctription { get; set; }
|
public string Desctription { get; set; }
|
||||||
|
|
||||||
public ForcesResults()
|
public ForcesResults()
|
||||||
{
|
{
|
||||||
ForcesResultList = new List<ForcesResult>();
|
ForcesResultList = new List<IForcesTupleResult>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
{
|
{
|
||||||
public class ForcesResult : INdmResult
|
public class ForcesTupleResult : IForcesTupleResult
|
||||||
{
|
{
|
||||||
public bool IsValid { get; set; }
|
public bool IsValid { get; set; }
|
||||||
public IDesignForceTuple DesignForceTuple { get; set; }
|
public IDesignForceTuple DesignForceTuple { get; set; }
|
||||||
@@ -22,7 +22,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ILoaderResults LoaderResults { get; set; }
|
public ILoaderResults LoaderResults { get; set; }
|
||||||
|
|
||||||
public ForcesResult()
|
public ForcesTupleResult()
|
||||||
{
|
{
|
||||||
DesignForceTuple = new DesignForceTuple();
|
DesignForceTuple = new DesignForceTuple();
|
||||||
}
|
}
|
||||||
@@ -14,6 +14,6 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
List<CalcTerms> CalcTermsList { get; }
|
List<CalcTerms> CalcTermsList { get; }
|
||||||
List<LimitStates> LimitStatesList { get; }
|
List<LimitStates> LimitStatesList { get; }
|
||||||
ICompressedMember CompressedMember { get; }
|
ICompressedMember CompressedMember { get; }
|
||||||
IAccuracy Accuracy { get; }
|
IAccuracy Accuracy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
|
{
|
||||||
|
public interface IForceTupleCalculator : INdmCalculator
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
|
{
|
||||||
|
public interface IForceTupleInputData
|
||||||
|
{
|
||||||
|
IEnumerable<INdm> NdmCollection { get; set; }
|
||||||
|
IForceTuple Tuple { get; set; }
|
||||||
|
IAccuracy Accuracy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
public interface IForcesResults : INdmResult
|
public interface IForcesResults : INdmResult
|
||||||
{
|
{
|
||||||
string Desctription { get; set; }
|
string Desctription { get; set; }
|
||||||
List<ForcesResult> ForcesResultList { get; }
|
List<IForcesTupleResult> ForcesResultList { get; }
|
||||||
bool IsValid { get; set; }
|
bool IsValid { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using LoaderCalculator.Data.ResultData;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
||||||
|
{
|
||||||
|
public interface IForcesTupleResult : INdmResult
|
||||||
|
{
|
||||||
|
IDesignForceTuple DesignForceTuple { get; set; }
|
||||||
|
ILoaderResults LoaderResults { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
using LoaderCalculator.Data.Materials.MaterialBuilders;
|
||||||
|
using LoaderCalculator.Data.Ndms;
|
||||||
|
using LoaderCalculator.Logics;
|
||||||
|
using LoaderCalculator.Logics.Geometry;
|
||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||||
|
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.Buckling
|
||||||
|
{
|
||||||
|
public class ConcreteBucklingCalculator : IConcreteBucklingCalculator
|
||||||
|
{
|
||||||
|
private IConcreteBucklingOptions options;
|
||||||
|
private IEilerCriticalForceLogic criticalForceLogic;
|
||||||
|
private IRCStiffnessLogic stiffnessLogicX, stiffnessLogicY;
|
||||||
|
private List<INdm> ndmCollection;
|
||||||
|
private List<INdm> concreteNdms;
|
||||||
|
private List<INdm> otherNdms;
|
||||||
|
IForcesTupleResult forcesResults;
|
||||||
|
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public INdmResult Result { get; private set; }
|
||||||
|
|
||||||
|
public IAccuracy Accuracy { get; set; }
|
||||||
|
|
||||||
|
private (double EtaAlongX, double EtaAlongY) GetBucklingCoefficients()
|
||||||
|
{
|
||||||
|
var stiffness = GetStiffness();
|
||||||
|
criticalForceLogic.LongForce = options.CalcForceTuple.Nz;
|
||||||
|
criticalForceLogic.StiffnessEI = stiffness.DX;
|
||||||
|
criticalForceLogic.DesignLength = options.CompressedMember.GeometryLength * options.CompressedMember.LengthFactorY;
|
||||||
|
var etaAlongY = criticalForceLogic.GetEtaFactor();
|
||||||
|
criticalForceLogic.StiffnessEI = stiffness.DY;
|
||||||
|
criticalForceLogic.DesignLength = options.CompressedMember.GeometryLength * options.CompressedMember.LengthFactorX;
|
||||||
|
var etaAlongX = criticalForceLogic.GetEtaFactor();
|
||||||
|
return (etaAlongX, etaAlongY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConcreteBucklingCalculator(IConcreteBucklingOptions options, IAccuracy accuracy)
|
||||||
|
{
|
||||||
|
this.options = options;
|
||||||
|
Accuracy = accuracy;
|
||||||
|
|
||||||
|
var allPrimitives = options.Primitives;
|
||||||
|
var concretePrimitives = GetConcretePrimitives();
|
||||||
|
var otherPrimitives = allPrimitives.Except(concretePrimitives);
|
||||||
|
ndmCollection = NdmPrimitivesService.GetNdms(allPrimitives, options.LimitState, options.CalcTerm);
|
||||||
|
concreteNdms = NdmPrimitivesService.GetNdms(concretePrimitives, options.LimitState, options.CalcTerm);
|
||||||
|
otherNdms = NdmPrimitivesService.GetNdms(otherPrimitives, options.LimitState, options.CalcTerm);
|
||||||
|
}
|
||||||
|
|
||||||
|
private (IConcreteDeltaELogic DeltaLogicX, IConcreteDeltaELogic DeltaLogicY) GetDeltaLogics()
|
||||||
|
{
|
||||||
|
IForceTuple forceTuple = options.CalcForceTuple;
|
||||||
|
if (forceTuple.Nz >= 0) { return (new ConstDeltaELogic(), new ConstDeltaELogic()); }
|
||||||
|
var eccentricityAlongX = options.CalcForceTuple.My / forceTuple.Nz;
|
||||||
|
var eccentricityAlongY = options.CalcForceTuple.Mx / forceTuple.Nz;
|
||||||
|
var sizeAlongX = ndmCollection.Max(x => x.CenterX) - ndmCollection.Min(x => x.CenterX);
|
||||||
|
var sizeAlongY = ndmCollection.Max(x => x.CenterY) - ndmCollection.Min(x => x.CenterY);
|
||||||
|
var DeltaElogicAboutX = new DeltaELogicSP63(eccentricityAlongY, sizeAlongY);
|
||||||
|
var DeltaElogicAboutY = new DeltaELogicSP63(eccentricityAlongX, sizeAlongX);
|
||||||
|
return (DeltaElogicAboutX, DeltaElogicAboutY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<INdmPrimitive> GetConcretePrimitives()
|
||||||
|
{
|
||||||
|
var primitives = options.Primitives.Where(x => x.HeadMaterial.HelperMaterial is IConcreteLibMaterial);
|
||||||
|
return primitives;
|
||||||
|
}
|
||||||
|
|
||||||
|
private (double DX, double DY) GetStiffness()
|
||||||
|
{
|
||||||
|
var gravityCenter = GeometryOperations.GetGravityCenter(ndmCollection);
|
||||||
|
|
||||||
|
var concreteInertia = GeometryOperations.GetMomentsOfInertiaMod(concreteNdms, gravityCenter);
|
||||||
|
var otherInertia = GeometryOperations.GetMomentsOfInertiaMod(otherNdms, gravityCenter);
|
||||||
|
|
||||||
|
var stiffnessX = stiffnessLogicX.GetStiffnessCoeffitients();
|
||||||
|
var dX = stiffnessX.Kc * concreteInertia.MomentX + stiffnessX.Ks * otherInertia.MomentX;
|
||||||
|
|
||||||
|
var stiffnessY = stiffnessLogicY.GetStiffnessCoeffitients();
|
||||||
|
var dY = stiffnessY.Kc * concreteInertia.MomentY + stiffnessY.Ks * otherInertia.MomentY;
|
||||||
|
|
||||||
|
return (dX, dY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private IConcretePhiLLogic GetPhiLogic()
|
||||||
|
{
|
||||||
|
IPoint2D point = GetMostTensionedPoint();
|
||||||
|
var phiLogic = new PhiLogicSP63(options.CalcForceTuple, options.LongTermTuple, point);
|
||||||
|
return phiLogic;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IPoint2D GetMostTensionedPoint()
|
||||||
|
{
|
||||||
|
var strains = forcesResults.LoaderResults.StrainMatrix;
|
||||||
|
double maxStrain = double.NegativeInfinity;
|
||||||
|
IPoint2D point = new Point2D();
|
||||||
|
var stressLogic = new StressLogic();
|
||||||
|
foreach (var item in ndmCollection)
|
||||||
|
{
|
||||||
|
var strain = stressLogic.GetTotalStrain(strains, item);
|
||||||
|
if (strain > maxStrain)
|
||||||
|
{
|
||||||
|
maxStrain = strain;
|
||||||
|
point = new Point2D() { X = item.CenterX, Y = item.CenterY };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return point;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IForceTupleCalculator GetForceCalculator()
|
||||||
|
{
|
||||||
|
var tuple = options.CalcForceTuple;
|
||||||
|
IForceTupleInputData inputData = new ForceTupleInputData() { NdmCollection = ndmCollection, Tuple = tuple, Accuracy = Accuracy };
|
||||||
|
IForceTupleCalculator calculator = new ForceTupleCalculator(inputData);
|
||||||
|
return calculator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Run()
|
||||||
|
{
|
||||||
|
var checkResult = CheckInputData();
|
||||||
|
if (checkResult != "")
|
||||||
|
{
|
||||||
|
Result = new ConcreteBucklingResult() { IsValid = false, Desctription = checkResult };
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IConcretePhiLLogic phiLLogic = GetPhiLogic();
|
||||||
|
var (DeltaLogicAboutX, DeltaLogicAboutY) = GetDeltaLogics();
|
||||||
|
stiffnessLogicX = new RCStiffnessLogicSP63(phiLLogic, DeltaLogicAboutX);
|
||||||
|
stiffnessLogicY = new RCStiffnessLogicSP63(phiLLogic, DeltaLogicAboutY);
|
||||||
|
criticalForceLogic = new EilerCriticalForceLogic();
|
||||||
|
|
||||||
|
var (EtaFactorX, EtaFactorY) = GetBucklingCoefficients();
|
||||||
|
Result = new ConcreteBucklingResult()
|
||||||
|
{
|
||||||
|
IsValid = true,
|
||||||
|
EtaFactorAlongX = EtaFactorX,
|
||||||
|
EtaFactorAlongY = EtaFactorY
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string CheckInputData()
|
||||||
|
{
|
||||||
|
string result = "";
|
||||||
|
IForceTupleCalculator calculator = GetForceCalculator();
|
||||||
|
calculator.Run();
|
||||||
|
forcesResults = calculator.Result as IForcesTupleResult;
|
||||||
|
if (forcesResults.IsValid != true)
|
||||||
|
{
|
||||||
|
result += "Bearind capacity of crosssection is not enough for initial forces\n";
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Sections;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
internal class ConcreteBucklingOptions : IConcreteBucklingOptions
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public IForceTuple LongTermTuple { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public ICompressedMember CompressedMember { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public LimitStates LimitState { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public CalcTerms CalcTerm { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public IEnumerable<INdmPrimitive> Primitives { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public IForceTuple CalcForceTuple { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public class ConcreteBucklingResult : IConcreteBucklingResult
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsValid { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public string Desctription { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double EtaFactorAlongX { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double EtaFactorAlongY { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public class ConstDeltaELogic : IConcreteDeltaELogic
|
||||||
|
{
|
||||||
|
public double GetDeltaE()
|
||||||
|
{
|
||||||
|
return 1.5d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal class ConstPhiLLogic : IConcretePhiLLogic
|
||||||
|
{
|
||||||
|
public double GetPhil()
|
||||||
|
{
|
||||||
|
return 2.0d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal class CriticalForceSP63Logic : ICriticalBucklingForceLogic
|
||||||
|
{
|
||||||
|
double concreteFactor, reinforcementFactor;
|
||||||
|
|
||||||
|
public double GetCriticalForce()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public double GetEtaFactor()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
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 StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public class DeltaELogicSP63 : IConcreteDeltaELogic
|
||||||
|
{
|
||||||
|
const double deltaEMin = 0.15d;
|
||||||
|
const double deltaEMax = 1.5d;
|
||||||
|
|
||||||
|
readonly double eccentricity;
|
||||||
|
readonly double size;
|
||||||
|
public DeltaELogicSP63(double eccentricity, double size)
|
||||||
|
{
|
||||||
|
if (size <= 0 )
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.SizeMustBeGreaterThanZero + $", actual size: {size}");
|
||||||
|
}
|
||||||
|
this.eccentricity = eccentricity;
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double GetDeltaE()
|
||||||
|
{
|
||||||
|
var deltaE = Math.Abs(eccentricity) / size;
|
||||||
|
deltaE = Math.Max(deltaE, deltaEMin);
|
||||||
|
deltaE = Math.Min(deltaE, deltaEMax);
|
||||||
|
return deltaE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
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 StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal class EilerCriticalForceLogic : IEilerCriticalForceLogic
|
||||||
|
{
|
||||||
|
public double LongForce { get; set; }
|
||||||
|
public double StiffnessEI { get; set; }
|
||||||
|
public double DesignLength { get; set; }
|
||||||
|
|
||||||
|
public double GetCriticalForce()
|
||||||
|
{
|
||||||
|
double Ncr = - Math.Pow(Math.PI, 2) * StiffnessEI / (Math.Pow(DesignLength, 2));
|
||||||
|
return Ncr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double GetEtaFactor()
|
||||||
|
{
|
||||||
|
if (LongForce >= 0d) return 1d;
|
||||||
|
var Ncr = GetCriticalForce();
|
||||||
|
if (LongForce <= Ncr)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.LongitudinalForceMustBeLessThanCriticalForce);
|
||||||
|
}
|
||||||
|
double eta = 1 / (1 - LongForce / Ncr);
|
||||||
|
return eta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Sections;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public interface IBucklingOptions
|
||||||
|
{
|
||||||
|
ICompressedMember CompressedMember { get; }
|
||||||
|
LimitStates LimitState { get; }
|
||||||
|
CalcTerms CalcTerm { get; }
|
||||||
|
IEnumerable<INdmPrimitive> Primitives { get; }
|
||||||
|
IForceTuple CalcForceTuple { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal interface IConcreteBucklingCalculator : INdmCalculator
|
||||||
|
{
|
||||||
|
IAccuracy Accuracy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using StructureHelperCommon.Models.Calculators;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public interface IConcreteBucklingOptions : IBucklingOptions
|
||||||
|
{
|
||||||
|
IForceTuple LongTermTuple { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using StructureHelperLogics.NdmCalculations.Analyses;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Results of calculation of buckling of reinforced concrete section
|
||||||
|
/// </summary>
|
||||||
|
public interface IConcreteBucklingResult : INdmResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Factor of increasing of bending moment (p-delta effect) in the plain XOZ
|
||||||
|
/// </summary>
|
||||||
|
double EtaFactorAlongX { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Factor of increasing of bending moment (p-delta effect) in the plain YOZ
|
||||||
|
/// </summary>
|
||||||
|
double EtaFactorAlongY { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal interface IConcreteDeltaELogic
|
||||||
|
{
|
||||||
|
double GetDeltaE();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public interface IConcretePhiLLogic
|
||||||
|
{
|
||||||
|
double GetPhil();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal interface ICriticalBucklingForceLogic
|
||||||
|
{
|
||||||
|
double GetCriticalForce();
|
||||||
|
double GetEtaFactor();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal interface IEilerCriticalForceLogic : ICriticalBucklingForceLogic
|
||||||
|
{
|
||||||
|
double LongForce { get; set; }
|
||||||
|
double StiffnessEI { get; set; }
|
||||||
|
double DesignLength { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using StructureHelperLogics.NdmCalculations.Primitives;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public interface IRCStiffnessLogic
|
||||||
|
{
|
||||||
|
(double Kc, double Ks) GetStiffnessCoeffitients();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
public class PhiLogicSP63 : IConcretePhiLLogic
|
||||||
|
{
|
||||||
|
readonly IForceTuple fullForceTuple;
|
||||||
|
readonly IForceTuple longForceTuple;
|
||||||
|
readonly IPoint2D point;
|
||||||
|
public PhiLogicSP63(IForceTuple fullForceTuple, IForceTuple longForceTuple, IPoint2D point)
|
||||||
|
{
|
||||||
|
this.fullForceTuple = fullForceTuple;
|
||||||
|
this.longForceTuple = longForceTuple;
|
||||||
|
this.point = point;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double GetPhil()
|
||||||
|
{
|
||||||
|
var distance = Math.Sqrt(point.X * point.X + point.Y * point.Y);
|
||||||
|
var fullMoment = GetMoment(fullForceTuple, distance);
|
||||||
|
var longMoment = GetMoment(longForceTuple, distance);
|
||||||
|
if (fullMoment == 0d) { return 2d; }
|
||||||
|
var phi = 1 + longMoment / fullMoment;
|
||||||
|
phi = Math.Max(1, phi);
|
||||||
|
phi = Math.Min(2, phi);
|
||||||
|
return phi;
|
||||||
|
}
|
||||||
|
|
||||||
|
private double GetMoment(IForceTuple forceTuple, double distance)
|
||||||
|
{
|
||||||
|
return Math.Abs(forceTuple.Nz) * distance + Math.Abs(forceTuple.Mx) + Math.Abs(forceTuple.My);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.NdmCalculations.Buckling
|
||||||
|
{
|
||||||
|
internal class RCStiffnessLogicSP63 : IRCStiffnessLogic
|
||||||
|
{
|
||||||
|
IConcretePhiLLogic phiLLogic { get; }
|
||||||
|
IConcreteDeltaELogic deltaELogic { get; }
|
||||||
|
|
||||||
|
public RCStiffnessLogicSP63() : this(new ConstPhiLLogic(), new ConstDeltaELogic()) { }
|
||||||
|
|
||||||
|
public RCStiffnessLogicSP63(IConcretePhiLLogic phiLLogic, IConcreteDeltaELogic deltaELogic)
|
||||||
|
{
|
||||||
|
this.phiLLogic = phiLLogic;
|
||||||
|
this.deltaELogic = deltaELogic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public (double Kc, double Ks) GetStiffnessCoeffitients()
|
||||||
|
{
|
||||||
|
const double initialKs = 0.7d;
|
||||||
|
const double initialKc = 0.15d;
|
||||||
|
const double deltaEAddition = 0.3d;
|
||||||
|
double phiL = phiLLogic.GetPhil();
|
||||||
|
double deltaE = deltaELogic.GetDeltaE();
|
||||||
|
double kc = initialKc / (phiL * (deltaEAddition + deltaE));
|
||||||
|
return (kc, initialKs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Models.Forces;
|
||||||
using StructureHelperCommon.Services.Forces;
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
using StructureHelperCommon.Services.Sections;
|
||||||
using StructureHelperLogics.Models.Primitives;
|
using StructureHelperLogics.Models.Primitives;
|
||||||
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||||
using System;
|
using System;
|
||||||
@@ -19,8 +20,8 @@ namespace StructureHelperLogics.Services.NdmCalculations
|
|||||||
calculator.LimitStatesList.Add(finishDesignForce.LimitState);
|
calculator.LimitStatesList.Add(finishDesignForce.LimitState);
|
||||||
calculator.CalcTermsList.Clear();
|
calculator.CalcTermsList.Clear();
|
||||||
calculator.CalcTermsList.Add(finishDesignForce.CalcTerm);
|
calculator.CalcTermsList.Add(finishDesignForce.CalcTerm);
|
||||||
calculator.Accuracy.IterationAccuracy = source.Accuracy.IterationAccuracy;
|
CompressedMemberServices.CopyProperties(source.CompressedMember, calculator.CompressedMember);
|
||||||
calculator.Accuracy.MaxIterationCount = source.Accuracy.MaxIterationCount;
|
calculator.Accuracy = source.Accuracy;
|
||||||
calculator.Primitives.AddRange(source.Primitives);
|
calculator.Primitives.AddRange(source.Primitives);
|
||||||
calculator.ForceCombinationLists.Clear();
|
calculator.ForceCombinationLists.Clear();
|
||||||
var combination = new ForceCombinationList()
|
var combination = new ForceCombinationList()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using LoaderCalculator.Tests.Infrastructures.Logics;
|
using LoaderCalculator.Tests.Infrastructures.Logics;
|
||||||
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using StructureHelperLogics.Models.Templates.CrossSections.RCs;
|
using StructureHelperLogics.Models.Templates.CrossSections.RCs;
|
||||||
using StructureHelperLogics.Models.Templates.RCs;
|
using StructureHelperLogics.Models.Templates.RCs;
|
||||||
@@ -8,15 +9,19 @@ namespace StructureHelperTests.FunctionalTests.Ndms.Calculators.ForceCalculatorT
|
|||||||
{
|
{
|
||||||
public class RCSectionsTest
|
public class RCSectionsTest
|
||||||
{
|
{
|
||||||
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 2, 2, -0.00062544561815463693d, -0.0029292919541166911d, 0.00035383082501577246d)]
|
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 2, 2, false, -0.00062544561815463693d, -0.0029292919541166911d, 0.00035383082501577246d)]
|
||||||
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 3, 2, -0.00046762265275279838d, -0.0025101896869558888d, 0.00027185795017719519d)]
|
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 3, 2, false, -0.00046762265275279838d, -0.0025101896869558888d, 0.00027185795017719519d)]
|
||||||
[TestCase(0.5d, 0.5d, 0.025d, 0.025d, 3, 3, -0.00080914991212906239d, -0.00080914991212906184d, 0.00011900072665826425d)]
|
[TestCase(0.5d, 0.5d, 0.025d, 0.025d, 3, 3, false, -0.00080914991212906239d, -0.00080914991212906184d, 0.00011900072665826425d)]
|
||||||
public void Run_SouldPass(double width, double height, double topDiametr, double bottomDiametr, int widthCount, int heightCount, double expectedKx, double expectedKy, double expectedEpsZ)
|
[TestCase(0.5d, 0.5d, 0.025d, 0.025d, 3, 3, true, -0.0008126213321004612d, -0.00081262133210046055d, 0.00011963568117586145d)]
|
||||||
|
[TestCase(0.5d, 0.6d, 0.025d, 0.025d, 3, 3, true, -0.00047720148631058529d, -0.00077269031816753532d, 0.00010610472872420363d)]
|
||||||
|
[TestCase(0.6d, 0.5d, 0.025d, 0.025d, 3, 3, true, -0.00077269031816753478d, -0.00047720148631058437d, 0.00010610472872420363d)]
|
||||||
|
public void Run_ShouldPass(double width, double height, double topDiametr, double bottomDiametr, int widthCount, int heightCount, bool isBuckling, double expectedKx, double expectedKy, double expectedEpsZ)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var template = new RectangleBeamTemplate(width, height) { TopDiameter = topDiametr, BottomDiameter = bottomDiametr, WidthCount = widthCount, HeightCount = heightCount};
|
var template = new RectangleBeamTemplate(width, height) { TopDiameter = topDiametr, BottomDiameter = bottomDiametr, WidthCount = widthCount, HeightCount = heightCount};
|
||||||
var newSection = new SectionTemplate(new RectGeometryLogic(template)).GetCrossSection();
|
var newSection = new SectionTemplate(new RectGeometryLogic(template)).GetCrossSection();
|
||||||
var calculator = newSection.SectionRepository.CalculatorsList[0];
|
var calculator = newSection.SectionRepository.CalculatorsList[0] as IForceCalculator;
|
||||||
|
calculator.CompressedMember.Buckling = isBuckling;
|
||||||
//Act
|
//Act
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var result = calculator.Result as IForcesResults;
|
var result = calculator.Result as IForcesResults;
|
||||||
@@ -32,15 +37,16 @@ namespace StructureHelperTests.FunctionalTests.Ndms.Calculators.ForceCalculatorT
|
|||||||
Assert.AreEqual(expectedEpsZ, epsz, ExpectedProcessor.GetAccuracyForExpectedValue(expectedEpsZ));
|
Assert.AreEqual(expectedEpsZ, epsz, ExpectedProcessor.GetAccuracyForExpectedValue(expectedEpsZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 2, 2, true, true)]
|
[TestCase(0.4d, 0.6d, 0.012d, 0.025d, 2, 2, false, true, true)]
|
||||||
[TestCase(1d, 0.2d, 0.012d, 0.012d, 5, 2, true, false)]
|
[TestCase(1d, 0.2d, 0.012d, 0.012d, 5, 2, false, true, false)]
|
||||||
[TestCase(1d, 0.2d, 0.012d, 0.025d, 5, 2, true, true)]
|
[TestCase(1d, 0.2d, 0.012d, 0.025d, 5, 2, false, true, true)]
|
||||||
public void Run_SouldPass_Result_IsNotValid(double width, double height, double topDiametr, double bottomDiametr, int widthCount, int heightCount, bool calcResult, bool firstForceResult)
|
public void Run_ShouldPass_Result_IsNotValid(double width, double height, double topDiametr, double bottomDiametr, int widthCount, int heightCount,bool isBuckling, bool calcResult, bool firstForceResult)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var template = new RectangleBeamTemplate(width, height) { TopDiameter = topDiametr, BottomDiameter = bottomDiametr, WidthCount = widthCount, HeightCount = heightCount };
|
var template = new RectangleBeamTemplate(width, height) { TopDiameter = topDiametr, BottomDiameter = bottomDiametr, WidthCount = widthCount, HeightCount = heightCount };
|
||||||
var newSection = new SectionTemplate(new RectGeometryLogic(template)).GetCrossSection();
|
var newSection = new SectionTemplate(new RectGeometryLogic(template)).GetCrossSection();
|
||||||
var calculator = newSection.SectionRepository.CalculatorsList[0];
|
var calculator = newSection.SectionRepository.CalculatorsList[0] as IForceCalculator;
|
||||||
|
calculator.CompressedMember.Buckling = isBuckling;
|
||||||
//Act
|
//Act
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var result = calculator.Result as IForcesResults;
|
var result = calculator.Result as IForcesResults;
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using LoaderCalculator.Tests.Infrastructures.Logics;
|
||||||
|
using Moq;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using StructureHelperLogics.Models.Templates.CrossSections.RCs;
|
||||||
|
using StructureHelperLogics.Models.Templates.RCs;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
|
||||||
|
using StructureHelperLogics.NdmCalculations.Buckling;
|
||||||
|
|
||||||
|
namespace StructureHelperTests.FunctionalTests.Ndms.RCSections
|
||||||
|
{
|
||||||
|
public class BucklingLogicTest
|
||||||
|
{
|
||||||
|
[TestCase(0d, 0d, 0d, 0d, 0d, -100d, -0.15d, 0.15d, 1d)]
|
||||||
|
[TestCase(0d, 0d, -50d, 0d, 0d, -100d, -0.15d, 0.15d, 1.5d)]
|
||||||
|
[TestCase(0d, 0d, -100d, 0d, 0d, -100d, -0.15d, 0.15d, 2d)]
|
||||||
|
[TestCase(0d, 0d, 0d, -10d, 0d, -100d, -0.15d, 0.15d, 1d)]
|
||||||
|
[TestCase(-5d, 0d, -50d, -10d, 0d, -100d, -0.15d, 0.15d, 1.5d)]
|
||||||
|
[TestCase(-10d, 0d, -100d, -10d, 0d, -100d, -0.15d, 0.15d, 2d)]
|
||||||
|
[TestCase(0d, 0d, 0d, -10d, 10d, -100d, -0.15d, 0.15d, 1d)]
|
||||||
|
[TestCase(-5d, 5d, -50d, -10d, 10d, -100d, -0.15d, 0.15d, 1.5d)]
|
||||||
|
[TestCase(-10d, 10d, -100d, -10d, 10d, -100d, -0.15d, 0.15d, 2d)]
|
||||||
|
public void Run_ShoulPass_PhiLogicSP63(double longMx, double longMy, double longNz, double shortMx, double shortMy, double shortNz, double pointX, double pointY, double expectedPhi)
|
||||||
|
{
|
||||||
|
//Arrange
|
||||||
|
var fullTuple = new ForceTuple() { Mx = shortMx, My = shortMy, Nz = shortNz };
|
||||||
|
var longTuple = new ForceTuple() { Mx = longMx, My = longMy, Nz = longNz };
|
||||||
|
var point = new Point2D() { X = pointX, Y = pointY };
|
||||||
|
//Act
|
||||||
|
var phiLogic = new PhiLogicSP63(fullTuple, longTuple, point);
|
||||||
|
var phiL = phiLogic.GetPhil();
|
||||||
|
//Assert
|
||||||
|
Assert.AreEqual(expectedPhi, phiL, 0.01d);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(0d, 0.5d, 0.15d)]
|
||||||
|
[TestCase(0.1d, 0.5d, 0.2d)]
|
||||||
|
[TestCase(1d, 0.5d, 1.5d)]
|
||||||
|
public void Run_ShoulPass_DeltaELogicSP63(double eccentricity, double size, double expectedDeltaE)
|
||||||
|
{
|
||||||
|
//Arrange
|
||||||
|
//Act
|
||||||
|
var deltaELogic = new DeltaELogicSP63(eccentricity, size);
|
||||||
|
var deltaE = deltaELogic.GetDeltaE();
|
||||||
|
//Assert
|
||||||
|
Assert.AreEqual(expectedDeltaE, deltaE, 0.01d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="..\packages\NUnit3TestAdapter.4.2.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.4.2.1\build\net35\NUnit3TestAdapter.props')" />
|
|
||||||
<Import Project="..\packages\NUnit.3.13.3\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" />
|
<Import Project="..\packages\NUnit.3.13.3\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" />
|
||||||
|
<Import Project="..\packages\NUnit3TestAdapter.4.3.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.4.3.1\build\net35\NUnit3TestAdapter.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
<Compile Include="FieldsVisualizerTests\WindowTests\ViewerTest.cs" />
|
<Compile Include="FieldsVisualizerTests\WindowTests\ViewerTest.cs" />
|
||||||
<Compile Include="FunctionalTests\Ndms\Calculators\ForceCalculatorTests\RCSectionsTest.cs" />
|
<Compile Include="FunctionalTests\Ndms\Calculators\ForceCalculatorTests\RCSectionsTest.cs" />
|
||||||
<Compile Include="FunctionalTests\Ndms\RCSections\RCSectionTest.cs" />
|
<Compile Include="FunctionalTests\Ndms\RCSections\RCSectionTest.cs" />
|
||||||
|
<Compile Include="FunctionalTests\Ndms\RCSections\BucklingLogicTest.cs" />
|
||||||
<Compile Include="FunctionalTests\Ndms\SteelSections\ReinforcementTest.cs" />
|
<Compile Include="FunctionalTests\Ndms\SteelSections\ReinforcementTest.cs" />
|
||||||
<Compile Include="Infrastructures\Logics\ExpectedProcessor.cs" />
|
<Compile Include="Infrastructures\Logics\ExpectedProcessor.cs" />
|
||||||
<Compile Include="LibrariesTests\Ndms\RCSections\RCSectionTest.cs" />
|
<Compile Include="LibrariesTests\Ndms\RCSections\RCSectionTest.cs" />
|
||||||
@@ -58,16 +59,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Castle.Core.5.1.0\lib\net462\Castle.Core.dll</HintPath>
|
<HintPath>..\packages\Castle.Core.5.1.1\lib\net462\Castle.Core.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="LoaderCalculator">
|
<Reference Include="LoaderCalculator">
|
||||||
<HintPath>..\Libraries\LoaderCalculator.dll</HintPath>
|
<HintPath>..\Libraries\LoaderCalculator.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.18.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.18.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.18.2\lib\net462\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.18.4\lib\net462\Moq.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NUnit.3.13.3\lib\net45\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\NUnit.3.13.3\lib\net45\nunit.framework.dll</HintPath>
|
||||||
@@ -112,7 +111,7 @@
|
|||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.4.3.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.4.3.1\build\net35\NUnit3TestAdapter.props'))" />
|
||||||
<Error Condition="!Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.3\build\NUnit.props'))" />
|
<Error Condition="!Exists('..\packages\NUnit.3.13.3\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.13.3\build\NUnit.props'))" />
|
||||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.4.2.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.4.2.1\build\net35\NUnit3TestAdapter.props'))" />
|
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -8,7 +8,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Castle.Core" version="5.1.0" targetFramework="net472" />
|
<package id="Castle.Core" version="5.1.1" targetFramework="net472" />
|
||||||
<package id="Moq" version="4.18.2" targetFramework="net472" />
|
<package id="Moq" version="4.18.4" targetFramework="net472" />
|
||||||
<package id="NUnit" version="3.13.3" targetFramework="net472" />
|
<package id="NUnit" version="3.13.3" targetFramework="net472" />
|
||||||
<package id="NUnit3TestAdapter" version="4.2.1" targetFramework="net472" />
|
<package id="NUnit3TestAdapter" version="4.3.1" targetFramework="net472" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
<TabItem Header="Primitives">
|
<TabItem Header="Primitives">
|
||||||
<ContentControl ContentTemplate="{StaticResource SourceToTarget}" Content="{Binding PrimitivesViewModel}"/>
|
<ContentControl ContentTemplate="{StaticResource SourceToTarget}" Content="{Binding PrimitivesViewModel}"/>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="SOrder" Visibility="Hidden">
|
<TabItem Header="S-Order">
|
||||||
<Grid DataContext="{Binding SecondOrder}">
|
<Grid DataContext="{Binding SecondOrder}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
|||||||
@@ -287,11 +287,11 @@ namespace StructureHelper.Windows.MainWindow
|
|||||||
{
|
{
|
||||||
if (CheckMaterials() == false) { return;}
|
if (CheckMaterials() == false) { return;}
|
||||||
var ndms = NdmPrimitivesService.GetNdms(repository.Primitives, LimitStates.SLS, CalcTerms.ShortTerm);
|
var ndms = NdmPrimitivesService.GetNdms(repository.Primitives, LimitStates.SLS, CalcTerms.ShortTerm);
|
||||||
double[] center = GeometryOperations.GetGravityCenter(ndms);
|
var center = GeometryOperations.GetGravityCenter(ndms);
|
||||||
foreach (var item in PrimitiveLogic.Items)
|
foreach (var item in PrimitiveLogic.Items)
|
||||||
{
|
{
|
||||||
item.CenterX -= center[0];
|
item.CenterX -= center.CenterX;
|
||||||
item.CenterY -= center[1];
|
item.CenterY -= center.CenterY;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
o => repository.Primitives.Count() > 0
|
o => repository.Primitives.Count() > 0
|
||||||
|
|||||||
@@ -112,23 +112,24 @@
|
|||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
<RowDefinition Height="22"/>
|
<RowDefinition Height="22"/>
|
||||||
|
<RowDefinition Height="22"/>
|
||||||
|
<RowDefinition Height="22"/>
|
||||||
|
<RowDefinition Height="22"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="100"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
<ColumnDefinition/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="User's" HorizontalAlignment="Center"/>
|
<TextBlock Grid.Row="0" Grid.Column="1" Text="User's / Auto" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="2" Text="Auto" HorizontalAlignment="Center"/>
|
|
||||||
<TextBlock Grid.Row="1" Text="k_x"/>
|
<TextBlock Grid.Row="1" Text="k_x"/>
|
||||||
<TextBlock Grid.Row="2" Text="k_y"/>
|
<TextBlock Grid.Row="3" Text="k_y"/>
|
||||||
<TextBlock Grid.Row="3" Text="epsilon_z"/>
|
<TextBlock Grid.Row="5" Text="epsilon_z"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Margin="1" Text="{Binding PrestrainKx, Converter={StaticResource Curvature}, ValidatesOnDataErrors=True}"/>
|
<TextBox Grid.Row="1" Grid.Column="1" Margin="1" Text="{Binding PrestrainKx, Converter={StaticResource Curvature}, ValidatesOnDataErrors=True}"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="1" Margin="1" Text="{Binding PrestrainKy, Converter={StaticResource Curvature}, ValidatesOnDataErrors=True}"/>
|
<TextBox Grid.Row="3" Grid.Column="1" Margin="1" Text="{Binding PrestrainKy, Converter={StaticResource Curvature}, ValidatesOnDataErrors=True}"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="1" Margin="1" Text="{Binding PrestrainEpsZ, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
<TextBox Grid.Row="5" Grid.Column="1" Margin="1" Text="{Binding PrestrainEpsZ, Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="2" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainKx, Converter={StaticResource Curvature}, Mode=OneWay}"/>
|
<TextBox Grid.Row="2" Grid.Column="1" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainKx, Converter={StaticResource Curvature}, Mode=OneWay}"/>
|
||||||
<TextBox Grid.Row="2" Grid.Column="2" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainKy, Converter={StaticResource Curvature}, Mode=OneWay}"/>
|
<TextBox Grid.Row="4" Grid.Column="1" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainKy, Converter={StaticResource Curvature}, Mode=OneWay}"/>
|
||||||
<TextBox Grid.Row="3" Grid.Column="2" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainEpsZ, Converter={StaticResource PlainDouble}, Mode=OneWay}"/>
|
<TextBox Grid.Row="6" Grid.Column="1" Margin="1" IsEnabled="False" Text="{Binding AutoPrestrainEpsZ, Converter={StaticResource PlainDouble}, Mode=OneWay}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Expander>
|
</Expander>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
private IEnumerable<INdm> ndms;
|
private IEnumerable<INdm> ndms;
|
||||||
private IReport isoFieldReport;
|
private IReport isoFieldReport;
|
||||||
|
|
||||||
public ForcesResult SelectedResult { get; set; }
|
public ForcesTupleResult SelectedResult { get; set; }
|
||||||
private RelayCommand showIsoFieldCommand;
|
private RelayCommand showIsoFieldCommand;
|
||||||
private RelayCommand exportToCSVCommand;
|
private RelayCommand exportToCSVCommand;
|
||||||
private RelayCommand interpolateCommand;
|
private RelayCommand interpolateCommand;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
|||||||
get => member.LengthFactorX;
|
get => member.LengthFactorX;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
member.GeometryLength = value;
|
member.LengthFactorX = value;
|
||||||
OnPropertyChanged(nameof(LengthFactorX));
|
OnPropertyChanged(nameof(LengthFactorX));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ namespace StructureHelper.Windows.ViewModels.NdmCrossSections
|
|||||||
get => member.LengthFactorY;
|
get => member.LengthFactorY;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
member.GeometryLength = value;
|
member.LengthFactorY= value;
|
||||||
OnPropertyChanged(nameof(LengthFactorY));
|
OnPropertyChanged(nameof(LengthFactorY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user