(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 96957, 2229] NotebookOptionsPosition[ 93614, 2110] NotebookOutlinePosition[ 94021, 2128] CellTagsIndexPosition[ 93978, 2125] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[StyleBox["APPENDIX B", FontWeight->"Bold"]], "Text", CellChangeTimes->{{3.3931674469262543`*^9, 3.393167452283793*^9}}, TextAlignment->Left, FontSize->14], Cell["\<\ Simultaneous determination of k and Tc with incremental n values.\ \>", "Text", CellChangeTimes->{{3.3932562596421833`*^9, 3.393256312572752*^9}}, TextAlignment->Left, FontSize->16, FontWeight->"Bold"], Cell["\<\ Programmed by: Mark D. Normand and Micha Peleg Last modified: August 1, 2007\ \>", "Text", CellChangeTimes->{{3.393168181924315*^9, 3.393168198891725*^9}, { 3.393241755676222*^9, 3.393241769788744*^9}, {3.393241858404467*^9, 3.393241870013986*^9}, 3.393327138150137*^9, 3.393773040473209*^9, { 3.3938433404414883`*^9, 3.393843354875573*^9}, {3.393844380872176*^9, 3.393844382530843*^9}, {3.394188008788476*^9, 3.394188008958943*^9}, { 3.394961051258519*^9, 3.394961052693719*^9}}, TextAlignment->Left, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Assign the three parameters k, n and Tc their original values. These are the \ values we are trying to recover.\ \>", "Text", CellChangeTimes->{{3.3931675076578712`*^9, 3.3931675129825773`*^9}, { 3.393252746087364*^9, 3.393252752848744*^9}, {3.393328911293683*^9, 3.393328916410233*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"k", "=", "0.065"}], ";", RowBox[{"n", "=", "0.8"}], ";", RowBox[{"Tc", "=", "100."}], ";"}]], "Input", CellChangeTimes->{{3.393241591214342*^9, 3.393241619905489*^9}, { 3.393242584467102*^9, 3.3932425879189653`*^9}, 3.393242672115157*^9, 3.393242705182542*^9}, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Assign the final time values, tCycle1, tCycle2 and tCycle3, for the three \ survival curves.\ \>", "Text", CellChangeTimes->{{3.3933289214914227`*^9, 3.393328957210947*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"tCycle1", "=", "7."}], ";", RowBox[{"tCycle2", "=", "7.5"}], ";", RowBox[{"tCycle3", "=", "8."}], ";"}]], "Input", FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell["Define the three temperature profile functions.", "Text", CellChangeTimes->{3.393327174489436*^9}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T1", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "4."}], ",", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"t", "^", ".7"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"4.", "^", ".7"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"4.", "^", ".7"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".9"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.393773122681652*^9, 3.393773135377913*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T2", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "3."}], ",", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"t", "^", ".8"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"3.", "^", ".8"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"3", "^", ".8"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".7"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{3.393773089732197*^9, 3.393773157210267*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"T3", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "2.5"}], ",", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"t", "^", ".85"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"2.5", "^", ".85"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"2.5", "^", ".85"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".5"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.393773092609137*^9, 3.39377311505787*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Compute and save the three temperatures at the three tCycle times using the \ three temperature profile functions.\ \>", "Text", CellChangeTimes->{{3.393322237848249*^9, 3.3933222418990507`*^9}, { 3.393325056163465*^9, 3.3933250652433043`*^9}, {3.393325526678794*^9, 3.393325542925816*^9}, {3.393326043888006*^9, 3.393326044481868*^9}, 3.393327194632271*^9, {3.393327561595056*^9, 3.393327569871024*^9}, { 3.393773046546372*^9, 3.39377304796911*^9}}, TextAlignment->Left, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycle1T1", "=", RowBox[{"T1", "[", "tCycle1", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycle1T1"}], "]"}]}]], "Input", CellChangeTimes->{{3.393322100432173*^9, 3.3933221278763723`*^9}, 3.39332554916901*^9, {3.393325607619711*^9, 3.393325612349854*^9}, 3.393326084597148*^9, {3.393327584308352*^9, 3.393327634860392*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T1[tCycle1]=\"\>", "\[InvisibleSpace]", "45.85305487675453`"}], SequenceForm["T1[tCycle1]=", 45.85305487675453], Editable->False]], "Print", CellChangeTimes->{3.393320121581217*^9, 3.3933221852294617`*^9, 3.393323123591468*^9, 3.3933252890246973`*^9, 3.3933254396472607`*^9, 3.3933257653010883`*^9, 3.393326611064291*^9, 3.393327059591311*^9, 3.393327201570022*^9, 3.3933292484726152`*^9, 3.3933296520516663`*^9, 3.393773676103527*^9, 3.39377482917377*^9, 3.393775157462851*^9, 3.3937761979996357`*^9, 3.3938432909486427`*^9, 3.3938445217085533`*^9, 3.394188019496896*^9, 3.3941883450942993`*^9, 3.394188779957304*^9, 3.394189225299621*^9, 3.394189676157607*^9, 3.394189827876747*^9, 3.39418990707544*^9, 3.394190186204294*^9, 3.394194819754313*^9, 3.394961072366146*^9, 3.3949624869469023`*^9, 3.3949647243377132`*^9, 3.394966933020776*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycle2T2", "=", RowBox[{"T2", "[", "tCycle2", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycle2T2"}], "]"}]}]], "Input", CellChangeTimes->{{3.39332215124137*^9, 3.3933221528608713`*^9}, { 3.393325557500794*^9, 3.393325579892871*^9}, 3.393325619031274*^9, 3.39332609024548*^9, {3.393327586174065*^9, 3.39332763633394*^9}, { 3.3933296279823647`*^9, 3.39332963268054*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T2[tCycle2]=\"\>", "\[InvisibleSpace]", "46.278126718300705`"}], SequenceForm["T2[tCycle2]=", 46.278126718300705`], Editable->False]], "Print", CellChangeTimes->{3.393320121694007*^9, 3.393322185357984*^9, 3.393323123750484*^9, 3.393325289185557*^9, 3.393325439912942*^9, 3.3933257654491453`*^9, 3.393326611145443*^9, 3.3933270598144608`*^9, 3.393327201651826*^9, 3.393329248584855*^9, 3.39332965217715*^9, 3.393773676200733*^9, 3.39377482927818*^9, 3.393775157600686*^9, 3.393776198085019*^9, 3.3938432910494003`*^9, 3.393844521792973*^9, 3.3941880195918922`*^9, 3.394188345214879*^9, 3.394188780092585*^9, 3.394189225433771*^9, 3.394189676279735*^9, 3.3941898279913263`*^9, 3.3941899071790667`*^9, 3.394190186317499*^9, 3.394194819830782*^9, 3.3949610724456663`*^9, 3.394962487068411*^9, 3.3949647243966417`*^9, 3.394966933100456*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"tCycle3T3", "=", RowBox[{"T3", "[", "tCycle3", "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "tCycle3T3"}], "]"}]}]], "Input", CellChangeTimes->{{3.393322170793523*^9, 3.393322172397147*^9}, { 3.393325566670063*^9, 3.393325582959031*^9}, 3.393325626854475*^9, 3.3933261158418827`*^9, {3.393327587116534*^9, 3.393327637340363*^9}, { 3.393329635081936*^9, 3.393329637480438*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"T3[tCycle3]=\"\>", "\[InvisibleSpace]", "54.1365314659016`"}], SequenceForm["T3[tCycle3]=", 54.1365314659016], Editable->False]], "Print", CellChangeTimes->{3.3933201217909107`*^9, 3.393322185505349*^9, 3.393323123897531*^9, 3.393325289315895*^9, 3.393325440102467*^9, 3.3933257655674067`*^9, 3.393326611225205*^9, 3.393327059898323*^9, 3.393327201743946*^9, 3.3933292486867743`*^9, 3.3933296522775106`*^9, 3.3937736762990932`*^9, 3.393774829395447*^9, 3.3937751577093563`*^9, 3.393776198165964*^9, 3.393843291145875*^9, 3.393844521873609*^9, 3.394188019684207*^9, 3.3941883453082027`*^9, 3.3941887802040777`*^9, 3.394189225539753*^9, 3.394189676423441*^9, 3.3941898280727262`*^9, 3.3941899072727547`*^9, 3.3941901864166594`*^9, 3.3941948198980503`*^9, 3.3949610725379066`*^9, 3.394962487187297*^9, 3.394964724463957*^9, 3.394966933191948*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Define the three log survival functions as function modules.", "Text", TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"LS1", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tFinal_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b1", ",", "sfn1", ",", "t", ",", "T1", ",", "y1"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T1", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "4."}], ",", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"t", "^", ".7"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"4.", "^", ".7"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"20.", "*", RowBox[{"4.", "^", ".7"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".9"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"b1", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T1", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn1", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y1", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b1", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y1", "[", "t", "]"}]}], "/", RowBox[{"b1", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y1", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y1", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle1", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn1", "[", "tFinal", "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{3.393773219420247*^9}], Cell[BoxData[ RowBox[{ RowBox[{"LS2", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tFinal_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b2", ",", "sfn2", ",", "t", ",", "T2", ",", "y2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T2", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "3."}], ",", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"t", "^", ".8"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"3.", "^", ".8"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"30.", "*", RowBox[{"3", "^", ".8"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".7"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"b2", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T2", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn2", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y2", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b2", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y2", "[", "t", "]"}]}], "/", RowBox[{"b2", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y2", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y2", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle2", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn2", "[", "tFinal", "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{3.393773245564724*^9}], Cell[BoxData[ RowBox[{ RowBox[{"LS3", "[", RowBox[{ RowBox[{"k_", "?", "NumericQ"}], ",", RowBox[{"n_", "?", "NumericQ"}], ",", RowBox[{"Tc_", "?", "NumericQ"}], ",", RowBox[{"tFinal_", "?", "NumericQ"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"b3", ",", "sfn3", ",", "t", ",", "T3", ",", "y3"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"T3", "[", "t_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", " ", "2.5"}], ",", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"t", "^", ".85"}]}]}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"t", "\[LessEqual]", "6."}], ",", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"2.5", "^", ".85"}]}]}], ",", RowBox[{ RowBox[{"(", RowBox[{"60.", "+", RowBox[{"40.", "*", RowBox[{"2.5", "^", ".85"}]}]}], ")"}], "*", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", ".5"}], "*", RowBox[{"(", RowBox[{"t", "-", "6."}], ")"}]}], "]"}]}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"b3", "[", "t_", "]"}], ":=", RowBox[{"Log", "[", RowBox[{"1.", "+", RowBox[{"Exp", "[", RowBox[{"k", "*", RowBox[{"(", RowBox[{ RowBox[{"T3", "[", "t", "]"}], "-", "Tc"}], ")"}]}], "]"}]}], "]"}]}], ";", RowBox[{ RowBox[{"sfn3", "[", "t_", "]"}], "=", RowBox[{ RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y3", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", RowBox[{"b3", "[", "t", "]"}]}], "*", "n", "*", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", RowBox[{"y3", "[", "t", "]"}]}], "/", RowBox[{"b3", "[", "t", "]"}]}], ")"}], "^", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "1."}], ")"}], "/", "n"}], ")"}]}]}]}], ",", RowBox[{ RowBox[{"y3", "[", "0.", "]"}], "\[Equal]", RowBox[{"-", ".00001"}]}]}], "}"}], ",", RowBox[{"y3", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.001", ",", RowBox[{"tCycle3", "+", "1."}]}], "}"}]}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sfn3", "[", "tFinal", "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{3.393773259076874*^9}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Compute and save the three final survival function values at each final time \ (tCycle) using the original values for the parameters k, n and Tc. targetLS1 \ is the target survival value using the original values of all three parmeters \ k, n and Tc.\ \>", "Text", CellChangeTimes->{ 3.393240631786151*^9, {3.3932406926494513`*^9, 3.393240700414157*^9}, { 3.393252830733748*^9, 3.393252835413404*^9}, 3.393328032193994*^9, { 3.3933280834581413`*^9, 3.3933280838747587`*^9}, {3.393328301901437*^9, 3.393328325090005*^9}, {3.39332899578542*^9, 3.393329004051153*^9}}, TextAlignment->Left, FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"lstCycle1", "=", RowBox[{"LS1", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle1"}], "]"}]}], ";", RowBox[{"targetLS1", "=", "lstCycle1"}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "lstCycle1"}], "]"}]}]], "Input", CellChangeTimes->{{3.393328111310095*^9, 3.393328131458684*^9}, { 3.39332827647143*^9, 3.393328282523467*^9}, {3.393328342399544*^9, 3.393328364344249*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS1[k,n,Tc,tCycle1]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "3.428031736413475`"}]}], SequenceForm["LS1[k,n,Tc,tCycle1]=", -3.428031736413475], Editable->False]], "Print", CellChangeTimes->{3.393329248915043*^9, 3.3933296629005003`*^9, 3.393773684866783*^9, 3.393774829648288*^9, 3.39377515790489*^9, 3.393776198512752*^9, 3.393843291352399*^9, 3.393844522045969*^9, 3.394188019894277*^9, 3.39418834550069*^9, 3.394188780459243*^9, 3.394189225785534*^9, 3.3941896766435623`*^9, 3.3941898282395773`*^9, 3.394189907471603*^9, 3.39419018660972*^9, 3.3941948202041883`*^9, 3.3949610727347717`*^9, 3.3949624874282093`*^9, 3.394964724632956*^9, 3.3949669333968773`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"lstCycle2", "=", RowBox[{"LS2", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle2"}], "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "lstCycle2"}], "]"}]}]], "Input", CellChangeTimes->{{3.393328167966692*^9, 3.393328183737896*^9}, { 3.3933283727577753`*^9, 3.393328393870144*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS2[k,n,Tc,tCycle2]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "7.117937915500087`"}]}], SequenceForm["LS2[k,n,Tc,tCycle2]=", -7.117937915500087], Editable->False]], "Print", CellChangeTimes->{3.3933292490380363`*^9, 3.393329663022585*^9, 3.393773684995525*^9, 3.393774829794098*^9, 3.393775158030463*^9, 3.3937761986192427`*^9, 3.393843291489208*^9, 3.393844522147708*^9, 3.3941880200108137`*^9, 3.394188345599552*^9, 3.394188780584734*^9, 3.394189225929885*^9, 3.3941896767783213`*^9, 3.394189828342917*^9, 3.394189907567644*^9, 3.394190186710937*^9, 3.3941948202920313`*^9, 3.394961072831262*^9, 3.394962487545512*^9, 3.394964724716858*^9, 3.394966933509622*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"lstCycle3", "=", RowBox[{"LS3", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle3"}], "]"}]}], ";", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", "lstCycle3"}], "]"}]}]], "Input", CellChangeTimes->{{3.393328191203388*^9, 3.3933281978368673`*^9}, { 3.393328399368285*^9, 3.393328404935911*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"LS3[k,n,Tc,tCycle3]=\"\>", "\[InvisibleSpace]", RowBox[{"-", "10.852269845844909`"}]}], SequenceForm["LS3[k,n,Tc,tCycle3]=", -10.852269845844909`], Editable->False]], "Print", CellChangeTimes->{3.393329249399015*^9, 3.39332966313656*^9, 3.3937736851272917`*^9, 3.393774829919445*^9, 3.393775158160285*^9, 3.393776198843849*^9, 3.393843291613603*^9, 3.393844522233078*^9, 3.39418802011979*^9, 3.394188345693172*^9, 3.394188780710678*^9, 3.39418922605256*^9, 3.394189676914523*^9, 3.394189828425954*^9, 3.394189907660692*^9, 3.3941901868486347`*^9, 3.394194820404652*^9, 3.394961072918508*^9, 3.394962487650503*^9, 3.394964724787868*^9, 3.394966933591548*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Iterate values of the parameter n starting with n=nSt up to n=nEn with an \ increment of nInc. Stop iterating when the absolute value of the difference \ between the target and trial values of LS1 is less than tol. NOTICE THAT THE \ PROGRAM FINDS THE ORIGINAL GENERATION PARAMETER VALUES k=0.065, n=0.8 and \ Tc=100.\ \>", "Text", CellChangeTimes->{{3.3937759660918694`*^9, 3.393775972297305*^9}, 3.394189426455537*^9}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"nSt", "=", ".7"}], ";", RowBox[{"nEn", "=", ".9"}], ";", RowBox[{"nInc", "=", "0.02"}], ";"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"tol", "=", "0.01"}], ";"}]], "Input", CellChangeTimes->{3.3932407866131372`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"k", ",", "Tc"}], "]"}], ";", RowBox[{"frResult", "=", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"LS3", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle3"}], "]"}], "==", "lstCycle3"}], ",", RowBox[{ RowBox[{"LS2", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle2"}], "]"}], "\[Equal]", "lstCycle2"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"k", ",", ".05", ",", ".06"}], "}"}], ",", RowBox[{"{", RowBox[{"Tc", ",", "80.", ",", "90."}], "}"}]}], "}"}], ",", RowBox[{"MaxIterations", "\[Rule]", "2000"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"k", "=", RowBox[{"frResult", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Tc", "=", RowBox[{"frResult", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"trialLS1", "=", RowBox[{"LS1", "[", RowBox[{"k", ",", "n", ",", "Tc", ",", "tCycle1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "trialLS1", ",", "\"\< k= \>\"", ",", "k", ",", "\"\< n= \>\"", ",", "n", ",", "\"\< Tc= \>\"", ",", "Tc"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"targetLS1", "-", "trialLS1"}], "]"}], "<", "tol"}], ",", RowBox[{"Break", "[", "]"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"n", ",", "nSt", ",", "nEn", ",", "nInc"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.3932414854276457`*^9, 3.393241485667058*^9}, { 3.393242748224288*^9, 3.393242758488509*^9}, {3.3932428181532717`*^9, 3.3932428321605043`*^9}, {3.394189774106435*^9, 3.3941897982279873`*^9}, { 3.394189875842482*^9, 3.394189894037389*^9}, {3.394189997851327*^9, 3.394189998559903*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.280171973339469`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.07587235182983353`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.7`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "98.43870471409251`"}], SequenceForm[ "trialLS1= ", -3.280171973339469, " k= ", 0.07587235182983353, " n= ", 0.7, " Tc= ", 98.43870471409251], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.39496693455931*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.3100547634345117`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.07349653539604928`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.72`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "98.66670818824683`"}], SequenceForm[ "trialLS1= ", -3.3100547634345117`, " k= ", 0.07349653539604928, " n= ", 0.72, " Tc= ", 98.66670818824683], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.39496693536919*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.339841727705481`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.07122527095895613`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.74`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "98.93562795165332`"}], SequenceForm[ "trialLS1= ", -3.339841727705481, " k= ", 0.07122527095895613, " n= ", 0.74, " Tc= ", 98.93562795165332], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.394966936009486*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.3694716472441204`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.0690546665796205`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.76`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "99.24674606204337`"}], SequenceForm[ "trialLS1= ", -3.3694716472441204`, " k= ", 0.0690546665796205, " n= ", 0.76, " Tc= ", 99.24674606204337], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.39496693697405*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.3988876180545873`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.06698083410849545`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.7799999999999999`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "99.60119271937853`"}], SequenceForm[ "trialLS1= ", -3.3988876180545873`, " k= ", 0.06698083410849545, " n= ", 0.7799999999999999, " Tc= ", 99.60119271937853], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.394966938397306*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"trialLS1= \"\>", "\[InvisibleSpace]", RowBox[{"-", "3.4280321466760553`"}], "\[InvisibleSpace]", "\<\" k= \"\>", "\[InvisibleSpace]", "0.06499999402085757`", "\[InvisibleSpace]", "\<\" n= \"\>", "\[InvisibleSpace]", "0.7999999999999999`", "\[InvisibleSpace]", "\<\" Tc= \"\>", "\[InvisibleSpace]", "99.99999648385807`"}], SequenceForm[ "trialLS1= ", -3.4280321466760553`, " k= ", 0.06499999402085757, " n= ", 0.7999999999999999, " Tc= ", 99.99999648385807], Editable->False]], "Print", CellChangeTimes->{3.393167885397414*^9, 3.393241317714065*^9, 3.393241438860729*^9, 3.393241682804503*^9, 3.393242913055911*^9, 3.3932501122223186`*^9, 3.3932507006513367`*^9, 3.393253094982565*^9, 3.393329250381813*^9, 3.3933296640171432`*^9, 3.393773686100819*^9, 3.393774839901455*^9, 3.3937751620406446`*^9, 3.3937761997900953`*^9, 3.393843292789316*^9, 3.39384452308354*^9, 3.394188021294117*^9, 3.394188346487739*^9, 3.394188781827223*^9, 3.394189227090362*^9, 3.3941896781017437`*^9, 3.394189829270961*^9, 3.394189908500795*^9, 3.3941901879394693`*^9, 3.3941948216981153`*^9, 3.394961073771452*^9, 3.394962488803829*^9, 3.39496472559095*^9, 3.394966938886125*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Plot the three temperature profile functions separately.", "Text", CellChangeTimes->{{3.3931678109056807`*^9, 3.393167827311077*^9}, 3.3932409362764807`*^9, 3.393253017035926*^9, 3.39332715569305*^9, { 3.3937732803530817`*^9, 3.3937732832844467`*^9}}, TextAlignment->Left, FontSize->14], Cell[BoxData[ RowBox[{ RowBox[{"tempCurveT1Plot", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"T1", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.", ",", "tCycle1"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.", ",", "10."}], "}"}], ",", RowBox[{"{", RowBox[{"20.", ",", "160."}], "}"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.01", "]"}], ",", "LightGray", ",", RowBox[{"Dashing", "[", "None", "]"}]}], "}"}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", "\"\\""}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"RotateLabel", "\[Rule]", "True"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontWeight", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "}"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\<\>\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"FrameTicks", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "2", ",", "4", ",", "6", ",", "8", ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{ "20", ",", "40", ",", "60", ",", "80", ",", "100", ",", "120", ",", "140", ",", "160"}], "}"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", "}"}]}], "}"}]}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.393250047884212*^9, {3.393250439443324*^9, 3.393250463233591*^9}, { 3.393250537805275*^9, 3.39325054746657*^9}, {3.393250635783272*^9, 3.393250648964038*^9}, {3.393329130805213*^9, 3.393329230622287*^9}, { 3.39332926923064*^9, 3.393329297599441*^9}, 3.393329361557909*^9, 3.393329392420142*^9, {3.393329422559197*^9, 3.3933294510955667`*^9}, 3.3933297209700003`*^9, {3.393773322890156*^9, 3.393773352567934*^9}, { 3.393773391502338*^9, 3.393773417731648*^9}, 3.393775082855269*^9, { 3.39418784643503*^9, 3.394187883042354*^9}, {3.3941881522898397`*^9, 3.394188158929481*^9}, {3.394188628965201*^9, 3.394188633260126*^9}, { 3.394188702198111*^9, 3.394188709717126*^9}, 3.3941887501024113`*^9, 3.394188837297305*^9}], Cell[BoxData[ RowBox[{ RowBox[{"tempCurveT2Plot", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"T2", "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0.", ",", "tCycle2"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.", ",", "10."}], "}"}], ",", RowBox[{"{", RowBox[{"20.", ",", "160."}], "}"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", "0.01", "]"}], ",", "Gray", ",", RowBox[{"Dashing", "[", "None", "]"}]}], "}"}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", "\"\\""}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"RotateLabel", "\[Rule]", "True"}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontWeight", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "14"}]}], "}"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ "\"\