function updateRangeInput(elem) { $(elem).next().val($(elem).val()); } /*time in hours*/ var js_day_time = 24; var c_w = 1.163;/* Specific heat capacity of the storage fluid (1.163 Wh/(kg.K) for water)-------- */ /*Konstanten: Warmwasserbedarf pro Person und Jahr*/ /*Konstanten: Konstanten: Spezifische Heizlast*/ var spez_hlast_1=75; function slide22() { /*---Getting gebäudetyp und baujahr des gebäudes from input----*/ var js_gbttyp = document.getElementById("js_gbttyp").value; var js_gbsan = document.getElementById("js_gbsan").value; var js_gbbaujahr = document.getElementById("js_gbbaujahr").value; var xhr = new XMLHttpRequest(); xhr.open("GET", "get_db_gebaeude.php?trial_out=" + js_gbttyp + "&gbsan=" + js_gbsan, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { var recordData = JSON.parse(xhr.responseText); console.log("Record Data:", recordData); var gbt_class = recordData[js_gbbaujahr]; console.log("TransmissionLoss:", gbt_class) pvt(gbt_class); toggleListItems(); } }; xhr.send(); } /*This is the main function and is used to interact with the database and getting the values from the database for Heat load calculation from this function slider_pvt is triggered and from there function main_func*/ function slider_22() { /*---Getting gebäudetyp und baujahr des gebäudes from input----*/ var js_gbttyp = document.getElementById("js_gbttyp").value; var js_gbsan = document.getElementById("js_gbsan").value; var js_gbbaujahr = document.getElementById("js_gbbaujahr").value; trial_out_value=js_gbttyp; //String formattedNumber = String.format("%02d", js_pvttype_int); var xhr = new XMLHttpRequest(); xhr.open("GET", "get_db_wp_design.php?trial_out=" + trial_out_value, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { //alert(xhr.responseText); var recordData = JSON.parse(xhr.responseText); console.log("Record Data:", recordData); var gbt_class= recordData[js_gbbaujahr]; //alert(gbt_class); //calling the other function and passing the gbt_class as variable so that it can be passed as variable together with the parameters to the funciton slider2 //slider_pvt(gbt_class); pvt(gbt_class); toggleListItems(); } }; xhr.send(); } function slider() { var js_gbttyp = document.getElementById("js_gbttyp").value; var js_gbsan = document.getElementById("js_gbsan").value; var js_gbbaujahr = document.getElementById("js_gbbaujahr").value; console.log(js_gbttyp, js_gbsan, js_gbbaujahr) const gbt_class = 1.5 pvt(gbt_class); toggleListItems(); } function pvt (gbt_class){ var js_hersteller = document.getElementById("js_hersteller").value; var eta_0; var K_b; var K_d; var c1; var c2; var c3; var c4; var c5; var c6; var c7; var c8; // Assign different dynamic values based on the selected manufacturer (js_hersteller) switch (js_hersteller) { case "Consolar": eta_0 =0.532 ; K_b=1 ; K_d=1 ; c1=19.08 ; c2=0 ; c3=3.69 ; c4=0.434 ; c5=0 ; c6=0.067 ; c7=0 ; c8=0 ; break; case "DualSun1": eta_0 =0.452 ; K_b=0.9409 ; K_d=0.88 ; c1=19.65 ; c2=0 ; c3=1.85 ; c4=0.45 ; c5=20800 ; c6=0.018 ; c7=0 ; c8=0 ; break; case "SunMaxx": eta_0 =0.584 ; K_b=1 ; K_d=1 ; c1=19.57 ; c2=0 ; c3=2.072 ; c4=0.49 ; c5=13500 ; c6=0.018 ; c7=0 ; c8=0 ; break; case "TripleSolar": eta_0 =0.468 ; K_b=1 ; K_d=0.953 ; c1=22.99 ; c2=0 ; c3=7.572 ; c4=0.434 ; c5=26500 ; c6=0.067 ; c7=0 ; c8=0 ; break; case "Solvis": eta_0 =0.52 ; K_b=0.92 ; K_d=1 ; c1=5.08 ; c2=0.02 ; c3=0 ; c4=0 ; c5=0 ; c6=0 ; c7=0 ; c8=0 ; break; case "nd_Systeme": eta_0 =0.63 ; K_b=0.98 ; K_d=0.99 ; c1=12.24 ; c2=0.06 ; c3=1.7 ; c4=0.57 ; c5=47900 ; c6=0.03 ; c7=0 ; c8=0 ; break; } console.log(gbt_class,eta_0,K_b,K_d, c1, c2, c3, c4, c5, c6, c7, c8) main_func(gbt_class,eta_0,K_b,K_d, c1, c2, c3, c4, c5, c6, c7, c8); } /*Function for connecting with the table pvt_collector and get the parameters */ function slider_pvt (gbt_class) { var js_hersteller = document.getElementById("js_hersteller").value; trial_out_value=js_hersteller; //alert(trial_out_value); var xhr_pvt = new XMLHttpRequest(); xhr_pvt.open("GET", "db_pvt_para.php?trial_out=" + trial_out_value, true); xhr_pvt.onreadystatechange = function () { if (xhr_pvt.readyState === 4 && xhr_pvt.status === 200) { var recordData2 = JSON.parse(xhr_pvt.responseText); console.log("Record Data PVT:", recordData2); var js_hersteller= recordData2[js_hersteller]; var eta_0 = recordData2.eta_0; var K_b = recordData2.K_b; var K_d= recordData2.K_d; var c1= recordData2.c1; var c2= recordData2.c2; var c3= recordData2.c3; var c4= recordData2.c4; var c5= recordData2.c5; var c6= recordData2.c6; var c7= recordData2.c7; var c8= recordData2.c8; main_func(gbt_class,eta_0,K_b,K_d, c1, c2, c3, c4, c5, c6, c7, c8); } else { console.log("Request failed with status:", xhr_pvt.status); } }; xhr_pvt.send(); } /* --------Here we read all the inputs and do the calculation inside this function--------------------- */ function main_func(gbt_class,eta_0,K_b,K_d, c1, c2, c3, c4, c5, c6, c7, c8){ console.log("Parameters:", eta_0,K_b,K_d, c1, c2, c3, c4, c5, c6, c7, c8) /* -------------------------------Projeckt variables------------------------------------------------ */ /* var js_projname = document.getElementById("js_projname").value; var js_proplz = document.getElementById("js_proplz").value; var js_proort = document.getElementById("js_proort").value; var js_projstraß = document.getElementById("js_projstraß").value; */ /* ------------------------------------------------------------------------------- */ /*Gebäude und system variables ------------------------------------------------------------------------------- */ var js_heizlast = document.getElementById("js_heizlast").value; js_heizlast=parseFloat(js_heizlast); //alert(3); var js_wohneinheiten = document.getElementById("js_wohneinheiten").value; js_wohneinheiten=parseFloat(js_wohneinheiten); var js_anbewoh = document.getElementById("js_anbewoh").value; js_anbewoh=parseFloat(js_anbewoh); var js_sperrdauer = document.getElementById("js_sperrdauer").value; js_sperrdauer=parseFloat(js_sperrdauer); //var js_anzsperrdauer = document.getElementById("js_anzsperrdauer").value; //js_anzsperrdauer=parseFloat(js_anzsperrdauer); var js_gbttyp = document.getElementById("js_gbttyp").value; //js_gbttyp=parseFloat(js_gbttyp); var js_gbbaujahr = document.getElementById("js_gbbaujahr").value; //js_gbbaujahr=parseFloat(js_gbbaujahr); var js_heizgrenztemp = document.getElementById("js_heizgrenztemp").value; js_heizgrenztemp=parseFloat(js_heizgrenztemp); var js_beheizte_flaeche = document.getElementById("js_beheizte_flaeche").value; js_beheizte_flaeche =parseFloat(js_beheizte_flaeche ); var js_normaussentemp = document.getElementById("js_normaussentemp").value; js_normaussentemp=parseFloat(js_normaussentemp); /* ------------------------------------------------------------------------------- */ /* -----------------------Heizlast Calculation------------------------------------ */ var T_amb_ext = js_normaussentemp; var T_amb_int = 19; //For wohngebäude, this temperature is 20 var h = 2.5; //for residential building h=2.5 is standard // Determination of the Luftwechselrate (/h) based on the table from DIN EN 12831-1 // Extract the first four characters from js_gbbaujahr var baujahr= js_gbbaujahr.substr(0, 4); // Convert the extracted string to a number var baujahr = parseInt(baujahr); var n; // Initialize the variable n if (baujahr >= 1995) { n = 0.25; } else if (baujahr < 1977) { n = 1; } else { n = 0.5; } //alert(n) var H_L = js_beheizte_flaeche*h*n*0.34 ; //alert(H_L); var H_T = gbt_class; //alert(H_T); var gain_int= 3; // 3 W/m2 var gain_sol = 0; // Need to edit it var gain_factor = 0.95; var gains= gain_factor*((gain_int * js_beheizte_flaeche) + gain_sol ); var normheizlast_self = ((js_beheizte_flaeche*H_T*(T_amb_int-T_amb_ext))+(H_L*(T_amb_int-T_amb_ext))-gains)/1000; console.log("Calculated Heizlast:", normheizlast_self); //alert(normheizlast_self); /* ------------------------------------------------------------------------------------------------- */ /* -------------------------- Raumheizung variables ---------------------------------------------- */ var js_heiztyp = document.getElementById("js_heiztyp").value; //alert(js_heiztyp); js_heiztyp=parseFloat(js_heiztyp); var js_vorlauf = document.getElementById("js_vorlauf").value; js_vorlauf=parseFloat(js_vorlauf); var js_rücklauf = document.getElementById("js_rücklauf").value; js_rücklauf=parseFloat(js_rücklauf); var js_speichtemp = document.getElementById("js_speichtemp").value; js_speichtemp=parseFloat(js_speichtemp); /* ----------------------------------------------------------------------------------------------------- */ /* ------------------------------Trinkwarmwasser variables------------------------------------------------- */ var js_berechnach = document.getElementById("js_berechnach").value; js_berechnach=parseFloat(js_berechnach); var js_trinkspeichtemp = document.getElementById("js_trinkspeichtemp").value; js_trinkspeichtemp=parseFloat(js_trinkspeichtemp); var js_kaltwassertemp = document.getElementById("js_kaltwassertemp").value; js_kaltwassertemp=parseFloat(js_kaltwassertemp); var js_zirk = document.getElementById("js_zirk").value; js_zirk=parseFloat(js_zirk); //alert(js_kaltwassertemp) /* -----------------------------------------------------------------------------------------------------*/ /* -------------STEP 1 and 2: Calculation of daily heat demand:-----------------------------------------*/ var Q_h_n_dialy = js_heizlast*js_day_time; var Q_h_n = js_heizlast; /* ------------------------------------------------------------------------------------------------------*/ /*------------------------ STEP 3: Calculation of daily DHW demand---------------------------------------*/ /* ------------------------Daily energy required for DHW preparation-------------------------------------*/ //var Q_dpb = js_wohneinheiten*2.24; /* -----------The total daily energy requirement for the day is calculated as below based on the Berechnung Nach input-----------------------*/ //var Q_dp = js_wohneinheiten*5.845; switch (js_berechnach) { /*----------Wohneinheiten----------------*/ case 1: var Q_dp = js_wohneinheiten*5.845; var Q_dpb = js_wohneinheiten*2.24; // Peak demand for storage sizing is break; /*--------Personnenzahl-----------------*/ case 2: var Q_dp = js_anbewoh*2.4; //2.4 kWh/day per person of heat demand assumed (medium-low i.e. 60 L/day/person) var Q_dpb = js_anbewoh*0.945; //Considering peak demand of 0.945 kWh from VDI break; } /* ------------------------Heat losses from the manufacturer’s specification (considering storage efficiency)------------------------------*/ var Q_dp_ges = Q_dp + 2.6; /* ------------------------------------------------------------------------------------------------------*/ /*---------------------------------Step 4: DHW Tank Sizing-----------------------------------------------*/ /* ---------------------------Required storage volume for the direct storage of the DHW------------------*/ var V_dpb = Q_dpb*1000/(c_w*(js_trinkspeichtemp-(js_kaltwassertemp))); /* -------------------------Volume to compensate for the circulation losses------------------------------ */ switch (js_zirk) { /*----------Heizkörper----------------*/ case 1: var Q_zirk = 0.26 ; /* circulation losses are fixed and amount to 6.2 kWh/24 h i.e. 0.26 kWh for 1 hour of reference period at 55 °C rücklauf temp-------- */ break; /*--------Boden Heizung--------------*/ case 2: var Q_zirk = 0 ; break; } var js_zir_rl_wassertemp = js_trinkspeichtemp-5; /*----------Difference in temperature----------------*/ var V_zirk = Q_zirk*1000/(c_w*(js_trinkspeichtemp-(js_zir_rl_wassertemp))); /* ------------------------------Storage volume with a 15 % surcharge for storage efficiency------------- */ var f_twe = 1.15; /* Surcharge for the assumption of mixing losses when storing DHW-------- */ var V_sp_min = (V_dpb+V_zirk)*f_twe; /* ----------------------------------------------------------------------------------------------------- */ /*-----------------------------------Step 5: SH Tank Sizing----------------------------------------------*/ /* ---------------------------Required storage volume for the direct storage of the DHW----------------- */ switch (js_heiztyp) { /*----------Heizkörper----------------*/ case 1: var a_0 = 53.8; var a_1 = 81.54; break; /*--------Boden Heizung--------------*/ case 2: var a_0 = 28.1; var a_1 = 19.4; break; } /* ----------------------------required storage size for space heating is determine------------------------*/ var V_r_h = a_0*js_heizlast+a_1; /* --------------------------------------------------------------------------------------------------------*/ /*---------------------------------Step 6: Heat pump Sizing------------------------------------------------*/ /* ---------------------Heat pump size to fulfil the space heating and domestic hot water demand-----------*/ var Q_sonst = 0; var Q_heiz_tww_ohn_sp = (Q_h_n_dialy+Q_dp_ges+Q_sonst+Q_zirk)/js_day_time; var Q_wp_erf = (Q_h_n_dialy+Q_dp_ges+Q_sonst+Q_zirk)/(js_day_time-js_sperrdauer); var Q_tww = (Q_dp_ges+Q_zirk)/js_day_time /*-------------------------------------Output WP-System----------------------------------------------------*/ /*Ergebnisübersicht WP DESIGN */ if (isNaN(Q_heiz_tww_ohn_sp)){ document.getElementById("outputBox_heizleistung_ink_tww").innerHTML = "0.00 "//Math.round(Q_heiz_tww_ohn_sp) }else{ document.getElementById("outputBox_heizleistung_ink_tww").innerHTML = Q_heiz_tww_ohn_sp.toFixed(2) } if (isNaN(Q_wp_erf)){ document.getElementById("outputBox_erförder_wp_size").innerHTML = "0.00"//Math.round(Q_wp_erf) }else{ document.getElementById("outputBox_erförder_wp_size").innerHTML = Q_wp_erf.toFixed(2) } if (isNaN(V_sp_min)){ document.getElementById("outputBox_tww_speicher_größe").innerHTML = "0.00"//Math.round(V_sp_min) }else{ document.getElementById("outputBox_tww_speicher_größe").innerHTML = Math.round(V_sp_min) } if (isNaN(V_r_h)){ document.getElementById("outputBox_rh_speicher_größe").innerHTML = "0.00"//Math.round(V_r_h) }else{ document.getElementById("outputBox_rh_speicher_größe").innerHTML = Math.round(V_r_h) } //document.getElementById("out_erförder_wp_size").innerHTML = Math.round(Q_wp_erf) //document.getElementById("out_erförder_wp_size").innerHTML = Math.round(Q_wp_erf); //document.getElementById("out_tww_speicher_größe").innerHTML = Math.round(V_sp_min); //document.getElementById("out_rh_speicher_größe").innerHTML = Math.round(V_r_h); //FROM HERE ANOTHER FUNCTION WITH THE NECESSARY INPUT FIELDS //js_betriebsmod, js_normaussentemp, js_bivalenztemp,js_heizgrenztemp,js_beheizte_flaeche, eta0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,Q_h_n_dialy,H_T, H_L, T_amb_int /* ---------------------------------------------------------------------------------------------------- */ /*----------------------WP Selection variables IMP: ADD HERE the Vorlauftemperatur for WP-------------- */ var js_betrimod = document.getElementById("js_betrimod").value; js_betrimod=parseFloat(js_betrimod); var js_bivalenz_temp = document.getElementById("js_bivalenz_temp").value; js_bivalenz_temp=parseFloat(js_bivalenz_temp); var js_gewaehlwp = document.getElementById("js_gewaehlwp").value; js_gewaehlwp=parseFloat(js_gewaehlwp); var js_minverdampfertemp = document.getElementById("js_minverdampfertemp").value; js_minverdampfertemp=parseFloat(js_minverdampfertemp); //var js_wpvorlauftemp = document.getElementById("js_wpvorlauftemp").value; //js_wpvorlauftemp=parseFloat(js_wpvorlauftemp); var js_cop = document.getElementById("js_cop").value; js_cop=parseFloat(js_cop); var js_wpnennleist = document.getElementById("js_wpnennleist").value; js_wpnennleist=parseFloat(js_wpnennleist); //var js_wpvorlauftemp_2 = document.getElementById("js_wpvorlauftemp_2").value; //js_wpvorlauftemp_2=parseFloat(js_wpvorlauftemp_2); var js_cop_2 = document.getElementById("js_cop_2").value; js_cop_2=parseFloat(js_cop_2); var js_wpnennleist_2 = document.getElementById("js_wpnennleist_2").value; js_wpnennleist_2=parseFloat(js_wpnennleist_2); /* ---------------------------------------------------------------------------------------------------- */ /* -------------------------------Weather conditions variables----------------------------------------- */ //var js_außentemp = document.getElementById("js_außentemp").value; //js_außentemp=parseFloat(js_außentemp); var js_globstrahl = document.getElementById("js_globstrahl").value; js_globstrahl=parseFloat(js_globstrahl); var js_windgeschwind = document.getElementById("js_windgeschwind").value; js_windgeschwind=parseFloat(js_windgeschwind); var js_himmel = document.getElementById("js_himmel").value; js_himmel=parseFloat(js_himmel); //var js_desivltemppvt = document.getElementById("js_desivltemppvt").value; //js_desivltemppvt=parseFloat(js_desivltemppvt); /* ----------------------------------------------------------------------------------------------------- */ /* ---------------------------PVT Modules variables----------------------------------------------------- */ var js_hersteller = document.getElementById("js_hersteller").value; js_hersteller=parseFloat(js_hersteller); //var js_model = document.getElementById("js_model").value; //js_model=parseFloat(js_model); /* --------------------------------------------------------------------------------------------------------*/ /*-------------------------------Step 7: PVT Design--------------------------------------------------------*/ /*--------Heat pump characteristics for different operation modes and inlet temperatures---------------------*/ switch (js_betrimod){ case 1: /*----------Monovalent---------------------------*/ var wp_vorlauftemp = js_minverdampfertemp; //WICHTIG: wp_vorlauftemp is the evaporator inlet temperature var tamb = wp_vorlauftemp+5; /*----- In ideal case has to be equal to the normaussentemperatur-----*/ //var Q_biv = (Q_h_n*(js_heizgrenztemp-js_bivalenz_temp))/(js_heizgrenztemp-(js_normaussentemp)); var cop_wp =js_cop; var qdot_wp = js_wpnennleist; var q_heizstab= 0; var q_dp = Q_heiz_tww_ohn_sp break; case 2: /*--------Bivalent Alternative mode-------------*/ var wp_vorlauftemp = js_bivalenz_temp-5; var tamb = wp_vorlauftemp+5; var Q_biv = Q_tww+((Q_h_n*(js_heizgrenztemp-js_bivalenz_temp))/(js_heizgrenztemp-(js_normaussentemp))); var Q_biv_self = ((js_beheizte_flaeche*H_T*(T_amb_int-js_bivalenz_temp))+(H_L*(T_amb_int-js_bivalenz_temp)))/1000; var cop_wp =js_cop_2; var qdot_wp = js_wpnennleist_2; /*----- In this case js_wpnennleist_2 has to equal at least Q_biv -----*/ var q_heizstab = Q_wp_erf; var q_dp = Q_biv break; case 3: /*-------- Bivalent Parallel mode --------------*/ var wp_vorlauftemp = js_bivalenz_temp-5; //this temperature is taken for PVT design at bivalence point var tamb = js_bivalenz_temp; //this is the ambient temperature for the var tamb_min = js_minverdampfertemp+5; /*----- Or Abschaltpunkt?? -----*/ var Q_biv = Q_tww+(((Q_h_n*(js_heizgrenztemp-js_bivalenz_temp))/(js_heizgrenztemp-(js_normaussentemp)))); var Q_biv_self = ((js_beheizte_flaeche*H_T*(T_amb_int-js_bivalenz_temp))+(H_L*(T_amb_int-js_bivalenz_temp)))/1000; /*----- Calculated from the formula for calculating heizlast at ambient temperature-----*/ var cop_wp =js_cop_2; var qdot_wp = js_wpnennleist_2; var q_heizstab= Q_wp_erf-js_wpnennleist; var q_dp = Q_biv /*--------- Performance at Abschaltpunkt --------*/ var Q_abs = (Q_h_n*(js_heizgrenztemp-tamb_min))/(js_heizgrenztemp-(js_normaussentemp)); var Q_abs_self = ((js_beheizte_flaeche*H_T*(T_amb_int-tamb_min))+(H_L*(T_amb_int-tamb_min)))/1000; /*----- Calculated from the formula for calculating heizlast at ambient temperature -----*/ break; } // if wp_vorlauftemp+3 < Normaussentemperatur; wp_vorlauftemp == Normaußentemp-5 /* if (tamb < js_normaussentemp){ tamb= js_normaussentemp; wp_vorlauftemp= js_normaussentemp-5; }else{ tamb = tamb; wp_vorlauftemp= wp_vorlauftemp; } */ /* -----------------------------Required thermal power from PVT---------------------------------------------*/ var t_pvt_out =wp_vorlauftemp; var t_pvt_in = t_pvt_out-3; var qdot_pvt = qdot_wp-(qdot_wp/cop_wp); var qdot_pvt = 1.15 * qdot_pvt; /*Adding 15 % deicing safety */ var tm_pvt = (t_pvt_in+t_pvt_out)/2; var G_hem =js_globstrahl; var Gd = 0.3*G_hem; //30% is diffused and 70% is beam radiation var Gb = G_hem - Gd; switch(js_himmel){ case 1: var js_himmelstemp = tamb-20; break; case 2: var js_himmelstemp = tamb-10; break; case 3: var js_himmelstemp = tamb; break; } //var E_L =(5.67 *10**-8) * (js_himmelstemp+273.15)**4; //this is also true var E_L = (5.67 * Math.pow(10, -8)) * Math.pow(js_himmelstemp + 273.15, 4); var u =js_windgeschwind; /* ---------------------------- QDT ISO 9806 ---------------------------------------------------------------*/ var q_pvt_spezifisch = (eta_0* Gb*K_b) + (eta_0*Gd*K_d)- c1*(tm_pvt-tamb)-c2*(tm_pvt-tamb)**2 - c3*u*(tm_pvt-tamb) + c4*(E_L-((5.67*10**-8)*(tamb+273)**4))-(c6*u*G_hem) - (c7*u*(E_L-((5.64*10**-8)*(tamb+273)**4)))-(c8*(tm_pvt-tamb)**4); var q_pvt_spezifisch = q_pvt_spezifisch/1000; /* ----------------------------Area of PVT Collectors-------------------------------------------------------*/ var pvt_flaeche = qdot_pvt/q_pvt_spezifisch; var pvt_energie= qdot_pvt; /*------------------------------------- Ergebnisübersicht PVT DESIGN--------------------------------------- */ if (isNaN(q_dp)){ document.getElementById("outputBox_qdp").innerHTML = "0.00";//Math.round(q_dp); }else{ document.getElementById("outputBox_qdp").innerHTML = q_dp.toFixed(3); //Math.round(q_dp); } if (isNaN(qdot_wp)){ document.getElementById("outputBox_wp_leistung").innerHTML = "0.00";//Math.round(qdot_wp); }else{ document.getElementById("outputBox_wp_leistung").innerHTML = qdot_wp.toFixed(3); //Math.round(qdot_wp); } if (isNaN(q_pvt_spezifisch)){ document.getElementById("outputBox_pvt_spezifisch").innerHTML = "0.00";//Math.round(q_pvt_spezifisch); }else{ document.getElementById("outputBox_pvt_spezifisch").innerHTML = q_pvt_spezifisch.toFixed(3);//Math.round(q_pvt_spezifisch); } if (isNaN(pvt_flaeche)){ document.getElementById("outputBox_pvt_flaeche").innerHTML = "0.00";//Math.round(pvt_flaeche); }else{ document.getElementById("outputBox_pvt_flaeche").innerHTML = pvt_flaeche.toFixed(2);//Math.round(pvt_flaeche); } if (isNaN(pvt_energie)){ document.getElementById("outputBox_pvt_energie").innerHTML = "0.00";//Math.round(pvt_energie); }else{ document.getElementById("outputBox_pvt_energie").innerHTML = pvt_energie.toFixed(3);//Math.round(pvt_energie); } if (isNaN(q_heizstab)){ document.getElementById("outputBox_heizstab_energie").innerHTML = "0.00"; //Math.round(q_heizstab) }else{ document.getElementById("outputBox_heizstab_energie").innerHTML = q_heizstab.toFixed(3);//Math.round(pvt_energie); } //document.getElementById("out_wp_leistung").innerHTML = qdot_wp.toFixed(2); //Math.round(qdot_wp); //document.getElementById("out_pvt_spezifisch").innerHTML = q_pvt_spezifisch.toFixed(2);//Math.round(q_pvt_spezifisch); //document.getElementById("out_pvt_flaeche").innerHTML = pvt_flaeche.toFixed(2);//Math.round(pvt_flaeche); //document.getElementById("out_pvt_energie").innerHTML = pvt_energie.toFixed(2);//Math.round(pvt_energie); //Fixing the sink side temperature of the heat pump if (js_speichtemp >= js_trinkspeichtemp) { temp_WP_VL = js_speichtemp; } else { temp_WP_VL = js_trinkspeichtemp; } if (isNaN(wp_vorlauftemp)){ document.getElementById("bValue").innerHTML = "-"; }else{ document.getElementById("bValue").innerHTML = js_minverdampfertemp.toFixed(0); } if (isNaN(temp_WP_VL)){ document.getElementById("wValue").innerHTML = "-"; }else{ document.getElementById("wValue").innerHTML = temp_WP_VL.toFixed(0); } if (isNaN(js_bivalenz_temp)){ document.getElementById("bValue2").innerHTML = "-"; }else{ document.getElementById("bValue2").innerHTML = (js_bivalenz_temp-5).toFixed(0); } if (isNaN(temp_WP_VL)){ document.getElementById("wValue2").innerHTML = "-"; }else{ document.getElementById("wValue2").innerHTML = temp_WP_VL.toFixed(0); } if (qdot_wp < Q_wp_erf ) { // Display the warning message document.getElementById("warningMessage").style.display = "block"; }else{ document.getElementById("warningMessage").style.display = "none"; } }/* Klammer zu der Funktion main_func() */ /* For the paper we could show the sensitivity of the design point (inlet verdampfer temperature) on the PVT area? Area vs inlet temp */ function toggleListItems() { const js_betrimod = document.getElementById("js_betrimod").value; //alert(js_betrimod) const listItem1 = document.getElementById("listItem1"); const listItem2 = document.getElementById("listItem2"); const biv_punkt = document.getElementById("list_BP"); const inputBivalenzTemp = document.getElementById("js_bivalenz_temp"); if (js_betrimod == "1") { listItem1.style.display = "block"; listItem2.style.display = "none"; biv_punkt.style.display = "block"; inputBivalenzTemp.setAttribute("disabled", true); //biv_punkt.setAttribute("disabled", true); } else if (js_betrimod == "2") { listItem1.style.display = "none"; listItem2.style.display = "block"; biv_punkt.style.display = "block"; inputBivalenzTemp.removeAttribute("disabled"); //biv_punkt.removeAttribute("disabled"); } else if (js_betrimod == "3") { listItem1.style.display = "block"; listItem2.style.display = "block"; biv_punkt.style.display = "block"; inputBivalenzTemp.removeAttribute("disabled"); //biv_punkt.removeAttribute("disabled"); } }