コード例 #1
0
ファイル: test_stellar_wind.py プロジェクト: vdhelm/amuse
    def test_static_wind_from_evolution(self):
        """ Test deriving static wind from stellar evolution """
        stars = Particles(mass=[1,2]|units.MSun)
        star_wind = stellar_wind.new_stellar_wind(1e-8|units.MSun, derive_from_evolution=True)
        stev = SeBa()
        stev.particles.add_particles(stars)

        stellar_wind.static_wind_from_stellar_evolution(star_wind, stev,
                1.49|units.Gyr, 1.495|units.Gyr)

        self.assertAlmostRelativeEquals(star_wind.particles.wind_mass_loss_rate,
                                        [0., 2.43765e-8]|units.MSun/units.yr, places=5)

        self.assertAlmostRelativeEquals(star_wind.particles.terminal_wind_velocity,
                                        [646317., 50921.7]|units.ms, places=5)
コード例 #2
0
ファイル: test_stellar_wind.py プロジェクト: jorishanse/amuse
    def test_static_wind_from_evolution(self):
        stars = self.create_stars_without_wind_attributes()
        star_wind = stellar_wind.new_stellar_wind(
            1e-8 | units.MSun, derive_from_evolution=True)
        stev = FakeStevCode()
        stev.mass_loss_rate = [1e-11, 2e-11] | units.MSun/units.yr
        stev.particles.add_particles(stars)

        stellar_wind.static_wind_from_stellar_evolution(
            star_wind, stev, 1.49 | units.Gyr, 1.495 | units.Gyr)

        self.assertAlmostRelativeEquals(
            star_wind.particles.wind_mass_loss_rate,
            [1e-11, 2e-11] | units.MSun/units.yr,
            places=5
            )

        self.assertAlmostRelativeEquals(
            star_wind.particles.terminal_wind_velocity,
            [615.521, 613.198] | units.kms, places=5)
コード例 #3
0
    def test_static_wind_from_evolution(self):
        stars = self.create_stars_without_wind_attributes()
        star_wind = stellar_wind.new_stellar_wind(1e-8 | units.MSun,
                                                  derive_from_evolution=True)
        stev = FakeStevCode()
        stev.mass_loss_rate = [1e-11, 2e-11] | units.MSun / units.yr
        stev.particles.add_particles(stars)

        stellar_wind.static_wind_from_stellar_evolution(
            star_wind, stev, 1.49 | units.Gyr, 1.495 | units.Gyr)

        self.assertAlmostRelativeEquals(
            star_wind.particles.wind_mass_loss_rate,
            [1e-11, 2e-11] | units.MSun / units.yr,
            places=5)

        self.assertAlmostRelativeEquals(
            star_wind.particles.terminal_wind_velocity,
            [615.521, 613.198] | units.kms,
            places=5)