/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2026 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 .
Class
Foam::partialSlipFvPatchField
Description
This boundary condition provides a partial slip condition. The amount of
slip is controlled by a user-supplied field.
Usage
\table
Property | Description | Required | Default value
valueFraction | fraction of value used for boundary [0-1] | yes |
\endtable
Example of the boundary condition specification:
\verbatim
{
type partialSlip;
valueFraction uniform 0.1;
value uniform 0;
}
\endverbatim
See also
Foam::transformFvPatchField
SourceFiles
partialSlipFvPatchField.C
\*---------------------------------------------------------------------------*/
#ifndef partialSlipFvPatchField_H
#define partialSlipFvPatchField_H
#include "transformFvPatchField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class partialSlipFvPatchField Declaration
\*---------------------------------------------------------------------------*/
template
class partialSlipFvPatchField
:
public transformFvPatchField
{
// Private Data
//- Fraction (0-1) of value used for boundary condition
scalarField valueFraction_;
protected:
// Protected functions
//- Construct from patch and internal field
partialSlipFvPatchField
(
const fvPatch&,
const DimensionedField&
);
public:
//- Runtime type information
TypeName("partialSlip");
// Constructors
//- Construct from patch, internal field and dictionary
partialSlipFvPatchField
(
const fvPatch&,
const DimensionedField&,
const dictionary&
);
//- Construct by mapping given partialSlipFvPatchField onto a new patch
partialSlipFvPatchField
(
const partialSlipFvPatchField&,
const fvPatch&,
const DimensionedField&,
const fieldMapper&
);
//- Disallow copy without setting internal field reference
partialSlipFvPatchField(const partialSlipFvPatchField&) = delete;
//- Copy constructor setting internal field reference
partialSlipFvPatchField
(
const partialSlipFvPatchField&,
const DimensionedField&
);
//- Construct and return a clone setting internal field reference
virtual tmp> clone
(
const DimensionedField& iF
) const
{
return tmp>
(
new partialSlipFvPatchField(*this, iF)
);
}
// Member Functions
using fvPatchField::patch;
using fvPatchField::patchInternalField;
// Attributes
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions
//- Map the given fvPatchField onto this fvPatchField
virtual void map(const fvPatchField&, const fieldMapper&);
//- Reset the fvPatchField to the given fvPatchField
// Used for mesh to mesh mapping
virtual void reset(const fvPatchField&);
// Return defining fields
virtual scalarField& valueFraction()
{
return valueFraction_;
}
virtual const scalarField& valueFraction() const
{
return valueFraction_;
}
// Evaluation functions
//- Return gradient at boundary
virtual tmp> snGrad() const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType =
Pstream::commsTypes::blocking
);
//- Return face-gradient transform diagonal
virtual tmp> snGradTransformDiag() const;
//- Write
virtual void write(Ostream&) const;
// Member Operators
virtual void operator=(const UList&) {}
virtual void operator=(const Field&) {}
virtual void operator=(const fvPatchField&) {}
//- Virtual assign to an expression
virtual void operator=(const expression::Assignment>& a)
{}
virtual void operator+=(const fvPatchField&) {}
virtual void operator-=(const fvPatchField&) {}
virtual void operator*=(const fvPatchField&) {}
virtual void operator/=(const fvPatchField&) {}
virtual void operator+=(const Field&) {}
virtual void operator-=(const Field&) {}
virtual void operator*=(const Field&) {}
virtual void operator/=(const Field&) {}
virtual void operator=(const Type&) {}
virtual void operator+=(const Type&) {}
virtual void operator-=(const Type&) {}
virtual void operator*=(const scalar) {}
virtual void operator/=(const scalar) {}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "partialSlipFvPatchField.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //