Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help me figure out what's wrong with my matlab code. I am solving a set of differential equations and algebraic equations using matlab.

Can you help me figure out what's wrong with my matlab code. I am solving a set of differential equations and algebraic equations using matlab. It's running and not ending and telling me there is an issue with fsolve. function dxds= HFcountercurrentflowODE (s,x)
% CROSSFLOW cross flow model
global c1 c2 z ph pl permN2 d do Nf Uf mu1 R T di pi
c1=0.00000000004;
c2=0.0004696;
d=0.0023876;
ph=101325;
pl=0.001;
permN2=0.00000000000000104836;
do=0.0002;
z=0.2;
Nf=10000;
Uf=0.1;
mu1=0.00001805;
R=8.314;
T=303.15;
di=0.0001;
=3.14159265;
permH2O ph {:);
pizpermN2*ph)?(d**Uf);
mul ** RUfd) pipermN2phdodidiNf);
selectivityH2O= permH2O/permN2;
fun selectivityH 20**x(1)**y(3) selectivityH20*x(4)));
y(2)-x(2)**y(3)1-x(4)+(y(3)**x(4));
selectivityH20*y(2))];
y0=[0.001;0.001;0.001];
y= fsolve (fun, yo);
selectivityH20*(x(1)-(x(4)**y(1));
(1x(3))**(x(2)-(x(4)**y(2)))**((x2y(2))-1);
(-1-x(4)y(3));
A*(1-x(3));
endThanks
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions