Skip to content

parker-abrantes/FlowState

Repository files navigation

FlowState

FlowState is a no-backend scientific web application for exploring first-principles bladder emptying and uroflowmetry curves. It is designed as a biomedical engineering capstone-style simulator for education and research intuition, not for clinical diagnosis.

Model

The physics engine lives in src/lib/physics/uroflow.ts.

  • Bladder pressure decays as an elastic pressure vessel: P(t) = P0 * (V / V0)^1.15.
  • Outlet area is circular urethral area scaled by sphincter opening: Aeff = pi * D^2 / 4 * restriction.
  • Bernoulli velocity is estimated with v = sqrt(2 deltaP / rho).
  • Optional Darcy-Weisbach loss uses deltaP = 0.5 * rho * v^2 * (1 + f * L / D).
  • Flow rate follows continuity: Q = Aeff * v.
  • Bladder volume is integrated with explicit Euler steps: dV/dt = -Q.

Run

npm install
npm run dev

Then open http://localhost:3000.

Verification

npm run test
npm run lint
npm run build

Source Matrix

The app includes a source matrix connecting continuity, Bernoulli, Darcy-Weisbach loss, viscosity defaults, and uroflowmetry terms to educational references. FlowState intentionally labels these references as teaching context rather than validation evidence.

About

First-principles uroflowmetry simulator built with Next.js, TypeScript, Tailwind, and Recharts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors