forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 0 additions & 78 deletions
78
...tion/test_models/test_full_battery_models/test_lithium_ion/test_basic_half_cell_models.py
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_basic_models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Test basic model classes | ||
# | ||
from tests import TestCase | ||
import pybamm | ||
|
||
import unittest | ||
|
||
|
||
class BaseBasicModelTest: | ||
def test_with_experiment(self): | ||
model = self.model | ||
experiment = pybamm.Experiment( | ||
[ | ||
"Discharge at C/3 until 3.5V", | ||
"Hold at 3.5V for 1 hour", | ||
"Rest for 10 min", | ||
] | ||
) | ||
sim = pybamm.Simulation(model, experiment=experiment) | ||
sim.solve(calc_esoh=False) | ||
|
||
|
||
class TestBasicSPM(BaseBasicModelTest, TestCase): | ||
def setUp(self): | ||
self.model = pybamm.lithium_ion.SPM() | ||
|
||
|
||
class TestBasicDFN(BaseBasicModelTest, TestCase): | ||
def setUp(self): | ||
self.model = pybamm.lithium_ion.DFN() | ||
|
||
|
||
class TestBasicDFNComposite(BaseBasicModelTest, TestCase): | ||
def setUp(self): | ||
self.model = pybamm.lithium_ion.BasicDFNComposite() | ||
|
||
|
||
class TestBasicDFNHalfCell(BaseBasicModelTest, TestCase): | ||
def setUp(self): | ||
options = {"working electrode": "positive"} | ||
self.model = pybamm.lithium_ion.BasicDFNHalfCell(options) | ||
|
||
|
||
if __name__ == "__main__": | ||
print("Add -v for more debug output") | ||
import sys | ||
|
||
if "-v" in sys.argv: | ||
debug = True | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters