22 #define MEARTH 5.972186e27 // Prsa et al. 2016
23 #define MSUN 1.988416e33 // Prsa et al. 2016
24 #define AUCM 1.49598e13
25 #define RSUN 6.957e10 // Prsa et al. 2016
26 #define YEARSEC 3.15576e7
28 #define REARTH 6.3781e8 // Equatorial; Prsa et al. 2016
29 #define RJUP 7.1492e9 // Equatorial; Prsa et al. 2016
30 #define MJUP 1.898130e30 // Prsa et al. 2016
32 #define BIGG 6.67428e-8 // From Luzum et al., 2011; value recommended by IAU NSFA in Prsa et al. 2016
33 #define PI 3.1415926535
36 #define MNEP 1.0244e29
38 #define YEARDAY 365.25
39 #define MSAT 5.6851e29
40 #define DEGRAD 0.017453292519444445
67 #define TINY (1./HUGE)
146 typedef void (*fvDerivs)(
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,double,
int**,double,int);
150 typedef double (*fdEqSpin)(double,double,double,int);
175 char cSystemName[16];
184 char *cOutputOrder[NUMOUT];
211 typedef double (*fdStep)(
PARAM*,
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,double,
int**,
double*,double,int);
222 char cParam[NUMOPT][OPTLEN];
223 char cDescr[NUMOPT][LINELEN];
225 char cDefault[NUMOPT][OPTLEN];
229 char *cParam[NUMOUT];
230 char cDescr[NUMOUT][LINELEN];
232 char cNeg[NUMOUT][OPTLEN];
233 double dConvert[NUMOUT];
238 void fprintd(FILE*,
double,
int,
int);
239 char *InitializeString();
242 double dBaylessOrosz06_MassRad(
double);
243 double dGordaSvech99_MassRad(
double);
244 double dReidHawley_MassRad(
double);
245 double dSotin07_MassRad(
double);
246 double dBaylessOrosz06_RadMass(
double);
247 double dBaraffe15_MassRad(
double);
248 double dGordaSvech99_RadMass(
double);
249 double dReidHawley_RadMass(
double);
250 double dSotin07_RadMass(
double);
252 double dDpDt(
double,
double,
double);
254 double a2p(
double,
double);
255 double p2a(
double,
double);
256 double dFreqToPer(
double);
257 double dPerToFreq(
double);
258 double dSemiToMeanMotion(
double,
double);
259 double dRotVel(
double,
double);
260 double DOrbPerDt(
double,
double,
double);
263 double dLengthUnit(
int,
int);
264 double dTimeUnit(
int,
int);
265 double dMassUnit(
int,
int);
266 double dAngleUnit(
int,
int);
269 double EqSpinRate_CPL2(
double,
double,
double,
int);
270 void AssignEpsilon(
double,
double,
int*);
275 double dDomegaDt_CPL2(
double,
double,
double,
double,
double,
double,
int*,
double);
276 double dDoblDt_CPL2(
double,
double,
double,
double,
double,
int*,
double,
double,
double);
277 double dTideHeat_CPL2(
int*,
double,
double,
double,
double,
double);
280 double dDaDt1_CPL2(
double,
double,
double,
double,
double,
int*,
double);
281 double dDeDt1_CPL2(
double,
double,
double,
double,
int*,
double);
282 double dTideHeatEq_CPL2(
double,
double,
double,
double,
int);
283 double EqSpinRate_CPL2Discrete(
double,
double);
284 double EqSpinRate_CPL2Cont(
double,
double);
285 double dGammaRot(
double,
double,
int*);
286 double dGammaOrb(
double,
double,
int*);
287 void DerivsCPL(
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,
double,
int**,
double,
int);
290 double EqSpinRate_CTL8(
double,
double,
double,
int);
291 double AssignF1(
double);
292 double AssignF2(
double);
293 double AssignF3(
double);
294 double AssignF4(
double);
295 double AssignBeta(
double);
296 double AssignF5(
double);
300 double dDomegaDt_CTL8(
double,
double,
double,
double,
double,
double,
double,
double,
double,
double *);
301 double dDoblDt_CTL8(
double,
double,
double,
double,
double,
double,
double,
double,
double,
double*,
double);
302 double dAnnualHeat_CTL8(
double,
double,
double);
303 double dDailyHeat_CTL8(
double,
double*,
double,
double,
double,
double);
306 double dDaDt1_CTL8(
double,
double,
double,
double,
double,
double,
double,
double,
double *,
double);
307 double dDeDt1_CTL8(
double,
double,
double,
double,
double,
double,
double,
double,
double*,
double);
308 double dTideHeat_CTL8(
double,
double*,
double,
double,
double,
double);
309 double dTideHeatEq_CTL8(
double,
double*,
double,
double,
double);
310 void DerivsCTL(
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,
double,
int**,
double,
int);
313 double EulerStep(
PARAM*,
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,
double,
int**,
double*,
double,
int);
314 double RK4Step(
PARAM*,
PRIMARY*,
SECONDARY*,
IO*,
double*,
double*,
double*,
double,
int**,
double*,
double,
int);
318 double dSpinAngMom(
double,
double,
double,
double);
319 double dRotEn(
double,
double,
double,
double);
320 double dOrbEn(
double,
double,
double);
322 void LineExit(
char[],
int,
int,
int);
324 double dDPerDt(
double,
double);
327 void InitializeIO(
IO*);
328 void InitializeOutput(
OUTPUT*);
329 void InitializeOptions(
OPTIONS*);
double dDobliquityDt
Time derivative of obliquity.
Definition: eqtide.h:95
int exit_exe
Exit code for execution error.
Definition: eqtide.h:137
double dDaDt
Time derivative of semi-major axis.
Definition: eqtide.h:124
double dRG
Radius of Gyration.
Definition: eqtide.h:109
double dMass
Planetary Mass.
Definition: eqtide.h:102
double dSyncEcc
Synchronous rotation below this e.
Definition: eqtide.h:110
double dK2
Love number of primary.
Definition: eqtide.h:83
int iVerbose
Verbosity: 0=no STDOUT, 1=all.
Definition: eqtide.h:129
double dAge
System Age.
Definition: eqtide.h:118
double dDobliquityDt
Time derivative of obliquity.
Definition: eqtide.h:123
int bSecSync
Halt if secondary rotation becomes synchronous?
Definition: eqtide.h:164
int iMassRad
Mass-Radius relationship identifier.
Definition: eqtide.h:120
int bDiscreteRot
Use Discrete Rotation model (CPL)
Definition: eqtide.h:177
double dQ
Secondary Tidal Q.
Definition: eqtide.h:105
int exit_param
Exit code for failure to specify necessary paramter.
Definition: eqtide.h:134
int bForceEqSpin
Tidally lock second?
Definition: eqtide.h:112
double dDomegaDt
Time derivative of spin rate.
Definition: eqtide.h:94
int bDblSync
Halt for double synchronous rotation?
Definition: eqtide.h:154
double dBackOutputTime
Output interval in Backward integration (years)
Definition: eqtide.h:199
double dBackStopTime
Backward integration time (years)
Definition: eqtide.h:198
int exit_units
Exit code for unit conversion error.
Definition: eqtide.h:138
int iSciNot
Decade to change from flt.
Definition: eqtide.h:132
double dRadius
Secondary Radius.
Definition: eqtide.h:103
double dMinSecObl
Halt integration at this obliquity.
Definition: eqtide.h:158
int bPosDeDt
Halt when de/dt > 0.
Definition: eqtide.h:161
double dDeDt
Time derivative of eccentricity.
Definition: eqtide.h:125
double dSpinRate
Rotation Rate.
Definition: eqtide.h:85
double dTau
Time lag.
Definition: eqtide.h:104
int bSecLock
Halt secondary becomes tide locked?
Definition: eqtide.h:163
int bPriLock
Halt primary becomes tide locked?
Definition: eqtide.h:162
double dMinValue
Minimum value for e and obl.
Definition: eqtide.h:187
int bDoBackward
Perfrom backward integration?
Definition: eqtide.h:196
double dMinSemi
Halt integration at this semi-major axis.
Definition: eqtide.h:156
int bLog
Write log file?
Definition: eqtide.h:179
double dK2
Secondary Love number.
Definition: eqtide.h:106
double dSemi
Semi-major axis.
Definition: eqtide.h:115
char * cIn
Input file.
Definition: eqtide.h:215
double dMinEcc
Halt integration at this eccentricity.
Definition: eqtide.h:160
int iNumCols
Number if columns in output file.
Definition: eqtide.h:185
int exit_input
Exit code for incompatible paramters.
Definition: eqtide.h:136
int iUnitTime
Time Unit for input/output.
Definition: eqtide.h:173
double dForwOutputTime
Output interval in forward integration (years)
Definition: eqtide.h:193
int iUnitAngle
Angle Unit for input/output.
Definition: eqtide.h:172
int bForceEqSpin
Force spin rate to be equilibrium?
Definition: eqtide.h:89
int iIntegration
Integration method.
Definition: eqtide.h:204
int iUnitLength
Length Unit for input/output.
Definition: eqtide.h:171
double dObliquity
Obliquity.
Definition: eqtide.h:107
double dRadius
Radius of primary.
Definition: eqtide.h:80
double dForwStopTime
Forward integration time (years)
Definition: eqtide.h:192
double dMaxEcc
Halt integration at this eccentricity.
Definition: eqtide.h:159
double * iEpsilon
Signs of phase lags.
Definition: eqtide.h:87
int iMassRad
Mass-Radius relationship identifier.
Definition: eqtide.h:92
int iUnitMass
Mass Unit for input/output.
Definition: eqtide.h:170
double dl
Change in angular momentum: (l-l0)/l0.
Definition: eqtide.h:182
int exit_output
Exit code for error during output.
Definition: eqtide.h:139
double dObliquity
Obliquity.
Definition: eqtide.h:84
double dEcc
Eccentricity.
Definition: eqtide.h:116
int bVarDt
Use variable timestep?
Definition: eqtide.h:201
int bHalt
Check for halts?
Definition: eqtide.h:153
int exit_io
Exit code for failure to open/close a file.
Definition: eqtide.h:135
double dMeanMotion
Mean Motion.
Definition: eqtide.h:117
double dDomegaDt
Time derivative of spin rate.
Definition: eqtide.h:122
int iDigits
Number of digits after the decimal.
Definition: eqtide.h:131
double dMinPriObl
Halt integration at this obliquity.
Definition: eqtide.h:157
double dMass
Mass of primary.
Definition: eqtide.h:79
fdEqSpin fEqSpin
Function pointer to equilibrium spin rate.
Definition: eqtide.h:206
int bMerge
Halt for merge?
Definition: eqtide.h:155
double dBackTimeStep
Time step for backward integration (years)
Definition: eqtide.h:197
int iTideModel
Integer version of tide model.
Definition: eqtide.h:176
double dMaxLockDiff
When to set spin rate to equilibrium.
Definition: eqtide.h:90
double dTimestepCoeff
Variable Timestep coefficients.
Definition: eqtide.h:202
double dRG
Radius of Gyration.
Definition: eqtide.h:86
double dForwTimeStep
Time step for forward integration (years)
Definition: eqtide.h:191
int bDoForward
Perform forward integration?
Definition: eqtide.h:190
double dTau
Time lag.
Definition: eqtide.h:81
double dQ
Tidal Q of primary.
Definition: eqtide.h:82
double dSpinRate
Rotation rate.
Definition: eqtide.h:108
char * cExe
Name of executable.
Definition: eqtide.h:214
double l0
Initial angular momentum.
Definition: eqtide.h:181
double dMaxLockDiff
When to set spin rate to equilibrium.
Definition: eqtide.h:113
fvDerivs fDerivs
Function pointer to derivatives.
Definition: eqtide.h:205