forked from battery-lcf/battery-archive-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 27c5949
Showing
15 changed files
with
1,197 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
BSD 2-Clause License | ||
|
||
Copyright (c) 2021, battery-lcf | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,16 @@ | ||
# battery-archive-sandbox | ||
|
||
Battery Lifecycle (BLC) Framework | ||
The Battery Lifecycle (BLC) Framework is an open-source platform that provides tools to visualize, analyze, and share battery data through the technology development cycle, including data from material characterization, cell testing, manufacturing, and field testing. The BLC framework provides users with a unified view of their data that they can use to optimize materials and cell configurations, validate cell performance under application conditions, and mitigate manufacturing variations and field failures. BLC has four components: data importers, one or more databases, a front-end for querying the data and creating visualizations, and an application programming interface to process the data. BLC supports multiple users with different access permissions. Instead of building the system from the ground up, we developed BLC around Redash, a robust open-source extract-transform-load engine. BLC has been deployed for two applications: (i) tracking the development of a single battery technology from the lab to a manufacturing line and systems installed in the field, and (ii) comparing studies of multiple cells of the same battery chemistry and configuration. The latter implementation is publicly available at www.BatteryArchive.org. | ||
|
||
The code and documentation in this repository can be used to build and operate a site like batteryarchive.org. | ||
|
||
The detailed installation steps are included in the [blc_Installation_steps.pdf](blc_Installation_steps.pdf) file in the repository. | ||
|
||
To learn more about the design of the software, read our paper available online at https://ecsarxiv.org/h7c24/ | ||
|
||
For more information, contact us at [email protected]. | ||
|
||
# | ||
Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software. | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,132 @@ | ||
-- Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software. | ||
CREATE USER battery_datasource; | ||
CREATE DATABASE public; | ||
GRANT ALL PRIVILEGES ON DATABASE public TO battery_datasource; | ||
-- Table: public.cell_metadata | ||
|
||
-- DROP TABLE public.cell_metadata; | ||
|
||
CREATE TABLE public.cell_metadata | ||
( | ||
cathode character varying(50) COLLATE pg_catalog."default", | ||
anode character varying(50) COLLATE pg_catalog."default", | ||
source character varying(50) COLLATE pg_catalog."default", | ||
ah numeric, | ||
form_factor character varying(50) COLLATE pg_catalog."default", | ||
cell_id character varying(100) COLLATE pg_catalog."default" | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE public.cell_metadata | ||
OWNER to postgres; | ||
-- Index: idx_cell_metadata_cell_id | ||
|
||
-- DROP INDEX public.idx_cell_metadata_cell_id; | ||
|
||
CREATE INDEX idx_cell_metadata_cell_id | ||
ON public.cell_metadata USING btree | ||
(cell_id COLLATE pg_catalog."default" ASC NULLS LAST) | ||
TABLESPACE pg_default; | ||
|
||
|
||
-- Table: public.test_metadata | ||
|
||
-- DROP TABLE public.test_metadata; | ||
|
||
CREATE TABLE public.test_metadata | ||
( | ||
temp numeric, | ||
soc_max numeric, | ||
soc_min numeric, | ||
v_max numeric, | ||
v_min numeric, | ||
crate_c numeric, | ||
crate_d numeric, | ||
cell_id character varying(100) COLLATE pg_catalog."default" | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE public.test_metadata | ||
OWNER to postgres; | ||
-- Index: idx_test_metadata_cell_id | ||
|
||
-- DROP INDEX public.idx_test_metadata_cell_id; | ||
|
||
CREATE INDEX idx_test_metadata_cell_id | ||
ON public.test_metadata USING btree | ||
(cell_id COLLATE pg_catalog."default" ASC NULLS LAST) | ||
TABLESPACE pg_default; | ||
|
||
|
||
-- Table: public.cycle_data | ||
|
||
-- DROP TABLE public.cycle_data; | ||
|
||
CREATE TABLE public.cycle_data | ||
( | ||
v_max numeric, | ||
v_min numeric, | ||
ah_c numeric, | ||
ah_d numeric, | ||
e_c numeric, | ||
e_d numeric, | ||
i_max numeric, | ||
i_min numeric, | ||
v_c_mean numeric, | ||
v_d_mean numeric, | ||
e_eff numeric, | ||
ah_eff numeric, | ||
cycle_index numeric, | ||
test_time numeric, | ||
cell_id character varying(100) COLLATE pg_catalog."default" | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE public.cycle_data | ||
OWNER to postgres; | ||
-- Index: idx_cycle_data_cell_id | ||
|
||
-- DROP INDEX public.idx_cycle_data_cell_id; | ||
|
||
CREATE INDEX idx_cycle_data_cell_id | ||
ON public.cycle_data USING btree | ||
(cell_id COLLATE pg_catalog."default" ASC NULLS LAST) | ||
TABLESPACE pg_default; | ||
|
||
|
||
-- Table: public.timeseries_data | ||
|
||
-- DROP TABLE public.timeseries_data; | ||
|
||
CREATE TABLE public.timeseries_data | ||
( | ||
i numeric, | ||
v numeric, | ||
ah_c numeric, | ||
ah_d numeric, | ||
e_c numeric, | ||
e_d numeric, | ||
temp_1 numeric, | ||
temp_2 numeric, | ||
cycle_time numeric, | ||
date_time timestamp without time zone, | ||
cycle_index numeric, | ||
test_time numeric, | ||
cell_id character varying(100) COLLATE pg_catalog."default" | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE public.timeseries_data | ||
OWNER to postgres; | ||
-- Index: idx_timeseries_data_cell_id | ||
|
||
-- DROP INDEX public.idx_timeseries_data_cell_id; | ||
|
||
CREATE INDEX idx_timeseries_data_cell_id | ||
ON public.timeseries_data USING btree | ||
(cell_id COLLATE pg_catalog."default" ASC NULLS LAST) | ||
TABLESPACE pg_default; |
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 @@ | ||
listen_addresses = '*' |
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,83 @@ | ||
## Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software. | ||
version: "2" | ||
x-redash-service: &redash-service | ||
image: redash/redash:8.0.0.b32245 | ||
depends_on: | ||
- postgres | ||
- redis | ||
env_file: ./env | ||
restart: always | ||
links: | ||
- "ds-postgres:ds-postgres" | ||
services: | ||
server: | ||
<<: *redash-service | ||
command: server | ||
ports: | ||
- "5000:5000" | ||
environment: | ||
REDASH_WEB_WORKERS: 4 | ||
scheduler: | ||
<<: *redash-service | ||
command: scheduler | ||
environment: | ||
QUEUES: "celery" | ||
WORKERS_COUNT: 1 | ||
scheduled_worker: | ||
<<: *redash-service | ||
command: worker | ||
environment: | ||
QUEUES: "scheduled_queries,schemas" | ||
WORKERS_COUNT: 1 | ||
adhoc_worker: | ||
<<: *redash-service | ||
command: worker | ||
environment: | ||
QUEUES: "queries" | ||
WORKERS_COUNT: 2 | ||
|
||
# Supporting containers | ||
redis: | ||
image: redis:5.0-alpine | ||
restart: always | ||
postgres: | ||
image: postgres:9.6-alpine | ||
env_file: ./env | ||
volumes: | ||
- ./postgres-data:/var/lib/postgresql/data | ||
restart: always | ||
nginx: | ||
image: redash/nginx:latest | ||
ports: | ||
- "80:80" | ||
depends_on: | ||
- server | ||
links: | ||
- server:redash | ||
restart: always | ||
|
||
## Datastorage for battery postgres instance | ||
## Avoiding an alpine image for a data source | ||
ds-postgres: | ||
image: postgres:12 | ||
ports: | ||
- "5432:5432" | ||
env_file: ./env | ||
volumes: | ||
- "./datasources/postgres/postgres.conf:/usr/local/etc/postgres/postgres.conf" | ||
- "./datasources/postgres/data:/var/lib/postgresql/data" | ||
- "./datasources/postgres/cell_data/init.sql:/docker-entrypoint-initdb.d/init.sql" | ||
|
||
command: "postgres -c config_file=/usr/local/etc/postgres/postgres.conf" | ||
restart: always | ||
|
||
## Allow us to peak into databases. | ||
pgadmin: | ||
image: dpage/pgadmin4 | ||
ports: | ||
- "26543:80" | ||
env_file: ./env | ||
depends_on: | ||
- postgres | ||
links: | ||
- "ds-postgres:ds-postgres" |
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,9 @@ | ||
# This configuration file is for the python scripts in the battery-lfc framework. | ||
# For a production example please refer to the https://github.com/battery-lcf repository on GitHub. | ||
version: "0.1" | ||
|
||
environment: | ||
DATABASE_CONNECTION: "postgresql://postgres:HLgCazkIx7Y1JYldPmZg27PhNiUDnaAP@localhost:5432/postgres" | ||
STYLE: 'unix' | ||
PLOT: False | ||
SAVE: True |
Oops, something went wrong.