Let's see how fluid react after we refine the mesh and run it using parallel method using following steps:
1. cd $FOAM_RUN/tutorials/multiphase/interFoam/laminar
mkdir damBreakFine
cp -r damBreak/0 damBreakFine
cp -r damBreak/system damBreakFine
cp -r damBreak/constant damBreakFine
cd damBreakFine
cd system Go to "blockMeshDict" to change mesh density.
cd ..
cp -r 0/alpha.water.org 0/alpha.water Then remember to remove alpha.water.org.
blockMesh
setFields To assign phase fraction 0 to air and 1 to water same as before.
2. Go to decomposeParDict and set the how you are going to decompose your calculating fields.
numberOfSubdomains 8;
method simple;
simpleCoeffs
{
n (2 4 1); //2*4=8 which is the number of subdomains, x direction is divided into 2 parts
and y direction is divided into 4 parts.
delta 0.001;
}
3. Decompose the mesh based on predefined method in decompoParDict.
decomposePar.exe
In each processor, you have individual 0 and constant files.
4. Run the case in parallel: (Note that the OpenFoam for Windows is installed, the below command
instead of that in UserGuide like mpirun -np 4 interFoam -parallel > log & is used.)
mpiexec -n 8 interFoam -parallel
5. Run command reconstructPar.exe
1. cd $FOAM_RUN/tutorials/multiphase/interFoam/laminar
mkdir damBreakFine
cp -r damBreak/0 damBreakFine
cp -r damBreak/system damBreakFine
cp -r damBreak/constant damBreakFine
cd damBreakFine
cd system Go to "blockMeshDict" to change mesh density.
cd ..
cp -r 0/alpha.water.org 0/alpha.water Then remember to remove alpha.water.org.
blockMesh
setFields To assign phase fraction 0 to air and 1 to water same as before.
2. Go to decomposeParDict and set the how you are going to decompose your calculating fields.
numberOfSubdomains 8;
method simple;
simpleCoeffs
{
n (2 4 1); //2*4=8 which is the number of subdomains, x direction is divided into 2 parts
and y direction is divided into 4 parts.
delta 0.001;
}
3. Decompose the mesh based on predefined method in decompoParDict.
decomposePar.exe
In each processor, you have individual 0 and constant files.
4. Run the case in parallel: (Note that the OpenFoam for Windows is installed, the below command
instead of that in UserGuide like mpirun -np 4 interFoam -parallel > log & is used.)
mpiexec -n 8 interFoam -parallel
5. Run command reconstructPar.exe