Skip to content

Overhaul PyBaMM solution importing #299

@tomjholland

Description

@tomjholland

Importing PyBaMM solutions has some added complexity due to differences in standards between terminology for Cycles and Steps. In PyBaMM the last three instructions of the following experiment:

experiment = pybamm.Experiment(
        [
            (
                "Discharge at C/10 for 10 hours or until 3.3 V",
                "Rest for 1 hour",
                "Charge at 1 A until 4.1 V",
                "Hold at 4.1 V until 50 mA",
                "Rest for 1 hour",
            ),
        ]
        * 3
        + [
            "Discharge at 2A until 3.3 V",
            "Charge at 1 A until 4.1 V",
            "Discharge at 1A until 3.3 V",
        ],
    )

are separated by cycle number, not step number. They can be grouped into the same cycle, and thus increment step by putting them inside a tuple:

experiment = pybamm.Experiment(
        [
            (
                "Discharge at C/10 for 10 hours or until 3.3 V",
                "Rest for 1 hour",
                "Charge at 1 A until 4.1 V",
                "Hold at 4.1 V until 50 mA",
                "Rest for 1 hour",
            ),
        ]
        * 3
        + [
            ("Discharge at 2A until 3.3 V",
            "Charge at 1 A until 4.1 V",
            "Discharge at 1A until 3.3 V",)
        ],
    )

In PyProBE, cycle only increments when steps are repeated. It should be ensured that the steps are properly separated, whatever the form of the experiment that created them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions