Merge branch 'HrvojeJasak'

This commit is contained in:
Hrvoje Jasak 2011-07-07 14:18:12 +01:00
commit dbdb3f2d65
13 changed files with 59 additions and 28 deletions

View file

@ -1,4 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \

View file

@ -34,20 +34,17 @@ Author
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "engineTime.H"
using namespace Foam;
#include "engineTopoChangerMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createEngineTime.H"
# include "createDynamicFvMesh.H"
# include "createEngineDynamicMesh.H"
scalar totalVolume = sum(mesh.V()).value();
@ -80,7 +77,7 @@ int main(int argc, char *argv[])
);
for (runTime++; !runTime.end(); runTime++)
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << endl;

View file

@ -603,6 +603,12 @@ void Foam::Time::setDeltaT(const scalar deltaT)
}
void Foam::Time::setWriteInterval(const scalar& deltaTheta)
{
writeInterval_ = deltaTheta;
}
Foam::TimeState Foam::Time::subCycle(const label nSubCycles)
{
subCycling_ = true;

View file

@ -437,6 +437,9 @@ public:
//- Reset time step
virtual void setDeltaT(const scalar);
//- Set write interval
void setWriteInterval(const scalar& deltaTheta);
//- Set time to sub-cycle for the given number of steps
virtual TimeState subCycle(const label nSubCycles);

View file

@ -364,6 +364,11 @@ Foam::dimensionSet Foam::inv(const dimensionSet& ds)
return dimless/ds;
}
Foam::dimensionSet Foam::hinv(const dimensionSet& ds)
{
return inv(ds);
}
Foam::dimensionSet Foam::trans(const dimensionSet& ds)
{
if (dimensionSet::debug && !ds.dimensionless())

View file

@ -78,6 +78,7 @@ dimensionSet sign(const dimensionSet&);
dimensionSet pos(const dimensionSet&);
dimensionSet neg(const dimensionSet&);
dimensionSet inv(const dimensionSet&);
dimensionSet hinv(const dimensionSet&);
// Function to check the argument is dimensionless
// for transcendental functions

View file

@ -63,7 +63,7 @@ UNARY_FUNCTION(symmTensor, symmTensor, inv, inv)
UNARY_FUNCTION(symmTensor, symmTensor, hinv, hinv)
// * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
UNARY_OPERATOR(vector, symmTensor, *, hdual, transform)

View file

@ -509,11 +509,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::maskedBridgeMaster
const labelList& mask
) const
{
if
(
bridgeField.size() != masterPatch_.size()
|| ff.size() != mask.size()
)
if (ff.size() != mask.size())
{
FatalErrorIn
(
@ -578,11 +574,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::maskedBridgeSlave
const labelList& mask
) const
{
if
(
bridgeField.size() != slavePatch_.size()
|| ff.size() != mask.size()
)
if (ff.size() != mask.size())
{
FatalErrorIn
(

View file

@ -311,7 +311,8 @@ void Foam::cyclicPolyPatch::calcTransforms()
<< endl
<< "Other errors also exist, only the largest is reported. "
<< "Please rerun with cyclic debug flag set"
<< " for more information." << exit(FatalError);
<< " for more information."
<< abort(FatalError);
}
if (debug)

View file

@ -297,9 +297,9 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::interpolate
{
FatalErrorIn
(
"tmp<Field<Type> > ggiPolyPatch::interpolate"
"("
" const Field<Type>& ff"
"tmp<Field<Type> > ggiPolyPatch::interpolate\n"
"(\n"
" const Field<Type>& ff\n"
") const"
) << "Incorrect slave patch field size. Field size: "
<< ff.size() << " patch size: " << shadow().size()
@ -404,9 +404,30 @@ void Foam::ggiPolyPatch::bridge
Field<Type>& ff
) const
{
// Check and expand the field from patch size to zone size
if (ff.size() != size())
{
FatalErrorIn
(
"tmp<Field<Type> > ggiPolyPatch::bridge\n"
"(\n"
" const Field<Type>& ff,\n"
" Field<Type>& ff\n"
") const"
) << "Incorrect patch field size for bridge. Field size: "
<< ff.size() << " patch size: " << size()
<< abort(FatalError);
}
if (bridgeOverlap())
{
# ifdef FAST_PARALLEL_GGI
# if 1
if (empty())
{
// Patch empty, no bridging
return;
}
if (localParallel())
{

View file

@ -81,7 +81,10 @@ void Foam::turboFvMesh::calcMovingPoints() const
if (dict_.subDict("rpm").found(cellZoneNames[cellZoneI]))
{
rpm = readScalar(dict_.subDict("rpm").lookup(cellZoneNames[cellZoneI]));
rpm = readScalar
(
dict_.subDict("rpm").lookup(cellZoneNames[cellZoneI])
);
Info<< "Moving Cell Zone Name: " << cellZoneNames[cellZoneI]
<< " rpm: " << rpm << endl;

View file

@ -29,7 +29,8 @@ Description
Simple mixer mesh using an ggi interfaces
This tool is used to have multiple rotating regions around the same origin
with different rpms. Creating the cellZones is not implemented in this tool.
with different rpms. Creating the cellZones is not implemented
in this tool.
The steps to obtain the cellZones and faceZones are:
1) use regionCellSets utility. With this command you can have different

View file

@ -34,13 +34,13 @@ purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writePrecision 10;
writeCompression compressed;
timeFormat general;
timePrecision 4;
timePrecision 10;
runTimeModifiable yes;