FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

calculateTransportProperties.H

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) 2008-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 \*---------------------------------------------------------------------------*/
00025 
00026 if (writeVacf)
00027 {
00028     OFstream vacfFile(runTime.path()/"vacf");
00029 
00030     if (!vacf.writeAveraged(vacfFile))
00031     {
00032         FatalErrorIn(args.executable())
00033             << "Failed writing to "
00034             << vacfFile.name()
00035             << abort(FatalError);
00036     }
00037 }
00038 
00039 Info<< "Diffusion coefficient = "
00040     << vacf.integral() << endl;
00041 
00042 if (writePacf)
00043 {
00044     OFstream pacfFile(runTime.path()/"pacf");
00045 
00046     if (!pacf.writeAveraged(pacfFile))
00047     {
00048         FatalErrorIn(args.executable())
00049             << "Failed writing to "
00050             << pacfFile.name()
00051             << abort(FatalError);
00052     }
00053 }
00054 
00055 Info<< "Viscosity = "
00056     << pacf.integral()/averageTemperature/moleculeCloud::kb/meshVolume
00057     << endl;
00058 
00059 if (writeHFacf)
00060 {
00061     OFstream hfacfFile
00062     (
00063         runTime.path()/ + "hfacf"
00064     );
00065 
00066     if (!hfacf.writeAveraged(hfacfFile))
00067     {
00068         FatalErrorIn(args.executable())
00069             << "Failed writing to "
00070             << hfacfFile.name()
00071             << abort(FatalError);
00072     }
00073 }
00074 
00075 Info<< "Thermal conductivity = "
00076     << hfacf.integral()
00077         /averageTemperature
00078         /averageTemperature
00079         /moleculeCloud::kb
00080         / meshVolume
00081     << endl;
00082 
00083 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines