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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

ODESOLVE

TW_9638511
6-Contributor

ODESOLVE

Hi everyone,

 

As a chemical engineering student, I am trying to solve a pipeloop problem. 

 

I stated all the necessary balances (see below):

TW_9638511_0-1671100207133.png

And the other necessary formulas:

TW_9638511_1-1671100249597.png

which I want to solve for Fh(v),Fo(v) and Fc(v) from v=0 until v=VL.

 

now I've set up this solve block:

 

TW_9638511_3-1671100487991.png

 

which in theory seems solvable, as there are 5 unknowns and 5 equations.

 

Is this the correct way to solve this problem?

 

With kind regards,

 

Tim

                    

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:TW_9638511)

You have a couple of errors.

The functions you are looking for are functions in just one variable (v) but you sometimes used them as if they were functions in three variables.

Sometimes you simply wrote F.C (as if it were a simple variable) instead of F.C(...)

In the IC you had a typo and wrote C.CL twice and were missing C.OL

You have to solve for ALL unknown functions even if you are not interested in C.CL and C.OL

This should help (worksheet attached):

Werner_E_0-1671116666860.png

 

View solution in original post

9 REPLIES 9
TW_9638511
6-Contributor
(To:TW_9638511)

When I try to solve it within the solveblock:

 

TW_9638511_2-1671105284785.png

 

I get the following error:

 

TW_9638511_0-1671105192332.png

 

Werner_E
25-Diamond I
(To:TW_9638511)

You have a couple of errors.

The functions you are looking for are functions in just one variable (v) but you sometimes used them as if they were functions in three variables.

Sometimes you simply wrote F.C (as if it were a simple variable) instead of F.C(...)

In the IC you had a typo and wrote C.CL twice and were missing C.OL

You have to solve for ALL unknown functions even if you are not interested in C.CL and C.OL

This should help (worksheet attached):

Werner_E_0-1671116666860.png

 

TW_9638511
6-Contributor
(To:Werner_E)

Thanks a lot! This really Really appreciate the help!

TW_9638511
6-Contributor
(To:Werner_E)

Hi!

 

I can't open the attached file, as I am working in Prime 4.0. Is there a way I can still open your file on the older version of Mathcad? This would be helpful as I am getting some errors when trying myself. 

 

With kind regards,

 

Tim

TW_9638511
6-Contributor
(To:Werner_E)

ODEsolve gives the error that there are too few equations. I suspect this has something to do with how COL(v),CCL(v),qc(fh(v),fc(v),fo(v)) and qo(fh(v),fc(v),fo(v)) which are wrongly defined in my file. Is there a way I can see how you defined it?

Werner_E
25-Diamond I
(To:TW_9638511)

Unfortunately there is no official way to convert a Prime file so that it can be opened with older Prime versions. The file I posted in from Prime 6.

Nonetheless @LucMeekes  often showed that he is able to do so by editing the XML structure of the file (an mcdx file is just a zipped xml file). Maybe he can help you out by converting my sheet so you can open it with Prime 4.

But in that sheet I did not change anything outside of the solve block and I guess I also mentioned all changes I applied in the text. At least all changes done can be seen in the picture I embedded. You see there quite clear the five equations, five initial conditions and how odesolve is told to solve for all five functions.

I did not change anything else so I also did not change your definitions of qo(..) and qc(..). And COL(v) and CCL(v) are not defined at all anywhere as these are two of the five functions the solve block solves for. As I had written above you had a typo in the initial conditions as you wrote C.CL(0)=0 twice and so the IC for C.OL was missing.

But you can post the failing sheet you tried to edit accordingly - chances are that we are able to find what you forgot to change....

TW_9638511
6-Contributor
(To:Werner_E)

Hi Werner,

 

 I am very stressed lately as I have to finish, my thesis on time before starting my first adult job. Your quick responses definitely facilitate this, a huge thank you!

 

Here is the file I have edited myself. I think the problem, which is also indicated by an error in the mathcad file, is in the qo/qc/col/ccl definitions in prior to the solve block. 

 

I have attached the most current version below. 

 

With kind regards,

 

Tim 

 

 

Werner_E
25-Diamond I
(To:TW_9638511)

You typed C.HL instead of C.CL twice:

Werner_E_0-1671201935217.png

I have not compared what else you changed, but I notice that the plots now look quite different. Are they supposed to look that way?

Werner_E_1-1671202229581.png

 

 

LucMeekes
23-Emerald III
(To:Werner_E)

Here's your file in Prime4.

 

Success!
Luc

Announcements

Top Tags