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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Problem with plotting results from odesolve

Xafie
4-Participant

Problem with plotting results from odesolve

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. 

  1. A + H2 -> B
  2. B + H2 -> C
  3. 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:

  1. Gas phase hydrogen
  2. Liquid phase hydrogen
  3. Solid phase hydrogen
  4. Liquid phase A
  5. Solid phase A
  6. Liquid phase B
  7. Solid phase B
  8. Liquid phase C
  9. 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

ACCEPTED SOLUTION

Accepted Solutions

Replace

Capture.PNG

with

CaptureA.PNG

and get

CaptureB.PNG

View solution in original post

6 REPLIES 6
Xafie
4-Participant
(To:Xafie)

Update:

 

Attached you'll find the mathcad file

 


@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

Replace

Capture.PNG

with

CaptureA.PNG

and get

CaptureB.PNG

Xafie
4-Participant
(To:Fred_Kohlhepp)

@Fred_Kohlhepp, 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!

Xafie
4-Participant
(To:ValeryOchkov)

I will take a look at this, thank you.

Fred_Kohlhepp
23-Emerald I
(To:Xafie)

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!

Announcements

Top Tags