distrot

Contents

distrot.c

Subroutines that control the integration of the obliquity model.

Author

Russell Deitrick (deitrr)

Date

July 7 2015

Functions

void BodyCopyDistRot(BODY *dest, BODY *src, int iTideModel, int iNumBodies, int iBody)
void InitializeUpdateTmpBodyDistRot(BODY *body, CONTROL *control, UPDATE *update, int iBody)
void ReadForcePrecRate(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadPrecRate(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadSpecMomInertia(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadOrbitData(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void ReadFileOrbitData(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, int iFile)
void InitializeOptionsDistRot(OPTIONS *options, fnReadOption fnRead[])
void ReadOptionsDistRot(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, SYSTEM *system, fnReadOption fnRead[], int iBody)
void InitializeXoblDistRot(BODY *body, UPDATE *update, int iBody, int iPert)
void InitializeYoblDistRot(BODY *body, UPDATE *update, int iBody, int iPert)
void InitializeZoblDistRot(BODY *body, UPDATE *update, int iBody, int iPert)
void InitializeXoblDistRotStar(BODY *body, UPDATE *update, int iBody, int iPert)
void InitializeYoblDistRotStar(BODY *body, UPDATE *update, int iBody, int iPert)
void VerifyOrbitData(BODY *body, CONTROL *control, OPTIONS *options, int iBody)
void AssignDistRotDerivatives(BODY *body, EVOLVE *evolve, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody)
void NullDistRotDerivatives(BODY *body, EVOLVE *evolve, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody)
void VerifyDistRot(BODY *body, CONTROL *control, FILES *files, OPTIONS *options, OUTPUT *output, SYSTEM *system, UPDATE *update, int iBody, int iModule)
void InitializeUpdateDistRot(BODY *body, UPDATE *update, int iBody)
void FinalizeUpdateXoblDistRot(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateYoblDistRot(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void FinalizeUpdateZoblDistRot(BODY *body, UPDATE *update, int *iEqn, int iVar, int iBody, int iFoo)
void CountHaltsDistRot(HALT *halt, int *iNumHalts)
void VerifyHaltDistRot(BODY *body, CONTROL *control, OPTIONS *options, int iBody, int *iHalt)
void WriteBodyDOblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteOblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WritePrecATimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyDPrecADtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyDXoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyDYoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyDZoblDtDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteXoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteYoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteZoblTimeDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyCassOne(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteBodyCassTwo(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WriteDynEllip(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void WritePrecFNat(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UNITS *units, UPDATE *update, int iBody, double *dTmp, char **cUnit)
void InitializeOutputDistRot(OUTPUT *output, fnWriteOutput fnWrite[])
void LogOptionsDistRot(CONTROL *control, FILE *fp)
void LogDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput fnWrite[], FILE *fp)
void LogBodyDistRot(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system, UPDATE *update, fnWriteOutput fnWrite[], FILE *fp, int iBody)
void AddModuleDistRot(CONTROL *control, MODULE *module, int iBody, int iModule)
void UpdateOrbitData(BODY *body, EVOLVE *evolve, int iBody)
void PropsAuxDistRot(BODY *body, EVOLVE *evolve, IO *io, UPDATE *update, int iBody)
void ForceBehaviorDistRot(BODY *body, MODULE *module, EVOLVE *evolve, IO *io, SYSTEM *system, UPDATE *update, fnUpdateVariable ***fnUpdate, int iBody, int iModule)
void RotateVector(double *v1, double *v2, double theta, int axis)
double fndCentralTorqueSfac(BODY *body, int iBody)

Correction to axial precession rate for eccentricity (and possible additional effects)

Parameters:
  • body – Struct containing all body information and variables

  • iBody – Body in question

Returns:

Correction to precession rate

double fndCentralTorqueR(BODY *body, int iBody)

Natural axial precession rate due to host star (alpha*cos(obliquity))

Parameters:
  • body – Struct containing all body information and variables

  • iBody – Body in question

Returns:

Axial precession rate (rad/sec)

double fndObliquityCRD4(BODY *body, SYSTEM *system, int *iaBody)

C(p,q) function in obliquity evol equations if RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

C(p,q) function

double fndObliquityARD4(BODY *body, SYSTEM *system, int *iaBody)

A(p,q) function in obliquity evol equations if RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

A(p,q) function

double fndObliquityBRD4(BODY *body, SYSTEM *system, int *iaBody)

B(p,q) function in obliquity evol equations if RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

B(p,q) function

double fndObliquityCLL2(BODY *body, SYSTEM *system, int *iaBody)

C(p,q) function in obliquity evol equations if LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

C(p,q) function

double fndObliquityALL2(BODY *body, SYSTEM *system, int *iaBody)

A(p,q) function in obliquity evol equations if LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

A(p,q) function

double fndObliquityBLL2(BODY *body, SYSTEM *system, int *iaBody)

B(p,q) function in obliquity evol equations if LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

B(p,q) function

double fndObliquityCExt(BODY *body, SYSTEM *system, int *iaBody)

C(p,q) function in obliquity evol equations if external orbital data is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

C(p,q) function

double fndObliquityAExt(BODY *body, SYSTEM *system, int *iaBody)

A(p,q) function in obliquity evol equations if external orbital data is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

A(p,q) function

double fndObliquityBExt(BODY *body, SYSTEM *system, int *iaBody)

B(p,q) function in obliquity evol equations if external orbital data is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

B(p,q) function

double fndAxialGRCorrection(BODY *body, int *iaBody)

GR correction to axial precession rate

Parameters:
  • body – Struct containing all body information and variables

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Correction to axial precession rate d(PrecA)/dt

double fndAxialGRDxDt(BODY *body, SYSTEM *system, int *iaBody)

GR correction to derivative of x = sin(obliquity)*cos(preca)

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Correction to derivative dx/dt

double fndAxialGRDyDt(BODY *body, SYSTEM *system, int *iaBody)

GR correction to derivative of y = sin(obliquity)*sin(preca)

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Correction to derivative dy/dt

double fndDistRotRD4DyDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of y = sin(obliquity)*sin(preca) when RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dy/dt

double fndDistRotRD4DxDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of x = sin(obliquity)*cos(preca) when RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dx/dt

double fndDistRotRD4DzDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of z = cos(obliquity) when RD4 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dz/dt

double fndDistRotLL2DyDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of y = sin(obliquity)*sin(preca) when LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dy/dt

double fndDistRotLL2DxDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of x = sin(obliquity)*cos(preca) when LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dx/dt

double fndDistRotLL2DzDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of z = cos(obliquity) when LL2 orbital model is used

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dz/dt

double fndDistRotDDynEllipDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of dynamical ellipticity when coupled to eqtide and thermint

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative d(dynellip)/dt

double fndDistRotExtDxDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of x = sin(obliquity)*cos(preca) when orbital data is input from external model

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dx/dt

double fndDistRotExtDyDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of y = sin(obliquity)*sin(preca) when orbital data is input from external model

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dy/dt

double fndDistRotExtDzDt(BODY *body, SYSTEM *system, int *iaBody)

Derivative of z = cos(obliquity) when orbital data is input from external model

Parameters:
  • body – Struct containing all body information and variables

  • system – Struct containing system information

  • iaBody – Array containing indices of bodies associated with interaction

Returns:

Derivative dz/dt

distrot.h

Subroutines that control the integration of the obliquity model.

Author

Russell Deitrick (deitrr)

Date

July 7 2015

Defines

OPTSTARTDISTROT
OPTENDDISTROT
OPT_FORCEPRECRATE
OPT_PRECRATE
OPT_READORBITDATA
OPT_FILEORBITDATA
OPT_SPECMOMINERTIA
OUTSTARTDISTROT
OUTENDDISTROT
OUTBODYSTARTDISTROT
OUT_CASS1
OUT_CASS2
OUT_DOBLDTDISTROT
OUT_DPRECADTDISTROT
OUT_DXOBLDTDISTROT
OUT_DYOBLDTDISTROT
OUT_DZOBLDTDISTROT
OUT_OBLTIMEDISTROT
OUT_PRECATIMEDISTROT
OUT_XOBLTIMEDISTROT
OUT_YOBLTIMEDISTROT
OUT_ZOBLTIMEDISTROT
OUT_DYNELLIP
OUT_PRECFNAT