- Go to the anaconda web-site and download distribution.
- After installation update anaconda navigator, if needed.
- Open enviroments tab and create new enviroment.
- Name it, e.t. For_EOA. Change Python version, if necessary.
- Install VS Code from home panel or download it.
- Spreadsheet cantaining volumetric flow in/out in
$m^3/s$ , pressure in/out in$Pa$ and corresponding timesteps in seconds. - Spereadsheet containing the adjusted flow rate in
$ml/s$ corresponding to time in seconds. Calculation of the mean pressure gradient:$$\Delta P_{mean} = \dfrac{1}{T_{systole}} \int_{T_{systole}} (P_{vent} - P_{aortic}) dt,$$ where$P_{vent}$ and$P_{aortic}$ are the ventricular and aortic pressures, respectively.
The mean pressure difference is calculated by integrating the pressure difference over the duration of systole.
Python
realisation of the integral is basically Rimman's sum, since
df['d_P'] = (df.query('flow > 0')['p_vent'] - df.query('flow > 0')['p_aort']) * df.query('flow > 0 and time < 0.26')['timestep']
,
where difference in the parenthesis equivalent to df.query('flow > 0 and time < 0.26')['timestep']
.
-
d_P = df.query('d_P > 0')['d_P'].sum() / (df.query('flow > 0')['timestep'].sum())
, whered_P = df.query('d_P > 0')['d_P'].sum()
- mentioned sum anddf.query('flow > 0')['timestep'].sum()
-$T_{systole}$ .$T_{systole}$ is the duration of systole$$T_{systole} = t_2 - t_1,$$ where$t_1$ is the time at the start of the positive differential pressure period (time period between start of positive differential pressure and end of positive differential pressure)
Calculation of the effective orifice area: