Product Lifetime at Operating Temperature and eTCL Slot Calculator Demo Example , numerical analysis

Product Lifetime at Operating Temperature and eTCL Slot Calculator Demo Example

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, gold 12Dec2018



Preface

gold12Dec2018. Here are some calculations for product lifetime at operating temperature. The calculations for lifetime ops are usually from figures provided in product specs. Most of the testcases involve replicas or models, using assumptions and rules of thumb.


Introduction

The 4 given numbers are expected lifetime rated at reference temperature in years (L0), t0 rating temperature in centigrade degrees, t2 operating temperature in degrees centigrade, and t2 operating temperature degrees centigrade. The formula for product lifetime (L2) at operating temperature is L2=L0*{0.5**{(t2-t0)/t1 }} years. The eTCL calculator offers change of halflife factor or base 0.5, but that halflife factor is not expected to change usually in business calculations. The lifetime in years can be converted into lifetime = L2 * 8760 {or 365*24} years.


While the halflife factor (0.5) is not expected to change usually in business calculations, there is some advantage to studying the effects of the halflife factor on the eTCL calculator results. For example, load the first testcase in the calculator and change the halflife factor by 10 percent to 0.5-0.5*90%*1E-2 or 0.45. Pushing solve with loaded entries <10,20,10,10,.45> with 0.45 factor changes the operating lifetime by 0.5 years. The eTCL calculator is very sensitive to the accuracy of the halflife factor or the inferred accuracy of halflife from specs in years.


In planning any software, it is advisable to gather a number of testcases to check the results of the program. The results of the testcases are estimated using the hand calculator and then checked in the eTCL slot calculator. Pseudocode and equations are developed from the hand calculations and theory. Small console programs are written to check or proof the alternate subroutines or procedures, rather than keeping the unblessed code and comment lines in the main slot calculator. Finally the improved or alternate subroutines are loaded into the slot calculator. The eTCL slot calculator is effectively a shell program to input entries, host calculation routines, and display results. Additional significant figures are used to check the eTCL calculator, not to infer the accuracy of inputs and product reports.


*Push Button Operation**


For the push buttons in the eTCL slot calculator, the recommended procedure is push testcase to fill entry frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console. For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers. The current result numbers will be cleared on the next solve button. The calculator display has a caution flag subroutine for negative numbers, unrecognizable text characters, and operation outside expected operation range. On a degrading scale, the calculator will post warning flags to the console report, issue degraded accuracy notices, and may reset some negative and offscale numbers to positive defaults. Errors pass through the warning flag routine once on the same testcase and multiple error calls on the same fault are possible. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the functions (subroutines).

Pseudocode and Equations

     #pseudocode can be developed from rules of thumb.
     #pseudocode: some problems can be solved by proportions (rule of three), to some order of magnitude
     #pseudocode: enter quantity1,  quantity2, quantity3 and expected output (quantity4) for testcases.
     #pseudocode: enter time in years, number of remaining items
     #pseudocode: output fraction of (remaining items) over (items at time zero)
     #pseudocode: ouput remaining items as fraction or percent
     #pseudocode: output fraction of (quantity4 ) over ( quantity1 at time zero)
     #pseudocode: output fraction of (quantity2) * (quantity3 ) over (quantity1 at time zero)
     #pseudocode: outputs should be in compatible units.
     #pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out.
     #pseudocode: need test cases > small,medium, giant
     #pseudocode: need testcases within range of expected operation.
     #pseudocode: are there any cases too small or large to be solved?

Testcases Section

Testcase 1

table 1printed in tcl format
quantity value comment, if any
testcase number:1
10.0 :expected lifetime rated at ref temperature years
20.0 :t0 rating temperature
10.0 :t1 temperature for half lifetime
10.0 :t2 operating temperature degrees centigrade
0.5 :halflife factor (optional, usually 0.5)
43800.0 :answers:lifetime at operating temperature hours
1825.0 : lifetime at operating temperature days
5.0 : lifetime at operating temperature years

Testcase 2

table 2printed in tcl format
quantity value comment, if any
testcase number:2
10.0 :expected lifetime rated at ref temperature years
20.0 :t0 rating temperature
10.0 :t1 temperature for half lifetime
5.0 :t2 operating temperature degrees centigrade
0.5 :halflife factor (optional, usually 0.5)
30971.277 :answers:lifetime at operating temperature hours
1290.469 : lifetime at operating temperature days
3.535 : lifetime at operating temperature years

Testcase 3

table 3printed in tcl format
quantity value comment, if any
testcase number:3
10.0 :expected lifetime rated at ref temperature years
20.0 :t0 rating temperature
10.0 :t1 temperature for half lifetime
8. :t2 operating temperature degrees centigrade
0.5 :halflife factor (optional, usually 0.5)
38130. :answers:lifetime at operating temperature hours
1588. : lifetime at operating temperature days
4.35 : lifetime at operating temperature years

References:

  • Influence

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # Lifetime at Operating Temperature Calculator
        # written on Windows XP on eTCL
        # working under TCL version 8.6.x and eTCL 1.0.1
        # gold on TCL WIKI, 10oct2014
        # comment follows from gold, 12Dec2018
        # pretty print from autoindent and ased editor
        # Lifetime at Operating Temperature Calculator V2
        # written on Windows XP on TCL
        # working under TCL version 8.6
        # Revamping older program from 2014.
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {expected lifetime rated at ref temperature years:} }
        lappend names {t0 rating temperature:}
        lappend names {t1 temperature for half lifetime: }
        lappend names {t2 operating temperature degrees centigrade:}
        lappend names {halflife factor (optional, usually 0.5):}
        lappend names {answers: lifetime at operating temperature hours: }
        lappend names {lifetime at operating temperature days: }
        lappend names {lifetime at operating temperature years:}
        foreach i {1 2 3 4 5 6 7 8} {
            label .frame.label$i -text [lindex $names $i] -anchor e
            entry .frame.entry$i -width 35 -textvariable side$i
            grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 }
        proc pi {} {expr acos(-1)}
        proc about {} {
            set msg "Calculator for Lifetime at Operaturing Temperature V2
            from TCL ,
            # gold on  TCL Club, 12Dec2018 "
            tk_messageBox -title "About" -message $msg }
        proc self_help {} {
            set msg " Lifetime at Operaturing Temperature V2
            from TCL Club ,
            # self help listing
            # problem, Lifetime at Operaturing Temperature V2
            # 4 givens follow.
            1) expected lifetime rated at ref temperature years:
            2) t0 rating temperature:
            3) t1 temperature for half lifetime:
            4) halflife factor (optional, usually 0.5):
            # Recommended procedure is push testcase
            # and fill frame,
            # change first three entries etc, push solve,
            # and then push report.
            # Report allows copy and paste
            # from console to conventional texteditor.
            # For testcases, testcase number is internal
            # to the calculator and will not be printed
            # until the report button is pushed
            # for the current result numbers.
            # >>> copyright notice <<<
            # This posting, screenshots, and TCL source code is
            # copyrighted under the TCL/TK license terms.
            # Editorial rights and disclaimers
            # retained under the TCL/TK license terms
            # and will be defended as necessary in court.
            Conventional text editor formulas
            or  formulas grabbed from internet
            screens can be pasted into green console.
            # gold on  TCL Club, 12Dec2018 "
            tk_messageBox -title "Self_Help" -message $msg }
        proc calculate {     } {
            global answer2
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global testcase_number
            incr testcase_number
            set side1 [* $side1 1. ]
            set side2 [* $side2 1. ]
            set side3 [* $side3 1. ]
            set side4 [* $side4 1. ]
            set side5 [* $side5 1. ]
            set side6 [* $side6 1. ]
            set side7 [* $side7 1. ]
            set side8 [* $side8 1. ]
            set temperature0_rating 1.
            set temperature1_half_life 1.
            set temperature_operating 1.
            set lifetime0_rated 1.
            set lifetime1_at_temperature 1.
            set lifetime1_at_temperature_ops 1.
            set temperature0_rating $side2
            set temperature1_half_life $side3
            set temperature_operating $side4
            set lifetime0_rated $side1
            set lifetime1_at_temperature_ops 1.
            #set base [* 0.5 1. ]
            set base [*  $side5 1. ]
            set term_temp [/ [-  $temperature_operating $temperature0_rating ] [* $temperature1_half_life 1. ] ]
            set term_temp [abs $term_temp ]
            set lifetime1_at_temperature_ops [* $lifetime0_rated [pow $base $term_temp  ] ]
            set side6 [* $lifetime1_at_temperature_ops 8760. ]
            set side7 [* $lifetime1_at_temperature_ops 365. ]
            set side8 $lifetime1_at_temperature_ops
        }
        proc fillup {aa bb cc dd ee ff gg hh} {
            .frame.entry1 insert 0 "$aa"
            .frame.entry2 insert 0 "$bb"
            .frame.entry3 insert 0 "$cc"
            .frame.entry4 insert 0 "$dd"
            .frame.entry5 insert 0 "$ee"
            .frame.entry6 insert 0 "$ff"
            .frame.entry7 insert 0 "$gg"
            .frame.entry8 insert 0 "$hh"
        }
        proc clearx {} {
            foreach i {1 2 3 4 5 6 7 8 } {
                .frame.entry$i delete 0 end } }
        proc reportx {} {
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global testcase_number
            console eval {.console config -bg palegreen}
            console eval {.console config -font {fixed 20 bold}}
            console eval {wm geometry . 40x20}
            console eval {wm title . " Lifetime at Operating Temperature Calculator V2 Report, screen grab and paste from console 2 to texteditor"}
            console eval {. configure -background orange -highlightcolor brown -relief raised -border 30}
            console show;
            puts "%|table $testcase_number|printed in| tcl format|% "
            puts "&| quantity| value| comment, if any|& "
            puts "&| testcase number:|$testcase_number | |&"
            puts "&| $side1 :|expected lifetime rated at ref temperature years |   |&"
            puts "&| $side2 :|t0 rating temperature| |& "
            puts "&| $side3 :|t1 temperature for half lifetime| |& "
            puts "&| $side4 :|t2 operating temperature degrees centigrade |  |&"
            puts "&| $side5 :|halflife factor (optional, usually 0.5)|  |&"
            puts "&| $side6 :|answers:lifetime at operating temperature hours |  |&"
            puts "&| $side7 :| lifetime at operating temperature days|  |&"
            puts "&| $side8 :| lifetime at operating temperature years|  |&"
        }
        frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 10. 20. 10. 10. 0.5 43800. 1825. 5.}
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 10.0 20.0 10.0 5. 0.5 30971. 1290. 3.5 }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 10.0 20.0 10.0 8. 0.5 38130. 1588. 4.35 }
        ::ttk::button .clearallx -text clear -command {clearx }
        ::ttk::button .about -text about -command about
        ::ttk::button .self_help -text self_help -command { self_help }
        ::ttk::button .cons -text report -command { reportx }
        ::ttk::button .exit -text exit -command {exit}
        pack .calculator  -in .buttons -side top -padx 10 -pady 5
        pack  .clearallx .cons .self_help .about .exit .test4 .test3 .test2   -side bottom -in .buttons
        grid .frame .buttons -sticky ns -pady {0 10}
        . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30
        wm title . "Lifetime at Operating Temperature Calculator V2"


Hidden Comments Section

Please place any comments here with your wiki MONIKER and date, Thanks.gold12Dec2018