You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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)
Activity
martinjrobins commentedon Feb 26, 2020
I think this would involve:
pybamm.VariableDotthat represents the derivative of a state variable wrt time, natually the time derivative of apybamm.Variableresults in apybamm.VariableDotpybamm.StateVariableDotthat represents the state time derivative vector , natually the time derivative of apybamm.StateVectorresults in apybamm.StateVectorDotpybamm.VariableDotresults in a correspondingpybamm.StateVectorDotSymbol.evaluateto also takeydot, the derivative of the state vector, as an argumentpybamm.VariableDotexists in any rhs or algebraic equations (i.e. equations should be in semi-explicit form)#858 update state vector to allow derivative of y or ydot
#858 add stateVectorDot
#858 add y_dot arg to all evaluate functions
#858 add VariableDot
#858 add d_dt unary operator, fixes to jac to support this
#858 discretisation of VariableDot results in StateVectorDot
#858 time derivative of state vector gives state vector dot, raise er…
#858 add check for time derivs in model.rhs, fix some evaluate arg bugs
#858 added make_semi_explicit to convert implicit dae equations to al…
#858 make_semi_explicit updates initial conditions
#858 some fixes, move time deriv model checks to base_model
#858 misc fixes
#858 style fixes, remove d_dt helper function, fix bugs
10 remaining items
#858 fix coverage and flake8
#858 fix test errors
#858 improve coverage
#858 add coverage
#858 improve coverage, document exception for InputParameter in evalu…
#858 improve coverage
#858 improve coverage
#858 flake8
martinjrobins commentedon Mar 18, 2020
forgot the changelog!
#858 add changelog
#858 merge develop
Merge pull request #896 from pybamm-team/issue-858-ddt