Incorrect values for y axis in 2D simulation?
See original GitHub issueDescribe the bug
This might not be a bug but just me not understanding how to do things properly (PyBaMM beginner…).
When using a 2+1D pouch cell model, the plot uses values for the y (horizontal) axis which are not what I would expect based on the Electrode width
parameter setting.
To Reproduce Steps to reproduce the behaviour:
import pybamm
options = {"cell geometry": "pouch", "thermal": "x-lumped", "dimensionality": 2}
model = pybamm.lithium_ion.SPM(options=options)
geometry = model.default_geometry
parameter_values = model.default_parameter_values
parameter_values.update(
{
"Electrode height [m]": 0.3,
"Electrode width [m]": 0.1,
"Negative tab width [m]": 0.03,
"Positive tab width [m]": 0.03,
"Negative tab centre y-coordinate [m]": 0.03,
"Positive tab centre y-coordinate [m]": 0.07,
"Negative tab centre z-coordinate [m]": 0.3,
"Positive tab centre z-coordinate [m]": 0.3,
}
)
parameter_values.process_model(model)
parameter_values.process_geometry(geometry)
sim = pybamm.Simulation(model, parameter_values=parameter_values, solver=pybamm.CasadiSolver("fast"))
sim.solve([0, 60])
Expected behaviour
I expected the horizontal axis (y) to extend from 0 to 10 cm.
Screenshots
Additional context
Using PyBaMM 0.3.0 or current master (no difference). Python 3.8.5.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
problem in 2D simulation? - Forums - CFD Online
Hi dear friends i want simulating one spillway as shown follow in 2D, i using version 14, in previous version like v12 for...
Read more >Excel Charts Displaying Incorrect Values on Vertical Axis
I am creating charts in Excel 2010; when I select data and create the chart, the vertical axis amounts do not agree with...
Read more >Problem in generation of 2d model - Ansys Learning Forum
I'm trying to generate a model of cooling tower using axisymmetric but the problem is that i dont know how to place it...
Read more >Unable to plot displacement vs time graph - COMSOL
I am using 2D plot Group and adding Parameterized Curve 2D in Data Sets. Also, I am not able to get the correct...
Read more >Invalid Curves for 2D Axisymmetric Models - PTC Support
For example, no curve can cross or lie on the Y axis. To ensure this, Creo Simulate enforces a rule that all model...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI, you can pass the plot function a “spatial_unit” argument to display mm or m instead of um https://pybamm.readthedocs.io/en/latest/source/plotting/quick_plot.html
Thanks for the quick fix!