Help - Search - Members - Calendar
Full Version: v(t),p(t) -> p(v). plot possible?
Modelica Forum > Modelica > Modelica
denis
hi,

I have two functions v(t) and p(t). Is it possible to get a plot of p against v?
thanks,

denis
Carsten
Hi Denis,

if you use Dymola, you can run a simulation in the interested intervall of t (eg:
CODE
model test
Real t = 200 + time*100; //if you run 1 second you get t from 200 to 300
Real p=p(t);
Real v=v(t);
end test;

Then you select p in the variable browser to plot. Now you click with the right botton on v an select "Independent variable > v".

Another possibility is to create three arrays in the command line with t, p, v:
CODE
t = {200:5:300}
p=p(t)
v=v(t)

You have to use the complete function name including the package name, e.g.
CODE
MyPackage.v(t)


Now you can use the plotArray command of the Dymola scripting language:
CODE
plotArray(v, p)

See
CODE
document(“plotArray”)
for further information.

Hope that helps. I did not checked for spelling. If you copy it to the editor and there occur erros, write me and I will check it.

Carsten

denis
thanks for your very fast reply!
This will surely help me with my work tomorrow.
RungeZipperer
You can also use the package "UserInteraction".

Choose UserInteraction->Outputs->SpatialPlot.

The plot changes its values dynmically during simulation.

HTH.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.