1) a)fitting a linear polynomial %fitting a linear polynomial clear all close all clc %preparaing the data cp_data=load(\'datanew\'); temperature=cp_data(:,1); cp= cp_data(:,2); %curve fit coeff=polyfit(temperature,cp,1) pred_cp=polyval(coeff,temperature); % comparing curve fit with original data plot(temperature,cp,\'linewidth\',3,\'color\',\'r\');…
MAK 97
updated on 05 Jun 2018
Project Details
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Read more Projects by MAK 97 (24)
Simulation of Flow over a cylinder
Flow over a cylinder with different reynolds number. Dimensions were taken as follows Diameter of cylinder= 0.03m Length of cylinder= 0.1m The length of the Computational domain was taken to be 0.6m Formula to calculate the baseline case Reynolds number. Re = V*D/v where D= cylinder diameter in m v = kinematic…
26 Sep 2018 09:01 AM IST
Constraint Minimization Problem
Constraint Minimization Problem
25 Aug 2018 12:21 AM IST
Newton Raphson Methon using Python
Newton Raphson Method in determining the Minimum Pressure required to break Ice cushion. \"\"\" NEWTON-RAPHSON by MAK \"\"\" import matplotlib.pyplot as plt import math import numpy as np beta=0.5 r=40 sigma=150*144 h=[0.6,1.2,1.8,2.4,3.0,3.6,4.2] alp=0.8 p=1000 tolerance=1e-7 def eqn(p,h,r,beta,sigma): t1=np.power(p,3)*(1-np.power(beta,2))…
25 Aug 2018 12:12 AM IST
Robotic Arm Simulation using MATLAB
% robotic arm animation clear all close all clc %input l1=1; l2=0.5; %calculations theta1=linspace(0,90,10); theta2=linspace(0,90,10); ct=1; %use of ct is just for the frame for i=1:length(theta1) THETA1=theta1(i); for j=1:length(theta2) x0=0; y0=0; THETA2=theta2(j); x1=l1*cosd(THETA1); y1=l1*sind(THETA1); x2=x1+l2*cosd(THETA2);…
03 Aug 2018 08:48 AM IST
CENTRIFUGAL PUMP FLOW SIMULATION using SolidWorks
CENTRIFUGAL PUMP FLOW SIMULATION Boundary Conditions: a) Environment Pressure at inlet: 101325 Pa 293.2 Kb) Velocity at Outlet: 10 m/s Link for Velocity Contours: https://drive.google.com/open?id=1Z4iGkyoWVxxh1SKTe1QfiZG4_s5-X6zX Link for Pump CAD file: https://drive.google.com/open?id=1_OMKrp80AYqDT876blpp2cKAWOdPYVKG…
18 Jul 2018 10:21 PM IST
Flowbench Simulation using SolidWorks
FLOWBENCH SIMULATION 1) Boundary Conditions: a) Total Pressure at inlet: 101325 Pa 293.2 Kb) Static Pressure at Outlet: 95000 Pa 293.2 K 2) Grid dependendency test(at 0.001m of valve lift): The following grids were chosen: Out of these, the 3rd design point…
18 Jul 2018 03:08 AM IST
Curve Fit using Python
1) Question:What does popt and pcov mean ? Answer:popt is an array which consists of optimum values of the coefficients of the function(linear,quadratic,cubic etc.) so that the error is minimum between the actual data and the curve fit. pcov is an array which consists of the estimated Covariance of popt.Covariance…
11 Jul 2018 09:28 PM IST
Data Visualizer Python
Data Visualizer Tool for the data provided for Internal combustion engine. NOTE:sublimeREPL package was used in providing input by the User in the program given below. \"\"\" DATA VISUALIZER \"\"\" import matplotlib.pyplot as plt import numpy as np import sys import math #Opening the file try: f=open(\'engine_data.out\',\'r\')…
11 Jul 2018 09:26 PM IST
Curve Fit using Python
1) Question:What does popt and pcov mean ? Answer:popt is an array which consists of optimum values of the coefficients of the function(linear,quadratic,cubic etc.) so that the error is minimum between the actual data and the curve fit. pcov is an array which consists of the estimated Covariance of popt.Covariance…
11 Jul 2018 09:06 PM IST
Flow over BOEING 737 MID SPAN AIRFOIL b737b-il
The following data was colleted for BOEING 737 MID SPAN AIRFOIL(b737b-il) The velocity chosen was 250 m/s at 101325 Pa and 293.3 K. 1) For angle of Attack 2 degrees: 2) For angle of Attack 4 degrees: 3) For angle of Attack 6 degrees: 4) For angle of Attack 8 degrees: 5)…
01 Jul 2018 01:41 AM IST
Flow through Pipe Parametric Study
The pipe was made with the following dimensions: a) Length=1m b) Diameter=0.018m c) thickness=0.001m The inlet velocities were calculated to be 0.005566 m/s, 0.05566 m/s and 0.5566 m/s for Reynolds number 100,1000 and 10000, respectively. Design point 1 represents reynold\'s number=100 Design point 2 represents…
29 Jun 2018 10:00 PM IST
OTTO CYCLE P-V DIAGRAM AND EFFICIENCY python
1) Main Program \"\"\" Otto cycle by MAK \"\"\" import math import matplotlib.pyplot as plt import numpy as np #function definition def eng_varfunc(bore,stroke,con_rod,cr,start_crank,end_crank): a=stroke/2 r=con_rod/a v_s=math.pi/4*pow(bore,2)*stroke v_c=v_s/(cr-1) v_1=[] theta=np.linspace(start_crank,end_crank,100)…
24 Jun 2018 01:50 AM IST
Robotic Arm Simulation using Python
\"\"\" Robotic arm Simulation Program by MAK \"\"\" import math import matplotlib.pyplot as plt l1=1.5 l2=1 x0=0 y0=0 theta1=[] theta2=[] n_theta=10 thetastart=0 thetaend=math.pi/2 ct=1; for i in range(0,n_theta): tmp=thetastart+i*(thetaend-thetastart)/(n_theta-1) theta1.append(tmp) theta2.append(tmp) for t1 in…
22 Jun 2018 11:15 PM IST
FLOW OVER A BICYCLE Python
\"\"\" program to calculate drag force by MAK THE VALUES FOR ALL THE INPUTS ARE RANDOMLY CHOSEN \"\"\" import matplotlib.pyplot as plt import numpy as np #inputs #drag coefficient c_d=np.linspace(0.5,1.5,25) print(c_d) #frontal area A=0.2 #velocity velocity=np.linspace(1,25,25) print(velocity) #density rho=1.2 #dragforce…
18 Jun 2018 09:32 AM IST
printing hello python
18 Jun 2018 09:25 AM IST
Optimizing Stalagmite Function using Genetic Algorithm in MATLAB
Genetic algorithm first selects parent solutions and obtains results using them. It works on the principle of the survival of the fittest.Then, GA breeds the parents to produce better offsprings(i.e solutions) and the obtain results using those solutions.After many iterations, GA converges to find a minimum value to the…
14 Jun 2018 07:56 AM IST
Optimizing Stalagmite Function using Genetic Algorithm in MATLAB
1)Main Program clear all close all clc x=linspace(0,0.6,150); y=linspace(0,0.6,150); num_cases=100; f=get_stalagmite1(x,y); options=optimoptions(\'ga\') options=optimoptions(options,\'PopulationSize\',250); for i=1:num_cases [inputs,fopt(i)]=ga(@stalagmite_func2,2,[],[],[],[],[0;0],[0.6;0.6],[],options) xopt(i)=inputs(1);…
14 Jun 2018 07:56 AM IST
RANKINE-CYCLE
1) Main Program close all clear all clc disp(\'1-2 is Isentropic Expansion in the Turbine\') disp(\'2-3 is Constant Pressure Heat Rejection by the Condenser\') disp(\'3-4 is Isentropic Compression in the Pump\') disp(\'4-1 is Constant Pressure Heat Addition by the Boiler\') disp(\' \') p1=input(\'Enter the Pressure at…
13 Jun 2018 10:29 AM IST
Parsing NASA Thermodynamic file
1)Main program %main program close all clear all clc fop=fopen(\'thermo30.dat.txt\',\'r\') for m=1:5 ign{m}=fgetl(fop) end for k=1:53 [coeff{k} t{k} speciesname{k}]=extract_data(fop); end for k=1:53 molec_wt{k}=mol_wt(speciesname{k}); c_p{k}=specheat_calc(coeff{k},t{k}); h{k}=enthalpy_calc(coeff{k},t{k}); s{k}=entropy_calc(coeff{k},t{k});…
11 Jun 2018 02:23 PM IST
Optimizing Stalagmite Function using Genetic Algorithm in MATLAB
Genetic algorithm first selects parent solutions and obtains results using them. It works on the principle of the survival of the fittest.Then, GA breeds the parents to produce better offsprings(i.e solutions) and the obtain results using those solutions.After many iterations, GA converges to find a minimum value to the…
10 Jun 2018 03:18 AM IST
CURVE FITTING LINEAR AND CUBIC POLYNOMIAL
1) a)fitting a linear polynomial %fitting a linear polynomial clear all close all clc %preparaing the data cp_data=load(\'datanew\'); temperature=cp_data(:,1); cp= cp_data(:,2); %curve fit coeff=polyfit(temperature,cp,1) pred_cp=polyval(coeff,temperature); % comparing curve fit with original data plot(temperature,cp,\'linewidth\',3,\'color\',\'r\');…
05 Jun 2018 04:12 AM IST
DAMPED PENDULUM MOTION
Link to the video of Damped Pendulum Motion: https://youtu.be/KvAMWccTOwc close all clear all clc %ODE initial conditions theta_0=[0;3]; b=0.5; g=9.81; l=1; m=1; %odetimepoints t_span=linspace(0,20,500); %odesolution [t,result]=ode45(@(t,theta) ode_func(b,g,l,m,theta,t),t_span,theta_0); ct=1; %plotting figure(1) clf plot(t,result(:,1))…
01 Jun 2018 12:39 PM IST
OTTO CYCLE P-V DIAGRAM AND EFFICIENCY
%otto cycleclear allclose allclc%inputsgamma = 1.4;bore=0.1;stroke=0.1;cr=16;con_rod=0.15;t3=2500;%state variablesp1=202650;t1=500;%calculationsv_swept=(pi/4)*bore^2*stroke;v_clearence=v_swept/(cr-1);v1=v_swept+v_clearence;%state 2v2=v1/cr;p2=p1*cr^gamma;t2=(p2*v2*t1)/(p1*v1);v_comp=eng_varfunc(bore,stroke,con_rod,cr,180,0);const1=p1*v1^gamma;p_comp=const1./v_comp.^gamma;%state…
31 May 2018 08:40 PM IST
drag force on a bicycle
%drag force on a bicycle close all clear all clc %input variables %for velocity, these values are randomly chosen vel=[9,8,7,6,5];%density of fluid(air)rho=1.2; %for various shapes,these values are chosen randomly for frontal area f_area=[1,2,4,6,7];%drag coeffiecients chosen randomlydrag_coeff=[0.65,0.7,0.75,0.8,0.9];…
29 May 2018 03:24 AM IST