Exemplo 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);
        }
        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;
            }
 public ConcreteSectionIterationData(LinearStrainDistribution StrainDistribution, LinearStrainDistribution PreviousStrainDistribution, 
     SectionAnalysisResult Result)
 {
     this.StrainDistribution = StrainDistribution;
     this.PreviousStrainDistribution = PreviousStrainDistribution;
     this.Result = Result;
 }
        private double DeltaTCCalculationFunction(double SteelStrain)
        {
            //function of CurrentCompressionFiberPosition
            //1. create trial strain
            LinearStrainDistribution iteratedStrainDistribution = null;

            switch (currentCompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:
                iteratedStrainDistribution = new LinearStrainDistribution(StrainHeight, this.MaxConcreteStrain, SteelStrain);
                break;

            case FlexuralCompressionFiberPosition.Bottom:
                iteratedStrainDistribution = new LinearStrainDistribution(StrainHeight, SteelStrain, this.MaxConcreteStrain);
                break;

            default:
                throw new CompressionFiberPositionException();
            }
            //2. Calculate result
            SectionAnalysisResult iteratedResult = GetSectionResult(iteratedStrainDistribution, currentCompressionFiberPosition);
            //3. calculate difference between T and C
            double T = iteratedResult.TForce;
            double C = iteratedResult.CForce;

            return(Math.Abs(T) - Math.Abs(C));
        }
Exemplo n.º 5
0
 public ConcreteSectionIterationData(LinearStrainDistribution StrainDistribution, LinearStrainDistribution PreviousStrainDistribution,
                                     SectionAnalysisResult Result)
 {
     this.StrainDistribution         = StrainDistribution;
     this.PreviousStrainDistribution = PreviousStrainDistribution;
     this.Result = Result;
 }
        public IStrainCompatibilityAnalysisResult GetNominalFlexuralCapacity
            (FlexuralCompressionFiberPosition 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);
            }
        }
        protected IStrainCompatibilityAnalysisResult GetResult(SectionAnalysisResult SectionResult)
        {
            RebarPointResult controllingBar        = GetMaxSteelStrainPoint(SectionResult.TensionRebarResults);
            double           MaxSteelTensionStrain = controllingBar.Strain;
            double           Mn = SectionResult.Moment;
            IStrainCompatibilityAnalysisResult result = new ConcreteSectionFlexuralAnalysisResult(Mn, SectionResult.StrainDistribution, controllingBar);

            return(result);
        }
        public IStrainCompatibilityAnalysisResult GetNominalMomentResult(double P_u,
                                                                         FlexuralCompressionFiberPosition CompressionFiberPosition)
        {
            double MaxSteelStrain = CalculateMaximumSteelStrain(CompressionFiberPosition);
            SectionAnalysisResult IteratedResult      = FindMomentResultInPresenceOfAxialForce(CompressionFiberPosition, P_u, MaxSteelStrain);
            IStrainCompatibilityAnalysisResult result = GetResult(IteratedResult);

            return(result);
        }
        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);
        }
        protected bool GetAnalysisResultConverged(SectionAnalysisResult sectionResult, double ConvergenceTolerance)
        {
            double C = Math.Abs(sectionResult.CForce);
            double T = Math.Abs(sectionResult.TForce);

            double MinForce = Math.Min(C, T);
            double ConvergenceToleranceDifference = ConvergenceTolerance * MinForce;

            if (Math.Abs(C - T) <= ConvergenceToleranceDifference)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        protected virtual SectionAnalysisResult GetSectionResult(LinearStrainDistribution StrainDistribution, FlexuralCompressionFiberPosition compFiberPosition)
        {
            ForceMomentContribution CForceRebarResultant = GetCompressionForceConcreteResultant(StrainDistribution, compFiberPosition);
            ForceMomentContribution CForceConcreteResultant = GetCompressionForceRebarResultant(StrainDistribution, compFiberPosition);
            
            ForceMomentContribution CForceResultant = CForceRebarResultant + CForceConcreteResultant;

            ForceMomentContribution TForceResultant = GetTensionForceResultant(StrainDistribution);
            SectionAnalysisResult result = new SectionAnalysisResult()
            {
                AxialForce = CForceResultant.Force + TForceResultant.Force,
                CForce = CForceResultant.Force,
                TForce = TForceResultant.Force,
                Moment = CForceResultant.Moment+ TForceResultant.Moment,
                Rotation = 0,
                StrainDistribution = StrainDistribution,
                CompressionRebarResults = CForceRebarResultant.RebarResults,
                TensionRebarResults =TForceResultant.RebarResults
            };
            return result;
        }
        protected virtual SectionAnalysisResult GetSectionResult(LinearStrainDistribution StrainDistribution, FlexuralCompressionFiberPosition compFiberPosition)
        {
            ForceMomentContribution CForceRebarResultant    = GetCompressionForceConcreteResultant(StrainDistribution, compFiberPosition);
            ForceMomentContribution CForceConcreteResultant = GetCompressionForceRebarResultant(StrainDistribution, compFiberPosition);

            ForceMomentContribution CForceResultant = CForceRebarResultant + CForceConcreteResultant;

            ForceMomentContribution TForceResultant = GetTensionForceResultant(StrainDistribution);
            SectionAnalysisResult   result          = new SectionAnalysisResult()
            {
                AxialForce              = CForceResultant.Force + TForceResultant.Force,
                CForce                  = CForceResultant.Force,
                TForce                  = TForceResultant.Force,
                Moment                  = CForceResultant.Moment + TForceResultant.Moment,
                Rotation                = 0,
                StrainDistribution      = StrainDistribution,
                CompressionRebarResults = CForceRebarResultant.RebarResults,
                TensionRebarResults     = TForceResultant.RebarResults
            };

            return(result);
        }
        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);
        }
        private double SectionAxialForceResultantFunction(double SteelStrain)
        {
            //Create trial strain
            LinearStrainDistribution iteratedStrainDistribution = null;

            switch (currentCompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:
                iteratedStrainDistribution = new LinearStrainDistribution(StrainHeight, this.MaxConcreteStrain, SteelStrain);
                break;

            case FlexuralCompressionFiberPosition.Bottom:
                iteratedStrainDistribution = new LinearStrainDistribution(StrainHeight, SteelStrain, this.MaxConcreteStrain);
                break;

            default:
                throw new CompressionFiberPositionException();
            }
            //Calculate result
            SectionAnalysisResult iteratedResult = GetSectionResult(iteratedStrainDistribution, currentCompressionFiberPosition);

            return(iteratedResult.AxialForce);
        }
        protected virtual SectionAnalysisResult FindMomentResultInPresenceOfAxialForce(FlexuralCompressionFiberPosition CompressionFiberPosition,
                                                                                       double P, double MaxSteelStrain, 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 StrainMin = MaxSteelStrain;
            double StrainMax = StrainUltimateConcrete.Value;

            double targetP = P;
            LinearStrainDistribution finalStrainDistribution = null;

            double SteelStrain = RootFinding.Brent(new FunctionOfOneVariable(SectionAxialForceResultantFunction), StrainMin, StrainMax,
                                                   StrainConvergenceTolerance, targetP);

            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);
        }
 protected IStrainCompatibilityAnalysisResult GetResult(SectionAnalysisResult SectionResult)
 {
             RebarPointResult controllingBar = GetMaxSteelStrainPoint(SectionResult.TensionRebarResults);
             double MaxSteelTensionStrain = controllingBar.Strain;
             double Mn = SectionResult.Moment;
             IStrainCompatibilityAnalysisResult result = new ConcreteSectionFlexuralAnalysisResult(Mn, SectionResult.StrainDistribution, controllingBar);
             return result;
 }
        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;
        }
        protected bool GetAnalysisResultConverged(SectionAnalysisResult sectionResult, double ConvergenceTolerance)
        {
            double C = Math.Abs(sectionResult.CForce);
            double T = Math.Abs(sectionResult.TForce);

            double MinForce = Math.Min(C, T);
            double ConvergenceToleranceDifference = ConvergenceTolerance * MinForce;

            if (Math.Abs(C - T) <= ConvergenceToleranceDifference)
            {
                return true;
            }
            else
            {
                return false;
            }
        }