Show Instructions
In this code example, you'll calculate the flow rate Q based on Darcy's law:
Q = - (k * A / μ) * (dP/dL)
Follow these steps:
- Define the parameters:
- k: Permeability (m²)
- A: Cross-sectional area (m²)
- μ: Dynamic viscosity (Pa·s)
-
dP/dL: Pressure gradient (Pa/m)
-
Compute Q using the formula.
- Modify the parameters to see how the flow rate changes with permeability, area, viscosity, and pressure gradient.