コード例 #1
0
        protected ForceMomentContribution GetRebarResultant(LinearStrainDistribution StrainDistribution, ResultantType resType)
        {
            ForceMomentContribution resultant = new ForceMomentContribution();
            //tension is negative
            List <RebarPointResult> RebarResults = CalculateRebarResults(StrainDistribution);

            foreach (var barResult in RebarResults)
            {
                if (resType == ResultantType.Tension)
                {
                    if (barResult.Strain < 0)
                    {
                        resultant.Force  += barResult.Force;
                        resultant.Moment += Math.Abs(barResult.Force * barResult.DistanceToNeutralAxis);
                    }
                }
                else
                {
                    if (barResult.Strain > 0)
                    {
                        resultant.Force  += barResult.Force;
                        resultant.Moment += Math.Abs(barResult.Force * barResult.DistanceToNeutralAxis);
                    }
                }
            }
            resultant.RebarResults = RebarResults;
            return(resultant);
        }
コード例 #2
0
 protected ForceMomentContribution GetRebarResultant(LinearStrainDistribution StrainDistribution, ResultantType resType )
 {
     ForceMomentContribution resultant = new ForceMomentContribution();
     //tension is negative
     List<RebarPointResult> RebarResults = CalculateRebarResults(StrainDistribution);
     foreach (var barResult in RebarResults)
     {
         if (resType == ResultantType.Tension)
         {
             if (barResult.Strain < 0)
             {
                 resultant.Force += barResult.Force;
                 resultant.Moment += Math.Abs(barResult.Force * barResult.DistanceToNeutralAxis);
             }
         }
         else
         {
             if (barResult.Strain > 0)
             {
                 resultant.Force += barResult.Force;
                 resultant.Moment += Math.Abs(barResult.Force * barResult.DistanceToNeutralAxis);
             }
         }
     }
     resultant.RebarResults = RebarResults;
     return resultant;
 }