Evaluate time required for the initial oxygen concentration

Assignment Help Simulation in MATLAB
Reference no: EM131728256

MATLAB Assignment

In an attempt to understand the mechanism of the depolarization process in a direct methanol fuel cell (DMFC), an electro-kinetic model for mixed oxygen-methanol current on platinum was developed in the laboratory at Florida A&M University (read more about DMFC in textbook Ch 07.00B). A simplified model of the reaction developed suggests a functional relation in an integral form:

T = x1x2 (6.73x + 6.725 × 10-8 + 7.26 × 10-4Cme) dx / (3.62 × 10-12x + 3.908 × 10-8 x Cme)

where

T = Time it takes to consume certain amount of oxygen concentration in the fuel cell, sec
x = Concentration of oxygen, moles/cm3
x1 = Initial concentration of oxygen, moles/cm3
x2 = Concentration of oxygen after T seconds, moles/cm3
Cme = Concentration of methanol, moles/cm3
0 ≤ Cme ≤ 5 × 10-4 moles/cm3
0.2 × 10-6 ≤ x ≤ 1.22 × 10-6 moles/cm3

Task 1

Use MATLAB to evaluate the time required for the initial oxygen concentration to be reduced by half (x2 = x1/2) in the fuel cell using various numerical integration methods.

Write a function to perform analytical and various numerical integration methods for the integration. Your function should meet the following requirements:

• It should be named EKdmfc
• The function should have three input arguments:

1) Concentration of methanol, Cme
2) Initial concentration of oxygen, x1
3) The number of intervals, n

• The function should have a single output argument in the form of a row vector that contains five items (in this order):

1) The value of the analytical integral using the built-in ‘int' command.
2) The value of the numerical integral using the built-in ‘integral' command.
3) The value of the numerical integral using the built-in ‘quadgk' command.
4) The value of the numerical integral using the built-in 'trapz' command with the input value of number intervals n.
5) The value of the numerical integration using Simpson's 1/3 rule. Write your own code to perform multiple-segment Simpson's 1/3 rule.

• Note that for multiple-segment Simpson's 1/3 rule, n must be an even natural number (read more about this in Ch 07.03). Your code should check the input value of ??, and return ‘inf' for this part if ?? does not meet this requirement. (Hint: an even number is divisible by 2 while an odd number is not. In other words, the remainder after division by 2 for an even number is 0, but is 1 for an odd number. There are at least two MATLAB built-in functions that you can use to obtain the remainder after division.) Demonstrate this portion of your code in your report.

• Display the input and output in the command window. The display should be professionally formatted and the precision of the display controlled.

Your solution will be tested three times with randomly generated input arguments.

Task 2

Assume Cme = 3 × 10-4, and x1 = 1.00 × 10-6. Analyze the results from your function and compare the resulting integral values from different methods. Employ the concepts of errors for different numerical integration methods you have learned in this course and discuss the accuracy of these results. Explain why certain methods are more accurate than others. Use your code, explore how the error from the trapezoidal method and the Simpson's 1/3 method change as you vary the number of intervals.

Task 3

Plot time required vs. initial oxygen concentration for a range of x1 values (0.2 × 10-6 ≤ x1 ≤ 1.22 × 10-6) for Cme= 3.5 × 10-4 moles/cm3. Initial oxygen concentration (x1) should be on the x-axis and time is on the y-axis. From your plot, what is the relation (Linear, Quadratic, Cubic, Exponential etc.) between time required vs. initial oxygen concentration? Try to prove your opinion.

Problem Description

Write a function to perform analytical and various numerical integration methods for the integration in Matlab Assignment. Your function should meet the following requirements:

• It should be named EKdmfc
• The function should have three input arguments:

1) Concentration of methanol, Cme
2) Initial concentration of oxygen, xl
3) The number of intervals, n, for Simpson's 1/3 rule

• The function should have a single output argument in the form of a row vector that contains five items (in this order):

1) The value of the analytical integration;
2) The value of numerical integration using built-in 'integral' command;
3) The value of numerical integration using built-in 'quadgk' command;
4) The value of numerical integration using multiple-segment trapezoidal rule;
5) The value of numerical integration using Simpson's 1/3 rule.

Note that for multiple-segment Simpson's 1/3 rule, IT must be an even natural number (read more about this in Ch 07.03). Your code should check the input value of n , and return 'inf' for this part if IT does not meet the requirement. ('_Hint_*: an even number is divisible by 2 while an odd number is not). In other words, the remainder after division by 2 for an even number is 0, but is 1 for an odd number. There are at least two MATLAB built-in functions that you can use to obtain the remainder after division.) Demonstrate this portion of your code in your report.

• Display the input and output in the command window. The display should be professionally formatted and the precision of the display controlled.

Attachment:- Mat-Lab.zip

Reference no: EM131728256

Questions Cloud

Which investment has the higher return : Calculating Rates of Return. You're trying to choose between two different investments, both of which have up-front costs of $39,000.
Identify the environmental factors related to this disease : Describe what the public health department is doing to reduce the threat of the disease - Explain the influence of lifestyles, socioeconomic status
Compute the debt ratio and debt to equity ratio : Identify the Company's current liabilities for the past two years? Compute the Debt ratio and Debt to Equity ratio
What if interest rates suddenly rise : Present Value and Interest Rates. What is the relationship between the value of an annuity and the level of interest rates?
Evaluate time required for the initial oxygen concentration : evaluate the time required for the initial oxygen concentration to be reduced by half (x2 = x1/2) in the fuel cell using various numerical integration methods.
Describe the relevance of the robert t stafford act : Describe the relevance of the Robert T. Stafford Act and the Disaster Mitigation Act of 2000 (DMA2K) to local hazard mitigation.
How many payments will have made : Calculating the Number of Payments. You're prepared to make monthly payments of $250, beginning at the end of this month, into an account that pays 8 percent.
What is the highest rate can afford on a apr loan : Calculating Annuity Present Values. You want to borrow $80,000 from your local bank to buy a new sailboat. You can afford to make monthly payments of $1,650.
What kind of deal did the wide receiver snag : Calculating Present Values. In March 2015, the Kansas City Chiefs signed Jeremy Maclin to a contract reportedly worth $55 million. Maclin's salary.

Reviews

Write a Review

Simulation in MATLAB Questions & Answers

  Calculate the stress intensity factor

Use the three-parameter zone finite element method or the boundary collocation method to calculate the stress intensity factor K, at the crack tip for the plate

  Build a simulation using newtons laws of motion

Build a new and different simulation of your own using Newtons laws of motion and Show the code and describe how it works

  Write the specification of load mover

Write the specification of LOAD MOVER detailed of the whole design and precise for automatic control section and divide the design into various modules and Is the kernel required if yes which one?

  Design the automatic control section using statecharts

Aim of this project is to design an embedded system which can move loads from one place to another. The system can be operated manually, automatically and wirelessly.

  Need an expert who can model a drill in simulink

Need an expert who can model a drill in Simulink. Working model of a drill needing for an improvment to behave more realistically as a drill to drill through plastic block.

  Project is on load frequency control using fpid

Project is on load frequency control using FPID tuned using GA and PSO algorithm and the system is a two area system.

  Number of packets received with time

Let x be the number of packets received with time -

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Simulate the standardised sum of independent

Simulate the standardised sum of independent and identically distributed variates - Fit a linear regression model as in Q5, and plot your estimates for β0 and β1 as N increases, together with a line indicating their true values. Supply your code.

  Plot the original periodic square wave

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

  Use matlab to plot the function

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd