cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Iteration Problem on Multicomponent Adsorption

ptc-1441311
1-Newbie

Iteration Problem on Multicomponent Adsorption

Hello!

I am working on a Multicomponent Adsorption problem. To get the value of the interphase concentrations, ys1 & ys2, I need to do iteration. I am having difficulty on the programming for the iteration for the values in matrix. The "while" loop part is a bit confusing for me.


[ys1 (subs i, subs j)](subs k) <---- is this ok?

Please help.

7 REPLIES 7

An adsorption problem was done years ago.
If you wish, save 11 or lower for > audience.

jmG

Yup! It is.
I saved the ver.11 of the program for greater viewer.

In addition, please see below the brief explanation of the problem for the program that I made:

1. Variable ys1 is a function of x1, y1, and ys2 while ys2 is a function of x2, y2 and ys12. 2.Values of x1 and y1 are already known and ys2(at k=0) is first assumed.
3. With the values of x1, y1 and assumed ys2, ys1 (at k=1) is obtained (quadratic formula on while loop).
4. Same goes for ys2. Values of x2 and y2 are known and ys1(at k=0) is first assumed.
5. Values of x2 and y2 are already known and ys2(at k=0) is first assumed.
6. With the values of x2, y2 and assumed ys1, ys2 (at k=1) is obtained (quadratic formula on while loop).
7. The assumed values of ys1 & ys2 is compared with the calculated values obtained in #3 and #6. If the difference is greater than the tolerance, then the step is repeated using the previously calculated values of ys1 & ys2 (at k=1).
8. Once the final ys1 & ys2 are obtained, y1,y2,x1 & x2 is calculated (for i+1, j+1) and steps #1 to #7 is repeated again.

If you couldn't trace the first error or if your version does not show the same error, then the versions are not compatible at all in respect of this attempt at the top of your 4 pages program. Such a long program should be split like it was done for Galerkin, that you can find in the collab.



jmG

Yes. I have the same error. Iam using MathCAD ver.14.1 M011. My problem is how to express ys1 and ys2 into matrix form. I attached here other program that I made but still it shows the same error. I attached here ver11 and ver 14.

this is the error that i got

Build that array manually and pass it to collab for help.
It does not work and what it means is obscure.

jmG
Top Tags