added dummy in derivative of Tsurf
@@ -2202,18 +2202,23 @@ double fdDPotTemp(BODY *body, SYSTEM *system, int *iaBody) {
}
double fdDSurfTemp(BODY *body, SYSTEM *system, int *iaBody) {
- double dFluxPart,dWaterPart,dManPart,dTempPart,dTBL;
+ double dFluxPart,dWaterPart,dManPart,dTempPart,dTBL,dReturn;
dTBL = fabs((body[iaBody[0]].dPotTemp-body[iaBody[0]].dSurfTemp) * THERMALCONDUC / body[iaBody[0]].dManHeatFlux);
+ dTBL = (body[iaBody[0]].dPotTemp-body[iaBody[0]].dSurfTemp) * THERMALCONDUC / body[iaBody[0]].dManHeatFlux;
if (dTBL>(body[iaBody[0]].dRadius-body[iaBody[0]].dSolidRadius)) {
dTBL = body[iaBody[0]].dRadius-body[iaBody[0]].dSolidRadius;
}
dFluxPart = body[iaBody[0]].dManHeatFlux - body[iaBody[0]].dNetFluxAtmo;
dWaterPart = WATERHEATCAP * (body[iaBody[0]].dPressWaterAtm + body[iaBody[0]].dPressOxygenAtm) / body[iaBody[0]].dGravAccelSurf;
dManPart = SILICATEHEATCAP * body[iaBody[0]].dManMeltDensity / (3*pow(body[iaBody[0]].dRadius,2));
- // dTempPart = pow(body[iaBody[0]].dRadius,3) - pow(dTBL,3);
dTempPart = pow(body[iaBody[0]].dRadius,3) - pow((body[iaBody[0]].dRadius-dTBL),3);
+ // dTempPart = pow(body[iaBody[0]].dRadius,3) - pow(dTBL,3);
+ // dTempPart = 3*pow(body[iaBody[0]].dRadius,2)*dTBL;
// dTempPart = pow(body[iaBody[0]].dRadius,3) - pow((body[iaBody[0]].dRadius-body[iaBody[0]].dSolidRadius),3);
- return dFluxPart / (dWaterPart + dManPart * dTempPart);
+
+ dReturn = dFluxPart / (dWaterPart + dManPart * dTempPart);
+
+ return dReturn;
}
double fdDSolidRadius(BODY *body, SYSTEM *system, int *iaBody) {
