Commit 89c7523c authored by mattijs's avatar mattijs
Browse files

Merge branch 'master' into splitCyclic

Conflicts:
	src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
	src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C
	src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H
	src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
	src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C
	src/parallel/decompose/scotchDecomp/scotchDecomp.C
	src/parallel/parMetisDecomp/parMetisDecomp.C
	src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C
parents 50160baa 52fc076b
......@@ -55,6 +55,10 @@ doc/[Dd]oxygen/man
/*.html
/doc/*.html
# untracked configuration files
/etc/prefs.csh
/etc/prefs.sh
# source packages - anywhere
*.tar.bz2
*.tar.gz
......
......@@ -2,7 +2,7 @@
#
#+TITLE: OpenFOAM README for version 1.6
#+AUTHOR: OpenCFD Ltd.
#+DATE: November 2009
#+DATE: March 2010
#+LINK: http://www.opencfd.co.uk
#+OPTIONS: author:nil ^:{}
......@@ -23,10 +23,10 @@
section "Running OpenFOAM in 32-bit mode".
*** Qt (from http://trolltech.com/products/qt)
The ParaView 3.6.1 visualisation package requires Qt to be installed on the
The ParaView 3.7.0 visualisation package requires Qt to be installed on the
system. ParaView's producers state that ParaView is only officially
supported on Qt version 4.3.x. However, we have found in limited tests that
ParaView works satisfactorily with newer versions of Qt than 4.3.x. To
supported on Qt version 4.6.x. However, we have found in limited tests that
ParaView works satisfactorily with Qt than 4.5.x. To
check whether Qt4 is installed, and the version, type:
+ qmake --version
......@@ -44,13 +44,14 @@
+ openSUSE-10.3: Version 4.3.1
+ openSUSE-11.0: Version 4.4.0
+ openSUSE-11.1: Version 4.4.3
+ openSUSE-11.2: Version 4.5.3
Compilation and running of ParaView has been successful using the libraries
downloaded in the "libqt4-dev" package on ubuntu.
If you don't have an appropriate version of Qt installed you can download
the sources from TrollTech e.g.:
ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.5.tar.bz2
the sources e.g.:
http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz
and compile and install in /usr/local or some other location that does not
conflict with the pre-installed version.
......@@ -108,11 +109,11 @@
* Building from Sources (Optional)
If you cannot find an appropriate binary pack for your platform, you can build
the complete OpenFOAM from the source-pack. You will first need to compile or
obtain a recent version of gcc (we recomend gcc-4.3.?) for your platform,
obtain a recent version of gcc (we recommend gcc-4.4.?) for your platform,
which may be obtained from http://gcc.gnu.org/.
Install the compiler in
$WM_THIRD_PARTY_DIR/gcc-<GCC_VERSION>/platforms/$WM_ARCH$WM_COMPILER_ARCH/
$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc-<GCC_VERSION>
and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and
$WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the
environment variables as in section 3.
......@@ -157,15 +158,16 @@
Refer to the OpenFOAM User Guide at http://www.OpenFOAM.org/doc/user.html for
more information.
* Compiling Paraview 3.6.1 and the PV3FoamReader module
* Compiling Paraview 3.7.0 and the PV3FoamReader module
If there are problems encountered with ParaView, then it may be necessary to
compile ParaView from sources. The compilation
is a fairly simple process using the makeParaView script
(found in ThirdParty directory), which has worked in our tests with other
packages supplied in the ThirdParty directory, namely cmake-2.6.4 and
gcc-4.3.3. Execute the following:
packages supplied in the ThirdParty directory, namely cmake-2.8.0 and
gcc-4.4.3. Execute the following:
+ cd $WM_THIRD_PARTY_DIR
+ rm -rf paraview-3.6.1/platforms
+ rm -rf paraview-3.7.0/platforms
+ rm -rf platforms/*/paraview-3.7.0
+ ./makeParaView
The PV3blockMeshReader and the PV3FoamReader ParaView plugins are compiled
......@@ -177,7 +179,7 @@
*** Compiling Paraview with a local version of Qt
If the user still encounters problems with ParaView, it may relate to the
version of Qt, in which case, it is recommended that the user first
downloads a supported version of Qt /e.g./ 4.3.5 as described in the section
downloads a supported version of Qt /e.g./ 4.5.3 as described in the section
on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR.
Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR:
+ ./makeQt
......
......@@ -24,6 +24,8 @@ OK - amg.
Tested on unitTestCases/singleCyclic/
- initTransfer in GAMGprocessorInterfaces using nonblocking+tags
untested.
- test createPatch pointSync
- pointFields on cyclics. volPointInterpolation.
- jumpCyclics
......
......@@ -270,7 +270,7 @@ void PDRkEpsilon::correct()
}
tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G = 2*mut_*(tgradU() && dev(symm(tgradU())));
volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
// Update espsilon and G at the wall
......
EXE_INC = \
-I../sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \
-I../sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
......
rhoPorousMRFPimpleFoam.C
EXE = $(FOAM_APPBIN)/rhoPorousMRFPimpleFoam
EXE_INC = \
-I../rhoPimpleFoam \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lbasicThermophysicalModels \
-lspecie \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lmeshTools
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
pZones.ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
if (oCorr == nOuterCorr-1)
{
UEqn().relax(1);
}
else
{
UEqn().relax();
}
mrfZones.addCoriolis(rho, UEqn());
pZones.addResistance(UEqn());
volScalarField rUA = 1.0/UEqn().A();
if (momentumPredictor)
{
if (oCorr == nOuterCorr-1)
{
solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal"));
}
else
{
solve(UEqn() == -fvc::grad(p));
}
}
else
{
U = rUA*(UEqn().H() - fvc::grad(p));
U.correctBoundaryConditions();
}
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicPsiThermo> pThermo
(
basicPsiThermo::New(mesh)
);
basicPsiThermo& thermo = pThermo();
volScalarField& p = thermo.p();
volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
thermo.rho()
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
dimensionedScalar pMin
(
mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
//dimensionedScalar initialMass = fvc::domainIntegrate(rho);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt =
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U);
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
if (nCorr <= 1)
{
UEqn.clear();
}
if (transonic)
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)
);
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rUA, p)
);
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi == pEqn.flux();
}
}
}
else
{
phi =
fvc::interpolate(rho)*
(
(fvc::interpolate(U) & mesh.Sf())
//+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
mrfZones.relativeFlux(fvc::interpolate(rho), phi);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
);
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
//if (oCorr != nOuterCorr-1)
{
// Explicitly relax pressure for momentum corrector
p.relax();
rho = thermo.rho();
rho.relax();
Info<< "rho max/min : " << max(rho).value()
<< " " << min(rho).value() << endl;
}
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
bound(p, pMin);
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
/*
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
*/
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
rhoPorousMRFPimpleFoam
Description
Transient solver for laminar or turbulent flow of compressible fluids
with support for porous media and MRF for HVAC and similar applications.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "bound.H"
#include "MRFZones.H"
#include "porousZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "readPIMPLEControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
if (nOuterCorr != 1)
{
p.storePrevIter();
rho.storePrevIter();
}
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{
#include "UEqn.H"
#include "hEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "pEqn.H"
}
turbulence->correct();
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
......@@ -61,7 +61,7 @@
mesh
);
# include "createPhi.H"
#include "createPhi.H"
Info<< "Reading field pB\n" << endl;
volScalarField pB
......@@ -93,15 +93,15 @@
);
# include "createPhiB.H"
#include "createPhiB.H"
dimensionedScalar DB = 1.0/(mu*sigma);
DB.name() = "DB";
dimensionedScalar DB = 1.0/(mu*sigma);
DB.name() = "DB";
dimensionedScalar DBU = 1.0/(2.0*mu*rho);
DBU.name() = "DBU";
dimensionedScalar DBU = 1.0/(2.0*mu*rho);
DBU.name() = "DBU";
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
......@@ -49,8 +49,6 @@ Description
\*---------------------------------------------------------------------------*/
#include "string.H"
#include "Time.H"
#include "fvCFD.H"
#include "OSspecific.H"
......
<
......@@ -38,7 +38,7 @@ solidWallHeatFluxTemperatureFvPatchScalarField
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchScalarField(p, iF),
fixedGradientFvPatchScalarField(p, iF),
q_(p.size(), 0.0),
KName_("undefined-K")
{}
......@@ -53,7 +53,7 @@ solidWallHeatFluxTemperatureFvPatchScalarField
const fvPatchFieldMapper& mapper
)
:
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
q_(ptf.q_, mapper),
KName_(ptf.KName_)
{}
......@@ -67,7 +67,7 @@ solidWallHeatFluxTemperatureFvPatchScalarField
const dictionary& dict
)
:
fixedValueFvPatchScalarField(p, iF, dict),
fixedGradientFvPatchScalarField(p, iF, dict),
q_("q", dict, p.size()),
KName_(dict.lookup("K"))
{}
......@@ -79,7 +79,7 @@ solidWallHeatFluxTemperatureFvPatchScalarField
const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf
)
:
fixedValueFvPatchScalarField(tppsf),
fixedGradientFvPatchScalarField(tppsf),
q_(tppsf.q_),
KName_(tppsf.KName_)
{}
......@@ -92,7 +92,7 @@ solidWallHeatFluxTemperatureFvPatchScalarField
const DimensionedField<scalar, volMesh>& iF
)
:
fixedValueFvPatchScalarField(tppsf, iF),
fixedGradientFvPatchScalarField(tppsf, iF),
q_(tppsf.q_),
KName_(tppsf.KName_)
{}
......@@ -105,7 +105,7 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::autoMap
const fvPatchFieldMapper& m
)
{
fixedValueFvPatchScalarField::autoMap(m);
fixedGradientFvPatchScalarField::autoMap(m);
q_.autoMap(m);
}
......@@ -116,7 +116,7 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::rmap
const labelList& addr
)
{
fixedValueFvPatchScalarField::rmap(ptf, addr);
fixedGradientFvPatchScalarField::rmap(ptf, addr);
const solidWallHeatFluxTemperatureFvPatchScalarField& hfptf =
refCast<const solidWallHeatFluxTemperatureFvPatchScalarField>(ptf);
......@@ -132,14 +132,14 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
return;
}
const scalarField& Kw =
patch().lookupPatchField<volScalarField, scalar>(KName_);
const fvPatchScalarField& Tw = *this;
const scalarField& Kw = patch().lookupPatchField<volScalarField, scalar>
(
KName_