pybamm-team / pybamm-tea Goto Github PK
View Code? Open in Web Editor NEWA package for performing Techno Economic Analysis using PyBaMM
License: BSD 3-Clause "New" or "Revised" License
A package for performing Techno Economic Analysis using PyBaMM
License: BSD 3-Clause "New" or "Revised" License
Add readme
Think about how to structure the code. Some suggestions to get started:
TEA
class)parameter_values
, loops over them and create a TEA
class for each, does the relevant calculations and plots or displays some kind of summary.I think a more robust test would be to create a TEA class from some known parameters and then check all the calculations are correctly compared - then you will catch if anyone accidentally changes a calculation to give the incorrect result.
Add docs
Add comments for each of the calculations done in the TEA class
Doing
data = {"a": [1, 3], "b": [2, 4], "c": [3, 6]}
pd.DataFrame(data)
is equivalent to (and shorter than) doing
data = [{"a": 1, "b":2 , "c": 3}, {"a": 3, "b":5 , "c": 6}]
data = [{"a": 1, "b":2 , "c": 3}, {"a": 3, "b":5 , "c": 6}]
This can be used to clean up a bunch of code in TEA
, e.g.
stack_ed = self.stack_energy_densities
data = [
{
"Parameter": "Volumetric energy density",
"Unit": "Wh.L-1",
"Value": stack_ed.get("Volumetric stack energy density [Wh.L-1]"),
},
{
"Parameter": "Gravimetric energy density",
"Unit": "Wh.kg-1",
"Value": stack_ed.get("Gravimetric stack energy density [Wh.kg-1]"),
},
{
"Parameter": "Stack average OCP",
"Unit": "V",
"Value": stack_ed.get("Stack average OCP [V]"),
},
{
"Parameter": "Capacity",
"Unit": "mA.h.cm-2",
"Value": stack_ed.get("Capacity [mA.h.cm-2]"),
},
{
"Parameter": "(Single-) stack thickness",
"Unit": "um",
"Value": 10**6 * stack_ed.get("Stack thickness [m]"),
},
{
"Parameter": "Stack density",
"Unit": "kg.L-1",
"Value": 10**-3 * stack_ed.get("Stack density [kg.m-3]"),
},
]
# Create the DataFrame from the list of dictionaries
df = pd.DataFrame(data)
could be much shorter and more readable.
Add tests and infrastructure
Set the inputs when you make an instance of the class instead of on the methods. This will ensure consistency across calculations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.