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

time derivative operator #858

Closed
martinjrobins opened this issue Feb 26, 2020 · 2 comments · Fixed by #888 or #896
Closed

time derivative operator #858

martinjrobins opened this issue Feb 26, 2020 · 2 comments · Fixed by #888 or #896
Assignees

Comments

@martinjrobins
Copy link
Contributor

Summary
This would add an d / dt operator to pybamm to take the time derivative of an expression tree

Motivation
no such operator currently exists. Users can manually add an expression tree corresponding to the time derivative of an expression, but if that expression involves a state variable then there is no way to evaluate an expression that contains the time derivative of the state variable

Additional context
none

@martinjrobins martinjrobins self-assigned this Feb 26, 2020
@martinjrobins
Copy link
Contributor Author

martinjrobins commented Feb 26, 2020

I think this would involve:

  • a new Symbol class pybamm.VariableDot that represents the derivative of a state variable wrt time, natually the time derivative of a pybamm.Variable results in a pybamm.VariableDot
  • a new Symbol class pybamm.StateVariableDot that represents the state time derivative vector , natually the time derivative of a pybamm.StateVector results in a pybamm.StateVectorDot
  • discretisation of a pybamm.VariableDot results in a corresponding pybamm.StateVectorDot
  • need to change Symbol.evaluate to also take ydot, the derivative of the state vector, as an argument
  • raise error in the base_model checks if a pybamm.VariableDot exists in any rhs or algebraic equations (i.e. equations should be in semi-explicit form)

martinjrobins added a commit that referenced this issue Mar 5, 2020
martinjrobins added a commit that referenced this issue Mar 6, 2020
martinjrobins added a commit that referenced this issue Mar 6, 2020
…rors if taking time derivative of *Dot classes
martinjrobins added a commit that referenced this issue Mar 7, 2020
martinjrobins added a commit that referenced this issue Mar 7, 2020
@martinjrobins martinjrobins mentioned this issue Mar 14, 2020
6 tasks
martinjrobins added a commit that referenced this issue Mar 14, 2020
martinjrobins added a commit that referenced this issue Mar 14, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 15, 2020
martinjrobins added a commit that referenced this issue Mar 16, 2020
martinjrobins added a commit that referenced this issue Mar 18, 2020
martinjrobins added a commit that referenced this issue Mar 18, 2020
martinjrobins added a commit that referenced this issue Mar 18, 2020
martinjrobins added a commit that referenced this issue Mar 18, 2020
martinjrobins added a commit that referenced this issue Mar 18, 2020
@martinjrobins martinjrobins reopened this Mar 18, 2020
@martinjrobins
Copy link
Contributor Author

forgot the changelog!

martinjrobins added a commit that referenced this issue Mar 18, 2020
@martinjrobins martinjrobins mentioned this issue Mar 18, 2020
6 tasks
martinjrobins added a commit that referenced this issue Mar 18, 2020
martinjrobins added a commit that referenced this issue Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant