orbits

package
v0.0.0-...-d1cee31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// gravitational constant
	StandardCgrav = 6.67430e-8

	// seconds in a year
	SecYer = 24.0 * 60.0 * 60.0 * 365.25

	Msun = mu_sun / StandardCgrav
	Rsun = 6.957e10
)

Variables

This section is empty.

Functions

func AtoP

func AtoP(a float64, m1 float64, m2 float64) float64

kepler law to get orbital period from binary separation

func CountDigits

func CountDigits(number int) int

return the number of digits of an integer

func LinSpace

func LinSpace(xi float64, xf float64, num int) []float64

linspace function

func LogSpace

func LogSpace(xi float64, xf float64, num int, base float64) []float64

logspace function

func PtoA

func PtoA(p float64, m1 float64, m2 float64) float64

kepler law to get binary separation from orbital period

Types

type Binary

type Binary struct {
	M1         float64 `yaml:"m1"`
	M2         float64 `yaml:"m2"`
	Separation float64 `yaml:"separation"`
	Period     float64 `yaml:"period"`

	MCO float64 `yaml:"compact_object_mass"`

	KickStrengthDistribution string `yaml:"kick_distribution"`
	KickDirection            string `yaml:"kick_direction"`

	ReduceByFallback bool    `yaml:"reduce_by_fallback"`
	FallbackFraction float64 `yaml:"fallback_fraction"`

	SigmaStrength   float64 `yaml:"kick_sigma"`
	MinKickStrength float64 `yaml:"min_kick_value"`
	MaxKickStrength float64 `yaml:"max_kick_value"`

	MinPhi float64 `yaml:"min_phi"`
	MaxPhi float64 `yaml:"max_phi"`

	MinTheta float64 `yaml:"min_theta"`
	MaxTheta float64 `yaml:"max_theta"`

	Seed uint64 `yaml:"seed"`

	NumberOfCases int `yaml:"number_of_cases"`

	LogLevel string `yaml:"log_level"`

	StoreKicks  bool `yaml:"save_kicks"`
	StoreOrbits bool `yaml:"save_bounded_orbits"`
	StoreGrid   bool `yaml:"save_grid_of_orbits"`

	KicksFilename           string `yaml:"kicks_filename"`
	BoundedBinariesFilename string `yaml:"bounded_orbits_filename"`
	GridFilename            string `yaml:"grid_of_orbits_filename"`

	PQuantileMin float64 `yaml:"period_quantile_min"`
	PQuantileMax float64 `yaml:"period_quantile_max"`
	EQuantileMin float64 `yaml:"eccentricity_quantile_min"`
	EQuantileMax float64 `yaml:"eccentricity_quantile_max"`
	PNum         int     `yaml:"number_of_periods"`
	ENum         int     `yaml:"number_of_eccentricities"`
	MinProb      float64 `yaml:"minimum_probability_for_grid"`

	W     []float64
	Phi   []float64
	Theta []float64

	IndexBounded        []int
	WBounded            []float64
	ThetaBounded        []float64
	PhiBounded          []float64
	SeparationBounded   []float64
	EccentricityBounded []float64
	PeriodBounded       []float64

	PeriodGrid       []float64
	SeparationGrid   []float64
	EccentricityGrid []float64
	ProbabilityGrid  []float64
}

structure with binary configuration

func InitBinary

func InitBinary(filename string) Binary

initialize structure Binary with the info from a binary system that will then be analyze in different conditions due to asymmetric momentum kicks it returns the Binary object

func (*Binary) ComputeKicks

func (b *Binary) ComputeKicks()

create slices of asymmetric kicks following a given probability density function

func (*Binary) ConvertoAstro

func (b *Binary) ConvertoAstro()

let's go back from CGS to astro units

func (*Binary) ConvertoCGS

func (b *Binary) ConvertoCGS()

input should be in Msun / Rsun / Lsun and so on.. here we change it to CGS

func (*Binary) GridOfOrbits

func (b *Binary) GridOfOrbits()

divide orbital parameter in a grid

func (*Binary) OrbitsAfterKicks

func (b *Binary) OrbitsAfterKicks()

compute orbital parameters assuming linear momentum conservation before and just after a momentum kick using Kalogera 1996

func (*Binary) SaveBoundedOrbits

func (b *Binary) SaveBoundedOrbits(filename string)

save orbits info to file

func (*Binary) SaveGridOrbits

func (b *Binary) SaveGridOrbits(filename string)

save grid of binaries bounded after kick

func (*Binary) SaveKicks

func (b *Binary) SaveKicks(filename string)

save kick info to file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL