Skip to content
Snippets Groups Projects
vorticity.H 4.31 KiB
Newer Older
  • Learn to ignore specific revisions
  • /*---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     |
    
    OpenFOAM bot's avatar
    OpenFOAM bot committed
        \\  /    A nd           | www.openfoam.com
    
         \\/     M anipulation  |
    -------------------------------------------------------------------------------
    
    OpenFOAM bot's avatar
    OpenFOAM bot committed
        Copyright (C) 2014-2016 OpenFOAM Foundation
    
        Copyright (C) 2016-2020 OpenCFD Ltd.
    
    -------------------------------------------------------------------------------
    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
    
    Description
    
        Computes the vorticity, the curl of the velocity.
    
        \f[
            \vec \omega = \nabla \times \vec U
        \f]
    
        where
        \vartable
            \vec \omega   | Vorticity vector    [1/s]
            \vec U        | Velocity vector     [m/s]
        \endvartable
    
        Operands:
        \table
          Operand        | Type           | Location
          input          | volVectorField | $FOAM_CASE/\<time\>/\<inpField\>
          output file    | -              | -
          output field   | volVectorField | $FOAM_CASE/\<time\>/\<outField\>
        \endtable
    
        Minimal example by using \c system/controlDict.functions:
    
    andy's avatar
    andy committed
        \verbatim
    
    andy's avatar
    andy committed
        {
    
            // Mandatory entries (unmodifiable)
    
            libs        (fieldFunctionObjects);
    
    
            // Optional (inherited) entries
    
    andy's avatar
    andy committed
        }
        \endverbatim
    
        where the entries mean:
    
          Property     | Description                        | Type | Req'd | Dflt
          type         | Type name: vorticity               | word |  yes  | -
          libs         | Library name: fieldFunctionObjects | word |  yes  | -
    
        The inherited entries are elaborated in:
         - \link functionObject.H \endlink
         - \link fieldExpression.H \endlink
    
        Minimal example by using the \c postProcess utility:
        \verbatim
            postProcess -func vorticity
        \endverbatim
    
    
        - Foam::functionObject
        - Foam::functionObjects::fvMeshFunctionObject
        - Foam::functionObjects::fieldExpression
        - ExtendedCodeGuide::functionObjects::field::vorticity
    
    
    SourceFiles
    
        vorticity.C
    
    
    \*---------------------------------------------------------------------------*/
    
    
    #ifndef functionObjects_vorticity_H
    #define functionObjects_vorticity_H
    
    #include "fieldExpression.H"
    
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    namespace Foam
    {
    
    
    /*---------------------------------------------------------------------------*\
    
                              Class vorticity Declaration
    
    \*---------------------------------------------------------------------------*/
    
    
    class vorticity
    
        public fieldExpression
    
            //- Calculate the vorticity field and return true if successful
            virtual bool calc();
    
    
    
    public:
    
        //- Runtime type information
    
        TypeName("vorticity");
    
            //- Construct from Time and dictionary
    
            vorticity
    
            (
                const word& name,
    
                const Time& runTime,
                const dictionary& dict
    
            //- No copy construct
            vorticity(const vorticity&) = delete;
    
            //- No copy assignment
            void operator=(const vorticity&) = delete;
    
    
        //- Destructor
    
        virtual ~vorticity() = default;
    
    };
    
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    
    } // End namespace Foam
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    #endif
    
    // ************************************************************************* //