hw11_p07 - %hybrid method clc clear f format long pc =...

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

View Full Document Right Arrow Icon
%hybrid method % clc clear format long f pc = 4580*1000; %10^-3 * kPa = N/m^2 = kg/m s^2 Tc = 191; %K R = 0.518*1000; %10^-3 * kJ/kg K = m^2/s^2 K R a1 = 0.427*R*R*Tc^2.5/pc; %m^4/s^4 K^2 * K^2.5 * m s^2/kg = m^5 K^0.5/kg s^2 b1 = 0.0866*R*Tc/pc; %m^2/s^2 K * K * m s^2/kg = m^3/kg b p = 65000*1000; %10^-3 * kPa = N/m^2 = kg/m s^2 T = -50 + 273.15; %K V = 3; %m^3 V n=1; n guess1 = 1.001*b1; guess2 = 20; g x(n)=guess1; x(n+1)=guess2; x a(n)=guess1; a(n+1)=guess1; b(n)=guess2; b(n+1)=guess2; b fa(n)=hw11_p07function( a(n), p, R, T, a1, b1 ); fa(n+1)=hw11_p07function( a(n+1), p, R, T, a1, b1 ); fb(n)=hw11_p07function( b(n), p, R, T, a1, b1 ); fb(n+1)=hw11_p07function( b(n+1), p, R, T, a1, b1 ); f tolerance = 0.000000001; t c = hw11_p07secant( x(n+1), x(n), p, R, T, a1, b1 ); %secant method works % disp('secant') x(n+2) = c; fc = hw11_p07function( c, p, R, T, a1, b1 ); %figure out how to update our a,b interval
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/22/2010 for the course CHE 348 taught by Professor Chelikowsky during the Spring '08 term at University of Texas at Austin.

Page1 / 2

hw11_p07 - %hybrid method clc clear f format long pc =...

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

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