Highlighted

"Restrict" expression

Genius
Genius

Hello,

In my results, I always get unrealistic value for massflow at t=0s

It makes my charts not proper.

For fixing it, I wanted to create a postprocessing value of the desired massflow by restricting it between 1 and 50 s

restrict(q1@QB,1,50)

But doing that, the expression becomes red, and also the the postprocessing variable is not available as the run is over

I dont understand why it doesn't work since the plot of q1@QB works

It runs under v15

(By the way, is it possible to enforce an unity in a postprocessing variable, instead of [null]?)

Thanks for any tip

Maxime

Capture.JPG

4 REPLIES 4

Re: "Restrict" expression

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

the "unrealistic" result that you get in the very first time steps is due to a non-optimal guess of the initial values. Usually, by providing better guesses the problem should be solved. You can try to reach an equilibrium point and sue the "set final values..." option to force the initial values of the system state variables to equilibrium.

 

Regarding the restrict(a,t1,t2) function, I understand that the time interval that you provide in the expression must be a subset of the simulation time. In your case, t2 should be strictly less than 50 (for example: restrict(q1@QB,1,49.99)).

 

Starting from v16, it is possible to assign a unit of measurement to post processed variables.

 

Cheers, 

 

FedericoC 

Re: "Restrict" expression

Siemens Phenom Siemens Phenom
Siemens Phenom
Version 17 for the units of post processing variables Smiley Happy

Re: "Restrict" expression

Siemens Legend Siemens Legend
Siemens Legend
Yep, thanks for the correction Emmanuel !

Re: "Restrict" expression

Genius
Genius

Hello @FedericoC

Ok the problem was that my final time in the subset wasn't strictly less than my final time value

Now it works perfect!

Great

Thank you