Git Product home page Git Product logo

poet's Introduction

Planetary Orbital Evolution due to Tides

Python wrapped C++ code for calculating the orbital evolution of two bodies under mutually raised tides.

Documentation on GitHubPages

Potentially Interesting Articles

Tidal Love Number

poet's People

Contributors

kpenev avatar vortebo avatar decaelus avatar ruskin23 avatar lgbouma avatar

Stargazers

Juliette Becker avatar Trevesuki avatar Dmitry Savransky avatar  avatar  avatar Jerome de Leon avatar Anna Miller avatar Ghosha avatar  avatar

Watchers

 avatar  avatar  avatar Ben Oommen avatar Ghosha avatar  avatar

poet's Issues

Evolution stalls with these intial conditions and parameters

Initial Conditions

PRIMARY MASS = 1.0208328796081652
SECONDARY MASS = 0.7022364956055686
P0 = 4.881682292837919,

Parameters:

Pdisk = 1.4311397660850234
convective phase lag = 5.7726669277786535e-06
disk_dissipation_age = 5e-3,
wind_saturation_frequency = 2.54,
diff_rot_coupling_timescale = 5e-3,
wind_strength = 0.17,
inclination=scipy.pi/2

Present day values:

P0 = 4.881682292837919
Pdisk = 1.4311397660850234

A locked zone does not unlock when it should

The evolution defined in the following source code has one of the star's envelope locking and unlocking properly, but for the other star, the envelope seems to remain locked in a 2:1 spin-orbit ratio even when the eccentricity is negligible, which should not happen:

test_evol.cpp.txt

Use doxygen for C++ API documentation

The task is to add the doxygen generated HTML to the documentation webpage and link to it as from the sphinx main page as the C++ API documentation. The sphinx generated documentation has too many problems and is missing too many features to be useful.

Painfully slow evolution

Occasionally running an evolution takes millions of steps to complete. An example of system parameters which cause this is as follows:

  • Mprimary: 1.1 solMass

  • Msecondary: 0.4 solMass

  • Porb: 13.0 d

  • Pprimary: 6.03 d

  • RVdata: data/MMS06_binary3081_RV.digitized

  • age: 0.15 Gyr

  • eccentricity: 0.5528421901571807

  • feh: -0.15

  • 'lgQ_primary': 6.5

  • 'lgQ_secondary': 5.5

  • 'lgQ_primary_wtide_dependence': [0.0, 3.0, -3.1]

  • 'lgQ_secondary_wtide_dependence': [0.0, 3.0, -3.1]

  • 'lgQ_primary_wspin_dependence': []

  • 'lgQ_secondary_wspin_dependence': []

  • 'initial_eccentricity': 0.5

  • 'initial_obliquity': 0.0

  • 'disk_period': 20.0

  • 'disk_lifetime': 0.02

  • 'primary_angmom': [0.17, 2.78, 0.01]

  • 'secondary_angmom': [0.1, 2.78, 0.01]

Unit test for stopping condition derivatives

  • Create a unit test for derivative calculations by stopping conditions, comparing the analytic derivatives they calculate to numerical approximations.
  • Put all stopping conditions through the created test.

Create a project description page

Should include:

  • Brief description
  • Links to:
    • Installation instructions (#44)
    • the theory (#35)
    • python interface
    • c++ interface
    • Acknowledgements (grants and libraries)
    • How to cite

Document Python Orbital Evolution

Describe:

  • Initialization:
    • Eccentricity coefficients
    • Stellar evolution interpolator
  • star + planet evolution
  • star + star evolution
    • common stellar evolution interpolator
    • different interpolator for each star
  • Dissipative vs non-dissipative stars
  • Dissipative vs non-dissipative planets

Finish unit tests of Orbital Evolution

Some unit tests exist of the orbital evolution, but more are necessary, since at the moment only 3 of the 7 tidal terms present are tested. Also more tests should be added with variable dissipation.

Assertion error when breaking a lock

The evolution set-up in the attached code results in an attempt to access past the last entry in the BinarySystem::__above_lock_fractions[NO_DERIV] attribute when breaking a lock.
test_evol.cpp.txt

A gdb backtrace is as follows:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff63e0801 in __GI_abort () at abort.c:79
#2  0x00007ffff63d039a in __assert_fail_base (fmt=0x7ffff65577d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555555907168 "index >= 0 && index < size()", 
    file=file@entry=0x555555907108 "/home/kpenev/projects/git/poet/poet_src/third_party_libs/Eigen/Eigen/src/Core/DenseCoeffsBase.h", line=line@entry=378, 
    function=function@entry=0x555555914a20 <Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 1>::operator[](long)::__PRETTY_FUNCTION__> "Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator[](Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<double, -1, 1>; Eigen::DenseCoeffsBa"...) at assert.c:92
#3  0x00007ffff63d0412 in __GI___assert_fail (assertion=0x555555907168 "index >= 0 && index < size()", file=0x555555907108 "/home/kpenev/projects/git/poet/poet_src/third_party_libs/Eigen/Eigen/src/Core/DenseCoeffsBase.h", line=378, 
    function=0x555555914a20 <Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 1>::operator[](long)::__PRETTY_FUNCTION__> "Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator[](Eigen::DenseCoeffsBase<Derived, 1>::Index) [with Derived = Eigen::Matrix<double, -1, 1>; Eigen::DenseCoeffsBa"...) at assert.c:101
#4  0x000055555586d234 in Eigen::DenseCoeffsBase<Eigen::Matrix<double, -1, 1, 0, -1, 1>, 1>::operator[] (this=0x555558f1b070, index=1) at /home/kpenev/projects/git/poet/poet_src/third_party_libs/Eigen/Eigen/src/Core/DenseCoeffsBase.h:378
#5  0x0000555555869e9a in Evolve::BinarySystem::above_lock_fraction (this=0x555555bdb618, locked_zone_index=1, entry=Evolve::Dissipation::NO_DERIV, deriv_zone_index=0, secondary_radius=false) at /home/kpenev/projects/git/poet/poet_src/Evolve/BinarySystem.cpp:2065
#6  0x000055555585dbb0 in Evolve::BreakLockCondition::operator() (this=0x5555590149b0, evol_mode=Core::BINARY, orbit=..., derivatives=..., stop_deriv=...) at /home/kpenev/projects/git/poet/poet_src/Evolve/BreakLockCondition.cpp:27
#7  0x0000555555854238 in Evolve::CombinedStoppingCondition::add_subcondition_values (this=0x555558ffba30, cond=0x5555590149b0, evol_mode=Core::BINARY, orbit=..., derivatives=..., first_index=@0x7fffffffcfe0: 0, values=..., derivs=...)
    at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:27
#8  0x000055555585473a in Evolve::CombinedStoppingCondition::operator() (this=0x555558ffba30, evol_mode=Core::BINARY, orbit=..., derivatives=..., stop_deriv=...) at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:102
#9  0x0000555555854238 in Evolve::CombinedStoppingCondition::add_subcondition_values (this=0x55555900b860, cond=0x555558ffba30, evol_mode=Core::BINARY, orbit=..., derivatives=..., first_index=@0x7fffffffd110: 0, values=..., derivs=...)
    at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:27
#10 0x000055555585473a in Evolve::CombinedStoppingCondition::operator() (this=0x55555900b860, evol_mode=Core::BINARY, orbit=..., derivatives=..., stop_deriv=...) at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:102
#11 0x0000555555854238 in Evolve::CombinedStoppingCondition::add_subcondition_values (this=0x555559014760, cond=0x55555900b860, evol_mode=Core::BINARY, orbit=..., derivatives=..., first_index=@0x7fffffffd240: 1, values=..., derivs=...)
    at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:27
#12 0x000055555585473a in Evolve::CombinedStoppingCondition::operator() (this=0x555559014760, evol_mode=Core::BINARY, orbit=..., derivatives=..., stop_deriv=...) at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:102
#13 0x0000555555854238 in Evolve::CombinedStoppingCondition::add_subcondition_values (this=0x555558fff090, cond=0x555559014760, evol_mode=Core::BINARY, orbit=..., derivatives=..., first_index=@0x7fffffffd370: 4, values=..., derivs=...)
    at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:27
#14 0x000055555585473a in Evolve::CombinedStoppingCondition::operator() (this=0x555558fff090, evol_mode=Core::BINARY, orbit=..., derivatives=..., stop_deriv=...) at /home/kpenev/projects/git/poet/poet_src/Evolve/CombinedStoppingCondition.cpp:102
#15 0x000055555584dfb3 in Evolve::OrbitSolver::update_stop_condition_history (this=0x555558f10830, age=0.025047166386331598, orbit=..., derivatives=..., expansion_errors=..., evolution_mode=Core::BINARY, stop_reason=Evolve::NO_STOP, ignore_e_order_decrease=false)
    at /home/kpenev/projects/git/poet/poet_src/Evolve/OrbitSolver.cpp:741
#16 0x000055555584f636 in Evolve::OrbitSolver::evolve_until (this=0x555558f10830, system=..., max_age=@0x7fffffffd870: 5.5912146016389963, orbit=..., stop_reason=@0x7fffffffd858: Evolve::NO_STOP, max_step=0.001, evolution_mode=Core::BINARY) at /home/kpenev/projects/git/poet/poet_src/Evolve/OrbitSolver.cpp:1025
#17 0x0000555555850d27 in Evolve::OrbitSolver::operator() (this=0x555558f10830, system=..., max_step=0.001, required_ages=empty std::__cxx11::list) at /home/kpenev/projects/git/poet/poet_src/Evolve/OrbitSolver.cpp:1372
#18 0x000055555583d5f0 in evolve_system (system=0x555555bdb5e0, final_age=6.2999999999999998, max_time_step=0.001, precision=9.9999999999999995e-07, required_ages=0x0, num_required_ages=0, print_progress=true) at /home/kpenev/projects/git/poet/poet_src/Evolve/CInterface.cpp:209
#19 0x000055555583b770 in main () at test_evol.cpp:282

Eccentricity order is never reduced

The evolution for a system defined in the following source code:
test_evol.cpp.txt
increases its eccentricity expansion order to 31, but then even though the expansion order check suggests that the order should be reduced it never actually is.

Reading in eccentricity expansion coefficients

Hello Kaloyan -

Thanks for building this code and making it available to the community!

I was wondering about reading in the file containing the eccentricity expansion coefficients. In the documentation here: https://kpenev.github.io/poet/python_orbital_evolution.html , it says to use:

from orbital_evolution.evolve_interface import library as\
orbital_evolution_library

orbital_evolution_library.read_eccentricity_expansion_coefficients(    <filename with eccentricity expansion coefficients>)

Is this the correct method to read in the coefficients with the current version of the code (which has been updated quite a lot since that documentation was written, it appears)? For me, Python cannot locate the function (AttributeError: dlsym(0x308f35730, read_eccentricity_expansion_coefficients): symbol not found. While I think my build worked correctly, I think this either indicates that it didn't link correctly, or the name of that method has been updated - so wanted to check that it wasn't the latter before I get too much deeper into debugging.

Thanks!

Juliette Becker

Faulty logic in evolve_until()

The function that actually computes a leg of evolution has a clearly faulty logical construct near line 1063:

                first_step = false;
            } while(
                step_rejected
                &&
                !first_step
                &&
                (
                    std::abs(stop.stop_condition_precision()) > __precision
                    ||
                    __stop_history_ages.size() == 1
                )
                &&
                stop.stop_reason() != LARGE_EXPANSION_ERROR
            );

The check of the value of first step immediately after it is set is nonsensical!

Document C++ Orbital Evolution

Describe:

  • Initialization:
    • Eccentricity coefficients
    • Stellar evolution interpolator
  • star + planet evolution
  • star + star evolution
    • common stellar evolution interpolator
    • different interpolator for each star
  • Dissipative vs non-dissipative stars
  • Dissipative vs non-dissipative planets

Assertion Error while running evolution with breaks

The attached evolution code will generate the following assertion error:
cfile_12_withbreaks: /home/ruskin/projects/poet/poet_src/Evolve/DissipatingZone.cpp:128: virtual void Evolve::DissipatingZone::check_locks_consistency() const: Assertion __lock || (__lock.lock_direction() * __other_lock.lock_direction( )== -1) || ( __lock.spin_frequency_multiplier() == 1 && ( __lock.orbital_frequency_multiplier() == __lock.lock_direction() * max_abs_orb_mult ) && __other_lock.orbital_frequency_multiplier() == 1 && __other_lock.spin_frequency_multiplier() == 0 && __other_lock.lock_direction() == 1)' failed.

Code:
cfile_12_withbreaks.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.