rochePlot
|
Schematically plot the evolution of a binary star. More...
Modules | |
module | input_data |
Contains data from the input file and derived data. | |
module | plot_settings |
Contains plot settings. | |
module | roche_data |
Contains Roche-lobe data. | |
Functions/Subroutines | |
program | rocheplot |
Plots Roche lobes for given binaries. More... | |
subroutine | find_example_input_file (inputfile) |
If no input file is specified, try to find the example input file called rochePlot.dat. More... | |
subroutine | read_input_file (inputfile) |
Read the lines of the input file containting evolutionary states and compute positions of the Roche lobes. More... | |
subroutine | initialise_plot () |
Initialise plot output; open output file, set page, create a white background, print plot title and column headers. More... | |
subroutine | pgwhitebg () |
Create a white background when plotting to screen; swap black (ci=0) and white (ci=1) More... | |
subroutine | plot_disc (xL1, xc, yc, radin, radout) |
Draws an accretion disc centered on xc,yc between radin and radout. More... | |
subroutine | plot_binary (itel) |
Plot each binary; Roche lobes, stars and labels. More... | |
real function | xmap (il, nl, l1, lim, lr) |
Map the x-array to plot a right-hand Roche lobe. More... | |
real function | rtsafe (funcd, x1, x2, xacc) |
Find the root of a function bracketed by x1,x2 using a combination of a Newton-Raphson and bisection methods. More... | |
subroutine | rlimit (x, f, df) |
Calculates outer limit of Roche lobe. More... | |
subroutine | rline (y, f, df) |
Calculates value of y^2 for given x^2 value. More... | |
subroutine | plot_scale_bar () |
Plot scale bar. More... | |
subroutine | plot_rotation_axis () |
Plot axis of rotation for the binaries. More... | |
Schematically plot the evolution of a binary star.
program rocheplot | ( | ) |
Plots Roche lobes for given binaries.
For each graph, read m1, m2, a, r1, r2:
The plot is scaled automatically:
References input_data::csep, find_example_input_file(), initialise_plot(), input_data::ktel, input_data::label, plot_settings::outputfile, plot_binary(), plot_rotation_axis(), plot_scale_bar(), read_input_file(), input_data::text, plot_settings::use_colour, input_data::xt, and input_data::yt.
subroutine find_example_input_file | ( | character, dimension(*), intent(out) | inputfile | ) |
If no input file is specified, try to find the example input file called rochePlot.dat.
inputfile | Name of the input file |
Referenced by rocheplot().
subroutine read_input_file | ( | character, dimension(*), intent(in) | inputfile | ) |
Read the lines of the input file containting evolutionary states and compute positions of the Roche lobes.
inputfile | Name of the input file |
References input_data::age_mc, input_data::blen, input_data::ce, roche_data::cediff, roche_data::const1, input_data::csep, input_data::hei, input_data::iscr, input_data::klabel, input_data::ktel, input_data::label, input_data::ng, input_data::pb, roche_data::q, roche_data::q11, input_data::rad1, input_data::rad2, input_data::rlag, input_data::rlef, rlimit(), input_data::rm1, input_data::rm2, input_data::rrig, input_data::rsep, input_data::text, input_data::title, input_data::txt, plot_settings::xleft, plot_settings::xrigh, input_data::xt, input_data::xtl, plot_settings::ymargin, plot_settings::ysize, and input_data::yt.
Referenced by rocheplot().
subroutine initialise_plot | ( | ) |
Initialise plot output; open output file, set page, create a white background, print plot title and column headers.
References input_data::iscr, input_data::klabel, input_data::label, plot_settings::lw, plot_settings::outputfile, pgwhitebg(), input_data::title, plot_settings::use_colour, plot_settings::xleft, plot_settings::xrigh, input_data::xtl, plot_settings::ymargin, and plot_settings::ysize.
Referenced by rocheplot().
subroutine pgwhitebg | ( | ) |
Create a white background when plotting to screen; swap black (ci=0) and white (ci=1)
Referenced by initialise_plot().
subroutine plot_disc | ( | real, intent(in) | xL1, |
real, intent(in) | xc, | ||
real, intent(in) | yc, | ||
real, intent(in) | radin, | ||
real, intent(in) | radout | ||
) |
Draws an accretion disc centered on xc,yc between radin and radout.
xL1 | Horizontal position of L1 point |
xc | Horizontal position of centre of disc |
yc | Vertical position of centre of disc |
radin | Inner radius of the disc |
radout | Outer radius of the disc |
Referenced by plot_binary().
subroutine plot_binary | ( | integer, intent(in) | itel | ) |
Plot each binary; Roche lobes, stars and labels.
itel | Number of the current binary/evolutionary state (1-ktel) |
References input_data::age_mc, input_data::ce, roche_data::cediff, roche_data::const1, roche_data::const2, input_data::hei, input_data::klabel, input_data::ktel, input_data::label, input_data::npl, roche_data::onexsq, input_data::pb, plot_disc(), roche_data::q, roche_data::q11, input_data::rad1, input_data::rad2, input_data::rlag, input_data::rlef, rline(), input_data::rm1, input_data::rm2, input_data::rrig, input_data::rsep, input_data::txt, plot_settings::use_colour, plot_settings::xpl, roche_data::xsq, input_data::xtl, plot_settings::ymargin, plot_settings::ypl, plot_settings::ypl2, plot_settings::yshift, and plot_settings::ysize.
Referenced by rocheplot().
real function xmap | ( | integer, intent(in) | il, |
integer, intent(in) | nl, | ||
real, intent(in) | l1, | ||
real, intent(in) | lim, | ||
integer, intent(in) | lr | ||
) |
Map the x-array to plot a right-hand Roche lobe.
il | Current point number in array (1-nl) |
nl | Total number of points in array |
l1 | L1 position |
lim | Extreme extent of Roche lobe (farthest from L1) |
lr | Left (1) or right (2) Roche lobe |
xmap | Mapped position of il-th x value |
real function rtsafe | ( | funcd, | |
real, intent(in) | x1, | ||
real, intent(in) | x2, | ||
real, intent(in) | xacc | ||
) |
Find the root of a function bracketed by x1,x2 using a combination of a Newton-Raphson and bisection methods.
funcd | User-provided function |
x1 | Lower limit for solution |
x2 | Upper limit for solution |
xacc | Desired accuracy for solution |
subroutine rlimit | ( | real, intent(in) | x, |
real, intent(out) | f, | ||
real, intent(out) | df | ||
) |
Calculates outer limit of Roche lobe.
x | Position along binary axis |
f | Roche potential |
df | First derivative of f w.r.t. x |
References roche_data::const1, roche_data::q, and roche_data::q11.
Referenced by read_input_file().
subroutine rline | ( | real, intent(in) | y, |
real, intent(out) | f, | ||
real, intent(out) | df | ||
) |
Calculates value of y^2 for given x^2 value.
y | Position along binary axis |
f | Position of Roche surface |
df | First derivative of f w.r.t. x |
References roche_data::const2, roche_data::onexsq, roche_data::q, and roche_data::xsq.
Referenced by plot_binary().
subroutine plot_scale_bar | ( | ) |
Plot scale bar.
References input_data::blen, input_data::hei, input_data::ktel, plot_settings::ymargin, and plot_settings::yshift.
Referenced by rocheplot().
subroutine plot_rotation_axis | ( | ) |
Plot axis of rotation for the binaries.
References plot_settings::ymargin, and plot_settings::yshift.
Referenced by rocheplot().