University : | Monash University UniLearnO is not sponsored or endorsed by this college or university. |
---|---|
Subject Code : | MCD4140 | Country : | Australia |
Import the files and create variables for the gas name, critical pressure, critical temperature, acentric factor and the binary interaction parameter. Use fprintf() to print the gas mixture options to the command window. An example output is shown below. Gas mixture 1: CH4 CO2 N2
Gas mixture 2: CO2 O2 H2 …
Gas mixture 5: C2H6 C3H8 nC4H10
extract the critical pressure in Pa, critical temperature in K and acentric factor for each gas component in the chosen gas mixture. Use fprintf() to print this information for each gas component. An example is shown below. Component 1 [CH4]: Pc = X.XXe+XX Pa, Tc = XXX.XX K, Ac = X.XXXX Component 2 [Ar]: Pc = X.XXe+XX Pa, Tc = XXX.XX K, Ac = X.XXXX Component 3 [CO2]: Pc = X.XXe+XX Pa, Tc = XXX.XX K, Ac = X.XXXX
create vectors for temperature and pressure each comprising of 100 equally spaced values starting from the respective initial and final values for the chosen gas mixture. For each combination of temperature and pressure, calculate the molar volume in cm3/mol using the ideal gas law. In figure(1)2, produce a surface plot of the molar volume (cm3/mol, ?????axis) against pressure (Pa, ?????axis) and temperature (K, ?????axis) using the surf() function. To increase visibility and readability, set the 'Edgecolor' argument to 'none' in the surf() function. Additionally, set the colormap to "cool" using the colormap() function
solve for the compressibility factor ???? for each combination of temperature and pressure using the bisection method with a precision of ????????????????. Note that ???? is a non?dimensional number between 0 and 1. In figure(2)2, produce a surface plot of the compressibility factor (?????axis) against pressure (Pa, ?????axis) and temperature (K, ?????axis) using the surf() function. To increase visibility and readability, set the 'Edgecolor' argument to 'none' in the surf() function. Additionally, set the colormap to "parula" using the colormap() function.
calculate the molar volume in cm3/mol using the Peng Robinson gas law for each combination of temperature and pressure. In figure(3)2, produce a surface plot of the molar volume (cm3/mol, ?????axis) against pressure (Pa, ?????axis) and temperature (K, ?????axis) using the surf() function. To increase visibility and readability, set the 'Edgecolor' argument to 'none' in the surf() function. Additionally, set the colormap to "summer" using the colormap() function. Determine the maximum percentage error between the molar volume based on the ideal gas law and the Peng Robinson gas law. The percentage error is defined as ???????????????????????????? ???? 100%
Use fprintf to print a statement containing the maximum percentage error and the corresponding temperature and pressure values.
In the comp_simp13_vector.m file, complete the function file for the Composite Simpson’s 1/3 rule which integrates the vector inputs.
In the Q2b.m file, create a 3?by?1 subplot plot in figure(4)2. In each subplot, plot the temperature of the plate along ???????? from ???? between ?1 to 8 (inclusive) as a red line of thickness 2, using 100 equally spaced points. Additionally, fit the ????,???? data using polynomials (see below) using a blue line. Turn the grid on and include the polynomial degree in the title of each subplot. ? Top subplot: polynomial degree 3 ? Middle subplot: polynomial degree 5 ? Bottom subplot: polynomial degree 7
In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with the minimum number of points required in each direction (???? and ????). Continue to increase the number of points until the approximated volume achieves an accuracy of 8 decimal places (DP) matching the temperature value obtained using MATLAB's integral2() function. Use fprintf to print the number of points, the approximated average temperature, MATLAB's average temperature value, and the error, but only when the approximated average temperature has improved by at least a decimal place. The error is taken to be the absolute difference between the approximated average temperature and the MATLAB's integral2() value. An example of this is shown below, with the decimal places bolded and underlined for clarity (you do not need to bold and underline the values in your MATLAB answers). pts temp_approx temp_MATLAB error DP
X X.XXXXXXXXX X.XXXXXXXXX 0.0XXXXXXXX 1
X X.XXXXXXXXX X.XXXXXXXXX 0.00XXXXXXX 2
X X.XXXXXXXXX X.XXXXXXXXX 0.000XXXXXX 3
X X.XXXXXXXXX X.XXXXXXXXX 0.0000XXXXX 4
In the midpoint2.m file, complete the function file to perform the midpoint method to solve two 1st?order ODE equations simultaneously
In the Q3b.m file, consider initial conditions ????090 ? and ????00. The parameters are: ????1 kg/s, ????1 kg, ????9.81 m/s2, and ????0.5 m. Solve for the angle of the pendulum ???? and the angular velocity ???????? ???????? using the midpoint2() function written in Q2a with a time step of 0.001s from ????0 to 10s. In figure(5)2, plot the following in 2?by?1 subplot arrangement.
[Top panel] ???? (deg) against ???? (s)
[Bottom panel] (deg/s) against ???? (s)
Q3c In the Q3c.m file, use the midpoint2() function to solve the angle of the pendulum with ????????,????,????,????????,????????,???????? kg/s using a time step of 0.001s. Use the same initial conditions and parameters as in Q3b, unless otherwise specified in this question. In figure(6)2, produce a plot of ???? (deg) against ???? (s) for each value of ???? as solid lines. Use the RGB values defined in the 'colourmap' variable as provided in the m?file to colour solutions from the smallest ???? to the largest ???? (top row to the bottom row). Is this the behavior that you would expect with varying ???? values? Use fprint() to print a statement to justify your answer.
Experiments have measured |????| to be less than 1? at ????10s using the initial conditions and parameters specified in Q3b. Hence, the solution of the 2nd?order differential equation is considered accurate if |????| is less than 1? at ????10s. In the Q3d.m file, solve for ???? using the midpoint2() function starting with a time step of 0.025s and plot ???? (deg) against ???? (s) in figure(7)2. Use the same initial conditions and parameters as in Q3b, unless otherwise specified in this question. If the solution is accurate (as per the experiments) then double the time step, solve for ???? and plot the result on the same figure. Continue to do this until an inaccurate solution (as per the experiments) is obtained. Your figure should also include a plot of an inaccurate solution. Use fprint() to print out the time step when the solution first becomes inaccurate based on the experiments.
This MCD 4140: CS/IT Assignment has been solved by our CS/IT Experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!