@@ -27,9 +27,12 @@ import { Button } from "@heroui/button";
2727
2828import { title } from "@/components/primitives" ;
2929import DefaultLayout from "@/layouts/default" ;
30- import { FlowData , GasInlet } from "@/components/GasInlet" ;
30+ import { GasInlet } from "@/components/GasInlet" ;
3131import { CalibrationInlet } from "@/components/CalibrationInlet" ;
3232import { SonicNozzleTable } from "@/components/SonicNozzleTable" ;
33+ import { FlowData } from "@/utilities" ;
34+ import { Table , TableBody , TableCell , TableColumn , TableHeader , TableRow } from "@heroui/table" ;
35+ import { ScientificNotation } from "@sctg/scientific-notation" ;
3336
3437export default function CalibrationGasPage ( ) {
3538 const [ temperature , setTemperature ] = useState < number > ( 293.15 ) ;
@@ -173,6 +176,64 @@ export default function CalibrationGasPage() {
173176 />
174177 ) }
175178 </ div >
179+ < Table removeWrapper aria-label = "Flow Results" className = "mt-4" >
180+ < TableHeader >
181+ < TableColumn > Parameter</ TableColumn >
182+ < TableColumn > Value</ TableColumn >
183+ < TableColumn > Unit</ TableColumn >
184+ </ TableHeader >
185+ < TableBody >
186+ < TableRow key = "flow1" >
187+ < TableCell > Flow 1 Mass Flow</ TableCell >
188+ < TableCell >
189+ < span
190+ dangerouslySetInnerHTML = { {
191+ __html : ScientificNotation . toScientificNotationHTML (
192+ inlet1FlowData . massFlow ,
193+ 5 ,
194+ ) ,
195+ } }
196+ />
197+ </ TableCell >
198+ < TableCell > kg/s</ TableCell >
199+ </ TableRow >
200+ < TableRow key = "flow2" >
201+ < TableCell > Flow 2 Mass Flow</ TableCell >
202+ < TableCell >
203+ < span
204+ dangerouslySetInnerHTML = { {
205+ __html : ScientificNotation . toScientificNotationHTML (
206+ inlet2FlowData . massFlow ,
207+ 5 ,
208+ ) ,
209+ } }
210+ />
211+ </ TableCell >
212+ < TableCell > kg/s</ TableCell >
213+ </ TableRow >
214+ < TableRow key = "concentration" >
215+ < TableCell > Concentration of Gas 2 in total flow</ TableCell >
216+ < TableCell >
217+ { (
218+ ( inlet2FlowData . massFlow /
219+ ( inlet1FlowData . massFlow + inlet2FlowData . massFlow ) ) *
220+ 100
221+ ) . toPrecision ( 5 ) }
222+ </ TableCell >
223+ < TableCell > %</ TableCell >
224+ </ TableRow >
225+ < TableRow key = "criticalPressure" >
226+ < TableCell > Flow Critical Pressure</ TableCell >
227+ < TableCell >
228+ { Math . min (
229+ inlet1FlowData . p_crit ,
230+ inlet2FlowData . p_crit ,
231+ ) . toPrecision ( 5 ) }
232+ </ TableCell >
233+ < TableCell > kPa</ TableCell >
234+ </ TableRow >
235+ </ TableBody >
236+ </ Table >
176237 </ section >
177238 </ DefaultLayout >
178239 ) ;
0 commit comments