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

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

Oct 14, 2013
12:38 PM

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

Oct 14, 2013
12:38 PM

Ideal Gas Equation

Good morning,

Right now I am working in a small project (just for curiosity, not work related at this stage), and my purpose is to get the final pressure of gas, based on the time elapsed. I have been working with MathCad for several years, but I am not comfortable dealing with differential models. Instead, I always use some numerical methods and/or matrices to get an approx. solution. This time however, I really would like to use the "Odesolver" fuction. so I am using the ideal gas equation (P*Vmol=R*Temp),the initial volume and the temperature,to evaluate the pressure and the pressure profile after 10 sec.

I defined the two functions (Pressure based on molar vol, and molar vol based on initial volume and time), and now I am trying to put them together to get and expression, but I was not able to do it right. Any comment / suggestion at this point would be really appreciated.

I have already finished the mathcad worksheet using a matrix and dt=0.001 sec, but if possible I would like to use the odesolver for this project.

Attached you can find the few lines with the issue.

Additional Question: Does Odesolver support units?

Thanks a lot,

Oscar J.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Oct 14, 2013
01:10 PM

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

Oct 14, 2013
01:10 PM

Without really trying to understand what you're modeling, I have restructured the problem to solve.

Mathcad 15 will not manage units in Odesolve.

6 REPLIES 6

Oct 14, 2013
12:48 PM

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

Oct 14, 2013
12:48 PM

The initial condition is not given for the function you want to solve (P.ideal != P)

You have a function dependent on V.mol and Temp but you attempt to do the drivative wrt t!?

Additional Question: Does Odesolver support units?

In MC 15, no

in Prime, yes

Oct 14, 2013
12:54 PM

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

Oct 14, 2013
12:54 PM

Sorry, pressure is not equal pressure/time.

Describe please your problem with words.

Oct 14, 2013
01:10 PM

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

Oct 14, 2013
01:10 PM

Without really trying to understand what you're modeling, I have restructured the problem to solve.

Mathcad 15 will not manage units in Odesolve.

Oct 14, 2013
01:29 PM

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

Oct 14, 2013
01:29 PM

Do you need an Odesolver at all here? If you are just after Pideal as a function of time and you have specified Vmol as a function of time, you just need to call Pideal(Vmol(t),Temp) to get pressure as a function of time!

If this isn't what you want then Fred's file should help.

Alan

Oct 14, 2013
01:39 PM

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

Oct 14, 2013
01:39 PM

Fred's file in Prime with units. With added sec - what is the physic of this problem?

Oct 15, 2013
08:10 AM

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

Oct 15, 2013
08:10 AM

Good morning,

Thank you all for your comments and your examples. Now I have many other possibilities to develop this worksheet based on your suggestions and your examples. I will let you all know what is the final result of this exercise.

Thanks a lot,

OJ.