Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prod/loss rates output #406

Open
Ekimmai opened this issue Oct 3, 2019 · 3 comments
Open

prod/loss rates output #406

Ekimmai opened this issue Oct 3, 2019 · 3 comments

Comments

@Ekimmai
Copy link

Ekimmai commented Oct 3, 2019

I am modeling a chamber experiment with a time step of 5 seconds and rates output step size of 5 seconds.

The output in speciesConcentrations looks fine, concentrations change at every time step as expected. However, in productionRates and lossRates the rates appear to not be being calculated at each time step and so the output is in steps, it is identical for several time steps and then jumps to another value.

I have tried changing the lossRates output step size to 5, 20, 60 and 600 seconds. The same things happen with the steps occurring in the same place (see attached figure for loss rates for an example reaction with each output step size).

The changes in the steps are at the same time for all lossRates (see green points in figure).

I also tried running with a shorter timestep (2 seconds), with a lossRates output step size of 5 seconds, and the results were the same.

Also shown in the figure is the loss rate calculated by multiplying the values from speciesConcentrations (red line).

image

@spco
Copy link
Collaborator

spco commented Oct 16, 2019

Hi @Ekimmai, sorry for the slow response, and welcome to Atchem. The behaviour you're seeing is a result of the way the underlying CVODE library algorithms work - rather than timestepping to the next output time, and outputting then, instead it largely chooses its own timesteps and interpolates to give the output at the requested times.

When you say that you shortened the timesteps, could you clarify how you did that - was it by line 5 in solver.parameters?

@Ekimmai
Copy link
Author

Ekimmai commented Oct 17, 2019

Hi, I was just changing 'step size' in model.parameters.

@spco
Copy link
Collaborator

spco commented Oct 17, 2019

Ok. Would you be willing to try reducing line 5 in solver.parameters (maximum solver step size) to see whether that reduces the effect you are seeing?

@rs028 rs028 moved this to Model Interface and Output in Roadmap Sep 22, 2022
@rs028 rs028 added this to Roadmap Sep 22, 2022
@rs028 rs028 added this to the version 1.4 milestone Oct 6, 2022
@rs028 rs028 moved this from Model Interface and Output to Performance and Profiling in Roadmap Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Performance and Profiling
Development

No branches or pull requests

3 participants