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

This commit is contained in:
mattijs
2012-01-24 12:36:37 +00:00
42 changed files with 303 additions and 67 deletions

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
@ -20,8 +21,7 @@ EXE_INC = \
-I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam
EXE_LIBS = \ EXE_LIBS = \

View File

@ -0,0 +1,73 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
U = rAU*UEqn.H();
if (pimple.transonic())
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
)
);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rAU, p)
==
parcels.Srho()
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
}
}
else
{
phi =
fvc::interpolate(rho)
*(
((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phi)
- fvm::laplacian(rho*rAU, p)
==
parcels.Srho()
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
K = 0.5*magSqr(U);
dpdt = fvc::ddt(p);

View File

@ -74,6 +74,8 @@ int main(int argc, char *argv[])
Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl; Info<< "Crank angle = " << runTime.theta() << " CA-deg" << endl;
mesh.move();
parcels.evolve(); parcels.evolve();
#include "rhoEqn.H" #include "rhoEqn.H"

View File

@ -114,11 +114,11 @@ public:
//- the dragfunction K used in the momentum eq. //- the dragfunction K used in the momentum eq.
// ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub) // ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
// ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua) // ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua)
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
// for numerical reasons alpha and beta has been // for numerical reasons alpha and beta has been
// extracted from the dragFunction K, // extracted from the dragFunction K,
// so you MUST divide K by alpha*beta when implemnting the drag function // so you MUST divide K by alpha*beta when implemnting the drag function
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0; virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
}; };

View File

@ -114,12 +114,12 @@ public:
//- the heat-transfer function K used in the enthalpy eq. //- the heat-transfer function K used in the enthalpy eq.
// ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb) // ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb)
// ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta) // ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta)
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB!*****************************
// for numerical reasons alpha and beta has been // for numerical reasons alpha and beta has been
// extracted from the heat-transfer function K, // extracted from the heat-transfer function K,
// so you MUST divide K by alpha*beta when implementing the // so you MUST divide K by alpha*beta when implementing the
// heat-transfer function // heat-transfer function
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB!*****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0; virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
}; };

View File

@ -35,8 +35,8 @@ Description
\verbatim \verbatim
Kunz, R.F., Boger, D.A., Stinebring, D.R., Chyczewski, Lindau. J.W., Kunz, R.F., Boger, D.A., Stinebring, D.R., Chyczewski, Lindau. J.W.,
Gibeling, H.J., Venkateswaran, S., Govindan, T.R., Gibeling, H.J., Venkateswaran, S., Govindan, T.R.,
A Preconditioned Implicit Method for Two-Phase Flows with Application "A Preconditioned Implicit Method for Two-Phase Flows with Application
to Cavitation Prediction, to Cavitation Prediction,"
Computers and Fluids, Computers and Fluids,
29(8):849-875, 2000. 29(8):849-875, 2000.
\endverbatim \endverbatim

View File

@ -131,11 +131,11 @@ public:
//- the dragfunction K used in the momentum eq. //- the dragfunction K used in the momentum eq.
// ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub) // ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
// ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua) // ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua)
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
// for numerical reasons alpha and beta has been // for numerical reasons alpha and beta has been
// extracted from the dragFunction K, // extracted from the dragFunction K,
// so you MUST divide K by alpha*beta when implemnting the drag function // so you MUST divide K by alpha*beta when implemnting the drag function
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0; virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
}; };

View File

@ -114,12 +114,12 @@ public:
//- the heat-transfer function K used in the enthalpy eq. //- the heat-transfer function K used in the enthalpy eq.
// ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb) // ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb)
// ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta) // ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta)
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
// for numerical reasons alpha and beta has been // for numerical reasons alpha and beta has been
// extracted from the heat-transfer function K, // extracted from the heat-transfer function K,
// so you MUST divide K by alpha*beta when implementing the // so you MUST divide K by alpha*beta when implementing the
// heat-transfer function // heat-transfer function
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB! *****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0; virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
}; };

View File

@ -114,11 +114,11 @@ public:
//- the dragfunction K used in the momentum eq. //- the dragfunction K used in the momentum eq.
// ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub) // ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
// ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua) // ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua)
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB ! *****************************
// for numerical reasons alpha and beta has been // for numerical reasons alpha and beta has been
// extracted from the dragFunction K, // extracted from the dragFunction K,
// so you MUST divide K by alpha*beta when implemnting the drag function // so you MUST divide K by alpha*beta when implemnting the drag function
// **********************************<EFBFBD>NB ! ***************************** // ********************************** NB ! *****************************
virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0; virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
}; };

View File

@ -1637,6 +1637,7 @@ int main(int argc, char *argv[])
#include "addRegionOption.H" #include "addRegionOption.H"
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
argList::addOption("dict", "name", "specify alternative dictionary");
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,6 +35,9 @@ Usage
\param -ascii \n \param -ascii \n
Write Ensight data in ASCII format instead of "C Binary" Write Ensight data in ASCII format instead of "C Binary"
\parm -name \<subdir\>\n
define sub-directory name to use for Ensight data (default: "Ensight")
\param -noZero \n \param -noZero \n
Exclude the often incomplete initial conditions. Exclude the often incomplete initial conditions.
@ -46,6 +49,9 @@ Usage
Suppress writing the geometry. Can be useful for converting partial Suppress writing the geometry. Can be useful for converting partial
results for a static geometry. results for a static geometry.
\param -width \<n\>\n
width of Ensight data subdir
Note Note
- no parallel data. - no parallel data.
- writes to \a Ensight directory to avoid collisions with foamToEnsight. - writes to \a Ensight directory to avoid collisions with foamToEnsight.
@ -96,6 +102,19 @@ int main(int argc, char *argv[])
"suppress writing the geometry. " "suppress writing the geometry. "
"Can be useful for converting partial results for a static geometry" "Can be useful for converting partial results for a static geometry"
); );
argList::addOption
(
"name",
"subdir",
"define sub-directory name to use for Ensight data "
"(default: \"Ensight\")"
);
argList::addOption
(
"width",
"n",
"width of Ensight data subdir"
);
// the volume field types that we handle // the volume field types that we handle
wordHashSet volFieldTypes; wordHashSet volFieldTypes;
@ -133,7 +152,21 @@ int main(int argc, char *argv[])
// always write the geometry, unless the -noMesh option is specified // always write the geometry, unless the -noMesh option is specified
bool optNoMesh = args.optionFound("noMesh"); bool optNoMesh = args.optionFound("noMesh");
fileName ensightDir = args.rootPath()/args.globalCaseName()/"Ensight"; // adjust output width
if (args.optionFound("width"))
{
ensightFile::subDirWidth(args.optionRead<label>("width"));
}
// define sub-directory name to use for Ensight data
fileName ensightDir = "Ensight";
args.optionReadIfPresent("name", ensightDir);
if (!ensightDir.isAbsolute())
{
ensightDir = args.rootPath()/args.globalCaseName()/ensightDir;
}
fileName dataDir = ensightDir/"data"; fileName dataDir = ensightDir/"data";
fileName caseFileName = "Ensight.case"; fileName caseFileName = "Ensight.case";
fileName dataMask = fileName("data")/ensightFile::mask(); fileName dataMask = fileName("data")/ensightFile::mask();

View File

@ -372,7 +372,7 @@ unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
switch ("$WM_MPLIB") switch ("$WM_MPLIB")
case OPENMPI: case OPENMPI:
setenv FOAM_MPI openmpi-1.5.3 setenv FOAM_MPI openmpi-1.5.4
# optional configuration tweaks: # optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh`

View File

@ -114,6 +114,16 @@ Linux)
export WM_LDFLAGS='-mabi=64 -G0' export WM_LDFLAGS='-mabi=64 -G0'
;; ;;
armv7l)
WM_ARCH=linuxARM7
export WM_COMPILER_LIB_ARCH=32
export WM_CC='gcc'
export WM_CXX='g++'
export WM_CFLAGS='-fPIC'
export WM_CXXFLAGS='-fPIC'
export WM_LDFLAGS=
;;
ppc64) ppc64)
WM_ARCH=linuxPPC64 WM_ARCH=linuxPPC64
export WM_COMPILER_LIB_ARCH=64 export WM_COMPILER_LIB_ARCH=64
@ -393,7 +403,7 @@ unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
case "$WM_MPLIB" in case "$WM_MPLIB" in
OPENMPI) OPENMPI)
export FOAM_MPI=openmpi-1.5.3 export FOAM_MPI=openmpi-1.5.4
# optional configuration tweaks: # optional configuration tweaks:
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh` _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh`

View File

@ -45,7 +45,9 @@ primitives/Tensor/lists/symmTensorList.C
primitives/Tensor/lists/tensorList.C primitives/Tensor/lists/tensorList.C
primitives/Vector/complexVector/complexVector.C primitives/Vector/complexVector/complexVector.C
#if !defined(WM_SP)
primitives/Vector/floatVector/floatVector.C primitives/Vector/floatVector/floatVector.C
#endif
primitives/Vector/labelVector/labelVector.C primitives/Vector/labelVector/labelVector.C
primitives/Vector/vector/vector.C primitives/Vector/vector/vector.C
primitives/Vector/lists/vectorList.C primitives/Vector/lists/vectorList.C

View File

@ -47,11 +47,11 @@ namespace Foam
typedef Vector<float> floatVector; typedef Vector<float> floatVector;
//- Data associated with floatVector type are contiguous //- Data associated with floatVector type are contiguous
#if !defined(WM_SP)
template<> template<>
inline bool contiguous<floatVector>() {return true;} inline bool contiguous<floatVector>() {return true;}
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ensightFile.H" #include "ensightFile.H"
#include <sstream>
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -31,6 +32,53 @@ bool Foam::ensightFile::allowUndef_ = false;
Foam::scalar Foam::ensightFile::undefValue_ = Foam::floatScalarVGREAT; Foam::scalar Foam::ensightFile::undefValue_ = Foam::floatScalarVGREAT;
// default is width 8
Foam::string Foam::ensightFile::mask_ = "********";
Foam::string Foam::ensightFile::dirFmt_ = "%08d";
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
Foam::string Foam::ensightFile::mask()
{
return mask_;
}
Foam::string Foam::ensightFile::subDir(const label n)
{
char buf[32];
sprintf(buf, dirFmt_.c_str(), n);
return buf;
}
void Foam::ensightFile::subDirWidth(const label n)
{
// enforce max limit to avoid buffer overflow in subDir()
if (n < 1 || n > 31)
{
return;
}
// appropriate printf format
std::ostringstream oss;
oss << "%0" << n << "d";
dirFmt_ = oss.str();
// set mask accordingly
mask_.resize(n, '*');
}
Foam::label Foam::ensightFile::subDirWidth()
{
return mask_.size();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::ensightFile::ensightFile Foam::ensightFile::ensightFile
@ -247,22 +295,4 @@ Foam::Ostream& Foam::ensightFile::writeBinaryHeader()
} }
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
Foam::string Foam::ensightFile::mask()
{
char buf[16] = "********";
return buf;
}
Foam::string Foam::ensightFile::subDir(const label n)
{
char buf[16];
sprintf(buf, "%08d", n);
return buf;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -57,6 +57,12 @@ class ensightFile
//- value to represent undef in results //- value to represent undef in results
static scalar undefValue_; static scalar undefValue_;
//- The '*' mask appropriate for subDir
static string mask_;
//- The printf format for zero-padded subdirectory numbers
static string dirFmt_;
// Private Member Functions // Private Member Functions
@ -88,12 +94,19 @@ public:
//- Return setting for whether 'undef' values are allowed in results //- Return setting for whether 'undef' values are allowed in results
static bool allowUndef(); static bool allowUndef();
//- '*' mask appropriate for subDir //- The '*' mask appropriate for subDir
static string mask(); static string mask();
//- consistent zero-padded numbers for subdirectories //- Consistent zero-padded numbers for subdirectories
static string subDir(const label); static string subDir(const label);
//- Set width of subDir and mask. Default width is 8 digits.
// Max width is 31 digits.
static void subDirWidth(const label);
//- Return current width of subDir and mask.
static label subDirWidth();
// Edit // Edit

View File

@ -76,7 +76,7 @@ class reducedUnits
scalar refPressure_; scalar refPressure_;
scalar refMassDensity_; scalar refMassDensity_;
scalar refNumberDensity_; scalar refNumberDensity_;
@ -103,9 +103,9 @@ public:
// Constructors // Constructors
//- Construct with no argument, uses default values: //- Construct with no argument, uses default values:
// length = 1nm // length = 1nm
// mass = 1.660538782e−27kg (unified atomic mass unit) // mass = 1.660538782e-27kg (unified atomic mass unit)
// temperature = 1K (therefore, energy = 1*kb) // temperature = 1K (therefore, energy = 1*kb)
reducedUnits(); reducedUnits();
//- Construct from components //- Construct from components

View File

@ -76,7 +76,7 @@ class reducedUnits
scalar refPressure_; scalar refPressure_;
scalar refMassDensity_; scalar refMassDensity_;
scalar refNumberDensity_; scalar refNumberDensity_;
@ -103,9 +103,9 @@ public:
// Constructors // Constructors
//- Construct with no argument, uses default values: //- Construct with no argument, uses default values:
// length = 1nm // length = 1nm
// mass = 1.660538782e−27kg (unified atomic mass unit) // mass = 1.660538782e-27kg (unified atomic mass unit)
// temperature = 1K (therefore, energy = 1*kb) // temperature = 1K (therefore, energy = 1*kb)
reducedUnits(); reducedUnits();
//- Construct from components //- Construct from components

View File

@ -366,7 +366,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(false), AMIReverse_(false),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(fileName("surface"))
{ {
// Neighbour patch might not be valid yet so no transformation // Neighbour patch might not be valid yet so no transformation
// calculation possible // calculation possible
@ -474,7 +474,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(pp.AMIReverse_), AMIReverse_(pp.AMIReverse_),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(pp.surfDict_)
{ {
// Neighbour patch might not be valid yet so no transformation // Neighbour patch might not be valid yet so no transformation
// calculation possible // calculation possible
@ -501,7 +501,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(pp.AMIReverse_), AMIReverse_(pp.AMIReverse_),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(pp.surfDict_)
{ {
if (nbrPatchName_ == name()) if (nbrPatchName_ == name())
{ {
@ -825,7 +825,7 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
} }
if (surfDict_ != dictionary::null) if (!surfDict_.empty())
{ {
os.writeKeyword(surfDict_.dictName()); os.writeKeyword(surfDict_.dictName());
os << surfDict_; os << surfDict_;

View File

@ -798,7 +798,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(false), AMIReverse_(false),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(fileName("surface"))
{} {}
@ -824,7 +824,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(false), AMIReverse_(false),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(fileName("surface"))
{} {}
@ -850,7 +850,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(false), AMIReverse_(false),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(fileName("surface"))
{} {}
@ -876,7 +876,7 @@ Foam::mappedPatchBase::mappedPatchBase
AMIPtr_(NULL), AMIPtr_(NULL),
AMIReverse_(false), AMIReverse_(false),
surfPtr_(NULL), surfPtr_(NULL),
surfDict_(dictionary::null) surfDict_(fileName("surface"))
{} {}
@ -1216,8 +1216,11 @@ void Foam::mappedPatchBase::write(Ostream& os) const
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
} }
os.writeKeyword(surfDict_.dictName()); if (!surfDict_.empty())
os << surfDict_; {
os.writeKeyword(surfDict_.dictName());
os << surfDict_;
}
} }
} }

View File

@ -81,8 +81,8 @@ class tetOverlapVolume
const point& fc const point& fc
) const; ) const;
public:
public:
//- Runtime type information //- Runtime type information
ClassName("tetOverlapVolume"); ClassName("tetOverlapVolume");

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -113,7 +113,13 @@ public:
// calculated from the given velocity gradient // calculated from the given velocity gradient
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
{ {
return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU))); volSymmTensorField D(symm(gradU));
volScalarField a(ce_/delta());
volScalarField b((2.0/3.0)*tr(D));
volScalarField c(2*ck_*delta()*(dev(D) && D));
return sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
} }
//- Return SGS kinetic energy //- Return SGS kinetic energy

View File

@ -33,7 +33,7 @@ Description
"A One-Equation Turbulence Model for Aerodynamic Flows" "A One-Equation Turbulence Model for Aerodynamic Flows"
P.R. Spalart, P.R. Spalart,
S.R. Allmaras, S.R. Allmaras,
La Recherche A´rospatiale, No. 1, 1994, pp. 521. La Recherche Aerospatiale, No. 1, 1994, pp. 5-21.
Extended according to: Extended according to:

View File

@ -33,7 +33,7 @@ Description
"A One-Equation Turbulence Model for Aerodynamic Flows" "A One-Equation Turbulence Model for Aerodynamic Flows"
P.R. Spalart, P.R. Spalart,
S.R. Allmaras, S.R. Allmaras,
La Recherche A´rospatiale, No. 1, 1994, pp. 521. La Recherche Aerospatiale, No. 1, 1994, pp. 5-21.
Extended according to: Extended according to:

View File

@ -105,8 +105,8 @@ PIMPLE
relaxationFactors relaxationFactors
{ {
U 1; "U.*" 1;
nuTilda 1; "nuTilda.*" 1;
} }

View File

@ -0,0 +1,16 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc
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++
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,3 @@
c++DBUG =
#c++OPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard
c++OPT = -O2 -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=soft

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,3 @@
cDBUG =
#cOPT = -O3 -floop-optimize -falign-loops -falign-labels -falign-functions -falign-jumps -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard
cOPT = -O3 -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard

View File

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

View File

@ -0,0 +1,9 @@
CPP = cpp -traditional-cpp $(GFLAGS)
LD = ld
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