Merge branch 'HrvojeJasak'
This commit is contained in:
commit
dbdb3f2d65
13 changed files with 59 additions and 28 deletions
|
@ -1,4 +1,5 @@
|
||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/engine/lnInclude \
|
-I$(LIB_SRC)/engine/lnInclude \
|
||||||
|
|
|
@ -34,20 +34,17 @@ Author
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
|
||||||
#include "engineTime.H"
|
#include "engineTime.H"
|
||||||
|
#include "engineTopoChangerMesh.H"
|
||||||
using namespace Foam;
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// Main program:
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createEngineTime.H"
|
# include "createEngineTime.H"
|
||||||
# include "createDynamicFvMesh.H"
|
# include "createEngineDynamicMesh.H"
|
||||||
|
|
||||||
scalar totalVolume = sum(mesh.V()).value();
|
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;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
|
|
|
@ -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)
|
Foam::TimeState Foam::Time::subCycle(const label nSubCycles)
|
||||||
{
|
{
|
||||||
subCycling_ = true;
|
subCycling_ = true;
|
||||||
|
|
|
@ -437,6 +437,9 @@ public:
|
||||||
//- Reset time step
|
//- Reset time step
|
||||||
virtual void setDeltaT(const scalar);
|
virtual void setDeltaT(const scalar);
|
||||||
|
|
||||||
|
//- Set write interval
|
||||||
|
void setWriteInterval(const scalar& deltaTheta);
|
||||||
|
|
||||||
//- Set time to sub-cycle for the given number of steps
|
//- Set time to sub-cycle for the given number of steps
|
||||||
virtual TimeState subCycle(const label nSubCycles);
|
virtual TimeState subCycle(const label nSubCycles);
|
||||||
|
|
||||||
|
|
|
@ -364,6 +364,11 @@ Foam::dimensionSet Foam::inv(const dimensionSet& ds)
|
||||||
return dimless/ds;
|
return dimless/ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Foam::dimensionSet Foam::hinv(const dimensionSet& ds)
|
||||||
|
{
|
||||||
|
return inv(ds);
|
||||||
|
}
|
||||||
|
|
||||||
Foam::dimensionSet Foam::trans(const dimensionSet& ds)
|
Foam::dimensionSet Foam::trans(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
if (dimensionSet::debug && !ds.dimensionless())
|
if (dimensionSet::debug && !ds.dimensionless())
|
||||||
|
|
|
@ -78,6 +78,7 @@ dimensionSet sign(const dimensionSet&);
|
||||||
dimensionSet pos(const dimensionSet&);
|
dimensionSet pos(const dimensionSet&);
|
||||||
dimensionSet neg(const dimensionSet&);
|
dimensionSet neg(const dimensionSet&);
|
||||||
dimensionSet inv(const dimensionSet&);
|
dimensionSet inv(const dimensionSet&);
|
||||||
|
dimensionSet hinv(const dimensionSet&);
|
||||||
|
|
||||||
// Function to check the argument is dimensionless
|
// Function to check the argument is dimensionless
|
||||||
// for transcendental functions
|
// for transcendental functions
|
||||||
|
|
|
@ -63,7 +63,7 @@ UNARY_FUNCTION(symmTensor, symmTensor, inv, inv)
|
||||||
UNARY_FUNCTION(symmTensor, symmTensor, hinv, hinv)
|
UNARY_FUNCTION(symmTensor, symmTensor, hinv, hinv)
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * global operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
UNARY_OPERATOR(vector, symmTensor, *, hdual, transform)
|
UNARY_OPERATOR(vector, symmTensor, *, hdual, transform)
|
||||||
|
|
||||||
|
|
|
@ -509,11 +509,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::maskedBridgeMaster
|
||||||
const labelList& mask
|
const labelList& mask
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if
|
if (ff.size() != mask.size())
|
||||||
(
|
|
||||||
bridgeField.size() != masterPatch_.size()
|
|
||||||
|| ff.size() != mask.size()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
@ -578,11 +574,7 @@ void GGIInterpolation<MasterPatch, SlavePatch>::maskedBridgeSlave
|
||||||
const labelList& mask
|
const labelList& mask
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if
|
if (ff.size() != mask.size())
|
||||||
(
|
|
||||||
bridgeField.size() != slavePatch_.size()
|
|
||||||
|| ff.size() != mask.size()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -311,7 +311,8 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||||
<< endl
|
<< endl
|
||||||
<< "Other errors also exist, only the largest is reported. "
|
<< "Other errors also exist, only the largest is reported. "
|
||||||
<< "Please rerun with cyclic debug flag set"
|
<< "Please rerun with cyclic debug flag set"
|
||||||
<< " for more information." << exit(FatalError);
|
<< " for more information."
|
||||||
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|
|
@ -297,9 +297,9 @@ Foam::tmp<Foam::Field<Type> > Foam::ggiPolyPatch::interpolate
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"tmp<Field<Type> > ggiPolyPatch::interpolate"
|
"tmp<Field<Type> > ggiPolyPatch::interpolate\n"
|
||||||
"("
|
"(\n"
|
||||||
" const Field<Type>& ff"
|
" const Field<Type>& ff\n"
|
||||||
") const"
|
") const"
|
||||||
) << "Incorrect slave patch field size. Field size: "
|
) << "Incorrect slave patch field size. Field size: "
|
||||||
<< ff.size() << " patch size: " << shadow().size()
|
<< ff.size() << " patch size: " << shadow().size()
|
||||||
|
@ -404,9 +404,30 @@ void Foam::ggiPolyPatch::bridge
|
||||||
Field<Type>& ff
|
Field<Type>& ff
|
||||||
) const
|
) 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())
|
if (bridgeOverlap())
|
||||||
{
|
{
|
||||||
# ifdef FAST_PARALLEL_GGI
|
# if 1
|
||||||
|
|
||||||
|
if (empty())
|
||||||
|
{
|
||||||
|
// Patch empty, no bridging
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (localParallel())
|
if (localParallel())
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,10 @@ void Foam::turboFvMesh::calcMovingPoints() const
|
||||||
|
|
||||||
if (dict_.subDict("rpm").found(cellZoneNames[cellZoneI]))
|
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]
|
Info<< "Moving Cell Zone Name: " << cellZoneNames[cellZoneI]
|
||||||
<< " rpm: " << rpm << endl;
|
<< " rpm: " << rpm << endl;
|
||||||
|
|
|
@ -29,7 +29,8 @@ Description
|
||||||
Simple mixer mesh using an ggi interfaces
|
Simple mixer mesh using an ggi interfaces
|
||||||
|
|
||||||
This tool is used to have multiple rotating regions around the same origin
|
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:
|
The steps to obtain the cellZones and faceZones are:
|
||||||
|
|
||||||
1) use regionCellSets utility. With this command you can have different
|
1) use regionCellSets utility. With this command you can have different
|
||||||
|
|
|
@ -34,13 +34,13 @@ purgeWrite 0;
|
||||||
|
|
||||||
writeFormat ascii;
|
writeFormat ascii;
|
||||||
|
|
||||||
writePrecision 6;
|
writePrecision 10;
|
||||||
|
|
||||||
writeCompression compressed;
|
writeCompression compressed;
|
||||||
|
|
||||||
timeFormat general;
|
timeFormat general;
|
||||||
|
|
||||||
timePrecision 4;
|
timePrecision 10;
|
||||||
|
|
||||||
runTimeModifiable yes;
|
runTimeModifiable yes;
|
||||||
|
|
||||||
|
|
Reference in a new issue