Exemplo 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));
        }
Exemplo n.º 2
0
        public void GetFactorTest_Success()
        {
            var building = new Mock <IStructure>();

            building.Setup(b => b.Width).Returns(1);
            var referenceHeight = new Mock <IFactor>();

            referenceHeight.Setup(rh => rh.GetFactor()).Returns(2);
            var turbulentLengthScale = new Mock <IFactorAt>();

            turbulentLengthScale.Setup(tls => tls.GetFactorAt(2)).Returns(5);
            var nondimensionalFrequency = new Mock <IFactorAt>();

            nondimensionalFrequency.Setup(nf => nf.GetFactorAt(2)).Returns(7);


            var aerodynamicAdmittanceWidth = new AerodynamicAdmittanceWidth(
                building.Object,
                referenceHeight.Object,
                turbulentLengthScale.Object,
                nondimensionalFrequency.Object);

            var result = aerodynamicAdmittanceWidth.GetFactor();

            Assert.That(result, Is.EqualTo(0.143).Within(0.001));
        }