-
Notifications
You must be signed in to change notification settings - Fork 0
/
machinery.js
2312 lines (2027 loc) · 106 KB
/
machinery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
let data, data2, RPM, Power,enginetype,speedRPM, engineStrokes, meanPressure,cylinderBore,pistonStroke,sfoc_cal,sfoc_cal_aux,
enginePower,engine_loadPercent, LHV,fuelType,ratedPower,ratedSfoc, rpm_min, rpm_max, torque,load,supplier,ratedSpeed,
minLoad, minPower,T, TA, Tf, Bwl, Lwl, shipSpeed, shipSpeedKnots, rudderBehindSkeg, rudderBehindStern, bilgeKeel, dome, stabilizerFins, shafts,
hullBossings, strutBossings, skeg, shaftBracket, TwinScrewBalaRudder, Fn, Rn, Cb, Cm, Cp, Cwp, g, shipVolume, Cf, density, hB, ABT, AT, stern,inputShipVolume,
Am, Awl,Rw,bulbous, sternId, lcb,LCB,lcb_type, Lpp, LOA,iE,Rw_A, Rw_B, Rb, Rtr, RA, Rf, Rbt,Rapp, Sa,domeCheck,StaFins,shaftsCheck,sBossings,sBracket,bKeel,thruster,K2,dt,Sapp,
formFactor,intervalResis,D,Z,J,AeAo,PD,W, KQ,KT,thrust,Ca,Pe,Pt,NH,NR, nShafts, No, NB,ND,NT,Cv,Cth,Va,TFactor,n, RAA,cross_section_area,roughness,screw, Rwave,H,Rfoul,RT_calm,SM,
Ns,Pb,RPM_pro,SMCR,Ptotal,engine_torque,propel_speed,simulate,DP_time, habor_time,standby_time,aux_ratedSpeed,No_of_eng,No_of_genset,aux_load,main_inst_power,
star_time,end_time,power_aval,transit_time, FC_total, FC,calm_simulate, aux_enginePower,aux_inst_power,create_type,sellected_genset,sellected_battery,sellected_engine,propulsion_syst,
gen_supplier,FC_ton,FC_ton_aux, main_engine_power,aux_engineStrokes,aux_meanPressure,aux_cylinderBore,aux_cylinders,aux_pistonStroke,aux_ratedsfoc,main_enginePower,emission_comparison,
LNG_emission,wind_speed,RAA_wind,Lw,DP_Va,Pe_calm,operation,Pt_calm,Pd_calm,Ps_calm,ND_calm, dynamic_load,wave_height_cal, wind_speed_cal,environment_type,DP_thruster_power,
eng_power, gen_pwer,bat_capacity,bat_SOC,bat_DOD,bat_volt,bat_C_rated,bat_C_rated_peak,simu_time_show, total_insta_power,show_propulsion, recent_chose_engine,online_engine,simulation_environment,S_APP_input, engine_test_type,power
let c1,c2,c3s,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,Fnt, phi,m1,m2, m3, m4 ,LR, CP1, p_b , Fni,try_tsting //for testing vaues
function engineAnalysis (){
//methods for different diesel engine property
this.torque = function (Strokes,speedRPM,mean_Presure,cylinderBore,cylinderNumber,pistonStroke){
this.mean_P = mean_Presure;// bar
this.cylinderBore = cylinderBore*0.001;//m
this.pistonStroke = pistonStroke *0.001;//m
this.speed_RPM = speedRPM;
this.engineStroke = Strokes;
if (this.engineStroke === "4 Stroke"){
this.cranshaftRev = 2;
}
else if (this.engineStroke === "2 Stroke") {
this.cranshaftRev = 1
}
// this.pistonSpeed =
this.cylinderNumber = cylinderNumber
this.area = (3.1413*this.cylinderBore*this.cylinderBore)/4
this.Volume = this.area*this.pistonStroke*this.cylinderNumber
this.force = this.area*this.mean_p*100000;
if(engine_test_type === "load"){
this.power = power
this.RPM = (this.power*60)/(this.mean_P*this.Volume*(this.cranshaftRev*100)) //kNm
RPM = this.RPM
RPM = RPM.toFixed(2)
this.torque = (power*60)/this.RPM
torque = this.torque
torque = torque.toFixed(2)*1
console.log( (this.power*100*this.cranshaftRev *60),(this.mean_P*this.Volume))
}
if(engine_test_type === "RPM"){
RPM //is an input from the dashbaord
this.power = ((this.mean_p*this.Volume*RPM)/(100*this.cranshaftRev*60)) //KW
// this.Torque = ((this.mean_p*100*this.Volume)/(2*3.143*this.cranshaftRev)) // kNm
this.torque = ((this.power*60)/RPM)/1000 // kNm
torque = this.torque
}
return this.torque
}
//NOTE: SFOC is use of the baseline for the engine since the supplier dont provided the engine baseline
this.SFOC = function(load, enginePower, SFOC,supplier,type) {
this.supplier = supplier
this.load = load
this.type = type // used to determine weather is auxilary engine or main engine
this.enginePower = enginePower
this.EL = this.load/this.enginePower
this.sfocBase = 170 // used as the baseline for the engine if not provided
// this.sfocRelative = 0.4613*this.EL *this.EL-0.7168*this.EL + 1.28;
// this.sfocBase = 170;
engine_loadPercent = parseFloat((this.EL*100).toFixed(1))
// this.sfocRelative = 0.4613*this.EL *this.EL-0.7168*this.EL + 1.28;
if (this.supplier === "wartsila") {
// this.sfocRelative = 0.4613*this.EL *this.EL-0.7168*this.EL + 1.28;
this.sfocRelative = 0.455*this.EL *this.EL-0.71*this.EL + 1.28; // general
console.log(this.sfocRelative)
this.SFOC_main = (this.sfocRelative*this.sfocBase).toFixed(1)
if(this.type === "auxilary"){
sfoc_cal_aux = parseFloat(this.SFOC_main);
this.sfoc_cal_aux = sfoc_cal_aux
console.log(sfoc_cal_aux," test load")
sfoc_display = sfoc_cal_aux
}else{
sfoc_cal = parseFloat(this.SFOC_main);
this.sfoc_cal = sfoc_cal
sfoc_display = sfoc_cal
console.log(sfoc_cal_aux," test load main")
}
console.log(sfoc_cal_aux," test load general")
}
else if (this.supplier === "Cat") {
this.sfocRelative = 0.7024*this.EL *this.EL-0.97728*this.EL + 1.35;
sfoc_cal = this.SFOC_main;
}
else if (this.supplier === "MAN") {
this.sfocRelative = 0.2933*this.EL *this.EL-0.432*this.EL + 1.1565;
sfoc_cal = this.SFOC_main;
}
// this.SFOC_main = this.sfocBase*this.sfocRelative;
// sfoc_cal = this.SFOC_main;
this.EL = 100*this.EL; //this the
console.log("engine poqwer percent ", this.EL)
this.gunnerus_sfoc = 0.0008*this.EL**2 - 0.22*this.EL + 212 //This is just for Gunnerus vessel case study
sfoc_cal_aux = this.gunnerus_sfoc.toFixed(2)*1
return {
sfoc_cal_aux,
sfoc_cal
}
}
this.SFOC_matrix = function(){
this.matrix_3x3 = math.matrix([[]])
}
}
function ship(){
// ship resistance component estimation
this.coefficient = function(){
// All different coefficient and areas
Cb // input
Cm // input
shipVolume = (Lwl * Bwl * T *Cb )
if(!Cm || Cm <= 0) Cm = 1.006 -0.0056*(Cb**3.56)// MidShip section coefficient using Kerlen (1970)
Cp = shipVolume/(Cm * Bwl * T * Lwl) // Prismatic coefficient
Cwp = Cb/(0.471 + 0.55*Cb) // waterline plane area coefficient using " Parson (2003)"
Cf = 0.075/(Math.log10(Rn)-2)**2
// Sa = Lwl*(2*T+Bwl)*Math.sqrt(Cm)*(0.453 + 0.4425*Cb - 0.2862*Cm - 0.00346*(Bwl/T) + 0.3696*Cwp) + 2.38*(ABT/Cb) // Surface weted area
this.c23 = (0.453 + 0.4425*Cb - 0.2862*Cm - 0.00346*(Bwl/T) + 0.3696*Cwp)
Sa = Lwl*(2*T+Bwl)*Math.sqrt(Cm)* (0.615989*this.c23 + 0.111439*Cm**3 +0.000571111*stern +
0.245357*(this.c23/Cm)) + 3.45538*AT + (ABT/Cb)*(1.4660538 + 0.5839497/Cm) // Surface weted area
shipVolume = 579 // This is jsut to test a specific model
//Sa = 7381
// Cp = 0.724
//Cm = 0.861
}
this.hull = function(){
Lwl; // Lenght on waterLine
AT //Immersed of the transverse sectional area of the transomat AP zero speed
hB //
ABT // transverse section area of teh bulb at the position where the still water surface intersect the stern
Lpp // Lenght between perpendicular
LOA // Overall lenght
Bwl // Breath of waterLine
Fn = shipSpeed/(g*Lwl)**0.5 // froude number
Rn = (shipSpeed*Lwl)/viscosity //reynolds number
// if(fn >= 0.14 && Fn <= 0.32){
////Schneekluth formular
if(lcb_type ==="aft"){
lcb = -(LCB/Lwl)*100
}
else if(lcb_type ==="forward"){
lcb = (LCB/Lwl)*100
}else {
// method by Harvald(1974)
lcb = -(0.44*Fn-0.094)
}
lcb = -3.5 ;// NOTE :this is used for one time test so delete it after this time
if(!T) T = 0.5*(Tf + TA)
// this.Sa =1.025*((shipVolume/this.T)+1.7*this.Lpp*this.T) // Surface weted area
}
}
function resistance(){
this.formFactor = function(){
this.LR =Lwl*(1-Cp+0.06*Cp*(-0.75))/(4*Cp-1)
LR
// }
if(T/Lwl > 0.05){
this.c12 = (T/Lwl)**0.2228446
}
else if(T/Lwl > 0.02 && T/Lwl <= 0.05 ){
this.c12 = 48.20*((T/Lwl)-0.02)**2.078+0.479948
}
else if(T/Lwl < 0.02 ){
this.c12 = 0.479948
}
this.c14 = 1 + 0.011*stern
c14 = this.c14
//formFactor = this.c13*(0.93+this.c12*(Bwl/this.LR)**0.92497*(0.95-Cp)**-0.521448*(1+Cp+0.022*lcb)**0.6906)
formFactor = 0.93+0.487118*this.c14*(Bwl/Lwl)**1.06806*(T/Lwl)**0.46106*(Lwl/this.LR)**0.121563*(Lwl**3/shipVolume)**0.36486*(1-Cp)**-0.604247
formFactor = (formFactor.toFixed(3))*1
console.log("formfact",formFactor)
}
this.appendageResistance = function(){
K2 // caculated at the other file (index.html)
dt // caculated at the other file (index.html)
Sapp // caculated at the other file (index.html)
if(S_APP_input> 10){
Sapp = S_APP_input
K2 = 1.5
}
if(thruster){
//if thruster are fitted in the vessels, they are put into consideration
this.Ctbo = 0.003
Rbt = Math.PI*density*shipSpeed**2*dt**2*this.Ctbo
Rbt = ((Rbt.toFixed(2))*1)/1000
console.log("Rbt",Rbt)
}else(
Rbt = 0
)
Rapp= (0.5*density*Cf*Sapp*shipSpeed**2*K2) //+ Rbt
Rapp =((Rapp.toFixed(2))*1)/1000
console.log("Rapp",Rapp)
}
this.correlationResistance = function(){
if(!bulbous){
// if no bulbus c2 = 1
this.c2 = 1
}else{
this.c3 = (0.56*(ABT)**1.5)/(Bwl*T*(0.31*Math.sqrt(ABT)+Tf-hB))
this.c2 = Math.exp((-1.89)*Math.sqrt(this.c3)) // accounting for the reduction of wave due to bulbous
}
if(Tf/Lwl <=0.04){
this.c4 = Tf/Lwl
}else if(Tf/Lwl > 0.04){
this.c4 = 0.04;
}
Ca = 0.006*(Lwl + 100)**-0.16-0.00205 + 0.003*Math.sqrt(Lwl/7.5)*Cb**4 * this.c2*(0.04 -this.c4)
if(roughness === true){
this.ks = 0.00015;
this.Ca = (0.105*this.ks**(1/3)-0.005579)/Lwl**(1/3)
}else{
this.Ca = 0;
}
RA = 0.5*density*shipSpeed**2*Sa*(Ca+this.Ca)
RA = RA/1000
RA = (RA.toFixed(2))*1
c2 = this.c2
c3s = this.c3
c4 = this.c4
console.log("ca",Ca)
}
this.PressureResistance = function(){
//Additional pressure resistance due to immerse transom
this.Fnt = shipSpeed/Math.sqrt(2*g*AT/(Bwl + Bwl * Cwp))
if(this.Fnt <5){
this.c6 = 0.2*(1-0.2*this.Fnt)
}else if(this.Fnt >= 5){
this.c6 = 0
}
Rtr = 0.5*density*shipSpeed**2*AT*this.c6
Rtr = Rtr/1000
Rtr= (Rtr.toFixed(2))*1
console.log("Rtr",Rtr)
console.log("Fnt",this.Fnt)
c6 = this.c6
Fnt= this.Fnt
}
this.bulbousResistance = function(){
// this.Pb = 0.56*Math.sqrt(ABT/(Tf-1.5*hB))
// this.Fni = shipSpeed/Math.sqrt(g*(Tf-hB-0.25*Math.sqrt(ABT))+0.15*shipSpeed**2)
this.hf = (Cp*Cm*Bwl*T/Lwl)*(136-316.3*Fn)*Fn**3
if(this.hf < -0.01*Lwl){
this.hf = -0.01*Lwl
}
this.hw = iE*shipSpeed**2/(400*9.81)
if(this.hw > 0.01*Lwl){
this.hw = 0.01*Lwl
}
this.Pb = 0.56*Math.sqrt(ABT)/(Tf-1.5*hB+this.hf)
// this.Pb = 2.555
this.Fni = shipSpeed/Math.sqrt(g*(Tf-hB-0.25*Math.sqrt(ABT))+this.hf+this.hw)
// Rb =0.11*Math.exp((-13)*this.Pb**-2)*this.Fni**3*ABT**1.5*g*density/(1+this.Fni**2)
Rb = (0.11*density*g*(Math.sqrt(ABT))**3)*((this.Fni**3)/(1+this.Fni**2))*Math.exp(-3.0*this.Pb**-2)
Rb = Rb/1000
Rb = (Rb.toFixed(3))*1
console.log("Pb",this.Pb)
console.log("Fni",this.Fni)
p_b = this.Pb
Fni = this.Fni
}
this.AirResistace = function(){
this.Cda = 0.8
RAA = 0.5*density_air * shipSpeed**2*this.Cda*cross_section_area
RAA = RAA/1000
}
this.wind_resistance = function(){
RAA_wind = (( 0.5*density_air * wind_speed**2*this.Cda*cross_section_area)/1000) - RAA
RAA_wind = RAA_wind.toFixed(2)*1
//AV
}
this.waveResistance = function(){
//Wave making resistnace
// this.lcb = 0.0101*Lwl
this.LR =Lwl*((1-Cp)+0.06*Cp*(-0.75)/(4*Cp-1))
// this.LR = 81
LR = this.LR
this.d = -0.9
iE = 1+89*Math.exp((-1*(Lwl/Bwl)**0.80856)*(1-Cwp)**0.30484*(1-Cp-0.0225*(-0.75))**0.6367*(this.LR/Bwl)**0.34574*((100*shipVolume)/Lwl**3)**0.16302) // (original equation) //halfe angle entrance of teh waterline
if(Bwl/Lwl < 0.11){
this.c7 = 0.229577*(Bwl/Lwl)**0.33333
}
else if(Bwl/Lwl >= 0.11 && Bwl/Lwl < 0.25 ){
this.c7 = (Bwl/Lwl)
}
else if(Bwl/Lwl >= 0.25){
this.c7 = 0.5- 0.0625*(Bwl/Lwl)
}
this.c1 = 2223105*this.c7**3.78613*(T/Bwl)**1.07961*(90-iE)**-1.37565
if(bulbous===false){
// if no bulbus c2 = 1
this.c2 = 1
}else{
this.c3 = (0.56*(ABT)**1.5)/(Bwl*T*(0.31*Math.sqrt(ABT)+Tf-hB))
this.c2 = Math.exp((-1.89)*Math.sqrt(this.c3)) // accounting for the reduction of wave due to bulbous
}
if(Tf/Lwl <= 0.04){
this.c4 = Tf/Lwl
}
else if(Tf/Lwl > 0.4){
this.c4 = 0.04
}
this.c5 = 1-0.8*AT/(Bwl*T*Cm)
// this.c6
if(Lwl**3/shipVolume < 512){
this.c15 = -1.69385
}
else if (Lwl**3/shipVolume > 1727){
this.c15 = 0.0
}
else if (Lwl**3/shipVolume >= 512 && Lwl**3/shipVolume <= 1727){
this.c15 = -1.69385 + ((Lwl/shipVolume**(1/3)-8.0)/2.36)
}
if(Cp <= 0.80){
this.c16 = 8.07981 *Cp -13.8673*Cp**2 + 6.984388*Cp**3
}
else if(Cp > 0.80){
this.c16 = 1.73014 - 0.7067 *Cp
}
this.c17 = 69193.2*this.Cm**-1.3346*shipVolume
if(Fn < 0.4) this.m1 = ((0.0140407*Lwl)/T)-((1.75254*shipVolume**(1/3))/Lwl)-((4.79323*Bwl)/Lwl)-this.c16
this.m2 = this.c15*Cp**2*Math.exp((-0.1)*Fn**-2)
this.m4 = this.c15*0.4*Math.exp(-0.0034*Fn**-3.29)
m4 = this.m4
if(Lwl/Bwl < 12){
this.phi = 1.446 * Cp - 0.03*(Lwl/Bwl)
}else{
this.phi = 1.446 * Cp - 0.036
}
Rw_A = this.c1*this.c2*this.c5*density*shipVolume*g*Math.exp(this.m1*Fn**this.d+this.m2*Math.cos(this.phi* Fn**-2))
Rw_A = ((Rw_A.toFixed(2))*1)/1000
console.log("rwa",Rw_A/1000)
console.log("c15",this.c15)
console.log("c16",this.c16)
console.log("c17",this.c17)
console.log("phi",this.phi)
console.log("m1",this.m1)
c5 = this.c5
c7 = this.c7
c1 = this.c1
c2 = this.c2
c4 = this.c4
c3s = this.c3
c15 = this.c15
c17 = this.c17
c16 = this.c16
phi= this.phi
m1 = this.m1
m2 = this.m2
m4 = this.m4
}
this.RwHighSped = function(){
this.d = -0.9
this.c14 = 1 + 0.011*stern
this.LR = Lwl*(1-Cp + 0.06*Cp*lcb/(4*Cp-1))
this.onePlusk1 = 0.93+0.487118*this.c14*(Bwl/Lwl)**1.06806*(T/Lwl)**0.46106*(Lwl/this.LR)**0.121563*(Lwl**3/shipVolume)**0.36486*(1-Cp)**-0.604247
this.c17 = 6919.3*Cm**-1.3346*(shipVolume/Lwl**3)**2.00977*(Lwl/Bwl-2)**1.40692
this.m3 = -7.2035*(Bwl/Lwl)**0.326869*(T/Bwl)**0.605375
this.c5 = 1-0.8*AT/(Bwl*T*Cm)
if(Lwl**3/shipVolume < 512){
this.c15 = -1.69385
}
else if (Lwl**3/shipVolume > 1727){
this.c15 = 0.0
}
else if (Lwl**3/shipVolume >= 512 && Lwl**3/shipVolume <= 1727){
this.c15 = -1.69385 + ((Lwl/shipVolume**(1/3)-8.0)/2.36)
}
this.m4 = this.c15*0.4*Math.exp((-1)*0.034*Fn**-3.29)
if(hB > 0.6*Tf){
hB = 0.5*Tf
}
if(Lwl/Bwl < 12){
this.phi = 1.446 * Cp - 0.03*(Lwl/Bwl)
}else{
this.phi = 1.446 * Cp - 0.036
}
if(!bulbous){
// if no bulbus c2 = 1
this.c2 = 1
}else{
this.c3 = (0.56*(ABT)**1.5)/(Bwl*T*(0.31*Math.sqrt(ABT)+Tf-hB))
console.log("new c",this.c3)
this.c2 = Math.exp((-1.89)*Math.sqrt(this.c3)) // accounting for the reduction of wave due to bulbous
}
Rw_B = this.c17*this.c2*this.c5*shipVolume*density*g*Math.exp(this.m3*Fn**this.d+this.m4*Math.cos(this.phi*Fn**-2))
Rw_B = (Rw_B.toFixed(3))*1
console.log("",Rw_B)
console.log("m4",this.m4)
c14 = this.c14
c17 = this.c17
c15 = this.c15
m3 = this.m3
m4 = this.m4
}
this.frictionalResistance = function(){
Rf = (density*Cf*shipSpeed**2*Sa)/2
Rf = Rf/1000
Rf = (Rf.toFixed(2))*1
console.log("Rf",Rf)
}
this.finalWaveResistance = function(){
// resolving of wave for high froud number and low froud number
if(Fn < 0.4){
calResistnace.waveResistance()
Rw = Rw_A
Rw =Rw.toFixed(3)*1
}
else if(Fn >= 0.4){
calResistnace.RwHighSped()
Rw = Rw_A+(10*Fn-4)* (Rw_B-Rw_A)/1.5
Rw =Rw.toFixed(3)*1
}
}
this.additionalResistance = function (){
// Wave resistance
Lb // Distance of the bow to 95% of maximum beam on the waterline [m]
Rwave = (1/6)*density*g* wave_height**2*Bwl*Math.sqrt(Bwl/Lb) //Note TODO: this formula sholdnt use this.lwl
Rwave = ((Rwave/1000).toFixed(2))*1
// Fouling resistance
Rfoul = 10*RT_calm //// TODO: Confirm this again
Rfoul = ((Rfoul/1000).toFixed(2))*1
}
this.totalResistance = function(){
shipHull.hull()
shipHull.coefficient()
calResistnace.appendageResistance()
calResistnace.PressureResistance()
calResistnace.bulbousResistance()
calResistnace.AirResistace()
calResistnace.wind_resistance()
calResistnace.frictionalResistance()
calResistnace.correlationResistance()
calResistnace.formFactor()
calResistnace.finalWaveResistance()
//Rbt is the resistance due to thrusters opening
RT_calm = Rf*formFactor+Rapp+Rw+RA+Rtr+Rbt+Rb + RAA
RT_calm = (RT_calm.toFixed(2))*1
calResistnace.additionalResistance()
//Total resistnace
RT = RT_calm // + Rwave+ RAA_wind // + Rfoul
RT = RT.toFixed(2)*1
}
}
function fourier_propeller_analyis(){
//using fourier method
if(!beta) {
Math.atan(va/(0.7*Math.PI*n*D))
}
CT_S = A_T0 + A_T1*Math.cos*beta + B_T1*Math.sin*beta
CQ_S = A_Q0 + A_Q1*Math.cos*beta + B_Q1*Math.sin*beta
Propeller_Thrust = CT_S*0.5*density(va**2 + beta**2)*(Math.PI/4)*D**2
Propeller_torque = CQ_S*0.5*density(va**2 + beta**2)*(Math.PI/4)*D**3
}
// function NTNU_Gunnerus(){
// the power model is based from extracted experimatal result from NTNU Gunrus vessel
// this.power_estimate = function(shipSpeedKnots){
// this.speed = shipSpeedKnots // t
// this.estimated_power = 3.97306397*this.speed**3 -84.90620491*this.speed**2 + 669.15103415*this.speed -1754.43001443
// return this.estimated_power
// }
// }
function NTNU_Gunnerus(){
// the power model is based from extracted experimatal result from NTNU Gunrus vessel
const speed = shipSpeedKnots // t
this.estimated_power = 3.97306397*this.speed**3 -84.90620491*this.speed**2 + 669.15103415*this.speed -1754.43001443
return this.estimated_power
}
function propellerProperties (){
this.Thrust =function(){
//cth = thrust loading cofficient
this.Cpi = 1.45*Cp - 0.315-0.0225*lcb
if(Lwl/Bwl < 5.2){
this.c10 = 0.25-0.003328402/(Bwl*Lwl - 0.134615385)
}
else if(Lwl/Bwl >= 5.2){
this.c10 = Bwl/Lwl
}
if(screw ==="singleScrew"){
TFactor = ((0.25*(Bwl/Lwl)**0.28956*(Math.sqrt(T*Bwl)/D)**0.2624)/(1-Cp+0.0225*lcb)**0.01762) + 0.0015*stern
}
if(screw ==="TwinScrew"){
TFactor = 0.325*Cb-0.1885*D/Math.sqrt(Bwl*T)
}
// TFactor = 0.01979*Lwl/(Bwl-Bwl*this.Cpi)+1.0585*this.c10-0.00524-0.1418*D**2/(Bwl*T) + 0.0015*stern
thrust = RT/(1-TFactor)
thrust = thrust.toFixed(2)
TFactor = TFactor.toFixed(2)
console.log("cpi",this.cpi)
console.log("c10",this.c10)
TFactor = 0.1747 // this is just for test
}
this.wake = function(){
//Cv = (formFactor*Rf+ Rapp + RA)/(0.5*density*shipSpeed**2*(Sa+Sapp))
Cv = formFactor*Cf+Ca
// Single screw ship
if(Bwl/TA <= 5){
this.c8 = (Bwl*Sa)/(Lwl*D*TA)
}
else if(Bwl/TA > 5){
this.c8 = Sa*(7*Bwl/TA-25)/(Lwl*D*(Bwl/TA - 3))
}
if(this.c8 < 28){
this.c9 = this.c8
}
else if(this.c8 >= 28){
this.c9= 32-16/(this.c8-24)
}
if(TA/D < 2){
this.c11 = TA/D
}
else if(TA/D >= 2){
this.c11 = 0.0833333*(TA/D)**3+1.33333
}
if(Cp <= 0.7){
this.c19 = (0.12997/(0.95-Cb))-((0.11056)/(0.95-Cp))
}
else if(Cp > 0.7){
this.c19 = 0.18567/(1.3571-Cm)-0.71276 + 0.38648*Cp
}
this.c20 = 1 + 0.015*stern
this.Cpi = 1.45*Cp - 0.315-0.0225*lcb
Cv
// W = (Cv*Lwl*this.c9/TA)*((0.0661875)+(1.21756*this.c11*(Cv/(1-this.Cpi))))+0.24558*Math.sqrt(Bwl/(Lwl*(1-this.Cpi)))-(0.09726/(0.95-Cp))+(0.11434/(0.95-Cb))+0.75*stern*Cv+0.002*stern
if(screw ==="singleScrew"){
W = this.c9*this.c20*Cv*(Lwl/TA)*(0.050776 + 0.93405*(this.c11*Cv/(1-this.Cpi))) + 0.27915*this.c20*Math.sqrt(Bwl/(Lwl*(1-this.Cpi))) + this.c19*this.c20
NR = 0.9922 - 0.05908*AeAo + 0.07424*(Cp - 0.0225*lcb)
}
else if(screw ==="TwinScrew"){
W = 0.3095*Cb + 10*Cv*Cb - 0.23*D/Math.sqrt(Bwl*T)
NR = 0.9737 +0.111*(Cp - 0.0225*lcb) - 0.06325*PD
}
Va = shipSpeed*(1-W)
Va = Va.toFixed(2)*1
Cth = thrust/(density*Va**2*D**2*(Math.PI/8))
W = W.toFixed(3)*1
//W = 0.2584 // this is just for test
Cth = Cth.toFixed(3)*1
NR = NR.toFixed(3)*1
//For Dp Operation
this.DP_speed = 3*0.51 // Dp speed is assumed to be 3 knot according to the literatures (tranvser speed)
DP_Va = this.DP_speed*(1-W)
}
this.KTandKQ = function(){
this.RPM_input = 230//test input
this.input_propeller_speed = this.RPM_input/60 // USED FOR TESTING
this.input_propeller_speed = 1.659
// AeAo = 0.7393
this.gunnerus_propeller_speed = this.gunnerus_propeller_speed/60
this.Co7r = 2.073*AeAo *D/Z
J = Va/(this.input_propeller_speed *D)
this.Rno = (this.Co7r*Math.sqrt(Va**2 + (0.75*Math.PI*n*D)**2))/viscosity
n = this.input_propeller_speed
//this.AE_Ao = 0.08+((1.3 + 0.2*Z)*thrust)/(D**2)
if(n && this.Rno > 2*10**6){
KT = 0.000353485 - 0.00333758*AeAo*J**2-0.00478125*AeAo*PD*J +0.000257792*(Math.log(this.Rno)-0.301)**2*AeAo*J**2+0.0000643192*(Math.log(this.Rno)-0.301)*PD**6*J**2
- 0.0000110636*(Math.log(this.Rno)-0.301)**2*PD**6*J**2- 0.0000276305**(Math.log(this.Rno)-0.301)**2*Z*AeAo*J**2+0.0000954*(Math.log(this.Rno)-0.301)*Z*AeAo*PD*J+0.0000032049*(Math.log(this.Rno)-0.301)*Z**2*AeAo*PD**3*J
KQ = -0.000591412+0.00696898*PD-0.0000666654*Z*PD**6+0.0160818*AeAo**2-0.000938091*(Math.log(this.Rno)-0.301)*PD-0.00059593*(Math.log(this.Rno)-0.301)*PD**2+0.0000782099*(Math.log(this.Rno)-0.301)**2*PD**2
+0.0000052199*(Math.log(this.Rno)-0.301)*Z*AeAo*J**2-0.00000088528*(Math.log(this.Rno)-0.301)**2*Z*AeAo*PD*J+0.0000230171*(Math.log(this.Rno)-0.301)*Z*PD**6-0.00000184341*(Math.log(this.Rno)-0.301)**2*Z*PD**6-0.00400252*(Math.log(this.Rno)-0.301)*AeAo**2
+0.000220915*(Math.log(this.Rno)-0.301)**2*AeAo**2
}
else{
KT = 0.00880496*J**0*PD**0*AeAo**0*Z**0-0.204554*J**1*PD**0*AeAo**0*Z**0 + 0.166351*J**0*PD**1*AeAo**0*Z**0 + 0.158114*J**0*PD**2*AeAo**0*Z**0 - 0.147581*J**2*PD**0*AeAo**1*Z**0 - 0.481497*J**1*PD**1*AeAo**1*Z**0 +
0.415437*J**0*PD**2*AeAo**1*Z**0 + 0.0144043*J**0*PD**0*AeAo**0*Z**1 - 0.0530054*J**2*PD**0*AeAo**0*Z**1 + 0.0143481*J**0*PD**1*AeAo**0*Z**1 + 0.0606826*J**1*PD**1*AeAo**0*Z**1 - 0.0125894*J**0*PD**0*AeAo**1*Z**1 +
0.0109689*J**1*PD**0*AeAo**1*Z**1 - 0.133698*J**0*PD**3*AeAo**0*Z**0 + 0.00638407*J**0*PD**6*AeAo**0*Z**0 - 0.00132718*J**2*PD**6*AeAo**0*Z**0 + 0.168496*J**3*PD**0*AeAo**1*Z**0 - 0.0507214*J**0*PD**0*AeAo**2*Z**0 +
0.0854559*J**2*PD**0*AeAo**2*Z**0 - 0.0504475*J**3*PD**0*AeAo**2*Z**0 + 0.010465*J**1*PD**6*AeAo**2*Z**0 - 0.00648272*J**2*PD**6*AeAo**2*Z**0 - 0.00841728*J**0*PD**3*AeAo**0*Z**1 + 0.0168424*J**1*PD**3*AeAo**0*Z**1 -
0.00102296*J**3*PD**3*AeAo**0*Z**1 - 0.0317791*J**0*PD**3*AeAo**1*Z**1 + 0.018604*J**1*PD**0*AeAo**2*Z**1 - 0.00410798*J**0*PD**2*AeAo**2*Z**1 - 0.000606848*J**0*PD**0*AeAo**0*Z**2 - 0.0049819*J**1*PD**0*AeAo**0*Z**2 +
0.0025983*J**2*PD**0*AeAo**0*Z**2 - 0.000560528*J**3*PD**0*AeAo**0*Z**2 - 0.00163652*J**1*PD**2*AeAo**0*Z**2 - 0.000328787*J**1*PD**6*AeAo**0*Z**2 + 0.000116502*J**2*PD**6*AeAo**0*Z**2 + 0.000690904*J**0*PD**0*AeAo**1*Z**2 +
0.00421749*J**0*PD**3*AeAo**1*Z**2 + 0.0000565229*J**3*PD**6*AeAo**1*Z**2 - 0.00146564*J**0*PD**3*AeAo**2*Z**2
KQ = 0.00379368*J**0*PD**0*AeAo**0*Z**0 + 0.00886523*J**2*PD**0*AeAo**0*Z**0 - 0.032241*J**1*PD**1*AeAo**0*Z**0 - 0.00344778*J**0*PD**2*AeAo**0*Z**0 - 0.0408811*J**0*PD**1*AeAo**1*Z**0 - 0.108009*J**1*PD**1*AeAo**1*Z**0 -
0.0885381*J**2*PD**1*AeAo**1*Z**0 + 0.188561*J**0*PD**2*AeAo**1*Z**0 - 0.00370871*J**1*PD**0*AeAo**0*Z**1 + 0.00513696*J**0*PD**1*AeAo**0*Z**1 + 0.0209449*J**1*PD**1*AeAo**0*Z**1 + 0.00474319*J**2*PD**1*AeAo**0*Z**1 -
0.00723408*J**2*PD**0*AeAo**1*Z**1 + 0.00438388*J**1*PD**1*AeAo**1*Z**1 - 0.0269403*J**0*PD**2*AeAo**1*Z**1 + 0.0558082*J**3*PD**0*AeAo**1*Z**0 + 0.0161886*J**0*PD**3*AeAo**1*Z**0 + 0.00318086*J**1*PD**3*AeAo**1*Z**0 +
0.015896*J**0*PD**0*AeAo**2*Z**0 + 0.0471729*J**1*PD**0*AeAo**2*Z**0 + 0.0196283*J**3*PD**0*AeAo**2*Z**0 - 0.0502782*J**0*PD**1*AeAo**2*Z**0 - 0.030055*J**3*PD**1*AeAo**2*Z**0 + 0.0417122*J**2*PD**2*AeAo**2*Z**0 -
0.0397722*J**0*PD**3*AeAo**2*Z**0 - 0.00350024*J**0*PD**6*AeAo**2*Z**0 - 0.0106854*J**3*PD**0*AeAo**0*Z**1 + 0.00110903*J**3*PD**3*AeAo**0*Z**1 - 0.000313912*J**0*PD**6*AeAo**0*Z**1 + 0.0035985*J**3*PD**0*AeAo**1*Z**1 -
0.00142121*J**0*PD**6*AeAo**1*Z**1 - 0.00383637*J**1*PD**0*AeAo**2*Z**1 + 0.0126803*J**0*PD**2*AeAo**2*Z**1 - 0.00318278*J**2*PD**3*AeAo**2*Z**1 + 0.00334268*J**0*PD**6*AeAo**2*Z**2 - 0.00183491*J**1*PD**1*AeAo**0*Z**2 +
0.000112451*J**3*PD**2*AeAo**0*Z**2 - 0.0000297228*J**3*PD**6*AeAo**0*Z**2 + 0.000269551*J**1*PD**0*AeAo**1*Z**2 + 0.00083265*J**2*PD**0*AeAo**1*Z**2 + 0.00155334*J**0*PD**2*AeAo**1*Z**2 + 0.000302683*J**0*PD**6*AeAo**1*Z**2 -
0.0001843*J**0*PD**0*AeAo**2*Z**2 - 0.000425399*J**0*PD**3*AeAo**2*Z**2 + 0.0000869243*J**3*PD**3*AeAo**2*Z**2 - 0.0004659*J**0*PD**6*AeAo**2*Z**2 + 0.0000554194*J**1*PD**6*AeAo**2*Z**2
}
PD = PD*1
this.KT_coef = {
i_0:{ a : 0.0088049, b: 0, c: 0, d:0, e: 0 },
i_1:{ a : -0.204554, b: 1, c: 0, d:0, e: 0 },
i_2:{ a : 0.166351, b: 0, c: 1, d:0, e: 0 },
i_3:{ a : 0.158114, b: 0, c: 2, d:0, e: 0 },
i_4:{ a : -0.147581, b: 2, c: 0, d:1, e: 0 },
i_5:{ a : -0.481497, b: 1, c: 1, d:1, e: 0 },
i_6:{ a : 0.415437, b: 0, c: 2, d:1, e: 0 },
i_7:{ a : 0.00144043, b: 0, c: 0, d: 0, e: 1 },
i_8:{ a : -0.00530054, b: 2, c: 0, d: 0, e: 1 },
i_9:{ a : +0.0143481, b: 0, c: 1, d: 0, e: 1 },
i_10:{ a : +0.0606826, b: 1, c: 1, d: 0, e: 1 },
i_11:{ a : -0.0125894, b: 0, c: 0, d: 1, e: 1 },
i_12:{ a : 0.0109689, b: 1, c: 0, d: 1, e: 1 },
i_13:{ a : -0.0133698, b: 0, c: 3, d: 0, e: 0 },
i_14:{ a : 0.00638407, b: 0, c: 6, d: 0, e: 0 },
i_15:{ a : -0.00132718, b: 2, c: 6, d: 0, e: 0 },
i_16:{ a : 0.168496, b: 3, c: 0, d: 1, e: 0 },
i_17:{ a : -0.0507214, b: 0, c: 0, d: 2, e: 0 },
i_18:{ a : 0.0854559, b: 2, c: 0, d: 2, e: 0 },
i_19:{ a : -0.0504475, b: 3, c: 0, d: 2, e: 0 },
i_20:{ a : 0.010465, b: 1, c: 6, d: 2, e: 0 },
i_21:{ a : -0.00648272, b: 2, c: 6, d: 2, e: 0 },
i_22:{ a : -0.00841728, b: 0, c: 3, d: 0, e: 1 },
i_23:{ a : 0.0168424, b: 1, c: 3, d: 0, e: 1 },
i_24:{ a : -0.00102296, b: 3, c: 3, d: 0, e: 1 },
i_25:{ a : -0.0317791, b: 0, c: 3, d: 1, e: 1 },
i_26:{ a : 0.018604, b: 1, c: 0, d: 2, e: 1 },
i_27:{ a : -0.00410798, b: 0, c: 2, d: 2, e: 1 },
i_28:{ a : -0.000606848, b: 0, c: 0, d: 0, e: 2 },
i_29:{ a : -0.0049819, b: 1, c: 0, d: 0, e: 2 },
i_30:{ a : 0.0025983, b: 2, c: 0, d: 0, e: 2 },
i_31:{ a : -0.000560528, b: 3, c: 0, d: 0, e: 2 },
i_32:{ a : -0.00163652, b: 1, c: 2, d: 0, e: 2 },
i_33:{ a : -0.000328787, b: 1, c: 6, d: 0, e: 2 },
i_34:{ a : 0.000116502, b: 2, c: 6, d: 0, e: 2 },
i_35:{ a : 0.000690904, b: 0, c: 0, d: 1, e: 2 },
i_36:{ a : 0.00421749, b: 0, c: 3, d: 1, e: 2 },
i_37:{ a : 0.0000565229, b: 3, c: 6, d: 1, e: 2 },
i_38:{ a : -0.00146564, b: 0, c: 3, d: 2, e: 2 },
}
this.KQ_coef = {
i_0:{ a : 0.00379368, b: 0, c: 0, d:0, e: 0 },
i_1:{ a : 0.00886523, b: 2, c: 0, d:0, e: 0 },
i_2:{ a : -0.032241, b: 1, c: 1, d:0, e: 0 },
i_3:{ a : 0.00344778, b: 0, c: 2, d:0, e: 0 },
i_4:{ a : -0.0408811, b: 0, c: 1, d: 1, e: 0 },
i_5:{ a : -0.108009, b: 1, c: 1, d:1, e: 0 },
i_6:{ a : -0.0885381, b: 2, c: 1, d:1, e: 0 },
i_7:{ a : 0.188561, b: 0, c: 2, d:1, e: 0 },
i_8:{ a : -0.00370871, b: 1, c: 0, d:0, e: 1 },
i_9:{ a : 0.0051696, b: 0, c: 1, d: 0, e: 1 },
i_10:{ a : 0.0209449, b: 1, c: 1, d: 0, e: 1 },
i_11:{ a : 0.00474319, b: 2, c: 1, d: 0, e: 1 },
i_12:{ a : -0.00723408, b: 2, c: 0, d: 1, e: 1 },
i_13:{ a : 0.00438388, b: 1, c: 1, d: 1, e: 1 },
i_14:{ a : -0.0269403, b: 0, c: 2, d: 1, e: 1 },
i_15:{ a : 0.0558082, b: 3, c: 0, d: 1, e: 0 },
i_16:{ a : 0.0161886, b: 0, c: 3, d: 1, e: 0 },
i_17:{ a : 0.00318086, b: 1, c: 3, d: 1, e: 0 },
i_18:{ a : 0.015896, b: 0, c: 0, d: 2, e: 0 },
i_19:{ a : 0.0471729, b: 1, c: 0, d: 2, e: 0 },
i_20:{ a : 0.0196283, b: 3, c: 0, d: 2, e: 0 },
i_21:{ a : -0.0502782, b: 0, c: 1, d: 2, e: 0 },
i_22:{ a : -0.030055, b: 3, c: 1, d: 2, e: 0 },
i_23:{ a : 0.0417122, b: 2, c: 2, d: 2, e: 0 },
i_24:{ a : -0.0397722, b: 0, c: 3, d: 2, e: 0 },
i_25:{ a : -0.00350024, b: 0, c: 6, d: 2, e: 0 },
i_26:{ a : -0.0106854, b: 3, c: 0, d: 0, e: 1 },
i_27:{ a : 0.00110903, b: 3, c: 3, d: 0, e: 1 },
i_28:{ a : -0.000313912, b: 0, c: 6, d: 0, e: 1 },
i_29:{ a : 0.0035985, b: 3, c: 0, d: 1, e: 1 },
i_30:{ a : -0.00142121, b: 0, c: 6, d: 1, e: 1 },
i_31:{ a : -0.00383637, b: 1, c: 0, d: 2, e: 1 },
i_32:{ a : 0.0126803, b: 0, c: 2, d: 2, e: 1 },
i_33:{ a : -0.00318278, b: 2, c: 3, d: 2, e: 1 },
i_34:{ a : 0.00334268, b: 0, c: 6, d: 2, e: 1 },
i_35:{ a : -0.00183491, b: 1, c: 1, d: 0, e: 2 },
i_36:{ a : 0.000112451, b: 3, c: 2, d: 0, e: 1 },
i_37:{ a : -0.0000297228, b: 3, c: 6, d: 0, e: 1 },
i_38:{ a : 0.000269551, b: 1, c: 0, d: 1, e: 2 },
i_39:{ a : 0.00083265, b: 2, c: 0, d: 1, e: 2 },
i_40:{ a : 0.00155334, b: 0, c: 2, d: 1, e: 2 },
i_41:{ a : 0.000302683, b: 0, c: 6, d: 1, e: 2 },
i_42:{ a : -0.0001843, b: 0, c: 0, d: 2, e: 2 },
i_43:{ a : -0.000425399, b: 0, c: 3, d: 2, e: 2 },
i_44:{ a : 0.0000869243, b: 3, c: 3, d: 2, e: 2 },
i_45:{ a : -0.0004659, b: 0, c: 6, d: 2, e: 2 },
i_46:{ a : 0.0000554194, b: 1, c: 6, d: 2, e: 2 },
}
//new updated equations
this.new_KT = this.KT_coef.i_0.a*J**this.KT_coef.i_0.b*PD**this.KT_coef.i_0.c*AeAo**this.KT_coef.i_0.d*Z**this.KT_coef.i_0.e +
this.KT_coef.i_1.a*J**this.KT_coef.i_1.b*PD**this.KT_coef.i_1.c*AeAo**this.KT_coef.i_1.d*Z**this.KT_coef.i_1.e +
this.KT_coef.i_2.a*J**this.KT_coef.i_2.b*PD**this.KT_coef.i_2.c*AeAo**this.KT_coef.i_2.d*Z**this.KT_coef.i_2.e +
this.KT_coef.i_3.a*J**this.KT_coef.i_3.b*PD**this.KT_coef.i_3.c*AeAo**this.KT_coef.i_3.d*Z**this.KT_coef.i_3.e +
this.KT_coef.i_4.a*J**this.KT_coef.i_4.b*PD**this.KT_coef.i_4.c*AeAo**this.KT_coef.i_4.d*Z**this.KT_coef.i_4.e +
this.KT_coef.i_5.a*J**this.KT_coef.i_5.b*PD**this.KT_coef.i_5.c*AeAo**this.KT_coef.i_5.d*Z**this.KT_coef.i_5.e +
this.KT_coef.i_6.a*J**this.KT_coef.i_6.b*PD**this.KT_coef.i_6.c*AeAo**this.KT_coef.i_6.d*Z**this.KT_coef.i_6.e +
this.KT_coef.i_7.a*J**this.KT_coef.i_7.b*PD**this.KT_coef.i_7.c*AeAo**this.KT_coef.i_7.d*Z**this.KT_coef.i_7.e +
this.KT_coef.i_8.a*J**this.KT_coef.i_8.b*PD**this.KT_coef.i_8.c*AeAo**this.KT_coef.i_8.d*Z**this.KT_coef.i_8.e +
this.KT_coef.i_9.a*J**this.KT_coef.i_9.b*PD**this.KT_coef.i_9.c*AeAo**this.KT_coef.i_9.d*Z**this.KT_coef.i_9.e +
this.KT_coef.i_10.a*J**this.KT_coef.i_10.b*PD**this.KT_coef.i_10.c*AeAo**this.KT_coef.i_10.d*Z**this.KT_coef.i_10.e +
this.KT_coef.i_11.a*J**this.KT_coef.i_11.b*PD**this.KT_coef.i_11.c*AeAo**this.KT_coef.i_11.d*Z**this.KT_coef.i_11.e +
this.KT_coef.i_12.a*J**this.KT_coef.i_12.b*PD**this.KT_coef.i_12.c*AeAo**this.KT_coef.i_12.d*Z**this.KT_coef.i_12.e +
this.KT_coef.i_13.a*J**this.KT_coef.i_13.b*PD**this.KT_coef.i_13.c*AeAo**this.KT_coef.i_13.d*Z**this.KT_coef.i_13.e +
this.KT_coef.i_14.a*J**this.KT_coef.i_14.b*PD**this.KT_coef.i_14.c*AeAo**this.KT_coef.i_14.d*Z**this.KT_coef.i_14.e +
this.KT_coef.i_15.a*J**this.KT_coef.i_15.b*PD**this.KT_coef.i_15.c*AeAo**this.KT_coef.i_15.d*Z**this.KT_coef.i_15.e +
this.KT_coef.i_16.a*J**this.KT_coef.i_16.b*PD**this.KT_coef.i_16.c*AeAo**this.KT_coef.i_16.d*Z**this.KT_coef.i_16.e +
this.KT_coef.i_17.a*J**this.KT_coef.i_17.b*PD**this.KT_coef.i_17.c*AeAo**this.KT_coef.i_17.d*Z**this.KT_coef.i_17.e +
this.KT_coef.i_18.a*J**this.KT_coef.i_18.b*PD**this.KT_coef.i_18.c*AeAo**this.KT_coef.i_18.d*Z**this.KT_coef.i_18.e +
this.KT_coef.i_19.a*J**this.KT_coef.i_19.b*PD**this.KT_coef.i_19.c*AeAo**this.KT_coef.i_19.d*Z**this.KT_coef.i_19.e +
this.KT_coef.i_20.a*J**this.KT_coef.i_20.b*PD**this.KT_coef.i_20.c*AeAo**this.KT_coef.i_20.d*Z**this.KT_coef.i_20.e +
this.KT_coef.i_21.a*J**this.KT_coef.i_21.b*PD**this.KT_coef.i_21.c*AeAo**this.KT_coef.i_21.d*Z**this.KT_coef.i_21.e +
this.KT_coef.i_22.a*J**this.KT_coef.i_22.b*PD**this.KT_coef.i_22.c*AeAo**this.KT_coef.i_22.d*Z**this.KT_coef.i_22.e +
this.KT_coef.i_23.a*J**this.KT_coef.i_23.b*PD**this.KT_coef.i_23.c*AeAo**this.KT_coef.i_23.d*Z**this.KT_coef.i_23.e +
this.KT_coef.i_24.a*J**this.KT_coef.i_24.b*PD**this.KT_coef.i_24.c*AeAo**this.KT_coef.i_24.d*Z**this.KT_coef.i_24.e +
this.KT_coef.i_25.a*J**this.KT_coef.i_25.b*PD**this.KT_coef.i_25.c*AeAo**this.KT_coef.i_25.d*Z**this.KT_coef.i_25.e +
this.KT_coef.i_26.a*J**this.KT_coef.i_26.b*PD**this.KT_coef.i_26.c*AeAo**this.KT_coef.i_26.d*Z**this.KT_coef.i_26.e +
this.KT_coef.i_27.a*J**this.KT_coef.i_27.b*PD**this.KT_coef.i_27.c*AeAo**this.KT_coef.i_27.d*Z**this.KT_coef.i_27.e +
this.KT_coef.i_28.a*J**this.KT_coef.i_28.b*PD**this.KT_coef.i_28.c*AeAo**this.KT_coef.i_28.d*Z**this.KT_coef.i_28.e +
this.KT_coef.i_29.a*J**this.KT_coef.i_29.b*PD**this.KT_coef.i_29.c*AeAo**this.KT_coef.i_29.d*Z**this.KT_coef.i_29.e +
this.KT_coef.i_30.a*J**this.KT_coef.i_30.b*PD**this.KT_coef.i_30.c*AeAo**this.KT_coef.i_30.d*Z**this.KT_coef.i_30.e +
this.KT_coef.i_31.a*J**this.KT_coef.i_31.b*PD**this.KT_coef.i_31.c*AeAo**this.KT_coef.i_31.d*Z**this.KT_coef.i_31.e +
this.KT_coef.i_32.a*J**this.KT_coef.i_32.b*PD**this.KT_coef.i_32.c*AeAo**this.KT_coef.i_32.d*Z**this.KT_coef.i_32.e +
this.KT_coef.i_33.a*J**this.KT_coef.i_33.b*PD**this.KT_coef.i_33.c*AeAo**this.KT_coef.i_33.d*Z**this.KT_coef.i_33.e +
this.KT_coef.i_35.a*J**this.KT_coef.i_35.b*PD**this.KT_coef.i_35.c*AeAo**this.KT_coef.i_35.d*Z**this.KT_coef.i_35.e +
this.KT_coef.i_36.a*J**this.KT_coef.i_36.b*PD**this.KT_coef.i_36.c*AeAo**this.KT_coef.i_36.d*Z**this.KT_coef.i_36.e +
this.KT_coef.i_37.a*J**this.KT_coef.i_37.b*PD**this.KT_coef.i_37.c*AeAo**this.KT_coef.i_37.d*Z**this.KT_coef.i_37.e +
this.KT_coef.i_38.a*J**this.KT_coef.i_38.b*PD**this.KT_coef.i_38.c*AeAo**this.KT_coef.i_38.d*Z**this.KT_coef.i_38.e
this.new_KQ = this.KQ_coef.i_0.a*J**this.KQ_coef.i_0.b*PD**this.KQ_coef.i_0.c*AeAo**this.KQ_coef.i_0.d*Z**this.KQ_coef.i_0.e +
this.KQ_coef.i_1.a*J**this.KQ_coef.i_1.b*PD**this.KQ_coef.i_1.c*AeAo**this.KQ_coef.i_1.d*Z**this.KQ_coef.i_1.e +
this.KQ_coef.i_2.a*J**this.KQ_coef.i_2.b*PD**this.KQ_coef.i_2.c*AeAo**this.KQ_coef.i_2.d*Z**this.KQ_coef.i_2.e +
this.KQ_coef.i_3.a*J**this.KQ_coef.i_3.b*PD**this.KQ_coef.i_3.c*AeAo**this.KQ_coef.i_3.d*Z**this.KQ_coef.i_3.e +
this.KQ_coef.i_4.a*J**this.KQ_coef.i_4.b*PD**this.KQ_coef.i_4.c*AeAo**this.KQ_coef.i_4.d*Z**this.KQ_coef.i_4.e +
this.KQ_coef.i_5.a*J**this.KQ_coef.i_5.b*PD**this.KQ_coef.i_5.c*AeAo**this.KQ_coef.i_5.d*Z**this.KQ_coef.i_5.e +
this.KQ_coef.i_6.a*J**this.KQ_coef.i_6.b*PD**this.KQ_coef.i_6.c*AeAo**this.KQ_coef.i_6.d*Z**this.KQ_coef.i_6.e +
this.KQ_coef.i_7.a*J**this.KQ_coef.i_7.b*PD**this.KQ_coef.i_7.c*AeAo**this.KQ_coef.i_7.d*Z**this.KQ_coef.i_7.e +
this.KQ_coef.i_8.a*J**this.KQ_coef.i_8.b*PD**this.KQ_coef.i_8.c*AeAo**this.KQ_coef.i_8.d*Z**this.KQ_coef.i_8.e +
this.KQ_coef.i_9.a*J**this.KQ_coef.i_9.b*PD**this.KQ_coef.i_9.c*AeAo**this.KQ_coef.i_9.d*Z**this.KQ_coef.i_9.e +
this.KQ_coef.i_10.a*J**this.KQ_coef.i_10.b*PD**this.KQ_coef.i_10.c*AeAo**this.KQ_coef.i_10.d*Z**this.KQ_coef.i_10.e +
this.KQ_coef.i_11.a*J**this.KQ_coef.i_11.b*PD**this.KQ_coef.i_11.c*AeAo**this.KQ_coef.i_11.d*Z**this.KQ_coef.i_11.e +
this.KQ_coef.i_12.a*J**this.KQ_coef.i_12.b*PD**this.KQ_coef.i_12.c*AeAo**this.KQ_coef.i_12.d*Z**this.KQ_coef.i_12.e +
this.KQ_coef.i_13.a*J**this.KQ_coef.i_13.b*PD**this.KQ_coef.i_13.c*AeAo**this.KQ_coef.i_13.d*Z**this.KQ_coef.i_13.e +
this.KQ_coef.i_14.a*J**this.KQ_coef.i_14.b*PD**this.KQ_coef.i_14.c*AeAo**this.KQ_coef.i_14.d*Z**this.KQ_coef.i_14.e +
this.KQ_coef.i_15.a*J**this.KQ_coef.i_15.b*PD**this.KQ_coef.i_15.c*AeAo**this.KQ_coef.i_15.d*Z**this.KQ_coef.i_15.e +
this.KQ_coef.i_16.a*J**this.KQ_coef.i_16.b*PD**this.KQ_coef.i_16.c*AeAo**this.KQ_coef.i_16.d*Z**this.KQ_coef.i_16.e +
this.KQ_coef.i_17.a*J**this.KQ_coef.i_17.b*PD**this.KQ_coef.i_17.c*AeAo**this.KQ_coef.i_17.d*Z**this.KQ_coef.i_17.e +
this.KQ_coef.i_18.a*J**this.KQ_coef.i_18.b*PD**this.KQ_coef.i_18.c*AeAo**this.KQ_coef.i_18.d*Z**this.KQ_coef.i_18.e +
this.KQ_coef.i_19.a*J**this.KQ_coef.i_19.b*PD**this.KQ_coef.i_19.c*AeAo**this.KQ_coef.i_19.d*Z**this.KQ_coef.i_19.e +
this.KQ_coef.i_20.a*J**this.KQ_coef.i_20.b*PD**this.KQ_coef.i_20.c*AeAo**this.KQ_coef.i_20.d*Z**this.KQ_coef.i_20.e +
this.KQ_coef.i_21.a*J**this.KQ_coef.i_21.b*PD**this.KQ_coef.i_21.c*AeAo**this.KQ_coef.i_21.d*Z**this.KQ_coef.i_21.e +
this.KQ_coef.i_22.a*J**this.KQ_coef.i_22.b*PD**this.KQ_coef.i_22.c*AeAo**this.KQ_coef.i_22.d*Z**this.KQ_coef.i_22.e +
this.KQ_coef.i_23.a*J**this.KQ_coef.i_23.b*PD**this.KQ_coef.i_23.c*AeAo**this.KQ_coef.i_23.d*Z**this.KQ_coef.i_23.e +
this.KQ_coef.i_24.a*J**this.KQ_coef.i_24.b*PD**this.KQ_coef.i_24.c*AeAo**this.KQ_coef.i_24.d*Z**this.KQ_coef.i_24.e +
this.KQ_coef.i_25.a*J**this.KQ_coef.i_25.b*PD**this.KQ_coef.i_25.c*AeAo**this.KQ_coef.i_25.d*Z**this.KQ_coef.i_25.e +
this.KQ_coef.i_26.a*J**this.KQ_coef.i_26.b*PD**this.KQ_coef.i_26.c*AeAo**this.KQ_coef.i_26.d*Z**this.KQ_coef.i_26.e +
this.KQ_coef.i_27.a*J**this.KQ_coef.i_27.b*PD**this.KQ_coef.i_27.c*AeAo**this.KQ_coef.i_27.d*Z**this.KQ_coef.i_27.e +
this.KQ_coef.i_28.a*J**this.KQ_coef.i_28.b*PD**this.KQ_coef.i_28.c*AeAo**this.KQ_coef.i_28.d*Z**this.KQ_coef.i_28.e +
this.KQ_coef.i_29.a*J**this.KQ_coef.i_29.b*PD**this.KQ_coef.i_29.c*AeAo**this.KQ_coef.i_29.d*Z**this.KQ_coef.i_29.e +
this.KQ_coef.i_30.a*J**this.KQ_coef.i_30.b*PD**this.KQ_coef.i_30.c*AeAo**this.KQ_coef.i_30.d*Z**this.KQ_coef.i_30.e +
this.KQ_coef.i_31.a*J**this.KQ_coef.i_31.b*PD**this.KQ_coef.i_31.c*AeAo**this.KQ_coef.i_31.d*Z**this.KQ_coef.i_31.e +
this.KQ_coef.i_32.a*J**this.KQ_coef.i_32.b*PD**this.KQ_coef.i_32.c*AeAo**this.KQ_coef.i_32.d*Z**this.KQ_coef.i_32.e +
this.KQ_coef.i_33.a*J**this.KQ_coef.i_33.b*PD**this.KQ_coef.i_33.c*AeAo**this.KQ_coef.i_33.d*Z**this.KQ_coef.i_33.e +
this.KQ_coef.i_35.a*J**this.KQ_coef.i_35.b*PD**this.KQ_coef.i_35.c*AeAo**this.KQ_coef.i_35.d*Z**this.KQ_coef.i_35.e +
this.KQ_coef.i_36.a*J**this.KQ_coef.i_36.b*PD**this.KQ_coef.i_36.c*AeAo**this.KQ_coef.i_36.d*Z**this.KQ_coef.i_36.e +
this.KQ_coef.i_37.a*J**this.KQ_coef.i_37.b*PD**this.KQ_coef.i_37.c*AeAo**this.KQ_coef.i_37.d*Z**this.KQ_coef.i_37.e +
this.KQ_coef.i_38.a*J**this.KQ_coef.i_38.b*PD**this.KQ_coef.i_38.c*AeAo**this.KQ_coef.i_38.d*Z**this.KQ_coef.i_38.e +
this.KQ_coef.i_39.a*J**this.KQ_coef.i_39.b*PD**this.KQ_coef.i_39.c*AeAo**this.KQ_coef.i_39.d*Z**this.KQ_coef.i_39.e +
this.KQ_coef.i_40.a*J**this.KQ_coef.i_40.b*PD**this.KQ_coef.i_40.c*AeAo**this.KQ_coef.i_40.d*Z**this.KQ_coef.i_40.e +
this.KQ_coef.i_41.a*J**this.KQ_coef.i_41.b*PD**this.KQ_coef.i_41.c*AeAo**this.KQ_coef.i_41.d*Z**this.KQ_coef.i_41.e +
this.KQ_coef.i_42.a*J**this.KQ_coef.i_42.b*PD**this.KQ_coef.i_42.c*AeAo**this.KQ_coef.i_42.d*Z**this.KQ_coef.i_42.e +
this.KQ_coef.i_43.a*J**this.KQ_coef.i_43.b*PD**this.KQ_coef.i_43.c*AeAo**this.KQ_coef.i_43.d*Z**this.KQ_coef.i_43.e +
this.KQ_coef.i_44.a*J**this.KQ_coef.i_44.b*PD**this.KQ_coef.i_44.c*AeAo**this.KQ_coef.i_44.d*Z**this.KQ_coef.i_44.e +
this.KQ_coef.i_45.a*J**this.KQ_coef.i_45.b*PD**this.KQ_coef.i_45.c*AeAo**this.KQ_coef.i_45.d*Z**this.KQ_coef.i_45.e +
this.KQ_coef.i_46.a*J**this.KQ_coef.i_46.b*PD**this.KQ_coef.i_46.c*AeAo**this.KQ_coef.i_46.d*Z**this.KQ_coef.i_46.e
//testing models (these this.kt and this.kq models are stil unders testing mode )
this.KT = 0.00880496*J**0*PD**0*AeAo**0*Z**0 - 0.204554*J**1*PD**0*AeAo**0*Z**0 +
0.166351*J**0*PD**1*AeAo**0*Z**0 + 0.158114*J**0*PD**2*AeAo**0*Z**0 -
0.147581*J**2*PD**0*AeAo**1*Z**0 - 0.481497*J**1*PD**1*AeAo**1*Z**0 +
0.415437*J**0*PD**2*AeAo**1*Z**0 + 0.0144043*J**0*PD**0*AeAo**0*Z**1 -
0.0530054*J**2*PD**0*AeAo**0*Z**1 + 0.0143481*J**0*PD**1*AeAo**0*Z**1 +
0.0606826*J**1*PD**1*AeAo**0*Z**1 - 0.0125894*J**0*PD**0*AeAo**1*Z**1 +
0.0109689*J**1*PD**0*AeAo**1*Z**1 - 0.133698*J**0*PD**3*AeAo**0*Z**0 +
0.00638407*J**0*PD**6*AeAo**0*Z**0 - 0.00132718*J**2*PD**6*AeAo**0*Z**0 +
0.168496*J**3*PD**0*AeAo**1*Z**0 - 0.0507214*J**0*PD**0*AeAo**2*Z**0 +
0.0854559*J**2*PD**0*AeAo**2*Z**0 - 0.0504475*J**3*PD**0*AeAo**2*Z**0 +
0.010465*J**1*PD**6*AeAo**2*Z**0 - 0.00648272*J**2*PD**6*AeAo**2*Z**0 -
0.00841728*J**0*PD**3*AeAo**0*Z**1 + 0.0168424*J**1*PD**3*AeAo**0*Z**1 -
0.00102296*J**3*PD**3*AeAo**0*Z**1 - 0.0317791*J**0*PD**3*AeAo**1*Z**1 +
0.018604*J**1*PD**0*AeAo**2*Z**1 - 0.00410798*J**0*PD**2*AeAo**2*Z**1 -
0.000606848*J**0*PD**0*AeAo**0*Z**2 - 0.0049819*J**1*PD**0*AeAo**0*Z**2 +
0.0025983*J**2*PD**0*AeAo**0*Z**2 - 0.000560528*J**3*PD**0*AeAo**0*Z**2 -
0.00163652*J**1*PD**2*AeAo**0*Z**2 - 0.000328787*J**1*PD**6*AeAo**0*Z**2 +
0.000116502*J**2*PD**6*AeAo**0*Z**2 + 0.000690904*J**0*PD**0*AeAo**1*Z**2 +
0.00421749*J**0*PD**3*AeAo**1*Z**2 + 0.0000565229*J**3*PD**6*AeAo**1*Z**2 -
0.00146564*J**0*PD**3*AeAo**2*Z**2
this.KQ = 0.00379368*J**0*PD**0*AeAo**0*Z**0 + 0.00886523*J**2*PD**0*AeAo**0*Z**0 -
0.032241*J**1*PD**1*AeAo**0*Z**0 - 0.00344778*J**0*PD**2*AeAo**0*Z**0 -
0.0408811*J**0*PD**1*AeAo**1*Z**0 - 0.108009*J**1*PD**1*AeAo**1*Z**0 -
0.0885381*J**2*PD**1*AeAo**1*Z**0 + 0.188561*J**0*PD**2*AeAo**1*Z**0 -
0.00370871*J**1*PD**0*AeAo**0*Z**1 + 0.00513696*J**0*PD**1*AeAo**0*Z**1 +
0.0209449*J**1*PD**1*AeAo**0*Z**1 + 0.00474319*J**2*PD**1*AeAo**0*Z**1 -
0.00723408*J**2*PD**0*AeAo**1*Z**1 + 0.00438388*J**1*PD**1*AeAo**1*Z**1 -
0.0269403*J**0*PD**2*AeAo**1*Z**1 + 0.0558082*J**3*PD**0*AeAo**1*Z**0 +
0.0161886*J**0*PD**3*AeAo**1*Z**0 + 0.00318086*J**1*PD**3*AeAo**1*Z**0 +
0.015896*J**0*PD**0*AeAo**2*Z**0 + 0.0471729*J**1*PD**0*AeAo**2*Z**0 +
0.0196283*J**3*PD**0*AeAo**2*Z**0 - 0.0502782*J**0*PD**1*AeAo**2*Z**0 -
0.030055*J**3*PD**1*AeAo**2*Z**0 + 0.0417122*J**2*PD**2*AeAo**2*Z**0 -
0.0397722*J**0*PD**3*AeAo**2*Z**0 - 0.00350024*J**0*PD**6*AeAo**2*Z**0 -
0.0106854*J**3*PD**0*AeAo**0*Z**1 + 0.00110903*J**3*PD**3*AeAo**0*Z**1 -
0.000313912*J**0*PD**6*AeAo**0*Z**1 + 0.0035985*J**3*PD**0*AeAo**1*Z**1 -
0.00142121*J**0*PD**6*AeAo**1*Z**1 - 0.00383637*J**1*PD**0*AeAo**2*Z**1 +
0.0126803*J**0*PD**2*AeAo**2*Z**1 - 0.00318278*J**2*PD**3*AeAo**2*Z**1 +
0.00334268*J**0*PD**6*AeAo**2*Z**2 - 0.00183491*J**1*PD**1*AeAo**0*Z**2 +
0.000112451*J**3*PD**2*AeAo**0*Z**2 - 0.0000297228*J**3*PD**6*AeAo**0*Z**2 +
0.000269551*J**1*PD**0*AeAo**1*Z**2 + 0.00083265*J**2*PD**0*AeAo**1*Z**2 +
0.00155334*J**0*PD**2*AeAo**1*Z**2 + 0.000302683*J**0*PD**6*AeAo**1*Z**2 -
0.0001843*J**0*PD**0*AeAo**2*Z**2 - 0.000425399*J**0*PD**3*AeAo**2*Z**2 +
0.0000869243*J**3*PD**3*AeAo**2*Z**2 - 0.0004659*J**0*PD**6*AeAo**2*Z**2 +
0.0000554194*J**1*PD**6*AeAo**2*Z**2
this.KT_change = 0.000353485*J**0*PD**0*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**0 -
0.00333758*J**2*PD**0*AeAo**1*Z**0*Math.log10(this.Rno - 0.301)**0 -
0.00478125*J**1*PD**1*AeAo**1*Z**0*Math.log10(this.Rno - 0.301)**0
+ 0.000257792*J**2*PD**0*AeAo**1*Z**0*Math.log10(this.Rno - 0.301)**2 +
0.0000643192*J**2*PD**6*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**1
- 0.0000110636*J**2*PD**6*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**2 -
0.0000276305*J**2*PD**0*AeAo**1*Z**1*Math.log10(this.Rno - 0.301)**2
+ 0.0000954*J**1*PD**1*AeAo**1*Z**1*Math.log10(this.Rno - 0.301)**1 +
0.0000032049*J**1*PD**3*AeAo**1*Z**2*Math.log10(this.Rno - 0.301)**1
this.KQ_change = -0.000591412*J**0*PD**0*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**0 +
0.00696898*J**0*PD**1*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**0 -
0.0000666654*J**0*PD**6*AeAo**0*Z**1*Math.log10(this.Rno - 0.301)**0
+ 0.0160818*J**0*PD**0*AeAo**2*Z**0*Math.log10(this.Rno - 0.301)**0 -
0.000938091*J**0*PD**1*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**1
- 0.00059593*J**0*PD**2*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**1 +
0.000078299*J**0*PD**2*AeAo**0*Z**0*Math.log10(this.Rno - 0.301)**2
+ 0.0000052199*J**2*PD**0*AeAo**1*Z**1*Math.log10(this.Rno - 0.301)**1 -
0.00000088538*J**1*PD**1*AeAo**1*Z**1*Math.log10(this.Rno - 0.301)**2 +
0.0000230171*J**0*PD**6*AeAo**0*Z**1*Math.log10(this.Rno - 0.301)**1 -
0.00000184341*J**0*PD**6*AeAo**0*Z**1*Math.log10(this.Rno - 0.301)**2 -
0.00400252*J**0*PD**0*AeAo**2*Z**0*Math.log10(this.Rno - 0.301)**1 +
0.000220915*J**0*PD**0*AeAo**2*Z**0*Math.log10(this.Rno - 0.301)**2
console.log("testing", this.KT_change, this.KQ_change)
// }
console.log(KT,"KT", KQ,"KQ")
NH = (1- TFactor)/(1-W) // Hull efficiency
No = (KT*J)/(KQ*2*3.14)
NB = No * NR
NT = 0.97 // (Assumed value
NH = NH.toFixed(3)
No = No.toFixed(3)
KT = KT.toFixed(3)
KQ = KQ.toFixed(3)
propel_speed = (1-W)*shipSpeed/(D*J)
propel_speed = (propel_speed.toFixed(2))*1