Re: Venturi3d example
1. In general different fluids can be characterized by their density and their kinematic viscosity. While assuming a isothermal fluid to be incompressible, both quantities remain constant throughout the simulation and therefore are used as input parameters for the ‘UnitConverter’ set up.
In the particular case of ‘cylinder2d’ the density (‘physDensity’) is set to 1.0 kg m-3 which indeed is supposed to resemble an air-like fluid. The kinematic viscosity however is not fixed but scales with the cylinder radius and the Reynolds number (Re). This way the Reynolds number can be used as an input parameter in the beginning (‘simulation setup’), which allows for the investigation of different flow regimes. Nevertheless if desired any physical quantity may be set as a fixed input parameter for the ‘UnitConverter’ as well.
2. In the example ‘cylinder2d’ a velocity boundary is applied at the inlet and a pressure boundary at the outlet (‘addVelocityBoundary’ and ‘addPressureBoundary’ in ‘prepareLattice’). In order to specify a pressure difference a pressure boundary has to be applied at the inlet as well by replacing the corresponding velocity instruction in ‘prepareLattice’ by
sBoundaryCondition.addPressureBoundary( superGeometry, 3, omega );
sLattice.defineRho( superGeometry, 3, rho);
In order to prevent shocks, a smooth start-up can be added by gradually changing the initialized pressure on either side to the desired (here 0.1 Pa) one. This can be done in ‘setBoundaryValues’ by defining a functor which has the information of the density corresponding to the pressure in lattice units by