-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
1 parent
1a09b86
commit aae9402
Showing
10 changed files
with
124 additions
and
90 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
46 changes: 46 additions & 0 deletions
46
tests/unit/test_models/test_submodels/test_interface/test_diffusion_limited.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,46 @@ | ||
# | ||
# Test diffusion limited submodel | ||
# | ||
|
||
import pybamm | ||
import tests | ||
import unittest | ||
|
||
|
||
class TestBaseModel(unittest.TestCase): | ||
def test_public_function(self): | ||
param = pybamm.standard_parameters_lead_acid | ||
|
||
a_n = pybamm.PrimaryBroadcast(pybamm.Scalar(0), ["negative electrode"]) | ||
a_s = pybamm.PrimaryBroadcast(pybamm.Scalar(0), ["separator"]) | ||
a = pybamm.Scalar(0) | ||
variables = { | ||
"Current collector current density": a, | ||
"Negative electrode potential": a_n, | ||
"Negative electrolyte potential": a_n, | ||
"Negative electrolyte concentration": a_n, | ||
"X-averaged positive electrode oxygen interfacial current density": a, | ||
"Separator tortuosity": a_s, | ||
"Separator oxygen concentration": a_s, | ||
} | ||
submodel = pybamm.interface.DiffusionLimited( | ||
param, "Negative", "lead-acid oxygen", "leading" | ||
) | ||
std_tests = tests.StandardSubModelTests(submodel, variables) | ||
std_tests.test_all() | ||
|
||
submodel = pybamm.interface.DiffusionLimited( | ||
param, "Negative", "lead-acid oxygen", "full" | ||
) | ||
std_tests = tests.StandardSubModelTests(submodel, variables) | ||
std_tests.test_all() | ||
|
||
|
||
if __name__ == "__main__": | ||
print("Add -v for more debug output") | ||
import sys | ||
|
||
if "-v" in sys.argv: | ||
debug = True | ||
pybamm.settings.debug_mode = True | ||
unittest.main() |
27 changes: 0 additions & 27 deletions
27
...odels/test_submodels/test_interface/test_diffusion_limited/test_base_diffusion_limited.py
This file was deleted.
Oops, something went wrong.
Empty file.
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
Empty file.
27 changes: 0 additions & 27 deletions
27
tests/unit/test_models/test_submodels/test_interface/test_kinetics/test_base_kinetics.py
This file was deleted.
Oops, something went wrong.
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
47 changes: 36 additions & 11 deletions
47
tests/unit/test_models/test_submodels/test_interface/test_kinetics/test_tafel.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