Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Help for iteration

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2018
05:04 AM

12-17-2018
05:04 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2018
10:54 AM

12-17-2018
10:54 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2018
11:42 AM

12-17-2018
11:42 AM

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...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2018
11:42 AM

12-17-2018
11:42 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-17-2018
02:48 PM

12-17-2018
02:48 PM

Re: Help for iteration

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-28-2018
04:37 PM

12-28-2018
04:37 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-29-2018
04:17 AM

12-29-2018
04:17 AM

Re: Help for iteration

See the attached.

Alan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-30-2018
05:44 AM

12-30-2018
05:44 AM

Re: Help for iteration

Dear Alan,

Thank you very much!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

01-11-2019
12:34 PM

01-11-2019
12:34 PM

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

- « Previous
- Next »