Add a limit 1e-6 to the degradation parameters, otherwise set to 0

Remove debug printout
This commit is contained in:
Holger Vogt 2026-02-15 00:45:40 +01:00
parent 5cee2b6273
commit 3cc6d28682
1 changed files with 5 additions and 4 deletions

View File

@ -456,13 +456,14 @@ void cm_degmon(ARGS) /* structure holding parms,
if (T(0) > 0.99999 * tsim) {
/** debugging **/
char *thisinstance = INSTNAME;
// cm_message_printf("%s\n", thisinstance);
/**** model equations 2 ****/
sintegral = sintegral * tfut / tsim;
deg = 1. / (c * (pow(sintegral, -1.* n)));
/***************************/
// cm_message_printf("no. %d, Degradation deg = %e\n", ii, deg);
sintegral = 1e99; // flag final time step
/* only significant degradation */
if (fabs(deg) < 1e-6)
deg = 0.;
loc->result[ii] = deg;
}
loc->sintegral[ii] = sintegral;
@ -471,8 +472,8 @@ void cm_degmon(ARGS) /* structure holding parms,
/* save the degradation data for this instance */
if (T(0) > 0.99999 * tsim) {
nghash_insert(glohash, loc->parentname, loc->result);
cm_message_printf("instance %s, data: %e %e %e\n", loc->parentname, loc->result[0],
loc->result[1], loc->result[2]);
// cm_message_printf("instance %s, data: %e %e %e\n", loc->parentname, loc->result[0],
// loc->result[1], loc->result[2]);
}
}
}