Ejemplo n.º 1
0
        private IFactor GetResonanceResponse(IFactor logarithmicDecrementOfDamping)
        {
            var nonDimensionalFrequency =
                new NonDimensionalFrequency(
                    _windLoadData,
                    _fundamentalFlexuralFrequency,
                    _turbulentLengthScale);

            var nonDimensionalPowerSpectralDensity =
                new NonDimensionalPowerSpectralDensity(nonDimensionalFrequency);
            var aerodynamicAdmittanceWidth =
                new AerodynamicAdmittanceWidth(
                    _building,
                    _referenceHeight,
                    _turbulentLengthScale,
                    nonDimensionalFrequency);
            var aerodynamicAdmittanceHeight =
                new AerodynamicAdmittanceHeight(
                    _building,
                    _referenceHeight,
                    _turbulentLengthScale,
                    nonDimensionalFrequency);

            return(new ResonanceResponse(
                       _referenceHeight,
                       logarithmicDecrementOfDamping,
                       nonDimensionalPowerSpectralDensity,
                       aerodynamicAdmittanceWidth,
                       aerodynamicAdmittanceHeight));
        }
        public void GetFactorAtTest_Success()
        {
            var nonDimensionalFrequency = new Mock <IFactorAt>();

            nonDimensionalFrequency.Setup(ndf => ndf.GetFactorAt(2)).Returns(3);

            var nonDimensionalPowerSpectralDensity =
                new NonDimensionalPowerSpectralDensity(nonDimensionalFrequency.Object);

            var result = nonDimensionalPowerSpectralDensity.GetFactorAt(2);

            Assert.That(result, Is.EqualTo(0.064588).Within(0.000001));
        }