We present below the simulation of a viscous flow in a channel including some moving obstacles. The computational domain is composed of a multi-patch construction defined in the file baseline.dat
(download file). A baseline grid of degree 3 is thus generated by using the app igGenMesh
as follows:
$IGLOO_HOME/build/bin/igGenMesh -case ns_multi_patch -mesh mesh.dat -n1 20 -degree 3 -gauss 4
This grid contains 20 patches, that can be visualized using:
glvis -m igloo.mesh0.000000 -k "ljRm"
This grid is first refined upstream and downstream the obstacles. This is achieved using the app igPreRefiner
and the file box.dat
that defines the refinement boxes (download file):
$IGLOO_HOME/build/bin/igPreRefiner -mesh mesh.dat -box ./box.dat
Then, one refines globally the grid six times in alternate directions using:
$IGLOO_HOME/build/bin/igPreRefiner -mesh mesh_refined.dat -global 6
As results, the computational grid looks as follows:
glvis -m igloo.mesh5.000000 -k "ljRm"
Before running the solver, the degree of the elements is elevated using the app igPreElevator
as follows:
$IGLOO_HOME/build/bin/igPreElevator -mesh mesh_refined.dat -degree 4 -gauss 5
Then, the grid is cut into 32 partitions using the app igPartit
:
$IGLOO_HOME/build/bin/igPartit -mesh mesh_elevated.dat -npart1 32
Finally, the initial solution is generated using the app igGenSol
. It corresponds to a Mach number of value 0.3
$IGLOO_HOME/build/bin/igGenSol -case ns_multi_patch -mesh mesh_elevated.dat -initial initial.dat -mach 0.3
A first simulation is carried out with a fixed geometry, at Reynolds number 200:
mpirun -np 32 $IGLOO_HOME/build/bin/igloo -solver navier-stokes -mesh mesh_distributed.dat -initial initial.dat -time 100. -cfl 0.7 -mach 0.3 -reynolds 200. -save_period 0.2
One can visualize the solution (first momentum component) at final time, which is quasi-steady:
glvis -np 32 -m igloo.mesh0 -g igloo_1_500.sol -k "ljRm"
If the same configuration is simulated at Reynolds 500, the flow becomes completely unsteady and asymmetric, as shown below:
Secondly, a simulation with moving obstacles is achieved by adding a parameter invoking the used-defined mesh movement:
mpirun -np 32 $IGLOO_HOME/build/bin/igloo -solver navier-stokes -mesh mesh_distributed.dat -initial initial.dat -time 100. -cfl 0.7 -mach 0.3 -reynolds 500. -save_period 0.2 -ale oscillating_channel
The figures below show two snapshots of the solution, corresponding to opposite phases of the movement. As can be seen, the movement of the obstacles forces the flow to remain symmetric.