def endpoint(nCO2:float=22.7, nH2O:float=30000, nCaCO3:float=4000, nKOH:float=8000, frac:serve.slider(0.1, 1)=0.75,
start:serve.slider(0.01, 0.99)=0.0714, t:int=2000, scale:float=1) -> serve.html():
"""Simulates the KOH-based CO2 sequestration process.
General flow diagram:<br>
<img src="flow1.png" style="width: 100%"><br>
Specific streams diagram is available on page 3 of the result
:param nCO2: Moles of CO2 injected into the system every second
:param nH2O: Moles of initial H2O in the system
:param nCaCO3: Moles of initial CaCO3 in the system
:param nKOH: Moles of initial KOH in the system
:param frac: Fraction of maximum extent will be reacted
:param start: Excludes data points before this time in all graphs and reports
:param t: Total number of simulation steps
:param scale: Scales every molar amount by this amount"""
setup3(0, nH2O*scale, nCaCO3*scale, nKOH*scale)
for i in range(t): p.sim(frac, 1); p.s101.addMol("CO2", nCO2*scale).addMol("N2", nCO2/0.0004*scale)
return p.plot(f=~head(start))._repr_html_()