File size: 488 Bytes
78fefe8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from fastapi import APIRouter
from ..models.model_a import MassLoadingInput
from ..logic.calc_a import calculate_capacity

router = APIRouter()

@router.post("/calculate/capacity")
def calculate(input: MassLoadingInput):
    return {"results": calculate_capacity(
        cathode_name=input.cathode_name,
        L_anode   = input.L_anode,
        L_cathode = input.L_cathode,
        M_total   = input.M_total,
        t_total   = input.t_total,
        C_rate    = input.C_rate
    )}