Posts

Showing posts from November, 2021

FILE PARSING

Image
  NASA THERMODYNAMIC DATA : Thermodynamics is a branch of physics that deals with heat, work, and temperature, and their relation to energy, radiation, and physical properties of matter.  Thermodynamics applies to a wide variety of topics in science and engineering, especially physical chemistry, biochemistry, chemical engineering and mechanical engineering. Some of thermodynamic data were given by NASA,that has been shown here… In this senerio, we just extract the values,which is already written in that particular file and that values used to find some other datas like specific heat,entropy and enthalpy with the help of matlab. Specific heat:  The specific heat capacity of a substance is the heat capacity of a sample of the substance divided by the mass of the sample. Entropy : Entropy is a scientific concept as well as a measurable physical property that is most commonly associated with a state of disorder, randomness, or uncertainty. Enthalpy: Enthalpy, a property of a...

GENETIC ALGORITHM

Image
  GENETIC ALGORITHM: Basically,the genetic algorithm is inspired by the natural process that belongs to larger scale of evolutionary algorithm. It used to generate a high quality solution for optimation and search type problem. It relying on biologically operation like mutation,cross over and selection. Generates a population of points at each iteration. The best point in the population approaches an optimal solution. EXAMPLE; Automatically solve suduko puzzle, hyperparameter optimization....etc... SYNTEX:  call the genetic algorithm function ga with the syntax  [x fval] = ga(@fitnessfun, nvars, options)   where , @fitnessfun  is a handle to the fitness function.  nvars  is the number of independent variables for the fitness function.  options  is a structure containing options for the genetic algorithm.   WRITE A FUNCTION CODE: for genetic algorithm,we wrote a function program by this formula as given below, f1x=(sin(5.1*pi*x+0.5))^6; f2y=...

CURVE FIT USING MATLAB

Image
  curve fit: It is the process of constructing a curve or a mathematical function,and it has the relationship b/w orginal data set and predicted data set. Basically,the curve fit depends upon the polynomial equ... The polynomial equ are show below: linear equ/first degree polynomial:y=ax+b; quadratic equ/second degree polynomial:y=ax^2+bx+c; cubic equ/third degree polynomial:y=ax^3+bx^2+cx+d; the degree of polynomial can go 4,5 and so on; coading for linear and quadratic equ: clear all close all clc %loading data cp_data=load('data') temp=cp_data(:,1) cp=cp_data(:,2) %curve fit co_eff1=polyfit(temp,cp,3); predicted_cp=polyval(co_eff1,temp) co_eff2=polyfit(temp,cp,1); predicted_cp2=polyval(co_eff2,temp) %compare org fit,predicted fit plot(temp,cp,LineWidth=3); hold on plot(temp,predicted_cp,LineWidth=3) plot(temp,predicted_cp2,LineWidth=3) xlabel('temperature') ylabel('specific heat') legend('original c_p','cubic polynomial','linear polynomia...

simple pendulum using matlab

Image
  ORDERLY DEFFRENTIAL EQUATION: In applied engineering and science many physical initial and boundary value problems can be described by ODE. The behavior of many physical problem,particularly those system undergoing time dependent changes can be formulated as ODE. The diff.equ involves one or more physical quantities such as displacement,velocity,temperature etc.. An nth order ODE may be represented as F(x,y,y’,y’’…)=0 SIMPLE PENDULUM: A simple pendulum is a mechanical device,the thin string or massless string is fixed in a supported beam and the other end is fixed to a bob.actually,its act like a newton’s 2 nd law,we give a force to the bob,the pendulum swig due to net force and mass.according to the net force and mass , the bob travels high or low. THE EQU OF A SIMPLE PENDULUM: b-damping co-efficient m-mass of the object g-gravity l-length og the string   First of all,we change the 2 nd order ODE to 1 ST order ODE  According to this formulla,create a ...

AIR STANDARD CYCLE

Image
  AIR STANDARD CYCLE:   OTTO CYCLE: Nicholus august otto is invented a working four stroke diesel engine,that’s why the four stroke cycle is also known as otto cycle.later this formula is widely used in petrol engine too. Otto cycle is an idealized thermodynamic cycle that explain about the function of typical spark ignition piston engine.it widely used in automobile engine. In this system describe what happens to mass of air? And how it changes due to pressure,volume,temperature,addition of heat,removal of heat. PROCESSES: Process 0-1 = intake stroke,mass of air is drawn into cylinder at constant pressure. Process 1-2 = isentropic compression stroke,to compress the air/fuel ratio the piston moves BDC(bootom dead center) to TDC(top dead center). Process 2-3 = constant volume heat addition,due to the compression,the air fuel mixture burns rapidly and it will produce massive heat while the piston stay at TDC. Process 3-4 = isentropic expansion,the power, the piston is driven out...