Matlab_Programming_Example1

Matlab_Programming_Example1 - Chemical Engineering...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Chemical Engineering Department University of Florida ECH 4123 Prof. Oscar D. Crisalle Phase and Chemical Equilibria Class Project MATLAB PROGRAMING EXAMPLE 1 PRESSURE-EXPLICIT VAN DER WAALS EQUATION OF STATE—M-FUNCTION AND M-FILE DRIVER Appendix: MATLAB Programming Examples Appendix A.1. Example of a MATLAB M-function developed for the pressure-explicit van der Waals equation This Appendix contains an example of a MATLAB M-FUNCTION that calculates pressure according to the van der Waals equation of state P = ΡΤ ς - β - α 2 The code shown below must be saved in a file with the following name: VdWEOS_P.m The first line of the file should start with the word function . function P = VdWEOS_P(V, T, VdWPars) % Function Name: VdWEOS_P % Syntax: P = VdWEOS_P(V, T, VdWPars) % % Description: % This function finds the pressure calculated % using the pressure-explicit van der Waals % equation of state © Oscar D. Crisalle 1994-2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ECH 4123 Class Project- MATLAB PROGRAMMING EXAMPLE 1 2 % P = R T / (V-b) - a / V^2
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Matlab_Programming_Example1 - Chemical Engineering...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online