I'm new in Mathcad and I'm doing my thesis now. I have some trouble finding how to do iteration in Mathcad.
So in my file, I have a reactor of 250 m. And I want to know how the concentration changes.
But, I want the simulation to run for >1 cycle. Which means I have to define a way to make the Cout (concentration out) from previous cycle, as a value for the Cin(2) concentration in of the next cycle. These are for both liquid and gas concentration.
I mean now I have the for loop cycle after the 1st cycle derivation.
No. I just left an example of a single cycle so you could see that changing the Odesolve block to a function didn't alter the calculation. In the attached I've removed this!
Also, isn't now the system taking the value from previous x point, so the COlin (x) = COlout (X-1) instead of per cycle?
No. Each cycle covers all values of x before updating the inlet values for the next cycle. This is because all values of x are considered by the Odesolve function which is called just once per cycle.
What you have is two coupled first order differential equations. Your "Given" block is missing its closure.
Given needs to be a closed block, in your case with Odesolve. Review help on solving differential equations--there should be an example that is directly applicable.
Maybe you should look here.
It deals with (what appears to be/almost?) the exact same problem.
Hey Luc, unfortunately, that is my other account which I forgot the password..
Thanks for your reply. What do you mean by closed solve block?
Because in that file i'm using the "Given" which means I have the solve block already?
Now i'm just confused in trying to figure out how to loop the result as an input of the next derivation.
There's an old method in Mathcad that mimics Euler's approximation to ODE's. This might work for you.
A solve block opens with "Given".
As you can see in my attached picture.
So you should have two functions of the two parameters. What happens if you type C.O2lSS(2m), or try to plot C.02lSS(x) vs x?