0% found this document useful (0 votes)
57 views4 pages

Chemical Reaction Engineering Mini Project

This document describes a C program that calculates the order of a chemical reaction given experimental data of half-lives and initial concentrations. The program prompts the user to input the number of data points, then loops to collect the half-life and initial concentration for each point. It then calculates the order for each data point and averages them to determine the overall order of the reaction. The output shows it processing 5 data points and determining the reaction has a first order rate.

Uploaded by

Krishna Prabhu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views4 pages

Chemical Reaction Engineering Mini Project

This document describes a C program that calculates the order of a chemical reaction given experimental data of half-lives and initial concentrations. The program prompts the user to input the number of data points, then loops to collect the half-life and initial concentration for each point. It then calculates the order for each data point and averages them to determine the overall order of the reaction. The output shows it processing 5 data points and determining the reaction has a first order rate.

Uploaded by

Krishna Prabhu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

CHEMICAL REACTION ENGINEERING MINI PROJECT

Name Reg. No. Class College

: : : :

R.K. PRABHU 09CH24 VI semester B. Tech (Chemical Engineering) Coimbatore Institute of Technology, Coimbatore 14

Date

24.02.2012

QUESTION:

Write a C program to find the order of the reaction, given the respective half life and initial concentration.

PROGRAM CODING:

#include<stdio.h> #include<conio.h> #include<math.h> void main() { int i,p; double t[100],c[100],n[100],sum,x,v[100],e,f,g,h;

double log(double e); double log(double f); double log(double g); double log(double h); clrscr(); printf("\nHow many number of data are available?..."); scanf("%d",&i); for(p=0;p<i;p++) { printf("\nEnter the half life of data %d...",p+1); scanf("%lf",&t[p]); printf("\nEnter the initial concentration of data %d...",p+1); scanf("%lf",&c[p]); } sum=0; x=0; for(p=0;p<i;p++) { e=t[p]; f=t[p+1]; g=c[p]; h=c[p+1]; v[p]=(log(e)-log(f))/(log(g)-log(h));

if(v[p]<0) n[p]=1-v[p]; else if(v[p]==0) n[p]=1; else n[p]=1+v[p]; sum=sum+n[p]; } x=sum/i; printf("\nThe order is %.2lf",x); getch(); }

OUTPUT:

How many number of data are available?... 5 Enter the half life of data 1... 1 Enter the initial concentration of data 1... 1 Enter the half life of data 2... 1 Enter the initial concentration of data 2... 14 Enter the half life of data 3... 1 Enter the initial concentration of data 3... 542 Enter the half life of data 4... 1 Enter the initial concentration of data 4... 1234 Enter the half life of data 5... 1 Enter the initial concentration of data 5... 17895 The order is 1.00

You might also like