Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# I need the Matlab Code for simulating a binary star system with the Secondary Star a Red Dwarf and the Primary Star a Yellow Dwarf the same size as the Sun. There is an S-type planet orbiting the Red...

I need the Matlab Code for simulating a binary star system with the
Secondary Star a Red Dwarf and the Primary Star a Yellow Dwarf the same
size as the Sun. There is an S-type planet orbiting the Red Dwarf and is
tidal locked and a Circumbinary Gas Giant the same size as Jupiter. No
Answered 1 days After Mar 07, 2023

## Solution

Banasree answered on Mar 08 2023
Matlab code for simulating a binary star system with a Red Dwarf secondary star, a Yellow Dwarf primary star, and an S-type planet o
iting the Red Dwarf, as well as a circumbinary gas giant the same size as Jupiter:
Code:
% BOP => Binary O
ital Periods
clear all
close all
Ms = 1.989e+30; % Mass of the Sun in kilograms (kg)
AU = 1.496e+11; % Astronomical Unit in meters (m)
G = 6.674e-11; % Gravitational Constant in (m^3/(kg*s^2))
mp = Ms; % Mass of Primary Star in (kg) - Yellow Dwarf (Ivae)
ms = 0.0625*Ms; % Mass of Secondary Star in (kg) - Red Dwarf (Harsan)
Mpt = 1.898e+27; % Mass of P-type Planet (Thrummaz) in (kg) - Gas Giant, used Jupiter's mass
me = 5.972e+24; % Mass of Reference Planet in (kg), used Earth's mass
Mst = 0.666*me; % Mass of S-type Planet...
SOLUTION.PDF