-
Notifications
You must be signed in to change notification settings - Fork 9
/
testingDiffusion.js
7 lines (5 loc) · 8.04 KB
/
testingDiffusion.js
1
2
3
4
5
6
7
//timestep in s, spacestep in mm, thickness in cm, finalTemps in °C
var testData = [{timestep:.125,timesteps:8000,spacestep:1,thickness:3,finalTemps:[180, 172.54762027056412, 165.12317102343843, 157.75432843729476, 150.46826537901117, 143.2914128467727, 136.24923674501417, 129.366034469219, 122.66475526047951, 116.16684767128041, 109.8921367830925, 103.85873305313036, 98.08297386359521, 92.57939802422362, 87.36075266038814, 82.4380311261407, 77.82053983500865, 73.51599121980152, 69.53061943265197, 65.86931489187627, 62.53577338395759, 59.5326551449529, 56.861749180724196, 54.52413804133362, 52.520358340531914, 50.85055250251699, 49.51460751856167, 48.51227689690814, 47.843282479774906, 47.50739336897278, 47.504479832695694]},{timestep:.25,timesteps:4000,spacestep:1,thickness:3,finalTemps:[180, 172.54750829795978, 165.12294335177327, 157.75397755087394, 150.46777984794232, 143.2907771411027, 136.24843098993819, 129.36503414410274, 122.66353084532075, 116.16536424522818, 109.89035358075796, 103.85660298566646, 98.0804430128874, 92.57640512000833, 87.35722855167383, 82.433898259922, 77.8157117568909, 73.51037211273491, 69.52410371146507, 65.8617868726187, 62.52710704813923, 59.52271401953008, 56.850386355046716, 54.51119634215625, 52.50567068553077, 50.83394245148182, 49.49589003949125, 48.491259361593876, 47.81976590008876, 47.481173880993296, 47.47535043103342]},{timestep:.5,timesteps:2000,spacestep:1,thickness:3,finalTemps:[180, 172.54728549861704, 165.12249032440786, 157.75327931283138, 150.46681361323232, 143.28951194947706, 136.24682721830243, 129.36304290570635, 122.66109328391052, 116.16241073332566, 109.88680283344246, 103.85236110372266, 98.07540247190241, 92.57044372494182, 87.35020837954562, 82.42566461648664, 77.80609217642133, 73.49917543321699, 69.511119260486, 65.8467838018842, 62.50983385673052, 59.502898307552606, 56.82773485007439, 54.48539524067866, 52.4763863503222, 50.80082250329537, 49.45856487763748, 48.44934414271164, 47.77286299772012, 47.42887584044498, 47.41724342449848]},{timestep:1,timesteps:1000,spacestep:1,thickness:3,finalTemps:[180, 172.54684444321703, 165.12159345241483, 157.7518968524096, 150.46490028540111, 143.28700622946252, 136.24365036237387, 129.3590977541717, 122.65626285438596, 116.1565566222964, 109.87976344853618, 103.8439497540392, 98.06540534916158, 92.5586178140772, 87.33627934359316, 82.40932470706744, 77.78699822763357, 73.47694700312736, 69.48533699040856, 65.81698806898568, 62.47552379991195, 59.46353130971889, 56.78272656149671, 54.434120227869556, 52.418179452384216, 50.734980972808586, 49.3843513756037, 48.365990646718735, 47.67957566925319, 47.32484088116007, 47.30163393240631]},{timestep:10,timesteps:100,spacestep:1,thickness:3,finalTemps:[180, 172.53984835914622, 165.10735572885, 157.72992215594635, 150.43443509117816, 143.24702628218412, 136.19284411521127, 129.29584593295635, 122.5786143462468, 116.0622009486304, 109.76600015284365, 103.7076551161019, 97.90299692817062, 92.36601742389325, 87.10887517196767, 82.14193340532384, 77.47382791526665, 73.11156224963025, 69.06062695034053, 65.32513905124632, 61.90799764330776, 58.81105100876485, 56.03527063336635, 53.58092732786092, 51.44776472578483, 49.63516557064089, 48.14230645612935, 46.968297030448255, 46.11230011042709, 45.57362966257327, 45.351824184045235]},{timestep:20,timesteps:50,spacestep:1,thickness:3,finalTemps:[179.9999999999986, 172.53382722152787, 165.09507837470488, 157.71091414885234, 150.40797482443057, 143.21213237028172, 136.14825960880648, 129.24001788144486, 122.50967014033702, 115.97792063603919, 109.66378558003468, 103.58449584343747, 97.75543347615522, 92.19010226955524, 86.90013211671958, 81.89531603096852, 77.18367797850313, 72.77156899850084, 68.66378847855023, 64.86372693478312, 61.37352622249729, 58.19425278232561, 55.32607931335376, 52.768470159571635, 50.520365698767364, 48.58036113023482, 46.94687526424094, 45.61830521513245, 44.59316328286549, 43.87019276506419, 43.448459963013434]},{timestep:40,timesteps:25,spacestep:1,thickness:3,finalTemps:[180, 172.59089973755567, 164.99564787637064, 157.73981801255763, 150.35460220266268, 143.16306092627568, 136.08865749177406, 129.1613644220046, 122.4109733281868, 115.85633511202053, 109.51479642455789, 103.40302516150233, 97.53585013009028, 91.92598292872916, 86.58414269843603, 81.51915528651836, 76.73801298231896, 72.24595563772114, 68.04658929494856, 64.14203345663681, 60.533087711744756, 57.2194126307214, 54.199721312609846, 51.47197758346957, 49.033596325829485, 46.88164130279617, 45.01301600882397, 43.424643355180194, 42.11363031645765, 41.077414027124576, 40.31388623498441]},{timestep:100,timesteps:10,spacestep:1,thickness:3,finalTemps:[180, 157.42631577383517, 170.81833589968335, 160.78626874308213, 150.40351041501899, 142.34327710917051, 135.48840232904433, 128.92849026723243, 122.36429329551656, 115.81836899872614, 109.39501778074283, 103.17781996737995, 97.21047235901956, 91.50836014548445, 86.07368600554767, 80.90524049233692, 76.00246731185635, 71.36601943703606, 66.99689433629578, 62.895407711898535, 59.06052619023779, 55.489636254123766, 52.17863793328261, 49.12221616403087, 46.31417468204576, 43.74776463005209, 41.415978760356474, 39.31180573876664, 37.42844960500318, 35.759521579502604, 34.29920955718961]}]
//timestep in s, spacestep in mm, thickness in cm, finalTemps in °C
var spacechanges = [{timestep:1,timesteps:1000,spacestep:0.5,thickness:3,finalTemps:[180, 176.2700686896381, 172.5436117540386, 168.82409552299995, 165.11497027807255, 161.41966233236437, 157.741566234302, 154.08403713541153, 150.45038336111347, 146.84385922221162, 143.2676581031956, 139.72490586168735, 136.218654571355, 132.7518766384087, 129.3274593193943, 125.94819966543821, 122.61679991537551, 119.3358633573488, 116.10789067550121, 112.93527679533702, 109.82030823820166, 106.76516099216332, 103.77189890338131, 100.842472588846, 97.97871886818766, 95.18236070910547, 92.45500767787509, 89.79815688337905, 87.2131944001885, 84.70139715341833, 82.26393524540688, 79.90187470174386, 77.61618061180681, 75.40772063677497, 73.2772688560877, 71.22550992150687, 69.25304348634285, 67.36038887601879, 65.54798996497979, 63.816220224013584, 62.165387901335016, 60.59574130030265, 59.107474116383194, 57.70073079595306, 56.37561187973052, 55.132179294056456, 53.970461553886246, 52.890458842212595, 51.89214793170179, 50.975486915586174, 50.14041971630585, 49.38688034202091, 48.71479686291298, 48.12409508115021, 47.61470187048923, 47.186548163721845, 46.839571568526914, 46.57371859474734, 46.38894647866528, 46.285224592478464, 46.262535429875086]},{timestep:1,timesteps:1000,spacestep:1,thickness:3,finalTemps:[180, 172.54684444321703, 165.12159345241483, 157.7518968524096, 150.46490028540111, 143.28700622946252, 136.24365036237387, 129.3590977541717, 122.65626285438596, 116.1565566222964, 109.87976344853618, 103.8439497540392, 98.06540534916158, 92.5586178140772, 87.33627934359316, 82.40932470706744, 77.78699822763357, 73.47694700312736, 69.48533699040856, 65.81698806898568, 62.47552379991195, 59.46353130971889, 56.78272656149671, 54.434120227869556, 52.418179452384216, 50.734980972808586, 49.3843513756037, 48.365990646718735, 47.67957566925319, 47.32484088116007, 47.30163393240631]},{timestep:1,timesteps:1000,spacestep:2,thickness:3,finalTemps:[180, 165.1331992119743, 150.4910254412407, 136.29013275310393, 122.73189388491829, 109.99634986674566, 98.23787726184337, 87.58285203199297, 78.12938252762655, 69.94897495905575, 63.08980555085816, 57.58112380558071, 53.43821509839279, 50.66731607806623, 49.26990438839697, 49.24587028071223]},{timestep:1,timesteps:1000,spacestep:3,thickness:3,finalTemps:[180, 157.7904500402302, 136.34326044263813, 116.3618108100811, 98.44252132454062, 83.04619002204733, 70.49231360727264, 60.974684562913346, 54.59181156075763, 51.3827070856924, 51.35794001697636]},{timestep:1,timesteps:1000,spacestep:5,thickness:3,finalTemps:[180, 143.471040989163, 110.50646796403318, 83.95916060262857, 65.61470497211572, 56.30166629019357, 56.27566259223847]}]
var errors_at_middle = [0.004828078117739665, 0.014447658587315004, 0.033541607375070726, 0.3467119197419919, 0.6368618565055186, 1.082526852689682, 1.8180725231522956]