Example #1
0
        /// <summary>
        /// Fills the results.
        /// </summary>
        public override void FillResults()
        {
            _analysisResults.BaseReactionWithCentroid(
                out var loadCases,
                out var stepTypes,
                out var stepNumbers,
                out var reactions,
                out var baseReactionCoordinate,
                out var centroidFxCoordinates,
                out var centroidFyCoordinates,
                out var centroidFzCoordinates);

            BaseReactionCoordinate = baseReactionCoordinate;

            Results = new List <Tuple <StepResultsIdentifier, BaseReactions> >();
            for (int i = 0; i < loadCases.Length; i++)
            {
                StepResultsIdentifier identifier = new StepResultsIdentifier()
                {
                    LoadCase   = loadCases[i],
                    StepType   = stepTypes[i],
                    StepNumber = stepNumbers[i]
                };

                BaseReactions baseReactions = new BaseReactions()
                {
                    Reactions             = reactions[i],
                    CentroidFxCoordinates = centroidFxCoordinates[i],
                    CentroidFyCoordinates = centroidFyCoordinates[i],
                    CentroidFzCoordinates = centroidFzCoordinates[i],
                };

                Results.Add(new Tuple <StepResultsIdentifier, BaseReactions>(identifier, baseReactions));
            }
        }
Example #2
0
        /// <summary>
        /// Gets the modal participating mass ratios.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <returns>List&lt;Tuple&lt;StepResultsIdentifier, ModalParticipatingMassRatio&gt;&gt;.</returns>
        public static List <Tuple <StepResultsIdentifier, ModalParticipatingMassRatio> > GetModalParticipatingMassRatios(IResults app)
        {
            app.ModalParticipatingMassRatios(
                out var loadCases,
                out var stepTypes,
                out var stepNumbers,
                out var periods,
                out var massRatios,
                out var massRatioSums);

            List <Tuple <StepResultsIdentifier, ModalParticipatingMassRatio> > resultItems = new List <Tuple <StepResultsIdentifier, ModalParticipatingMassRatio> >();

            for (int i = 0; i < loadCases.Length; i++)
            {
                StepResultsIdentifier identifier =
                    new StepResultsIdentifier
                {
                    LoadCase   = loadCases[i],
                    StepType   = stepTypes[i],
                    StepNumber = stepNumbers[i]
                };

                ModalParticipatingMassRatio results = new ModalParticipatingMassRatio
                {
                    Period       = periods[i],
                    MassRatio    = massRatios[i],
                    MassRatioSum = massRatioSums[i]
                };

                resultItems.Add(new Tuple <StepResultsIdentifier, ModalParticipatingMassRatio>(identifier, results));
            }

            return(resultItems);
        }
        /// <summary>
        /// Fills the results.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <param name="baseReactionCoordinate">The base reaction coordinate.</param>
        /// <returns>List&lt;Tuple&lt;StepResultsIdentifier, BaseReactions&gt;&gt;.</returns>
        public static List <Tuple <StepResultsIdentifier, BaseReactions> > BaseReactionWithCentroid(
            IResults app,
            out Coordinate3DCartesian baseReactionCoordinate)
        {
            app.BaseReactionWithCentroid(
                out var loadCases,
                out var stepTypes,
                out var stepNumbers,
                out var reactions,
                out baseReactionCoordinate,
                out var centroidFxCoordinates,
                out var centroidFyCoordinates,
                out var centroidFzCoordinates);

            var results = new List <Tuple <StepResultsIdentifier, BaseReactions> >();

            for (int i = 0; i < loadCases.Length; i++)
            {
                StepResultsIdentifier identifier = new StepResultsIdentifier()
                {
                    LoadCase   = loadCases[i],
                    StepType   = stepTypes[i],
                    StepNumber = stepNumbers[i]
                };

                BaseReactions baseReactions = new BaseReactions()
                {
                    Reactions             = reactions[i],
                    CentroidFxCoordinates = centroidFxCoordinates[i],
                    CentroidFyCoordinates = centroidFyCoordinates[i],
                    CentroidFzCoordinates = centroidFzCoordinates[i],
                };

                results.Add(new Tuple <StepResultsIdentifier, BaseReactions>(identifier, baseReactions));
            }

            return(results);
        }
Example #4
0
        /// <summary>
        /// Gets the modal periods.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <returns>List&lt;Tuple&lt;StepResultsIdentifier, ModalPeriod&gt;&gt;.</returns>
        public static List <Tuple <StepResultsIdentifier, ModalPeriod> > GetModalPeriods(IResults app)
        {
            app.ModalPeriod(
                out var loadCases,
                out var stepTypes,
                out var stepNumbers,
                out var periods,
                out var frequencies,
                out var circularFrequencies,
                out var eigenvalues);

            List <Tuple <StepResultsIdentifier, ModalPeriod> > resultItems = new List <Tuple <StepResultsIdentifier, ModalPeriod> >();

            for (int i = 0; i < loadCases.Length; i++)
            {
                StepResultsIdentifier identifier =
                    new StepResultsIdentifier
                {
                    LoadCase   = loadCases[i],
                    StepType   = stepTypes[i],
                    StepNumber = stepNumbers[i]
                };

                ModalPeriod results = new ModalPeriod
                {
                    Period            = periods[i],
                    Frequency         = frequencies[i],
                    CircularFrequency = circularFrequencies[i],
                    Eigenvalue        = eigenvalues[i]
                };

                resultItems.Add(new Tuple <StepResultsIdentifier, ModalPeriod>(identifier, results));
            }

            return(resultItems);
        }
Example #5
0
        /// <summary>
        /// Gets the modal participation factors.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <returns>List&lt;Tuple&lt;StepResultsIdentifier, ModalParticipationFactor&gt;&gt;.</returns>
        public static List <Tuple <StepResultsIdentifier, ModalParticipationFactor> > GetModalParticipationFactors(IResults app)
        {
            app.ModalParticipationFactors(
                out var loadCases,
                out var stepTypes,
                out var stepNumbers,
                out var periods,
                out var participationFactors,
                out var modalMasses,
                out var modalStiffnesses);

            List <Tuple <StepResultsIdentifier, ModalParticipationFactor> > resultItems = new List <Tuple <StepResultsIdentifier, ModalParticipationFactor> >();

            for (int i = 0; i < loadCases.Length; i++)
            {
                StepResultsIdentifier identifier =
                    new StepResultsIdentifier
                {
                    LoadCase   = loadCases[i],
                    StepType   = stepTypes[i],
                    StepNumber = stepNumbers[i]
                };

                ModalParticipationFactor results = new ModalParticipationFactor
                {
                    Period = periods[i],
                    ParticipationFactor = participationFactors[i],
                    ModalMass           = modalMasses[i],
                    ModalStiffness      = modalStiffnesses[i]
                };

                resultItems.Add(new Tuple <StepResultsIdentifier, ModalParticipationFactor>(identifier, results));
            }

            return(resultItems);
        }