Get Help

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
- :
- Problem with plotting results from odesolve

- 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

Highlighted

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

03-11-2018
09:16 AM

03-11-2018
09:16 AM

Hello,

I am working in mathcad prime 3.0 on an assignment and I am modeling a Trickle Bed Reactor (plug flow behavior). I have set up the mole balances, from which I know by now that they are correct. I use the odesolve function to solve a set of differential (and algebraic) equations. However when I plot the results I do not get the results I want. Attached is the file I made. I made a plot with the liquid concentrations of the components. I see only a difference in the concentration of A and I am wondering what I am doing wrong, because i should also a difference in the concentration of B and C.

Below a brief description on the case:

I have three reactions. The third reaction does not take place due to a reaction rate constant which is zero.

- A + H2 -> B
- B + H2 -> C
- A -> G (This reaction is not taking place)

I am feeding hydrogen in the gas phase to the reactor together with liquid component A. I have set up 9 mole balances. The solid phase is in steady state, so, these are algebraic equations:

- Gas phase hydrogen
- Liquid phase hydrogen
- Solid phase hydrogen
- Liquid phase A
- Solid phase A
- Liquid phase B
- Solid phase B
- Liquid phase C
- Solid phase C

Maybe I am forgetting something trivial, but i'm am stuck for a while now. Any help would be appreciated. To be clear: I am wondering why i don't see a concentration difference for component B and C in the plot.

Thanks in advance

Kind regards,

Xafie

pc. unfortunately i can not attach the file. If needed i can also send the file via email

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

03-22-2018
02:40 PM

6 REPLIES 6

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

03-20-2018
09:32 AM

03-20-2018
09:32 AM

Re: Problem with plotting results from odesolve

Update:

Attached you'll find the mathcad file

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

03-20-2018
11:27 AM

03-20-2018
11:27 AM

Re: Problem with plotting results from odesolve

@Xafie wrote:

Update:

Attached you'll find the mathcad file

or see here http://twt.mpei.ac.ru/TTHB/New-Chem-Kin/En-ChemKin.html

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

03-20-2018
12:33 PM

03-20-2018
12:33 PM

Re: Problem with plotting results from odesolve

I notice that you have units for each of your terms, but you have not attached units to the values of your variables.

One of the really great things about Mathcad (IMHO) has always been that it handles and converts units. Just about the only redeeming feature of Prime (so far) has been that the ODE solvers will deal with units. If I (who knows almost nothing about chemical reactions) were to really try to troubleshoot this sheet, one of the first things I would do is apply the units to the variables. That will show (very quickly) if there's an equation where the units don't balance. In a sheet this complex (again, my opinion) there's a very good chance that a simple typo is part of the problem.

Another possibility: can you create a solve block for part (rather than all nine) concentrations, or are they all cross-coupled?

Divide and conquer!

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

03-22-2018
02:40 PM

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

03-23-2018
07:47 AM

03-23-2018
07:47 AM

Re: Problem with plotting results from odesolve

@FredKohlhepp, thank you for your time to take a look at my problem and solving it. After all I made a mistake in the annotation. Unfortunately the reactions are coupled, so it is not easy to split it in parts.

To come back at you post earlier about the units; The reason why I did it like this, is because I thought I did read somewhere that Mathcad can not solve the ODE's when it is using units. Apparently i am wrong. I will add the units to be more precise in the calculations and avoid mistakes!

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

03-23-2018
07:48 AM

03-23-2018
07:48 AM

Re: Problem with plotting results from odesolve

I will take a look at this, thank you.

Top Tags