Giter Site home page Giter Site logo

galcollide's People

Contributors

mclindner avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

wolffem

galcollide's Issues

Brentq fails when eccentricity is low

Problem: (-1*d_perigalactic * e) / (eccentricity - 1)) must be greater than initial separation for brentq to work

The _get_vxvy() function in Combine.py works fine for the parameters we are interested in, but if eccentricity is too low and (-1*d_perigalactic * e) / (eccentricity - 1)) - r) is negative,
brentq will fail.
This makes sense given that f(a) and f(b) must have different signs, but I am unsure if this makes sense physics-wise. Obviously the initial separation must also be less than or equal to the intergalactic distance, and violating that errors as it should.

This may all be fine, but investigation is needed to make sure.

Error message:
Traceback (most recent call last):
File "Main.py", line 31, in
combined = two_bodys.combine()
File "/home/michael/NBody/Combine.py", line 205, in combine
x1, y1, vx1, vy1 = self._initial_conds(which_gal=self.Gal1)
File "/home/michael/NBody/Combine.py", line 157, in _initial_conds
x, y, vx, vy = self._get_vxvy(which_gal)
File "/home/michael/NBody/Combine.py", line 84, in _get_vxvy
self.inital_separation)
File "/home/michael/miniconda3/lib/python3.7/site-packages/scipy/optimize/zeros.py", line 776, in brentq
r = _zeros._brentq(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
ValueError: f(a) and f(b) must have different signs

Period of oscillation in y versus time plot does not correspond to calculated period

The period given by T = np.sqrt(((4*np.pi ** 2) / (k ** 2)) * self.semimajor_axis ** 3) is used in the solve_ivp function, so the domain of the output should match the period. However, when I plot the output values, this is not the case. Both galaxies seem to orbit many more times than expected. To me this seems like a units problem, but I am having a hard time identifying the error.

Confirmation that orbits match physics needed

Validation that the orbits look as they should given the parameters that we input is needed - I will have to look through some textbooks. The units seem correct, but I am not 100% sure that changing the perigalactic distance is having the correct effect on the orbits.

Param file generation issue.

When there is no param file in the working directory, the NSteps in the param file created by running the code will be wrong. Running again fixes this when the file is overwritten. Maybe a default param file should be included, or specify in code.

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.