#include <orsa_interaction.h>
Public Member Functions | |
GalacticPotentialAllen () | |
GalacticPotentialAllen (const GalacticPotentialAllen &) | |
void | Acceleration (const Frame &, std::vector< Vector > &) |
double | PotentialEnergy (const Frame &) |
Interaction * | clone () const |
InteractionType | GetType () const |
virtual bool | depends_on_velocity () const |
void | SkipJPLPlanets (const bool b) |
bool | IsSkippingJPLPlanets () const |
Protected Attributes | |
bool | skip_JPL_planets |
Definition at line 422 of file orsa_interaction.h.
Definition at line 831 of file orsa_interaction.cc.
References orsa::FromUnits(), orsa::GetG(), orsa::MSUN, and orsa::PARSEC.
Referenced by GalacticPotentialAllen::clone().
00831 : Interaction() { 00832 00833 g = GetG(); 00834 00835 mb = FromUnits(1.40592e10, MSUN); 00836 bb = FromUnits(0.3873e3, PARSEC); 00837 md = FromUnits(8.5608e10, MSUN); 00838 ad = FromUnits(5.3178e3, PARSEC); 00839 bd = FromUnits(0.25e3, PARSEC); 00840 mh = FromUnits(10.3836745e10,MSUN); 00841 ah = FromUnits(12.0e3, PARSEC); 00842 00843 }
GalacticPotentialAllen | ( | const GalacticPotentialAllen & | ) |
Definition at line 846 of file orsa_interaction.cc.
References orsa::FromUnits(), orsa::GetG(), orsa::MSUN, and orsa::PARSEC.
00846 : Interaction() { 00847 00848 g = GetG(); 00849 00850 mb = FromUnits(1.40592e10, MSUN); 00851 bb = FromUnits(0.3873e3, PARSEC); 00852 md = FromUnits(8.5608e10, MSUN); 00853 ad = FromUnits(5.3178e3, PARSEC); 00854 bd = FromUnits(0.25e3, PARSEC); 00855 mh = FromUnits(10.3836745e10,MSUN); 00856 ah = FromUnits(12.0e3, PARSEC); 00857 00858 }
Implements Interaction.
Referenced by GalacticPotentialAllenPlusNewton::Acceleration().
Interaction * clone | ( | ) | const [virtual] |
Implements Interaction.
Definition at line 860 of file orsa_interaction.cc.
References GalacticPotentialAllen::GalacticPotentialAllen().
00860 { 00861 return new GalacticPotentialAllen(*this); 00862 }
virtual bool depends_on_velocity | ( | ) | const [inline, virtual, inherited] |
Reimplemented in Newton, and Relativistic.
Definition at line 92 of file orsa_interaction.h.
Referenced by Radau15::Step().
InteractionType GetType | ( | ) | const [inline, virtual] |
Implements Interaction.
Definition at line 434 of file orsa_interaction.h.
References orsa::GALACTIC_POTENTIAL_ALLEN.
00434 { 00435 return GALACTIC_POTENTIAL_ALLEN; 00436 }
bool IsSkippingJPLPlanets | ( | ) | const [inline, inherited] |
Definition at line 98 of file orsa_interaction.h.
References Interaction::skip_JPL_planets.
Referenced by Evolution::Integrate(), Stoer::Step(), DissipativeRungeKutta::Step(), RungeKutta::Step(), Radau15::Step(), Leapfrog::Step(), and OrsaFile::Write().
00098 { 00099 return skip_JPL_planets; 00100 }
double PotentialEnergy | ( | const Frame & | f | ) | [virtual] |
Implements Interaction.
Definition at line 915 of file orsa_interaction.cc.
References Vector::Length(), orsa::secure_pow(), Frame::size(), Vector::x, Vector::y, and Vector::z.
Referenced by GalacticPotentialAllenPlusNewton::PotentialEnergy().
00915 { 00916 00917 // to be tested... 00918 00919 double energy = 0.0; 00920 00921 double pb,pd,ph; 00922 double r2,z2,r,rho; 00923 unsigned int i; 00924 Vector x; 00925 00926 for (i=0;i<f.size();++i) { 00927 00928 x = f[i].position(); 00929 00930 // auxiliary components 00931 r2 = x.x*x.x+x.y*x.y; 00932 z2 = x.z*x.z; 00933 r = sqrt(r2); 00934 rho = x.Length(); 00935 00936 pb = mb/sqrt(r2+z2+bb*bb); 00937 pd = md/sqrt(r2+secure_pow(ad+sqrt(z2+bd*bd),2)); 00938 ph = (mh/(rho/ah))*(secure_pow(rho/ah,2.02))/(1.0+secure_pow(rho/ah,1.02)); 00939 00940 energy -= (pb+pd+ph); 00941 00942 } 00943 00944 return (energy*g); 00945 }
void SkipJPLPlanets | ( | const bool | b | ) | [inline, inherited] |
Definition at line 95 of file orsa_interaction.h.
References Interaction::skip_JPL_planets.
00095 { 00096 skip_JPL_planets = b; 00097 }
bool skip_JPL_planets [protected, inherited] |
Definition at line 102 of file orsa_interaction.h.
Referenced by Interaction::IsSkippingJPLPlanets(), Newton::Newton(), and Interaction::SkipJPLPlanets().