Skip to content

Commit

Permalink
Merge pull request #279 from samrosegilbert/samdev
Browse files Browse the repository at this point in the history
Samdev
  • Loading branch information
RoryBarnes committed Mar 5, 2024
2 parents 068e445 + 0c0a4f6 commit 9cfcfdb
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/EarthInterior/earth.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dTCore 6000
#dViscJumpMan 2.40
dActViscMan 3e5

saOutputOrder -Time -TMan -TUMan -TLMan -TCMB -TCore $
saOutputOrder -Time -TMan -TUMan -TSolUMan -TLMan -TCMB -TCore $
-HflowUMan -HflowMeltMan -RadPowerMan -RadPowerCore -RadPowerCrust $
-HflowCMB -HflowSecMan $
-TDotMan -TDotCore -TJumpLMan -TJumpUMan -RIC -RayleighMan -ViscUMan -ViscLMan $
Expand Down
33 changes: 33 additions & 0 deletions src/thermint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,30 @@ void fvWriteTUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system,
} else {
}
}
/**
Write TsolUMan output
@param body Body struct
@param control Control struct
@param output Output struct
@param system System struct
@param units Units struct
@param update Update struct
@param iBody Index of body
@param dTmp Temporary variable
@param cUnit Variable units
*/
void fvWriteTsolUMan(BODY *body, CONTROL *control, OUTPUT *output, SYSTEM *system,
UNITS *units, UPDATE *update, int iBody, double *dTmp,
char cUnit[]) {
/* Get TsolUMan */
*dTmp = body[iBody].dTsolUMan;
if (output->bDoNeg[iBody]) {
*dTmp *= output->dNeg;
strcpy(cUnit, output->cNeg);
} else{
}
}
/**
Write TLMan output
Expand Down Expand Up @@ -3668,6 +3692,15 @@ void fvInitializeOutputThermint(OUTPUT *output, fnWriteOutput fnWrite[]) {
output[OUT_TUMAN].iModuleBit = THERMINT;
fnWrite[OUT_TUMAN] = &fvWriteTUMan;

sprintf(output[OUT_TSOLUMAN].cName, "TsolUMan");
sprintf(output[OUT_TSOLUMAN].cDescr, "Upper Mantle Thermal Boundary Layer Solidus Temperature");
sprintf(output[OUT_TSOLUMAN].cNeg, "K");
output[OUT_TSOLUMAN].bNeg = 1;
output[OUT_TSOLUMAN].dNeg = 1;
output[OUT_TSOLUMAN].iNum = 1;
output[OUT_TSOLUMAN].iModuleBit = THERMINT;
fnWrite[OUT_TSOLUMAN] = &fvWriteTsolUMan;

sprintf(output[OUT_TLMAN].cName, "TLMan");
sprintf(output[OUT_TLMAN].cDescr, "Lower Mantle Temperature");
sprintf(output[OUT_TLMAN].cNeg, "K");
Expand Down
3 changes: 3 additions & 0 deletions src/thermint.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ void fvForceBehaviorThermint(BODY *, MODULE *, EVOLVE *, IO *, SYSTEM *,
#define OUT_TMAN 1710 /**< [K] Average mantle temperature */
#define OUT_TUMAN \
1711 /**< [K] Temperature base of upper mantle boundary layer */
#define OUT_TSOLUMAN 1801 /**< [K] Upper mantle solidus temperature */
#define OUT_TLMAN \
1712 /**< [K] Temperature top of lower mantle boundary layer */
#define OUT_TCORE 1713 /**< [K] Average core temperature */
Expand Down Expand Up @@ -594,6 +595,8 @@ void fvWriteTMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int,
double *, char[]);
void fvWriteTUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int,
double *, char[]);
void fvWriteTsolUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int,
double *, char[]);
void fvWriteTLMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *, int,
double *, char[]);
void fvWriteTJumpUMan(BODY *, CONTROL *, OUTPUT *, SYSTEM *, UNITS *, UPDATE *,
Expand Down

0 comments on commit 9cfcfdb

Please sign in to comment.