Accidental eccentricity logic was changed

This commit is contained in:
ear
2024-02-25 18:44:26 +05:00
parent bf72f6d347
commit 716c3764c1
5 changed files with 64 additions and 59 deletions

View File

@@ -88,47 +88,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
else
{
newTuple = ProcessAccEccentricity(ndms, newTuple);
var inputData = new BucklingInputData()
{
Combination = combination,
LimitState = limitState,
CalcTerm = calcTerm,
Ndms = ndms,
ForceTuple = newTuple
};
var bucklingResult = ProcessBuckling(inputData);
if (bucklingResult.IsValid != true)
{
TraceLogger?.AddMessage(bucklingResult.Description, TraceLogStatuses.Error);
var result = new ForcesTupleResult
{
IsValid = false,
Description = $"Buckling result:\n{bucklingResult.Description}\n",
DesignForceTuple = new DesignForceTuple()
{
ForceTuple = newTuple,
LimitState = limitState,
CalcTerm = calcTerm
}
};
ndmResult.ForcesResultList.Add(result);
}
else
{
newTuple = CalculateBuckling(newTuple, bucklingResult);
TraceLogger?.AddMessage($"Force combination with considering of second order effects");
TraceLogger?.AddEntry(new TraceTablesFactory().GetByForceTuple(newTuple));
var result = GetPrimitiveStrainMatrix(ndms, newTuple, Accuracy);
result.DesignForceTuple.LimitState = limitState;
result.DesignForceTuple.CalcTerm = calcTerm;
result.DesignForceTuple.ForceTuple = newTuple;
ndmResult.ForcesResultList.Add(result);
ActionToOutputResults?.Invoke(ndmResult);
}
newTuple = GetForceTupleByBuckling(ndmResult, combination, limitState, calcTerm, ndms, newTuple);
}
GetForceResult(ndmResult, limitState, calcTerm, ndms, newTuple);
}
else
{
@@ -137,20 +99,63 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
string message = string.Format("Second order effect is not considered, despite force Nz={0}", newTuple.Nz);
TraceLogger.AddMessage(message, TraceLogStatuses.Warning);
}
var result = GetPrimitiveStrainMatrix(ndms, newTuple, Accuracy);
result.DesignForceTuple.LimitState = limitState;
result.DesignForceTuple.CalcTerm = calcTerm;
result.DesignForceTuple.ForceTuple = newTuple;
ndmResult.ForcesResultList.Add(result);
ActionToOutputResults?.Invoke(ndmResult);
GetForceResult(ndmResult, limitState, calcTerm, ndms, newTuple);
}
}
private IForceTuple GetForceTupleByBuckling(ForcesResults ndmResult, IForceCombinationList combination, LimitStates limitState, CalcTerms calcTerm, List<INdm> ndms, IForceTuple newTuple)
{
var inputData = new BucklingInputData()
{
Combination = combination,
LimitState = limitState,
CalcTerm = calcTerm,
Ndms = ndms,
ForceTuple = newTuple
};
var bucklingResult = ProcessBuckling(inputData);
if (bucklingResult.IsValid != true)
{
TraceLogger?.AddMessage(bucklingResult.Description, TraceLogStatuses.Error);
var result = new ForcesTupleResult
{
IsValid = false,
Description = $"Buckling result:\n{bucklingResult.Description}\n",
DesignForceTuple = new DesignForceTuple()
{
ForceTuple = newTuple,
LimitState = limitState,
CalcTerm = calcTerm
}
};
ndmResult.ForcesResultList.Add(result);
}
else
{
newTuple = CalculateBuckling(newTuple, bucklingResult);
TraceLogger?.AddMessage($"Force combination with considering of second order effects");
TraceLogger?.AddEntry(new TraceTablesFactory().GetByForceTuple(newTuple));
}
return newTuple;
}
private void GetForceResult(ForcesResults ndmResult, LimitStates limitState, CalcTerms calcTerm, List<INdm> ndms, IForceTuple newTuple)
{
var result = GetPrimitiveStrainMatrix(ndms, newTuple, Accuracy);
result.DesignForceTuple.LimitState = limitState;
result.DesignForceTuple.CalcTerm = calcTerm;
result.DesignForceTuple.ForceTuple = newTuple;
ndmResult.ForcesResultList.Add(result);
ActionToOutputResults?.Invoke(ndmResult);
}
private IForceTuple ProcessAccEccentricity(List<INdm> ndms, IForceTuple newTuple)
{
var accLogic = new AccidentalEccentricityLogic()
{
CompressedMember = CompressedMember,
Length = CompressedMember.GeometryLength,
SizeX = ndms.Max(x => x.CenterX) - ndms.Min(x => x.CenterX),
SizeY = ndms.Max(x => x.CenterY) - ndms.Min(x => x.CenterY),
InitialForceTuple = newTuple,

View File

@@ -184,7 +184,7 @@ namespace StructureHelperLogics.NdmCalculations.Buckling
}
var (EtaFactorX, EtaFactorY) = GetBucklingCoefficients();
var messageString = "Eta factor orbitrary {0} axis, Etta{0} = {1} (dimensionless)";
var messageString = "Eta factor orbitrary {0} axis, Eta{0} = {1} (dimensionless)";
var messageStringX = string.Format(messageString, "X", EtaFactorX);
var messageStringY = string.Format(messageString, "Y", EtaFactorY);
TraceLogger?.AddMessage(messageStringX);

View File

@@ -19,7 +19,7 @@ namespace StructureHelperLogics.NdmCalculations.Buckling
public double GetCriticalForce()
{
double Ncr = - Math.Pow(Math.PI, 2) * StiffnessEI / Math.Pow(DesignLength, 2);
string message = string.Format("Ncr = - (PI ^ 2) * D / L0 ^2 = - ({0} * {1} / ({2} ^2)) = {3}, N", Math.PI, StiffnessEI, DesignLength, Ncr);
string message = string.Format("Ncr = - (PI ^ 2) * D / L0 ^2 = - ({0}^2 * {1} / ({2} ^2)) = {3}, N", Math.PI, StiffnessEI, DesignLength, Ncr);
TraceLogger?.AddMessage(message);
return Ncr;
}