Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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.
Without really trying to understand what you're modeling, I have restructured the problem to solve.
Mathcad 15 will not manage units in Odesolve.
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
Sorry, pressure is not equal pressure/time.
Describe please your problem with words.
Without really trying to understand what you're modeling, I have restructured the problem to solve.
Mathcad 15 will not manage units in Odesolve.
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
Fred's file in Prime with units. With added sec - what is the physic of this problem?
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.