Add flowrate forcing to incompressible solver
This MR adds the ability to drive a periodic flow by specifying a constant flow rate. To impose the flow rate, we solve a Stokes problem at setup for a single timestep, store this field, and use it to correct the flow to give the desired flow rate. There are two modes of operation:
- For 2D, 3D and 3DH1D, a boundary condition containing
USERDEFINEDTYPE="Flowrate"will be used to specify the surface through which to calculate the flux. This allows us to drive e.g. channel flows.
- For 3DH1D, if no boundary condition is specified, it is assumed that the flow will be in the homogeneous direction (for e.g. a pipe flow)
- In addition, the
Flowrateparameter must be set to specify the reference flow rate desired, and a
FlowrateForcefunction must be specified which is used in the Stokes solver to calculate the direction the flow is being driven.
- If the
IO_FlowrateStepsparameter is set, a file (
session.prs) will be written with the correction used to drive the flow at each step.