OpenFOAM-dev / data /src /finiteVolume /fields /fvPatchFields /derived /partialSlip /partialSlipFvPatchField.H
Download data/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H from introvoyz042/OpenFOAM-dev: direct link, hf CLI and curl.
- Browser
- Download file 7.02 kB
-
https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
- Command line
-
hf download hf://datasets/introvoyz042/OpenFOAM-dev/data/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
-
curl -L -o partialSlipFvPatchField.H https://huggingface.co/datasets/introvoyz042/OpenFOAM-dev/resolve/main/data/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.H
7.02 kB
| /*---------------------------------------------------------------------------*\ | |
| ========= | | |
| \\ / 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 <http://www.gnu.org/licenses/>. | |
| 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 | |
| <patchName> | |
| { | |
| type partialSlip; | |
| valueFraction uniform 0.1; | |
| value uniform 0; | |
| } | |
| \endverbatim | |
| See also | |
| Foam::transformFvPatchField | |
| SourceFiles | |
| partialSlipFvPatchField.C | |
| \*---------------------------------------------------------------------------*/ | |
| // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
| namespace Foam | |
| { | |
| /*---------------------------------------------------------------------------*\ | |
| Class partialSlipFvPatchField Declaration | |
| \*---------------------------------------------------------------------------*/ | |
| template<class Type> | |
| class partialSlipFvPatchField | |
| : | |
| public transformFvPatchField<Type> | |
| { | |
| // 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<Type, fvMesh>& | |
| ); | |
| public: | |
| //- Runtime type information | |
| TypeName("partialSlip"); | |
| // Constructors | |
| //- Construct from patch, internal field and dictionary | |
| partialSlipFvPatchField | |
| ( | |
| const fvPatch&, | |
| const DimensionedField<Type, fvMesh>&, | |
| const dictionary& | |
| ); | |
| //- Construct by mapping given partialSlipFvPatchField onto a new patch | |
| partialSlipFvPatchField | |
| ( | |
| const partialSlipFvPatchField<Type>&, | |
| const fvPatch&, | |
| const DimensionedField<Type, fvMesh>&, | |
| const fieldMapper& | |
| ); | |
| //- Disallow copy without setting internal field reference | |
| partialSlipFvPatchField(const partialSlipFvPatchField<Type>&) = delete; | |
| //- Copy constructor setting internal field reference | |
| partialSlipFvPatchField | |
| ( | |
| const partialSlipFvPatchField<Type>&, | |
| const DimensionedField<Type, fvMesh>& | |
| ); | |
| //- Construct and return a clone setting internal field reference | |
| virtual tmp<fvPatchField<Type>> clone | |
| ( | |
| const DimensionedField<Type, fvMesh>& iF | |
| ) const | |
| { | |
| return tmp<fvPatchField<Type>> | |
| ( | |
| new partialSlipFvPatchField<Type>(*this, iF) | |
| ); | |
| } | |
| // Member Functions | |
| using fvPatchField<Type>::patch; | |
| using fvPatchField<Type>::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<Type>&, const fieldMapper&); | |
| //- Reset the fvPatchField to the given fvPatchField | |
| // Used for mesh to mesh mapping | |
| virtual void reset(const fvPatchField<Type>&); | |
| // Return defining fields | |
| virtual scalarField& valueFraction() | |
| { | |
| return valueFraction_; | |
| } | |
| virtual const scalarField& valueFraction() const | |
| { | |
| return valueFraction_; | |
| } | |
| // Evaluation functions | |
| //- Return gradient at boundary | |
| virtual tmp<Field<Type>> snGrad() const; | |
| //- Evaluate the patch field | |
| virtual void evaluate | |
| ( | |
| const Pstream::commsTypes commsType = | |
| Pstream::commsTypes::blocking | |
| ); | |
| //- Return face-gradient transform diagonal | |
| virtual tmp<Field<Type>> snGradTransformDiag() const; | |
| //- Write | |
| virtual void write(Ostream&) const; | |
| // Member Operators | |
| virtual void operator=(const UList<Type>&) {} | |
| virtual void operator=(const Field<Type>&) {} | |
| virtual void operator=(const fvPatchField<Type>&) {} | |
| //- Virtual assign to an expression | |
| virtual void operator=(const expression::Assignment<Field<Type>>& a) | |
| {} | |
| virtual void operator+=(const fvPatchField<Type>&) {} | |
| virtual void operator-=(const fvPatchField<Type>&) {} | |
| virtual void operator*=(const fvPatchField<scalar>&) {} | |
| virtual void operator/=(const fvPatchField<scalar>&) {} | |
| virtual void operator+=(const Field<Type>&) {} | |
| virtual void operator-=(const Field<Type>&) {} | |
| virtual void operator*=(const Field<scalar>&) {} | |
| virtual void operator/=(const Field<scalar>&) {} | |
| 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 | |
| // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
| // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | |
| // ************************************************************************* // | |