Re: Pressure Inlet
modifying cylinder2d you rather want:
bc.addPressureBoundary(superGeometry, 3, omega);
bc.addPressureBoundary(superGeometry, 4, omega);
This sets one Pressure at the inlet (material number 3) replacing the velocity boundary and keeps the already existing pressure boundary at the outlet (material number 4). You want both boundaries to have the same omega, as different omega would imply either a different discretisation (what is not the case) or a difference in the physical viscosity (what you probably do not want to simulate).
Now you want to set different pressures to the two pressure boundaries. This can be done in the setBoundaryValues function in cylinder2d. Just replace the “defineU” by a “defineRho” function with appropriate arguments.
You can construct an object for the pressure by
AnalyticalConst2D<T,T> rho(converter.getLatticeDensityFromPhysPressure( >>pressure in Pa<<);