diff --git a/backend/src/acidwatch_api/models/example_adapter.py b/backend/src/acidwatch_api/models/example_adapter.py index f1f27e4e..0a4e5f2b 100644 --- a/backend/src/acidwatch_api/models/example_adapter.py +++ b/backend/src/acidwatch_api/models/example_adapter.py @@ -43,8 +43,8 @@ class ExampleAdapter(BaseAdapter): # The exception is CO2, which must not be specified as it's the solvent. # # Note that all concentrations provided to the adapter through - # self.concentrations will be in the unit PPM. Likewise, all concentrations - # provided in the results will be treated as PPM by the frontend. Make sure + # self.concentrations will be in the unit mol PPM. Likewise, all concentrations + # provided in the results will be treated as mol PPM by the frontend. Make sure # to adhere to this unit in the adapter interface. valid_substances = ["H2O"] diff --git a/frontend/src/components/GridSimulation/CompareGridSimulations.tsx b/frontend/src/components/GridSimulation/CompareGridSimulations.tsx index cef48417..7b9731ba 100644 --- a/frontend/src/components/GridSimulation/CompareGridSimulations.tsx +++ b/frontend/src/components/GridSimulation/CompareGridSimulations.tsx @@ -66,8 +66,9 @@ const CompareSection: React.FC = ({ results, modelIndex, ph }); const axisSubstances = new Set(results.map((r) => r.axes[0]?.substance).filter(Boolean)); - const xAxisLabel = axisSubstances.size === 1 ? `${[...axisSubstances][0]} (ppm)` : "Varied concentration (ppm)"; - const unit = phaseKind === "aqueous" ? "wt%" : "ppm"; + const xAxisLabel = + axisSubstances.size === 1 ? `${[...axisSubstances][0]} (ppm·mol)` : "Varied concentration (ppm·mol)"; + const unit = phaseKind === "aqueous" ? "wt%" : "ppm·mol"; return ( <> diff --git a/frontend/src/components/GridSimulation/GridResults.tsx b/frontend/src/components/GridSimulation/GridResults.tsx index 7ec9fe65..fa9859a8 100644 --- a/frontend/src/components/GridSimulation/GridResults.tsx +++ b/frontend/src/components/GridSimulation/GridResults.tsx @@ -65,7 +65,7 @@ const GridPhaseChart: React.FC = ({ result, modelIndex, pha xValues={xValues} series={series} xAxisLabel={`${xAxisSubstance} (ppm)`} - yAxisLabel={`Output concentration (${phaseKind === "aqueous" ? "wt%" : "ppm"})`} + yAxisLabel={`Output concentration (${phaseKind === "aqueous" ? "wt%" : "ppm·mol"})`} aspectRatio={2} /> )} diff --git a/frontend/src/components/LabResultsPlot.tsx b/frontend/src/components/LabResultsPlot.tsx index bb7e32ab..11670d33 100644 --- a/frontend/src/components/LabResultsPlot.tsx +++ b/frontend/src/components/LabResultsPlot.tsx @@ -57,7 +57,7 @@ const LabResultsPlot: React.FC = ({ data: ds.data.filter((point) => plotComponents.length === 0 || plotComponents.includes(point.x)), }))} aspectRatio={4} - yLabel="Concentration (ppm)" + yLabel="Concentration (ppm·mol)" xLabel="Components" />
diff --git a/frontend/src/components/ParityPlots.tsx b/frontend/src/components/ParityPlots.tsx index ffd9ad62..1f59d239 100644 --- a/frontend/src/components/ParityPlots.tsx +++ b/frontend/src/components/ParityPlots.tsx @@ -66,8 +66,8 @@ const ParityPlots: React.FC = ({ availableComponents, experime {comp && ( )} diff --git a/frontend/src/components/Simulation/ModelInputs.tsx b/frontend/src/components/Simulation/ModelInputs.tsx index 501a6a5f..2b7c3610 100644 --- a/frontend/src/components/Simulation/ModelInputs.tsx +++ b/frontend/src/components/Simulation/ModelInputs.tsx @@ -170,7 +170,7 @@ function GridRangeInput({ candidateSubstances }: { candidateSubstances: string[] id="gridMin0" type="number" label="From" - unit="ppm" + unit="ppm·mol" step="any" min={0} max={PPM_MAX} @@ -183,7 +183,7 @@ function GridRangeInput({ candidateSubstances }: { candidateSubstances: string[] id="gridMax0" type="number" label="To" - unit="ppm" + unit="ppm·mol" step="any" min={0} max={PPM_MAX} @@ -199,7 +199,7 @@ function GridRangeInput({ candidateSubstances }: { candidateSubstances: string[] id="gridStep0" type="number" label="Step" - unit="ppm" + unit="ppm·mol" step="any" min={0.001} value={stepStr} @@ -309,7 +309,7 @@ const ModelInputs: React.FC<{ opacity: invalid || isGridded ? 0.6 : 1, }} step="any" - unit="ppm" + unit="ppm·mol" max={PPM_MAX} value={value} disabled={isGridded} diff --git a/frontend/src/components/Simulation/PhaseResultTable.tsx b/frontend/src/components/Simulation/PhaseResultTable.tsx index f13b0970..1bb54a09 100644 --- a/frontend/src/components/Simulation/PhaseResultTable.tsx +++ b/frontend/src/components/Simulation/PhaseResultTable.tsx @@ -10,7 +10,7 @@ interface PhaseResultTableProps { } function unitLabel(phase: Phase): string { - return phase.kind === "aqueous" ? "wt%" : "ppm"; + return phase.kind === "aqueous" ? "wt%" : "ppm·mol"; } function convertUnitAccordingToPhase(phase: Phase): Record { @@ -109,7 +109,7 @@ const PhaseResultTable: React.FC = ({ initialConcentratio )); if (group.showTotal) { - cells.push(Total [ppm]); + cells.push(Total [ppm·mol]); } return cells; })} diff --git a/frontend/src/components/Simulation/Results.tsx b/frontend/src/components/Simulation/Results.tsx index ba30d35b..6f6b7071 100644 --- a/frontend/src/components/Simulation/Results.tsx +++ b/frontend/src/components/Simulation/Results.tsx @@ -89,7 +89,7 @@ const ModelResultTabs: React.FC = ({ simulationResults, mo aspectRatio={2} graphData={extractPlotData(initialConcentrations, phasesWithConcentrations)} xLabel="Components" - yLabel="Concentration (ppm)" + yLabel="Concentration (ppm·mol)" /> diff --git a/frontend/src/pages/Compare.tsx b/frontend/src/pages/Compare.tsx index cb554941..822e1071 100644 --- a/frontend/src/pages/Compare.tsx +++ b/frontend/src/pages/Compare.tsx @@ -198,7 +198,7 @@ const CompareSimulations: React.FC<{ simulationIds: string[] }> = ({ simulationI Output Concentrations - + Concentration Values (≥ 0.01)