|
|
from pydantic import BaseModel, Field |
|
|
from typing import List |
|
|
|
|
|
class CVInput(BaseModel): |
|
|
cathode_name: str |
|
|
V_start: float = Field(..., description="Starting voltage (V)") |
|
|
V_switch: float = Field(..., description="Switch voltage (V)") |
|
|
scan_rate: float = Field(..., description="Sweep rate (V/s)") |
|
|
dt: float = Field(..., description="Time step (s)") |
|
|
sigma: float = Field(..., description="Gaussian peak width (V)") |
|
|
E0: float = Field(..., description="Redox mid‑potential (V)") |
|
|
Ip: float = Field(..., description="Peak current magnitude (A)") |
|
|
|
|
|
|
|
|
frequencies: List[float] = Field(..., description="Frequencies (Hz)") |
|
|
Rs: float = Field(..., description="Solution resistance (Ohm)") |
|
|
Rct: float = Field(..., description="Charge‐transfer resistance (Ohm)") |
|
|
Cdl: float = Field(..., description="Double‐layer capacitance (F)") |
|
|
sigma_w: float = Field(..., description="Warburg coefficient (Ω·s^(-1/2))") |
|
|
|
|
|
|
|
|
V_qv: List[float] = Field(..., description="Voltage array for Q–V curve (monotonic)") |
|
|
Q_qv: List[float] = Field(..., description="Capacity array aligned with V_qv") |
|
|
window: int = Field(21, description="Savitzky–Golay window length (odd)") |
|
|
poly: int = Field(3, description="Savitzky–Golay polynomial order") |
|
|
|
|
|
|
|
|
|