Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2013-05-07 12:19:09 +01:00
38 changed files with 205 additions and 75 deletions

View File

@ -28,8 +28,8 @@
+ (
he1.name() == thermo1.phasePropertyName("e")
? fvc::div(alphaPhi1, p)
: -dalpha1pdt
? fvc::ddt(alpha1)*p + fvc::div(alphaPhi1, p)
: -alpha1*dpdt
)/rho1
- fvm::laplacian(k1, he1)
@ -50,8 +50,8 @@
+ (
he2.name() == thermo2.phasePropertyName("e")
? fvc::div(alphaPhi2, p)
: -dalpha2pdt
? fvc::ddt(alpha2)*p + fvc::div(alphaPhi2, p)
: -alpha2*dpdt
)/rho2
- fvm::laplacian(k2, he2)

View File

@ -275,8 +275,8 @@
);
Info<< "Creating field dalpha1pdt\n" << endl;
volScalarField dalpha1pdt
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
@ -285,21 +285,9 @@
mesh
),
mesh,
dimensionedScalar("dalpha1pdt", p.dimensions()/dimTime, 0)
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field dalpha2pdt\n" << endl;
volScalarField dalpha2pdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dalpha2pdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K1("K" + phase1Name, 0.5*magSqr(U1));

View File

@ -208,13 +208,8 @@
K1 = 0.5*magSqr(U1);
K2 = 0.5*magSqr(U2);
if (thermo1.dpdt())
if (thermo1.dpdt() || thermo2.dpdt())
{
dalpha1pdt = fvc::ddt(alpha1, p);
}
if (thermo2.dpdt())
{
dalpha2pdt = fvc::ddt(alpha2, p);
dpdt = fvc::ddt(p);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -224,6 +224,13 @@ case ThirdParty:
set mpfr_version=mpfr-3.1.0
set mpc_version=mpc-0.9
breaksw
case Gcc48:
case Gcc48++0x:
set gcc_version=gcc-4.8.0
set gmp_version=gmp-5.0.4
set mpfr_version=mpfr-3.1.0
set mpc_version=mpc-0.9
breaksw
case Gcc47:
case Gcc47++0x:
set gcc_version=gcc-4.7.2

View File

@ -246,6 +246,12 @@ OpenFOAM | ThirdParty)
mpfr_version=mpfr-3.1.0
mpc_version=mpc-0.9
;;
Gcc48 | Gcc48++0x)
gcc_version=gcc-4.8.0
gmp_version=gmp-5.0.4
mpfr_version=mpfr-3.1.0
mpc_version=mpc-0.9
;;
Gcc47 | Gcc47++0x)
gcc_version=gcc-4.7.2
gmp_version=gmp-5.0.4

View File

@ -105,6 +105,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
myComm.above(),
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
IOdictionary::readData(fromAbove);
@ -124,6 +125,7 @@ void Foam::IOdictionary::readFile(const bool masterOnly)
myComm.below()[belowI],
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
IOdictionary::writeData(toBelow);

View File

@ -243,6 +243,7 @@ bool Foam::regIOobject::read()
myComm.above(),
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
ok = readData(fromAbove);
@ -257,6 +258,7 @@ bool Foam::regIOobject::read()
myComm.below()[belowI],
0,
Pstream::msgType(),
Pstream::worldComm,
IOstream::ASCII
);
writeData(toBelow);

View File

@ -122,7 +122,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(receiveBuf_.begin()),
receiveBuf_.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}
OPstream::write
@ -131,7 +132,8 @@ void Foam::processorCyclicPointPatchField<Type>::initSwapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<const char*>(pf.begin()),
pf.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}
}
@ -156,7 +158,8 @@ void Foam::processorCyclicPointPatchField<Type>::swapAddSeparated
procPatch_.neighbProcNo(),
reinterpret_cast<char*>(receiveBuf_.begin()),
receiveBuf_.byteSize(),
procPatch_.tag()
procPatch_.tag(),
procPatch_.comm()
);
}

View File

@ -122,7 +122,7 @@ void Foam::lduPrimitiveMesh::checkUpperTriangular
}
Foam::label Foam::lduPrimitiveMesh::size
Foam::label Foam::lduPrimitiveMesh::totalSize
(
const PtrList<lduPrimitiveMesh>& meshes
)
@ -294,7 +294,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh
labelListListList& boundaryFaceMap
)
:
lduAddressing(myMesh.lduAddr().size() + size(otherMeshes)),
lduAddressing(myMesh.lduAddr().size() + totalSize(otherMeshes)),
lowerAddr_(0),
upperAddr_(0),
interfaces_(0),

View File

@ -76,7 +76,7 @@ class lduPrimitiveMesh
// Private Member Functions
//- Get size of all meshes
static label size(const PtrList<lduPrimitiveMesh>&);
static label totalSize(const PtrList<lduPrimitiveMesh>&);
static labelList upperTriOrder
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,6 +134,12 @@ public:
return procPolyPatch_.tag();
}
//- Return communicator used for communication
virtual label comm() const
{
return procPolyPatch_.comm();
}
//- Return the constraint type this pointPatch implements.
virtual const word& constraintType() const
{

View File

@ -246,14 +246,6 @@ public:
}
}
//- Return communicator used for communication
label comm() const
{
//return comm_;
return boundaryMesh().mesh().comm();
}
//- Return processor number
int myProcNo() const
{
@ -266,30 +258,6 @@ public:
return neighbProcNo_;
}
// For testing
// //- Return communicator used for communication
// label& comm()
// {
// return comm_;
// }
//- Return processor number
int& myProcNo()
{
return myProcNo_;
}
//- Return neigbour processor number
int& neighbProcNo()
{
return neighbProcNo_;
}
//- Does the processor own the patch ?
virtual bool owner() const
{
@ -332,6 +300,12 @@ public:
return Pstream::msgType();
}
//- Return communicator used for communication
virtual label comm() const
{
return boundaryMesh().mesh().comm();
}
//- Transform a patch-based position from other side to this side
virtual void transformPosition(pointField& l) const
{}

View File

@ -119,7 +119,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
new scalarField(meshLevels_[nCreatedLevels].size())
);
restrictField(*aggVPtr, *VPtr, nCreatedLevels);
// Restrict but no parallel agglomeration (not supported)
restrictField(*aggVPtr, *VPtr, nCreatedLevels, false);
if (nCreatedLevels)
{
@ -157,7 +158,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
new scalarField(meshLevels_[nCreatedLevels].size())
);
restrictField(*aggSbPtr, *SbPtr, nCreatedLevels);
// Restrict but no parallel agglomeration (not supported)
restrictField(*aggSbPtr, *SbPtr, nCreatedLevels, false);
delete SbPtr;
SbPtr = aggSbPtr;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,7 +52,7 @@ Foam::viscosityModels::BirdCarreau::calcNu() const
return
nuInf_
+ (nu0_ - nuInf_)
*pow(scalar(1) + sqr(k_*strainRate()), (n_ - 1.0)/2.0);
*pow(scalar(1) + pow(k_*strainRate(), a_), (n_ - 1.0)/a_);
}
@ -72,6 +72,14 @@ Foam::viscosityModels::BirdCarreau::BirdCarreau
nuInf_(BirdCarreauCoeffs_.lookup("nuInf")),
k_(BirdCarreauCoeffs_.lookup("k")),
n_(BirdCarreauCoeffs_.lookup("n")),
a_
(
BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
)
),
nu_
(
IOobject
@ -102,6 +110,11 @@ bool Foam::viscosityModels::BirdCarreau::read
BirdCarreauCoeffs_.lookup("nuInf") >> nuInf_;
BirdCarreauCoeffs_.lookup("k") >> k_;
BirdCarreauCoeffs_.lookup("n") >> n_;
a_ = BirdCarreauCoeffs_.lookupOrDefault
(
"a",
dimensionedScalar("a", dimless, 2)
);
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,9 @@ Class
Description
An incompressible Bird-Carreau non-Newtonian viscosity model.
The Bird-Carreau-Yasuda form is also supported if the optional "a"
coefficient is specified. "a" defaults to 2 for the Bird-Carreau model.
SourceFiles
BirdCarreau.C
@ -62,6 +65,7 @@ class BirdCarreau
dimensionedScalar nuInf_;
dimensionedScalar k_;
dimensionedScalar n_;
dimensionedScalar a_;
volScalarField nu_;

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -90,11 +96,9 @@ solvers
PIMPLE
{
nOuterCorrectors 3;
nCorrectors 1;
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
}
relaxationFactors

View File

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m64
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View File

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-100
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed

View File

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View File

@ -0,0 +1,2 @@
c++DBUG =
c++OPT = -O3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View File

@ -0,0 +1,8 @@
CPP = cpp -traditional-cpp
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/c
include $(RULES)/c++

View File

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi

View File

@ -0,0 +1,3 @@
PFLAGS = -DMPICH_SKIP_MPICXX
PINC = -I$(MPI_ARCH_PATH)/include64
PLIBS = -L$(MPI_ARCH_PATH)/lib64 -lmpi

16
wmake/rules/linuxGcc48/c Normal file
View File

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc -m32
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View File

@ -0,0 +1,21 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast
CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-100
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed

View File

@ -0,0 +1,2 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View File

@ -0,0 +1,2 @@
c++DBUG =
c++OPT = -O3

View File

@ -0,0 +1,2 @@
c++DBUG = -pg
c++OPT = -O2

View File

@ -0,0 +1,2 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View File

@ -0,0 +1,2 @@
cDBUG =
cOPT = -O3

View File

@ -0,0 +1,2 @@
cDBUG = -pg
cOPT = -O2

View File

@ -0,0 +1,9 @@
CPP = cpp -traditional-cpp
LD = ld -melf_i386
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(RULES)/c
include $(RULES)/c++

View File

@ -0,0 +1,3 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi