2

I have a model in my Modelica and I use Dymola to compile this model. In my model I need the simulation information "Output Interval length". I have searched for it but I could not get the useful information. Is there any other possible way we could access simulation information.

6
  • Why do you need it? There might be a better way to accomplish what you want to do. Commented Sep 24, 2016 at 4:54
  • sorry for my late reply. I have used sine block to generate a signal. The also want the change in the value of the signal after every time step. At present I have used a delay function with the delay time step value. I have hardcoded the time step value. So after reading the valuable comments I have found that we cannot access the timestep. so is there any other way to the find the change in the sine block output after every time step? Commented Sep 26, 2016 at 6:54
  • Do you need this value for some computation in the model or could you use postprocessing to access the value? Commented Sep 26, 2016 at 10:39
  • I need it in the computation. I have to provide the difference in amplitude after every time step. Commented Sep 26, 2016 at 12:25
  • Is it the time derivative of the signal that you want? Commented Oct 4, 2016 at 13:00

4 Answers 4

4

If you are simply trying to get the results reported at specific intervals, you can use a sample operator to achieve that. That would force the solution to be computed at specific times without directly specifying something like the time step.

The important point to understand here is that a model where the behavior of the model depends on the numerical integration is highly suspect and I've never seen a case where the behavior couldn't be described without knowledge of the solution method. Said another way, "mother nature" doesn't know anything about "time steps". :-)

Sign up to request clarification or add additional context in comments.

Comments

3

You could use a clocked system with an integrator. For an Example, see File -->Libraries-->Modelica_Synchronous --> Examples --> Systems --> Controlled_mixing_unit in Dymola There the period (i.e. in this case the timestep of the explicit Euler method) is a parameter of the periodic clock)

Comments

2

Modelica by design prohibits accessing any numerical solver internals, so you cannot access it. The output interval length also cannot be determined by the model in any reliable way since the solver will take internal steps longer than the output interval and then interpolate values for the result file.

Comments

0

You could create a function that reads the dsin.txt file and extracts that information.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.