Issue 548 variable bc - #624
Conversation
…ssue-548-variableBC
…ssue-548-variableBC
Codecov Report
@@ Coverage Diff @@
## master #624 +/- ##
==========================================
+ Coverage 98.5% 98.52% +0.01%
==========================================
Files 173 175 +2
Lines 8776 8861 +85
==========================================
+ Hits 8645 8730 +85
Misses 131 131
Continue to review full report at Codecov.
|
…ssue-548-variableBC # Conflicts: # pybamm/solvers/base_solver.py
|
does this also have changes from another branch? |
valentinsulzer
left a comment
There was a problem hiding this comment.
Looks good. Setting d/dt = 0 is a bit ugly and possibly susceptible to drift but done is better than working for now :)
| ) | ||
| if options[ | ||
| "current collector" | ||
| ] == "single particle potenetial pair" and not isinstance( |
There was a problem hiding this comment.
| ] == "single particle potenetial pair" and not isinstance( | |
| ] == "single particle potential pair" and not isinstance( |
There was a problem hiding this comment.
not sure why this didn't fail any tests
| + delta_phi_s_p_av | ||
| - delta_phi_s_n_av | ||
| ) | ||
| self.algebraic = {i_boundary_cc: v_boundary_cc - local_voltage_expression} |
There was a problem hiding this comment.
shouldn't local_voltage_expression already be in the variables dict (so you don't have to redefine it, introducing potential for a different definition here and in the SPMe class)?
| phi_s_cn: pybamm.Scalar(0), | ||
| phi_s_cp: param.U_p(param.c_p_init, param.T_ref) | ||
| - param.U_n(param.c_n_init, param.T_ref), | ||
| i_boundary_cc: applied_current / param.l_y / param.l_z, |
There was a problem hiding this comment.
is this the right initial condition for a 1+1D model
| solution1.t, | ||
| solution1.y, | ||
| mesh=mesh, | ||
| ) |
There was a problem hiding this comment.
you could use the helper function "post_process_variables" here
Description
Changes to enable 1 plus 1d and updating state vector between time steps for coupling to pnm
Fixes #548
Type of change
Please delete options that are not relevant.
Key checklist:
$ flake8$ python run-tests.py --unit$ cd docsand then$ make clean; make htmlYou can run all three at once, using
$ python run-tests.py --quick.Further checks: