mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added ACMI tutorial case
This commit is contained in:
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform (0 0 0);
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (1 0 0);
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type pressureInletOutletVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
// type fixedValue;
|
||||||
|
type movingWallVelocity;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -3 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 1.8e-3;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type epsilonWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 3.75e-3;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue $internalField;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type kqRWallFunction;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 2 -2 0 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
couple1
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
couple2
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
9
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
Executable file
9
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allclean
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
|
||||||
|
rm -rf 0
|
||||||
9
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
Executable file
9
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
./Allrun.pre
|
||||||
|
|
||||||
|
runApplication $(getApplication)
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
./Allrun.pre
|
||||||
|
|
||||||
|
runApplication decomposePar
|
||||||
|
|
||||||
|
runParallel $(getApplication) 4
|
||||||
|
|
||||||
|
runApplication reconstructPar
|
||||||
17
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
Executable file
17
tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial run functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
runApplication topoSet -constant
|
||||||
|
|
||||||
|
# split the mesh to generate the ACMI coupled patches
|
||||||
|
runApplication createBaffles -overwrite
|
||||||
|
|
||||||
|
# remove zero-sized patches
|
||||||
|
runApplication createPatch -overwrite
|
||||||
|
|
||||||
|
cp -rf 0.org 0
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
oscillatingInletACMI2D
|
||||||
|
|
||||||
|
This tutorial case gives an example of the Arbitrarily Coupled Mesh Interface
|
||||||
|
(ACMI) usage. The mesh is composed of two mesh regions: an inlet channel which
|
||||||
|
oscillates in the +/- Y-direction, and a fixed mesh region.
|
||||||
|
|
||||||
|
Each ACMI patch requires the specification of a 'non-overlapping' patch. In
|
||||||
|
this example, the non-overlapping patches are described as walls, e.g. taken
|
||||||
|
from the constant/polyMesh/boundary file:
|
||||||
|
|
||||||
|
1. First ACMI poatch pair applied to the inlet channel outlet
|
||||||
|
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 43680;
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 43720;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
transform noOrdering;
|
||||||
|
neighbourPatch ACMI2_couple;
|
||||||
|
nonOverlapPatch ACMI1_blockage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
1. Second ACMI poatch pair applied to the fixed mesh region inlet
|
||||||
|
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 96;
|
||||||
|
startFace 43760;
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
nFaces 96;
|
||||||
|
startFace 43856;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
transform noOrdering;
|
||||||
|
neighbourPatch ACMI1_couple;
|
||||||
|
nonOverlapPatch ACMI2_blockage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
In the above, the ACMI1_blockage and ACMI1_couple patches occupy the same space,
|
||||||
|
with duplicate points, edges and faces. The ACMI2_blockage and ACMI2_couple
|
||||||
|
patches are created similarly.
|
||||||
|
|
||||||
|
The duplicate patches are initially created using the createBaffles utility.
|
||||||
|
Firstly, the original (non-duplicated) patch faces are collected into zones
|
||||||
|
using the topoSet utility.
|
||||||
|
|
||||||
|
Each ACMI/no-overlapping patch pair is specified using a master-slave approach.
|
||||||
|
However, since we are generating boundary patches (which are always master
|
||||||
|
patches) the slave patches are simply defined using 'dummy' entries, e.g.:
|
||||||
|
|
||||||
|
type faceZone;
|
||||||
|
zoneName couple1Faces;
|
||||||
|
|
||||||
|
patches
|
||||||
|
{
|
||||||
|
// create blockage patch
|
||||||
|
master
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI1_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
slave1 // dummy entries only
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI1_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create cyclic ACMI patch
|
||||||
|
master2
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI1_couple;
|
||||||
|
type cyclicACMI;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
neighbourPatch ACMI2_couple;
|
||||||
|
nonOverlapPatch ACMI1_blockage;
|
||||||
|
transform noOrdering;
|
||||||
|
}
|
||||||
|
slave2 // dummy entries only
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI1_couple;
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Boundary conditions must then be applied to all geometric patches in the usual,
|
||||||
|
manner, and the cases can be executed in parallel (as shown when running the
|
||||||
|
Allrun-parallel script) without any speacial treatment, i.e. the case set-up is
|
||||||
|
the same as when operating in serial mode.
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel kEpsilon;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object dynamicMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dynamicFvMesh solidBodyMotionFvMesh;
|
||||||
|
|
||||||
|
motionSolverLibs ( "libfvMotionSolvers.so" );
|
||||||
|
|
||||||
|
solidBodyMotionFvMeshCoeffs
|
||||||
|
{
|
||||||
|
cellZone inletChannel;
|
||||||
|
|
||||||
|
solidBodyMotionFunction oscillatingLinearMotion;
|
||||||
|
|
||||||
|
oscillatingLinearMotionCoeffs
|
||||||
|
{
|
||||||
|
amplitude (0 0.5 0);
|
||||||
|
omega 3.14; // rad/s (.5 rps)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0 0.3 0)
|
||||||
|
(1 0.3 0)
|
||||||
|
(1 0.7 0)
|
||||||
|
(0 0.7 0)
|
||||||
|
(0 0.3 0.1)
|
||||||
|
(1 0.3 0.1)
|
||||||
|
(1 0.7 0.1)
|
||||||
|
(0 0.7 0.1)
|
||||||
|
|
||||||
|
(1 0 0)
|
||||||
|
(3 0 0)
|
||||||
|
(3 1 0)
|
||||||
|
(1 1 0)
|
||||||
|
(1 0 0.1)
|
||||||
|
(3 0 0.1)
|
||||||
|
(3 1 0.1)
|
||||||
|
(1 1 0.1)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
// hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
|
||||||
|
// hex (8 9 10 11 12 13 14 15) (40 48 1) simpleGrading (1 1 1)
|
||||||
|
hex (0 1 2 3 4 5 6 7) (80 40 1) simpleGrading (1 1 1)
|
||||||
|
hex (8 9 10 11 12 13 14 15) (80 96 1) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(10 14 13 9)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(3 7 6 2)
|
||||||
|
(1 5 4 0)
|
||||||
|
(11 15 14 10)
|
||||||
|
(9 13 12 8)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
couple1
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 5 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
couple2
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(8 12 15 11)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
mergePatchPairs
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev.ACMI |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
8
|
||||||
|
(
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 21464;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 96;
|
||||||
|
startFace 21504;
|
||||||
|
}
|
||||||
|
walls
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 320;
|
||||||
|
startFace 21600;
|
||||||
|
}
|
||||||
|
defaultFaces
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
inGroups 1(empty);
|
||||||
|
nFaces 21760;
|
||||||
|
startFace 21920;
|
||||||
|
}
|
||||||
|
ACMI1_blockage
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 43680;
|
||||||
|
}
|
||||||
|
ACMI1_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
inGroups 1(cyclicACMI);
|
||||||
|
nFaces 40;
|
||||||
|
startFace 43720;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
transform noOrdering;
|
||||||
|
neighbourPatch ACMI2_couple;
|
||||||
|
nonOverlapPatch ACMI1_blockage;
|
||||||
|
}
|
||||||
|
ACMI2_blockage
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 96;
|
||||||
|
startFace 43760;
|
||||||
|
}
|
||||||
|
ACMI2_couple
|
||||||
|
{
|
||||||
|
type cyclicACMI;
|
||||||
|
inGroups 1(cyclicACMI);
|
||||||
|
nFaces 96;
|
||||||
|
startFace 43856;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
transform noOrdering;
|
||||||
|
neighbourPatch ACMI1_couple;
|
||||||
|
nonOverlapPatch ACMI2_blockage;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object transportProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
transportModel Newtonian;
|
||||||
|
|
||||||
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-6;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType RASModel;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application pimpleDyMFoam;
|
||||||
|
|
||||||
|
startFrom latestTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 5;
|
||||||
|
|
||||||
|
deltaT 0.005;
|
||||||
|
|
||||||
|
writeControl adjustableRunTime;
|
||||||
|
|
||||||
|
writeInterval 0.05;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
adjustTimeStep true;
|
||||||
|
|
||||||
|
maxCo 0.5;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,107 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object createBafflesDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Whether to convert internal faces only (so leave boundary faces intact).
|
||||||
|
// This is only relevant if your face selection type can pick up boundary
|
||||||
|
// faces.
|
||||||
|
internalFacesOnly false;
|
||||||
|
|
||||||
|
|
||||||
|
// Baffles to create.
|
||||||
|
baffles
|
||||||
|
{
|
||||||
|
ACMI1
|
||||||
|
{
|
||||||
|
//- Use predefined faceZone to select faces and orientation.
|
||||||
|
type faceZone;
|
||||||
|
zoneName couple1Faces;
|
||||||
|
|
||||||
|
patches
|
||||||
|
{
|
||||||
|
master
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI1_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
slave // not used since we're manipulating a boundary patch
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI1_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
|
||||||
|
master2
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI1_couple;
|
||||||
|
type cyclicACMI;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
neighbourPatch ACMI2_couple;
|
||||||
|
nonOverlapPatch ACMI1_blockage;
|
||||||
|
transform noOrdering;
|
||||||
|
}
|
||||||
|
slave2 // not used since we're manipulating a boundary patch
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI1_couple;
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ACMI2
|
||||||
|
{
|
||||||
|
//- Use predefined faceZone to select faces and orientation.
|
||||||
|
type faceZone;
|
||||||
|
zoneName couple2Faces;
|
||||||
|
|
||||||
|
patches
|
||||||
|
{
|
||||||
|
master
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI2_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
slave // not used since we're manipulating a boundary patch
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI2_blockage;
|
||||||
|
type wall;
|
||||||
|
}
|
||||||
|
|
||||||
|
master2
|
||||||
|
{
|
||||||
|
//- Master side patch
|
||||||
|
name ACMI2_couple;
|
||||||
|
type cyclicACMI;
|
||||||
|
matchTolerance 0.0001;
|
||||||
|
neighbourPatch ACMI1_couple;
|
||||||
|
nonOverlapPatch ACMI2_blockage;
|
||||||
|
transform noOrdering;
|
||||||
|
}
|
||||||
|
slave2 // not used since we're manipulating a boundary patch
|
||||||
|
{
|
||||||
|
//- Slave side patch
|
||||||
|
name ACMI2_couple;
|
||||||
|
type patch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object createPatchDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// This application/dictionary controls:
|
||||||
|
// - optional: create new patches from boundary faces (either given as
|
||||||
|
// a set of patches or as a faceSet)
|
||||||
|
// - always: order faces on coupled patches such that they are opposite. This
|
||||||
|
// is done for all coupled faces, not just for any patches created.
|
||||||
|
// - optional: synchronise points on coupled patches.
|
||||||
|
|
||||||
|
// 1. Create cyclic:
|
||||||
|
// - specify where the faces should come from
|
||||||
|
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||||
|
// and centre to make matching easier
|
||||||
|
// - always create both halves in one invocation with correct 'neighbourPatch'
|
||||||
|
// setting.
|
||||||
|
// - optionally pointSync true to guarantee points to line up.
|
||||||
|
|
||||||
|
// 2. Correct incorrect cyclic:
|
||||||
|
// This will usually fail upon loading:
|
||||||
|
// "face 0 area does not match neighbour 2 by 0.0100005%"
|
||||||
|
// " -- possible face ordering problem."
|
||||||
|
// - in polyMesh/boundary file:
|
||||||
|
// - loosen matchTolerance of all cyclics to get case to load
|
||||||
|
// - or change patch type from 'cyclic' to 'patch'
|
||||||
|
// and regenerate cyclic as above
|
||||||
|
|
||||||
|
|
||||||
|
// Do a synchronisation of coupled points after creation of any patches.
|
||||||
|
// Note: this does not work with points that are on multiple coupled patches
|
||||||
|
// with transformations (i.e. cyclics).
|
||||||
|
pointSync false;
|
||||||
|
|
||||||
|
// Patches to create.
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
// none
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 4;
|
||||||
|
|
||||||
|
method scotch;
|
||||||
|
|
||||||
|
hierarchicalCoeffs
|
||||||
|
{
|
||||||
|
n (1 4 1);
|
||||||
|
delta 0.001;
|
||||||
|
order xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
grad(p) Gauss linear;
|
||||||
|
grad(U) cellLimited Gauss linear 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
// div(phi,U) Gauss upwind;
|
||||||
|
div(phi,U) Gauss linearUpwind grad(U);
|
||||||
|
div(phi,k) Gauss upwind;
|
||||||
|
div(phi,epsilon) Gauss upwind;
|
||||||
|
div((nuEff*dev(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear limited corrected 0.33;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default limited corrected 0.33;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
pcorr ;
|
||||||
|
p ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,80 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
pcorr
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-2;
|
||||||
|
relTol 0;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
cacheAgglomeration no;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
maxIter 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
p
|
||||||
|
{
|
||||||
|
$pcorr;
|
||||||
|
tolerance 1e-5;
|
||||||
|
relTol 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
pFinal
|
||||||
|
{
|
||||||
|
$p;
|
||||||
|
tolerance 1e-6;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|k|epsilon)"
|
||||||
|
{
|
||||||
|
solver smoothSolver;
|
||||||
|
smoother symGaussSeidel;
|
||||||
|
tolerance 1e-6;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|k|epsilon)Final"
|
||||||
|
{
|
||||||
|
$U;
|
||||||
|
tolerance 1e-6;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PIMPLE
|
||||||
|
{
|
||||||
|
correctPhi no;
|
||||||
|
nOuterCorrectors 1;
|
||||||
|
nCorrectors 2;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
// "(U|k|epsilon).*" 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
cache
|
||||||
|
{
|
||||||
|
grad(U);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object topoSetDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
actions
|
||||||
|
(
|
||||||
|
// Get both sides of ami
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Create faceZone for patch couple1
|
||||||
|
{
|
||||||
|
name couple1Faces;
|
||||||
|
type faceSet;
|
||||||
|
action new;
|
||||||
|
source patchToFace;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
name couple1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name couple1Faces;
|
||||||
|
type faceZoneSet;
|
||||||
|
action new;
|
||||||
|
source setToFaceZone;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
faceSet couple1Faces;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create faceZone for patch couple2
|
||||||
|
{
|
||||||
|
name couple2Faces;
|
||||||
|
type faceSet;
|
||||||
|
action new;
|
||||||
|
source patchToFace;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
name couple2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name couple2Faces;
|
||||||
|
type faceZoneSet;
|
||||||
|
action new;
|
||||||
|
source setToFaceZone;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
faceSet couple2Faces;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create cellZone for moving cells in inlet channel
|
||||||
|
{
|
||||||
|
name inletChannel;
|
||||||
|
type cellSet;
|
||||||
|
action new;
|
||||||
|
source boxToCell;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
box (-100 -100 -100) (1.0001 100 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name inletChannel;
|
||||||
|
type cellZoneSet;
|
||||||
|
action new;
|
||||||
|
source setToCellZone;
|
||||||
|
sourceInfo
|
||||||
|
{
|
||||||
|
set inletChannel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user