Turn on suggestions

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

Showing results for

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

Showing results for

** Community Tip** - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search.
X

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

Dec 15, 2022
05:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 15, 2022
05:37 AM

ODESOLVE

Hi everyone,

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

I stated all the necessary balances (see below):

And the other necessary formulas:

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:

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

Solved! Go to Solution.

Labels:

ACCEPTED SOLUTION

Accepted Solutions

Dec 15, 2022
10:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 15, 2022
10:04 AM

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):

9 REPLIES 9

Dec 15, 2022
06:55 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 15, 2022
06:55 AM

When I try to solve it within the solveblock:

I get the following error:

Dec 15, 2022
10:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 15, 2022
10:04 AM

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):

Dec 15, 2022
10:28 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 15, 2022
10:28 AM

Thanks a lot! This really Really appreciate the help!

Dec 16, 2022
03:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
03:11 AM

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

Dec 16, 2022
03:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
03:32 AM

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?

Dec 16, 2022
09:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
09:24 AM

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

Dec 16, 2022
09:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
09:37 AM

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

Dec 16, 2022
09:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
09:45 AM

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

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?

Dec 16, 2022
01:26 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 16, 2022
01:26 PM

Here's your file in Prime4.

Success!

Luc