IN MATLAB PLZ solve 2 and 3 with information given thank you
Posted: Thu May 05, 2022 1:59 pm
IN MATLAB PLZ
solve 2 and 3 with information given thank you
clc clear all syms PVn RTab syms T_IGL(P,V,n,R) T_VDW(PV,n, R,a,b) eqn1 = P*V == n*R*T; eqn2 = (P+(((n^2)*a)/(V^2)))*(V-(n*b))== n*R*T; T_IGL(PV,n,R)=solve(eqn1,T) T_VDW(P,V,n,R,a,b)=solve(eqn2,T) P=220;%bar n=2;%mol V=1:%L a=5.536;%L^2 bar/mol^2 b=0.03049;%L/mol R=0.08314472;%L bar/K mol IGL_T=double(T_IGL(P,V,n,R)) VDW_T=double(T_VDW(PV,n,R,a,b))
T_IGL (P, V, n, R) = (P*V) / (R*n) I_VDW (P, V, n, R, a, b) = ((V - b*n) * (P + (a*n^2)/V^2))/(R*n) IGL_T = 1.3230e+03 1.3674e+03 VDW_T =
2. From previous problem and for both equations ➤ Lets plot T as a function of P using the following values for P, figure(1) OP [0:10:400] bar Now lets plot T as a function of V, figure(2) o V = 0.1:0.1:10 L (NOTE: will be be using the old constant of P = 220 bar again here) Make sure to use proper plotting etiquette 3. You will be writing a function called SphereSA (user defined function) that will calculate the surface area of a sphere given its volume. The only input of the function will be the volume of the sphere. Your output will be the surface area. All algebraic manipulations have to be done within the function using the symbolic toolkit. prob03. DO NOT USE input()! Make sure to use your function within your script with a volume of 10. 4 V 3 -πr з SA = 4πr²
solve 2 and 3 with information given thank you
clc clear all syms PVn RTab syms T_IGL(P,V,n,R) T_VDW(PV,n, R,a,b) eqn1 = P*V == n*R*T; eqn2 = (P+(((n^2)*a)/(V^2)))*(V-(n*b))== n*R*T; T_IGL(PV,n,R)=solve(eqn1,T) T_VDW(P,V,n,R,a,b)=solve(eqn2,T) P=220;%bar n=2;%mol V=1:%L a=5.536;%L^2 bar/mol^2 b=0.03049;%L/mol R=0.08314472;%L bar/K mol IGL_T=double(T_IGL(P,V,n,R)) VDW_T=double(T_VDW(PV,n,R,a,b))
T_IGL (P, V, n, R) = (P*V) / (R*n) I_VDW (P, V, n, R, a, b) = ((V - b*n) * (P + (a*n^2)/V^2))/(R*n) IGL_T = 1.3230e+03 1.3674e+03 VDW_T =
2. From previous problem and for both equations ➤ Lets plot T as a function of P using the following values for P, figure(1) OP [0:10:400] bar Now lets plot T as a function of V, figure(2) o V = 0.1:0.1:10 L (NOTE: will be be using the old constant of P = 220 bar again here) Make sure to use proper plotting etiquette 3. You will be writing a function called SphereSA (user defined function) that will calculate the surface area of a sphere given its volume. The only input of the function will be the volume of the sphere. Your output will be the surface area. All algebraic manipulations have to be done within the function using the symbolic toolkit. prob03. DO NOT USE input()! Make sure to use your function within your script with a volume of 10. 4 V 3 -πr з SA = 4πr²