Skip to content

Commit

Permalink
var for obliquity
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed May 18, 2022
1 parent 47e1f2f commit ff9997b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Particles/PulsarParameters.H
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,10 @@ public:
** Upper bound specified must be less than 1, and default is 0.1 (10%)
*/
static amrex::Real m_ubound_reldiff_sigma0;
/** Oblique angle between magnetic field axis and pulsar rotation axis.
** (Read in degrees and converted to radians)
*/
static amrex::Real m_Chi;
private:
};

Expand Down
6 changes: 6 additions & 0 deletions Source/Particles/PulsarParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int Pulsar::m_print_injected_celldata;
int Pulsar::m_print_celldata_starttime;
amrex::Real Pulsar::m_lbound_ndens_magnetization = 1.e-16;
amrex::Real Pulsar::m_ubound_reldiff_sigma0 = 0.1;
amrex::Real Pulsar::m_Chi;


Pulsar::Pulsar ()
Expand Down Expand Up @@ -250,6 +251,11 @@ Pulsar::ReadParameters () {
if (m_sigma_tune_method == "relative_difference") {
pp.query("upperBound_reldiff_sigma0", m_ubound_reldiff_sigma0);
}
// Obliquity of the pulsar
pp.get("Chi", m_Chi);
// convert degrees to radians
m_Chi = m_Chi * MathConst::pi / 180._rt;
amrex::Print() << "Oblique angle between B-axis and Omega-axis " << m_Chi << " radians \n";
}


Expand Down

0 comments on commit ff9997b

Please sign in to comment.