MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Pimpri Chinchwad Education Trust’s Pimpri Chinchwad College of Engineering An Autonomous Institute (Affiliated to Savitribai Phule Pune University) BME21GO2 Programming & Problem-Solving Laboratory I A Mini-Project Report On “ DUCKWOTRH-LEWIS-STERN METHOD ” A way to get from rains to runs… By Sr 01 02 03 Name ABHISHEK WANARE SHREYASH JAGDALE ZAKI SAYYED PRN Batch 123B1G111 123B1G117 123B1G123 B3 B3 B3 Submitted On: 21 NOV 2023 Department of Applied Science & Humanities (Mechanical Engineering) Pimpri Chinchwad Education Trust’s Pimpri Chinchwad College of Engineering, Pune - 411044 An Autonomous Institute (Affiliated to Savitribai Phule Pune University) November 2023 1 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Table of Contents Sr Topic Page No. 01 02 03 04 05 06 07 08 THE PROBLEM FLOW-CHART FOR SOLUTION DETAILS OF THE CODE THE CODE OUTPUT MEMBER’S CONTRIBUTION REFERENCES APPENDIX 02 03 04 05 06 08 09 09 PROBLEM STATEMENT Q. Write a MATLAB code for conversion of parameters 2 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) FLOW-CHART parametre input fed to excel file •step1 excel file called to matlab editor •step 2 Conversion code written in matlab •step3 output called to excel 3 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) CODE DETAILS Parameter MATLAB Built-in functions used Details pi() readtable() exp() Input Variables Parameter Angle Area Currency Data Transfer rates Electric charge Electric current Energy Flow rate Force Frequency Information size length light intensity and luminous intensity magnetic flux and magnetic flux density power pressure radioactivity speed temperature time weight Inputs Units degree sq m Rupees bits per second Coulombs Amperes Joules litre per second Newtons GHz bits metres Lumens Gauss watts Pascals Curies Metre per seconds celcius seconds Kilograms Input values 30 100 1000 1024 100 50 1000 500 20 10 256000 100 50 5 200 6 25 300 95 360 2000 4 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Output Variables 5 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) 6 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) 7 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) 8 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Other Variables Name of Variable T p Value readtable("par_inp.xlsx") Input value matrix 9 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) CODE % Angle unit conversion clc clear all % Inputs T=readtable("par_inp.xlsx"); p=T.InputValues degree=p(1) % Arc minutes arc_minute=degree/60; % Arc seconds arc_sec=degree/3600; % Radians angle_radians=degree*pi/180; % Revolutions angle_rev=degree/360; % Turns turns=degree/360; %============================================= % Area area=p(2); A_acre=area*0.000247105; A_ares=area*0.01; A_barns=area*exp(28); A_cricketpitches=area/82.6; A_dunams=area*0.001; A_footballfields=area*0.0001868734483664 ; A_footballpitches=area/17.84; A_hectares=area*0.0001; A_pings=area*0.30257186081694; A_Planckarea=area*3.828*exp(69); A_sections=area*3.86102*exp(-7); A_sqcm=area*10000; A_sqmm=area*1000000; A_sqft=area/9; A_sqinch=A_sqcm/(2.5462)^2; A_sqkm=area/1000000; A_sqyards=area*1.19599; A_stokes=area*600000; A_surveyTownship=area*1.0725*exp(-8); %==================================================\ % Currency rupees=p(3); aus_dollar=rupees*0.018; bri_pound=rupees*0.0096; cana_dollar=rupees*0.016; egy_pound=rupees*0.37; hk_dollars=rupees*0.094; yen=rupees*1.79; mal_ringts=rupees*0.056; 1 0 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) mau_rupees=rupees*1.89; nepaleses=rupees*0.62; pakistani=rupees*0.29; qatari=rupees*22.89; sing_dollar=rupees*62.14; srilankan=rupees*0.25; thai_baht=rupees*2.37; ukranian=rupees*2.30; UAE_Dirhams=rupees*22.69; US_dollars=rupees*83.33; %======================================================= %data transfer rates bitspersec=p(4); bytespersec=bitspersec*0.125; %================================================= % electric charge coulombs=p(5); amp_hr=coulombs*0.000277778; faradays=coulombs*1.03643*exp(-5); %==================================== % electric currents ampere=p(6); biots=ampere*0.1; %=========================================== %energy joules=p(7); barellofoil=joules*1.63456*exp(-10); btu=joules*0.000947817; calorie=joules/4.186; Elecvolt=joules*6.242*exp(18); ergs=1*exp(7); ftpounds=joules*0.737562; gm_TNT=joules*0.00023900573613767; kilocalories=joules*0.000239006; kg_TNT=joules*2.3900573613767*exp(-7); Megaton=joules*2.39006*exp(-16); megawatt=joules*2.77778*exp(-10); therms=joules*9.48043*exp(-9); tons_TNT=joules*2.39006*exp(-10) watthours=joules*0.000277778; %==================================================== % flowrate lps=p(8); cfm=lps*2.11888; cfs=lps*0.04; lpm=lps/60; %============================================ % force newton=p(9); dyne=newton*100000; kgforce=newton*0.101972; poundforce=newton*0.224809; %========================== %frequency 1 1 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Ghz=p(10); hz=Ghz/1000000000000; Mhz=Ghz/1000000; gigahetz=Ghz; hertzs=hz; Khz=Ghz/1000000000; %===================================== % info size bits=p(11); nibble=0.25*bits; bytes=bits*0.125; kb=bytes*1024; kibi=bits*10000000000; mebi=bits*10^20; % ============================================== % length metre=p(12); angstrom=metre*1*exp(10); astro=metre*6.68459*exp(-12); fathoms=metre*0.546807; feet=metre/3; inches=metre*39.3701; furlong=metre*0.00497096; halftriabike=metre*113/1000; halftriarun=metre*21.1/1000; halftriaswim=metre*1.9/1000; hands=metre*0.01; cricpitch=metre*1.22; lightday=metre*2.590206837*10^13; lightmins=metre*5.5594*exp(-11); lighthours=metre*1079252848800; lightsec=metre*3.33564*exp(-9) lightyears=metre*1.057*exp(-16) marathon=metre*2.36995*exp(-5); micron=metre*1000000; miles=metre*0.000621371; mpc=metre*3.24077928966648*exp(-23); nails=metre*17.4978; nauticalleagues=metre*0.000179986; naut_miles=metre*0.000539957; olympictraithlonrun=metre*42.2/1000; olympictraithlonswim=metre*3.8/1000; olympictraithlonbike=metre*180/1000; olympictraithlons=metre*1500/1000; planckslength=metre*6.25*exp(34); post_picas=metre*2834.64566929; yards=metre*1.09361; %===================================== % light intensity LI=p(13); candela=LI/12.57; footcandel=LI/10.76; footlambert=candela*0.3183 ; lux=LI; %=========================================== 1 2 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) % Magnetic flux gauss=p(14); maxwell=gauss*6.4516*2.54; teslas=gauss/10000; weber=gauss*6.4516*exp(8)*2.54^2; %============================================== % power watts=p(15); BHP=watts*0.00134102; kilowatt_Kw=watts/1000; HP=watts*746; MHP=watts*0.00135962; mw=watts*1000; %================================================= % pressure pascals=p(16); atmospheres=pascals*9.86923*exp(-6); bar=pascals*exp(-5); inch_mercury=pascals*0.0002953; inch_water=pascals*0.00401865; milibar_mb=pascals*0.01; mm_mercury=pascals*0.00750062; poises=pascals*0.1; lb_sqinch=pascals*0.000145038; %============================== %radioactivity curies=p(17); bacquerrel=curies*37000000000; rutherford=curies*3700; % ================================= %speed mps=p(18); kmph=mps/3.6; milesph=mps*0.44704; nau_mph=mps*80.51444444444444; %============= whos % temperature celcius=p(19); fah=celcius*33.8; kelvin=celcius+273.15; R = celcius* 9/5 + 491.67; %=============================== %time sec=p(20); centuries=sec*3.171*exp(-10); day=sec*1.15741*exp(-5); decades=sec*3.1709*exp(-9); fortnight=sec*8.2672*exp(-7); halakim=sec*0.3; 1 3 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) hours=sec/3600; leapyear=sec/3.162*exp(7); lunarcycle=sec*3.2660987312905*exp(-8); lustrum=sec*6.3419583967529*exp(-9); millenium=sec*3.171*exp(-11); minutes=sec/60; months=sec*3.80517*exp(-7); sideraldays=sec*1.16058*exp(-5); sideralyear=sec*3.16875*exp(-8); weeks=sec*1.65344*exp(-6); years=sec*3.17098*exp(-8); %==================================== % weight kg=p(21); amu=kg*6.0228*exp(26); blintzes=kg/10.35; butterfirkin=kg*0.039368261104442 ; carats=kg*5000; grams=kg/1000; earthmasses=kg*1.6744*exp(-25); eng_stones=kg*0.157473; funt=kg*2.4419; grains=kg*15432.4; imperialtons=kg*0.000984207; jupiter=kg*5.2659294365455*exp(-28); % ********************************************************************* 1 4 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) OUTPUT % Angle unit conversion clc clear all % Inputs T=readtable("par_inp.xlsx"); p=T.InputValues degree=p(1) % Arc minutes arc_minute=degree/60; % Arc seconds arc_sec=degree/3600; % Radians angle_radians=degree*pi/180; % Revolutions angle_rev=degree/360; % Turns turns=degree/360; %============================================= % Area area=p(2); A_acre=area*0.000247105; A_ares=area*0.01; A_barns=area*exp(28); A_cricketpitches=area/82.6; A_dunams=area*0.001; A_footballfields=area*0.0001868734483664 ; A_footballpitches=area/17.84; A_hectares=area*0.0001; A_pings=area*0.30257186081694; A_Planckarea=area*3.828*exp(69); A_sections=area*3.86102*exp(-7); A_sqcm=area*10000; A_sqmm=area*1000000; A_sqft=area/9; A_sqinch=A_sqcm/(2.5462)^2; A_sqkm=area/1000000; A_sqyards=area*1.19599; A_stokes=area*600000; A_surveyTownship=area*1.0725*exp(-8); %==================================================\ % Currency rupees=p(3); aus_dollar=rupees*0.018; bri_pound=rupees*0.0096; cana_dollar=rupees*0.016; egy_pound=rupees*0.37; hk_dollars=rupees*0.094; yen=rupees*1.79; mal_ringts=rupees*0.056; 1 5 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) mau_rupees=rupees*1.89; nepaleses=rupees*0.62; pakistani=rupees*0.29; qatari=rupees*22.89; sing_dollar=rupees*62.14; srilankan=rupees*0.25; thai_baht=rupees*2.37; ukranian=rupees*2.30; UAE_Dirhams=rupees*22.69; US_dollars=rupees*83.33; %======================================================= %data transfer rates bitspersec=p(4); bytespersec=bitspersec*0.125; %================================================= % electric charge coulombs=p(5); amp_hr=coulombs*0.000277778; faradays=coulombs*1.03643*exp(-5); %==================================== % electric currents ampere=p(6); biots=ampere*0.1; %=========================================== %energy joules=p(7); barellofoil=joules*1.63456*exp(-10); btu=joules*0.000947817; calorie=joules/4.186; Elecvolt=joules*6.242*exp(18); ergs=1*exp(7); ftpounds=joules*0.737562; gm_TNT=joules*0.00023900573613767; kilocalories=joules*0.000239006; kg_TNT=joules*2.3900573613767*exp(-7); Megaton=joules*2.39006*exp(-16); megawatt=joules*2.77778*exp(-10); therms=joules*9.48043*exp(-9); tons_TNT=joules*2.39006*exp(-10) watthours=joules*0.000277778; %==================================================== % flowrate lps=p(8); cfm=lps*2.11888; cfs=lps*0.04; lpm=lps/60; %============================================ % force newton=p(9); dyne=newton*100000; kgforce=newton*0.101972; 1 6 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) poundforce=newton*0.224809; %========================== %frequency Ghz=p(10); hz=Ghz/1000000000000; Mhz=Ghz/1000000; gigahetz=Ghz; hertzs=hz; Khz=Ghz/1000000000; %===================================== % info size bits=p(11); nibble=0.25*bits; bytes=bits*0.125; kb=bytes*1024; kibi=bits*10000000000; mebi=bits*10^20; % ============================================== % length metre=p(12); angstrom=metre*1*exp(10); astro=metre*6.68459*exp(-12); fathoms=metre*0.546807; feet=metre/3; inches=metre*39.3701; furlong=metre*0.00497096; halftriabike=metre*113/1000; halftriarun=metre*21.1/1000; halftriaswim=metre*1.9/1000; hands=metre*0.01; cricpitch=metre*1.22; lightday=metre*2.590206837*10^13; lightmins=metre*5.5594*exp(-11); lighthours=metre*1079252848800; lightsec=metre*3.33564*exp(-9) lightyears=metre*1.057*exp(-16) marathon=metre*2.36995*exp(-5); micron=metre*1000000; miles=metre*0.000621371; mpc=metre*3.24077928966648*exp(-23); nails=metre*17.4978; nauticalleagues=metre*0.000179986; naut_miles=metre*0.000539957; olympictraithlonrun=metre*42.2/1000; olympictraithlonswim=metre*3.8/1000; olympictraithlonbike=metre*180/1000; olympictraithlons=metre*1500/1000; planckslength=metre*6.25*exp(34); post_picas=metre*2834.64566929; yards=metre*1.09361; %===================================== 1 7 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) % light intensity LI=p(13); candela=LI/12.57; footcandel=LI/10.76; footlambert=candela*0.3183 ; lux=LI; %=========================================== % Magnetic flux gauss=p(14); maxwell=gauss*6.4516*2.54; teslas=gauss/10000; weber=gauss*6.4516*exp(8)*2.54^2; %============================================== % power watts=p(15); BHP=watts*0.00134102; kilowatt_Kw=watts/1000; HP=watts*746; MHP=watts*0.00135962; mw=watts*1000; %================================================= % pressure pascals=p(16); atmospheres=pascals*9.86923*exp(-6); bar=pascals*exp(-5); inch_mercury=pascals*0.0002953; inch_water=pascals*0.00401865; milibar_mb=pascals*0.01; mm_mercury=pascals*0.00750062; poises=pascals*0.1; lb_sqinch=pascals*0.000145038; %============================== %radioactivity curies=p(17); bacquerrel=curies*37000000000; rutherford=curies*3700; % ================================= %speed mps=p(18); kmph=mps/3.6; milesph=mps*0.44704; nau_mph=mps*80.51444444444444; %============= whos % temperature celcius=p(19); 1 8 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) fah=celcius*33.8; kelvin=celcius+273.15; R = celcius* 9/5 + 491.67; %=============================== %time sec=p(20); centuries=sec*3.171*exp(-10); day=sec*1.15741*exp(-5); decades=sec*3.1709*exp(-9); fortnight=sec*8.2672*exp(-7); halakim=sec*0.3; hours=sec/3600; leapyear=sec/3.162*exp(7); lunarcycle=sec*3.2660987312905*exp(-8); lustrum=sec*6.3419583967529*exp(-9); millenium=sec*3.171*exp(-11); minutes=sec/60; months=sec*3.80517*exp(-7); sideraldays=sec*1.16058*exp(-5); sideralyear=sec*3.16875*exp(-8); weeks=sec*1.65344*exp(-6); years=sec*3.17098*exp(-8); %==================================== % weight kg=p(21); amu=kg*6.0228*exp(26); blintzes=kg/10.35; butterfirkin=kg*0.039368261104442 ; carats=kg*5000; grams=kg/1000; earthmasses=kg*1.6744*exp(-25); eng_stones=kg*0.157473; funt=kg*2.4419; grains=kg*15432.4; imperialtons=kg*0.000984207; jupiter=kg*5.2659294365455*exp(-28); % ********************************************************************* Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property. Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names. p = 30 100 1000 1024 100 50 1000 500 20 1 9 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) 10 256000 100 50 5 200 6 25 300 95 360 2000 degree = 30 tons_TNT = 0.1085 lightsec = 0.0412 lightyears = 1.1895e-05 Name Size A_Planckarea A_acre A_ares A_barns A_cricketpitches A_dunams A_footballfields A_footballpitches A_hectares A_pings A_sections A_sqcm A_sqft A_sqinch A_sqkm A_sqmm A_sqyards A_stokes A_surveyTownship BHP Elecvolt Ghz HP Khz 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 Bytes 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 Class Attributes double double double double double double double double double double double double double double double double double double double double double double double double 2 0 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) LI MHP Megaton Mhz T UAE_Dirhams US_dollars amp_hr ampere angle_radians angle_rev angstrom arc_minute arc_sec area astro atmospheres aus_dollar bacquerrel bar barellofoil biots bits bitspersec bri_pound btu bytes bytespersec calorie cana_dollar candela cfm cfs coulombs cricpitch curies degree dyne egy_pound ergs faradays fathoms feet footcandel footlambert ftpounds furlong gauss gigahetz gm_TNT halftriabike halftriarun halftriaswim hands hertzs hk_dollars hz inch_mercury inch_water 1x1 1x1 1x1 1x1 21x3 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 8 8 8 8 7175 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 double double double double table double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double 2 1 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) inches joules kb kg_TNT kgforce kibi kilocalories kilowatt_Kw kmph lb_sqinch lightday lighthours lightmins lightsec lightyears lpm lps lux mal_ringts marathon mau_rupees maxwell mebi megawatt metre micron miles milesph milibar_mb mm_mercury mpc mps mw nails nau_mph naut_miles nauticalleagues nepaleses newton nibble olympictraithlonbike olympictraithlonrun olympictraithlons olympictraithlonswim p pakistani pascals planckslength poises post_picas poundforce qatari rupees rutherford sing_dollar srilankan teslas thai_baht therms 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 21x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 168 8 8 8 8 8 8 8 8 8 8 8 8 8 8 double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double double 2 2 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) tons_TNT turns ukranian watthours watts weber yards yen 1x1 1x1 1x1 1x1 1x1 1x1 1x1 1x1 8 8 8 8 8 8 8 8 double double double double double double double double Published with MATLAB® R2023a 2 3 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) 2 4 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) Published with MATLAB® R2023b SHARED RESPONSIBILITIES Sr Name of Team Member PRN Work Shared for Mini-Project 01 02 03 2 5 MINI PROJECT (PROGRAMMING AND PROBLEM SOLVING) REFERENCES https://matlab.mathworks.com/ https://in.mathworks.com/ www.google.com APPENDIX A Par-inp.xlxs Parameter Angle Area Currency Data Transfer rates Electric charge Electric current Energy Flow rate Force Frequency Information size length light intensity and luminous intensity magnetic flux and magnetic flux density power pressure radioactivity speed temperature time weight Inputs Units degree sq m Rupees bits per second Coulombs Amperes Joules litre per second Newtons GHz bits metres Lumens Gauss watts Pascals Curies Metre per seconds celcius seconds Kilograms Input values 30 100 1000 1024 100 50 1000 500 20 10 256000 100 50 5 200 6 25 300 95 360 2000 2 6