incompressibleFluid: Completed the update of tutorial and template cases
to use the incompressibleFluid solver module rather than simpleFoam, pimpleFoam or pisoFoam.
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
simpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/simpleFoam
|
||||
@ -1,17 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
-lsampling
|
||||
@ -1,22 +0,0 @@
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ MRF.DDt(U)
|
||||
+ turbulence->divDevSigma(U)
|
||||
==
|
||||
fvModels.source(U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvConstraints.constrain(UEqn);
|
||||
|
||||
if (simple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
fvConstraints.constrain(U);
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
pressureReference pressureReference(p, simple.dict());
|
||||
|
||||
mesh.schemes().setFluxRequired(p.name());
|
||||
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createFvModels.H"
|
||||
#include "createFvConstraints.H"
|
||||
@ -1,54 +0,0 @@
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
MRF.makeRelative(phiHbyA);
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
tmp<volScalarField> rAtU(rAU);
|
||||
|
||||
if (simple.consistent())
|
||||
{
|
||||
rAtU = 1.0/(1.0/rAU - UEqn.H1());
|
||||
phiHbyA +=
|
||||
fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf();
|
||||
HbyA -= (rAU - rAtU())*fvc::grad(p);
|
||||
}
|
||||
|
||||
tUEqn.clear();
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, U, phiHbyA, rAtU(), MRF);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference
|
||||
(
|
||||
pressureReference.refCell(),
|
||||
pressureReference.refValue()
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA - pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
U = HbyA - rAtU()*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvConstraints.constrain(U);
|
||||
}
|
||||
@ -1,88 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
simpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow, using the SIMPLE
|
||||
algorithm.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop(runTime))
|
||||
{
|
||||
Info<< "Time = " << runTime.userTimeName() << nl << endl;
|
||||
|
||||
fvModels.correct();
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -58,7 +58,7 @@ which is case-insensitive on the first character.
|
||||
Otherwise the user can try a broader keyword match with "-keyword | -k" option.
|
||||
|
||||
Examples
|
||||
foamInfo simpleFoam
|
||||
foamInfo incompressibleFluid
|
||||
foamInfo interFoam
|
||||
foamInfo fixedValue
|
||||
foamInfo -k fixedValue
|
||||
|
||||
@ -67,6 +67,6 @@ nonConformalCouples
|
||||
// Note that in rare cases it may be appropriate to create multiple couplings
|
||||
// between the same two patches. That can be achieved with multiple entries
|
||||
// with the same patches specified. See the
|
||||
// incompressible/pimpleFoam/RAS/impeller tutorial for an example of this.
|
||||
// modules/incompressibleFluid/impeller tutorial for an example of this.
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -3240,31 +3240,6 @@ _shallowWaterFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _shallowWaterFoam_ shallowWaterFoam
|
||||
|
||||
_simpleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -roots -solver -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots|-solver)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _simpleFoam_ simpleFoam
|
||||
|
||||
_singleCellMesh_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5226,56 +5201,6 @@ _paraFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _paraFoam_ paraFoam
|
||||
|
||||
_pimpleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -roots -solver -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots|-solver)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _pimpleFoam_ pimpleFoam
|
||||
|
||||
_pisoFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -roots -solver -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots|-solver)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _pisoFoam_ pisoFoam
|
||||
|
||||
_postProcess_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
@ -5380,31 +5305,6 @@ _rhoSimpleFoam_ ()
|
||||
}
|
||||
complete -o filenames -o nospace -F _rhoSimpleFoam_ rhoSimpleFoam
|
||||
|
||||
_simpleFoam_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local line=${COMP_LINE}
|
||||
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
|
||||
|
||||
opts="-case -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -roots -solver -srcDoc"
|
||||
for o in $used ; do opts="${opts/$o/}" ; done
|
||||
extra=""
|
||||
|
||||
[ "$COMP_CWORD" = 1 ] || \
|
||||
case "$prev" in
|
||||
-case)
|
||||
opts="" ; extra="-d" ;;
|
||||
-fileHandler)
|
||||
opts="uncollated collated masterUncollated" ; extra="" ;;
|
||||
-hostRoots|-libs|-roots|-solver)
|
||||
opts="" ; extra="" ;;
|
||||
*) ;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
|
||||
}
|
||||
complete -o filenames -o nospace -F _simpleFoam_ simpleFoam
|
||||
|
||||
_wclean_ ()
|
||||
{
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ Overview
|
||||
========
|
||||
+ Template case for rotating geometry flow for a closed geometry
|
||||
+ Can be used for MRF or NCC simulations. Also supports AMI.
|
||||
+ Setup to run the simpleFoam solver for MRF, pimpleFoam for NCC
|
||||
+ Setup to run the incompressibleFluid solver module for MRF or NCC
|
||||
+ The case is designed to be meshed with snappyHexMesh
|
||||
+ snappyHexMesh is setup to use 3 trisurface files
|
||||
+ fixed.obj: CAD of the stationary (external) geometry
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Overview
|
||||
========
|
||||
+ This is a template case with single inlet and outlet
|
||||
+ Setup to run the simpleFoam solver
|
||||
+ Setup to run the incompressibleFluid solver module
|
||||
+ The case is designed to be meshed with snappyHexMesh
|
||||
+ snappyHexMesh is setup to use a single trisurface file named CAD.obj
|
||||
+ Copy the CAD.obj file to the constant/geometry directory
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ Overview
|
||||
========
|
||||
+ Template case for rotating geometry flow with single inlet and outlet
|
||||
+ Can be used for MRF or NCC simulations. Also supports AMI.
|
||||
+ Setup to run the simpleFoam solver for MRF, pimpleFoam for NCC
|
||||
+ Setup to run the incompressibleFluid solver module for MRF or NCC
|
||||
+ The case is designed to be meshed with snappyHexMesh
|
||||
+ snappyHexMesh is setup to use 3 trisurface files
|
||||
+ fixed.obj: CAD of the stationary (external) geometry
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,7 +42,7 @@ Description
|
||||
\verbatim
|
||||
ddtSchemes
|
||||
{
|
||||
#ifeq ${FOAM_APPLICATION} simpleFoam
|
||||
#ifeq ${FOAM_APPLICATION} foamRun
|
||||
default steadyState;
|
||||
#else
|
||||
default Euler;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,8 +29,8 @@ Description
|
||||
of an incompressible flow (laminar, RANS or LES).
|
||||
|
||||
It may be used in conjunction with any transient single-phase incompressible
|
||||
flow solver such as pisoFoam or pimpleFoam and tracks the particles or
|
||||
parcels without affecting the flow-field.
|
||||
flow solvers or solver modules such as incompressibleFluid and tracks the
|
||||
particles or parcels without affecting the flow-field.
|
||||
|
||||
The cloud requires the density of the fluid which is looked-up from
|
||||
constant/phaseProperties dictionary and the acceleration due to gravity
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,7 +71,7 @@ Description
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See \c tutorials/incompressible/pisoFoam/laminar/porousBlockage
|
||||
See \c tutorials/modules/incompressibleFluid/porousBlockage
|
||||
|
||||
SourceFiles
|
||||
coordinateSystems.C
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@ ls -d processor* | xargs -I {} rm -rf ./{}/0
|
||||
ls -d processor* | xargs -I {} mv ./{}/500 ./{}/0
|
||||
ls -d processor* | xargs -I {} rm -rf ./{}/0/uniform
|
||||
|
||||
runParallel pisoFoam
|
||||
runParallel foamRun
|
||||
|
||||
runApplication reconstructPar
|
||||
|
||||
@ -13,7 +13,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application pisoFoam;
|
||||
application foamRun;
|
||||
|
||||
solver incompressibleFluid;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -45,7 +47,7 @@ runTimeModifiable true;
|
||||
|
||||
cacheTemporaryObjects
|
||||
(
|
||||
SpalartAllmarasDDES:LESRegion
|
||||
SpalartAllmarasDES:LESRegion
|
||||
);
|
||||
|
||||
functions
|
||||
@ -60,7 +62,7 @@ functions
|
||||
|
||||
objects
|
||||
(
|
||||
SpalartAllmarasDDES:LESRegion
|
||||
SpalartAllmarasDES:LESRegion
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|B|nuTilda)"
|
||||
"(U|k|B|nuTilda).*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
|
||||
@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Mesh if necessary
|
||||
if ! cloneMesh ../../../incompressible/pimpleFoam/RAS/propeller .
|
||||
if ! cloneMesh ../../../../modules/incompressibleFluid/propeller .
|
||||
then
|
||||
./Allmesh
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user