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

Help for iteration

SOLVED

Re: Help for iteration

Hey Alex, 

 

So, there is another approach i should look into. Instead of coupling the CO2lSS & CO2gSS in one derivation.

I have to first solve the CO2lSS with ode solver and resulted in CO2lSS(x).

And from there i substitute into the equation of CO2gSS(x) equation, where inside the equation there the CO2gin and CO2lin which has to equal to the CO2lout (x-1) and CO2gout (x-1).

 

So i have to make the new For loop, i tried but it still gives error. Do you mind helping me with this?

I would really appreciate it.

 

Thank you. 

Re: Help for iteration

Something like the attached perhaps?

 

It would help if you were (1) to specify the units of all the constants and variables, and (2) to show a system diagram.  I would then be in a much better position to check my interpretation of what I think you are after!

 

Alan

 

 


Re: Help for iteration

Thanks for the reply. 

 

So, the re-circulation that i needed to simulate is the one presented above. The concentration in liquid is solved first by the ODE solver and results in CO2l(x) to simulate each concentration in every x point. Then, the CO2g(x) can be found by substitution.

 

I'm not sure should i do the for loop for gas and liquid in 1 command, or should i do it separately (like you did in previous file). I hope it makes thing clearer...

 

 

 

Re: Help for iteration

Notice that your liquid phase equations have an analytical solution, so, alternatively, you could do the calculations as in the attached

 

Alan

Re: Help for iteration

Okay, i will try that. Thank you very much!!

Re: Help for iteration

Hey Alan,

 

Looking at the result curve, i'm having trouble now in plotting the result.

I can only plot the first cycle and the last cycle.

Which means if I set n>2 cycles, I can not see and plot the curve for the middle between cycles 2 and last cycle.

Do you mind helping me again to solve this problem?

 

Thanks

Re: Help for iteration

See the attached.

 

Alan

 

Re: Help for iteration

Dear Alan,

 

Thank you very much!

Re: Help for iteration

Hey Alan,

It's me again haha. So I was wondering, from previous iteration it is correct that the value from previous cycle got taken up as an input value for the next cycle. However, I noticed that actually the liquid and gas derivation is not connected, while it's supposed to be connected. So, the liquid derivation has to take the new COgin as well, and same for the gas substitution has to take new COlin. While now, the new COgin value only used for gas derivation and the new COlin value only used for liquid derivation.

 

I made the new iteration as attached, do you think it's correct?

 

Thanks 

Announcements