示例#1
0
        public static CalculationResult GetSectionCapacity(Concrete concrete, Steel steel, IList <PointD> sectionCoordinates, IList <Bar> bars, IList <LoadCase> loadCases /*IProgress<ProgressArgument> progressIndicatior*/)
        {
            var result = new CalculationResult();

            var capacity        = new SectionCapacity(concrete, steel);
            var section         = new Section(sectionCoordinates);
            var loadCaseResults = new List <LoadCaseResult>();

            for (int i = 0; i <= loadCases.Count - 1; i++)
            {
                var loadCase = loadCases[i];
                //progressIndicatior.Report(ProgressArgument.CalculateProgress(i, loadCases.Count, loadCase.Name));
                var loadCaseResult = capacity.CalculateCapacity(loadCase.NormalForce, section, bars);
                loadCaseResult.LoadCase = loadCase;
                loadCaseResults.Add(loadCaseResult);
            }

            result.Cz = section.Cz;
            result.H  = section.H;
            result.LoadCaseResults     = loadCaseResults;
            result.MaxTensionForce     = AxialCapacity.TensionCapacity(bars, steel);
            result.MaxCompressionForce = AxialCapacity.CompressionCapacity(sectionCoordinates, concrete);
            result.Concrete            = concrete;
            result.Steel = steel;

            return(result);
        }
示例#2
0
        public IEnumerable <InteractionCurveResult> GetInteractionCurve()
        {
            var sectionCapacity = new SectionCapacity(concrete, steel);
            var result          = new List <InteractionCurveResult>();

            for (int i = 0; i <= loadCases.Count - 1; i++)
            {
                var loadCase = loadCases[i];
                //progress.Report(ProgressArgument.CalculateProgress(i, loadCases.Count, loadCase.Name));
                var interactionPoints = new List <PointD>();
                int angle             = 0;
                while (angle <= 360)
                {
                    var rotatedCoordinates = this.rotateSectionCoordinates(angle);
                    var rotatedSection     = new Section(rotatedCoordinates);
                    var rotatedBars        = this.rotateBarCoordinates(angle);
                    var capacityResult     = sectionCapacity.CalculateCapacity(loadCase.NormalForce, rotatedSection, rotatedBars);
                    if (double.IsNaN(capacityResult.X))
                    {
                        throw new NotImplementedException();
                    }
                    double mx, my;
                    calculatePrincipalMoments(angle, capacityResult.Mrd, out mx, out my);
                    var interactionMoments = new PointD
                    {
                        X = mx,
                        Y = my
                    };
                    interactionPoints.Add(interactionMoments);
                    angle = angle + this.deltaAngle;
                }
                var interactionResult = new InteractionCurveResult
                {
                    LoadCase = loadCase,
                    Moments  = interactionPoints,
                };
                result.Add(interactionResult);
            }
            return(result);
        }