Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

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

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M92536944

Have any Question?


Related Questions in MATLAB

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Suppose that a student has the option of enrolling for a

Suppose that a student has the option of enrolling for a single elective during a term. The student must select a course from a limited list of options: "English, " "History, " "Biology, " "Computer, " or "Math." Constru ...

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As