Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Modeling CSTR in series for a membrane reactor: MATLAB

Status
Not open for further replies.

Isabella_Ang

Chemical
Oct 9, 2020
1
0
0
NL
Dear all,

I'm new to modelling in Matlab, and am trying to model a hollow fibre membrane separating water and BSA using the tank in series model.
For this, I have determined that the number of CSTRs (found to be 44 through tracer experiments) that represent the membrane.
Now I am having difficulties inputing the ODE for the water balance.

The following assumptions are made:
- BSA and water enter the feed
- ONLY water permeates through the membrane
- the retentate stream has BSA and water.

For the water balance, I simply have:
dn/dt = Fw,in - Fw,out - J*A

where Fw,in and Fw,out are the molar flow of water [mol/s] in and out of the CSTR, J is the flux [mol/s*m2] and A the surface area of the membrane.
However, when I input this as an ode45 into matlab, matlab processes the equation as dFw/dt rather than dn/dt.

Therefore, how do format my water balance so that the inlet and outlet variable that are changing are in mol rather than mol/s?
 
Replies continue below

Recommended for you

There is a "Engineering Computer Programs" forum on this website that might be a better place for this question. If you plan to post there as well, please report this post for deletion so it's not a duplicate.
 
Status
Not open for further replies.
Back
Top