OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

parcelFunctions.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 \*---------------------------------------------------------------------------*/
00026 
00027 #include "parcel.H"
00028 #include "mathematicalConstants.H"
00029 
00030 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00031 
00032 namespace Foam
00033 {
00034 
00035 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00036 
00037 // The diameter based Reynolds number
00038 scalar parcel::Re
00039 (
00040     const vector& U,
00041     const scalar nu
00042 ) const
00043 {
00044     return mag(Urel(U))*d_/nu;
00045 }
00046 
00047 // The diameter based Reynolds number
00048 scalar parcel::Re
00049 (
00050     const scalar rho,
00051     const vector& U,
00052     const scalar mu
00053 ) const
00054 {
00055 
00056     return rho*mag(Urel(U))*d_/mu;
00057 }
00058 
00059 // The diameter based Weber number
00060 scalar parcel::We
00061 (
00062     const vector& U,
00063     const scalar rho,
00064     const scalar sigma
00065 ) const
00066 {
00067     return 0.5*rho*pow(mag(Urel(U)),2)*d_/sigma;
00068 }
00069 
00070 
00071 scalar parcel::Sc
00072 (
00073     const scalar mu,
00074     const scalar rho,
00075     const scalar massDiffusion
00076 ) const
00077 {
00078     return mu/(rho*massDiffusion);
00079 }
00080 
00081 
00082 scalar parcel::Sc
00083 (
00084     const scalar nu,
00085     const scalar massDiffusion
00086 ) const
00087 {
00088     return nu/massDiffusion;
00089 }
00090 
00091 
00092 scalar parcel::Pr
00093 (
00094     const scalar cp,
00095     const scalar mu,
00096     const scalar kappa
00097 ) const
00098 {
00099     return cp*mu/kappa;
00100 }
00101 
00102 
00103 scalar parcel::N(const scalar rho) const
00104 {
00105     return 6.0*m_/(rho*pow(d_, 3.0)*mathematicalConstant::pi);
00106 }
00107 
00108 
00109 scalar parcel::Vd() const
00110 {
00111     return pow(d_, 3.0)*mathematicalConstant::pi/6.0;
00112 }
00113 
00114 
00115 scalar parcel::V(const scalar rho) const
00116 {
00117     return m_/rho;
00118 }
00119 
00120 
00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00122 
00123 } // End namespace Foam
00124 
00125 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd