Ejemplo n.º 1
0
        protected override TCIterationBound GetSolutionBoundaries(SectionAnalysisResult result,
                                                                  LinearStrainDistribution ApproximationStrainDistribution)
        {
            double prestressForce = this.GetPrestressForceEffective();

            if (prestressForce == 0)
            {
                //TODO: add check for prstressing if needed
                //throw new NotPrestressedBeamException();
            }
            //prestressed beam strain iteration is different (from regular RC) from regular concrete because we are assuming that
            //the maximum depth of compression zone is 0.6d. Therefore this determines the start of iterations

            TCIterationBound bound = new TCIterationBound();

            switch (currentCompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:
                bound.MinStrain = ApproximationStrainDistribution.BottomFiberStrain;
                break;

            case FlexuralCompressionFiberPosition.Bottom:
                bound.MinStrain = ApproximationStrainDistribution.TopFiberStrain;
                break;

            default:
                throw new CompressionFiberPositionException();
            }
            bound.MaxStrain = CalculateMaximumSteelStrain(currentCompressionFiberPosition);
            return(bound);
        }
Ejemplo n.º 2
0
        protected virtual TCIterationBound GetSolutionBoundaries(SectionAnalysisResult result, LinearStrainDistribution ApproximationStrainDistribution)
        {
            double t = Math.Abs(result.TForce);
            double c = Math.Abs(result.CForce);

            SectionAnalysisResult    secondResult = new SectionAnalysisResult();
            TCIterationBound         data         = new TCIterationBound();
            LinearStrainDistribution secondApproximationStrainDistribution = null;
            double MaxSteelStrain = CalculateMaximumSteelStrain(currentCompressionFiberPosition);

            //Step 1: create adjusted strain distribution
            if (t > c)
            {
                if (currentCompressionFiberPosition == FlexuralCompressionFiberPosition.Top)
                {
                    secondApproximationStrainDistribution = new LinearStrainDistribution(ApproximationStrainDistribution.Height,
                                                                                         ApproximationStrainDistribution.TopFiberStrain, this.MaxConcreteStrain);
                }
                else
                {
                    secondApproximationStrainDistribution = new LinearStrainDistribution(ApproximationStrainDistribution.Height,
                                                                                         this.MaxConcreteStrain, ApproximationStrainDistribution.BottomFiberStrain);
                }
            }
            else
            {
                if (currentCompressionFiberPosition == FlexuralCompressionFiberPosition.Top)
                {
                    secondApproximationStrainDistribution = new LinearStrainDistribution(ApproximationStrainDistribution.Height,
                                                                                         ApproximationStrainDistribution.TopFiberStrain, MaxSteelStrain);
                }
                else
                {
                    secondApproximationStrainDistribution = new LinearStrainDistribution(ApproximationStrainDistribution.Height,
                                                                                         MaxSteelStrain, ApproximationStrainDistribution.BottomFiberStrain);
                }
            }

            //Step 2: Fill in data for output
            if (currentCompressionFiberPosition == FlexuralCompressionFiberPosition.Top)
            {
                data.MinStrain = -Math.Max(Math.Abs(ApproximationStrainDistribution.BottomFiberStrain), Math.Abs(secondApproximationStrainDistribution.BottomFiberStrain));
                data.MaxStrain = -Math.Min(Math.Abs(ApproximationStrainDistribution.BottomFiberStrain), Math.Abs(secondApproximationStrainDistribution.BottomFiberStrain));
            }
            else
            {
                data.MinStrain = -Math.Max(Math.Abs(ApproximationStrainDistribution.TopFiberStrain), Math.Abs(secondApproximationStrainDistribution.TopFiberStrain));
                data.MaxStrain = -Math.Min(Math.Abs(ApproximationStrainDistribution.TopFiberStrain), Math.Abs(secondApproximationStrainDistribution.TopFiberStrain));
            }

            return(data);
        }
Ejemplo n.º 3
0
        protected virtual SectionAnalysisResult FindPureMomentResult(FlexuralCompressionFiberPosition CompressionFiberPosition,
                                                                     TCIterationBound bound, double StrainConvergenceTolerance = 0.00001)
        {
            currentCompressionFiberPosition = CompressionFiberPosition;           //store this off because it will be necessary during iteration
            StrainHeight = GetStrainDistributionHeight(CompressionFiberPosition); //store this off because it will be necessary during iteration


            double SteelStrain = 0;
            double StrainMax   = bound.MaxStrain;
            double StrainMin   = bound.MinStrain;

            double targetTCDelta = 0;
            LinearStrainDistribution finalStrainDistribution = null;

            //SteelStrain = RootFinding.Brent(new FunctionOfOneVariable(GetTandCDeltaForSteelStrainIteration), TCDeltaMin, TCDeltaMax, StrainConvergenceTolerance, targetTCDelta);
            SteelStrain = RootFinding.Brent(new FunctionOfOneVariable(DeltaTCCalculationFunction), StrainMin, StrainMax, StrainConvergenceTolerance, targetTCDelta);
            switch (CompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:

                finalStrainDistribution = new LinearStrainDistribution(StrainHeight, this.MaxConcreteStrain, SteelStrain);

                break;

            case FlexuralCompressionFiberPosition.Bottom:

                finalStrainDistribution = new LinearStrainDistribution(StrainHeight, SteelStrain, this.MaxConcreteStrain);

                break;

            default:
                throw new CompressionFiberPositionException();
            }

            SectionAnalysisResult finalResult = GetSectionResult(finalStrainDistribution, CompressionFiberPosition);

            return(finalResult);
        }
Ejemplo n.º 4
0
        public IStrainCompatibilityAnalysisResult GetNominalFlexuralCapacity
            (FlexuralCompressionFiberPosition CompressionFiberPosition)
        {
            currentCompressionFiberPosition = CompressionFiberPosition;

            //Step 1: Assume strain distribution with all bars below section centroid yielding
            LinearStrainDistribution TrialStrainDistribution = GetInitialStrainEstimate(CompressionFiberPosition);
            SectionAnalysisResult    TrialSectionResult      = GetSectionResult(TrialStrainDistribution, CompressionFiberPosition);
            double Mn = 0;

            //check id T and C force are equal

            //if T<>C
            if (GetAnalysisResultConverged(TrialSectionResult, ConvergenceToleranceStrain) == false)
            {
                SectionAnalysisResult IteratedResult = null;
                try
                {
                    TCIterationBound bound = GetSolutionBoundaries(TrialSectionResult, TrialStrainDistribution);     //make sure solution exists
                    IteratedResult = FindPureMomentResult(CompressionFiberPosition, bound, ConvergenceToleranceStrain);
                    RebarPointResult controllingBar = GetMaxSteelStrainPoint(TrialSectionResult.TensionRebarResults);
                    Mn = IteratedResult.Moment;
                    return(new ConcreteSectionFlexuralAnalysisResult(Mn, IteratedResult.StrainDistribution, controllingBar));
                }
                catch (SectionAnalysisFailedToConvergeException)
                {
                    throw new SectionFailedToConvergeException();
                }
            }
            //if T=C
            else
            {
                IStrainCompatibilityAnalysisResult result = GetResult(TrialSectionResult);
                return(result);
            }
        }