A mjxture of benzene and toluene with p percent benzene and (l - p) percent toluene at 10°C is fed continuously to a vessel in which the mixture is healed to 50°c. The liquid product is 40 mole percent benzene and the vapor product is 68.4 mole percent benzene. Using conservation of the overall mass, we obtain the equation
V+L=I
where V is the vapor mass and L is the liquid mass.
Using conservation of benzene mass, we obtain the equation 0.684 V + 0.4 L = 0.01 p
Write a user-defined function that uses the left-division method to solve for V and L with p a the function's input argument. Test your function for the case where p = 50 percent

답변 (1개)

BOB MATHEW SYJI
BOB MATHEW SYJI 2020년 9월 17일

0 개 추천

Hope this helps. The function chemist_problem(p) inputs p and gives output vector y which have values of v and l.
function y =chemist_problem(p)
syms v l x
x=p;
eqn1= v+l==1;
eqn2= 0.684*v+0.4*l==0.01*x;
[A,B] = equationsToMatrix([eqn1, eqn2], [v, l]);
X = linsolve(A,B)
end

댓글 수: 5

Rahul Karelia
Rahul Karelia 2020년 9월 23일
편집: Rahul Karelia 2020년 9월 23일
but how do we solve the user defined funtion for the value of p = 50% ? what i mean is how do i call the function and solve it for p = 50%
BOB MATHEW SYJI
BOB MATHEW SYJI 2020년 9월 23일
You can call the function for p=50% as chemist_problem(0.5).
Steven Lord
Steven Lord 2020년 9월 23일
Please don't post the solution of homework problems (or questions that sound like homework problems) like this one unless the person asking the question shows what they've tried first. If they do show their attempt, I recommend providing help rather than an answer.
John D'Errico
John D'Errico 2020년 9월 23일
Please don'y do their homework assignments when no effort is shown. This does nothing to help the student, except teach them to ask for help immediately whenever they don't want to make the effort, and to expect that someone out there will be foolish enough to do their homework on demand.
Rahul Karelia
Rahul Karelia 2020년 9월 24일
well okay. will put the tried code first next time. though this is not the home work. And i am not a student.
I respect your work here.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Thermal Analysis에 대해 자세히 알아보기

질문:

2020년 9월 17일

댓글:

2020년 9월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by