mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy2/OpenFOAM/OpenFOAM-dev
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -45,4 +45,7 @@ doc/[Dd]oxygen/man
|
|||||||
# ignore .timeStamp in the main directory
|
# ignore .timeStamp in the main directory
|
||||||
/.timeStamp
|
/.timeStamp
|
||||||
|
|
||||||
|
# ignore .ebrowse in the main directory
|
||||||
|
/.ebrowse
|
||||||
|
|
||||||
# end-of-file
|
# end-of-file
|
||||||
|
|||||||
@ -451,7 +451,7 @@ void doRefinement
|
|||||||
const labelHashSet& refCells,
|
const labelHashSet& refCells,
|
||||||
labelList& refLevel
|
labelList& refLevel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
label oldCells = mesh.nCells();
|
label oldCells = mesh.nCells();
|
||||||
|
|
||||||
// Multi-iteration, multi-direction topology modifier.
|
// Multi-iteration, multi-direction topology modifier.
|
||||||
@ -565,7 +565,7 @@ void subsetMesh
|
|||||||
// Update cutCells for removed cells.
|
// Update cutCells for removed cells.
|
||||||
cutCells.updateMesh(morphMap());
|
cutCells.updateMesh(morphMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Divide the cells according to status compared to surface. Constructs sets:
|
// Divide the cells according to status compared to surface. Constructs sets:
|
||||||
// - cutCells : all cells cut by surface
|
// - cutCells : all cells cut by surface
|
||||||
@ -877,7 +877,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
// Added cells from 2:1 refinement level restriction.
|
// Added cells from 2:1 refinement level restriction.
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
limitRefinementLevel
|
limitRefinementLevel
|
||||||
(
|
(
|
||||||
@ -887,7 +887,8 @@ int main(int argc, char *argv[])
|
|||||||
refLevel,
|
refLevel,
|
||||||
cutCells
|
cutCells
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
Info<< " Current cells : " << mesh.nCells() << nl
|
Info<< " Current cells : " << mesh.nCells() << nl
|
||||||
@ -988,7 +989,8 @@ int main(int argc, char *argv[])
|
|||||||
refLevel,
|
refLevel,
|
||||||
hanging
|
hanging
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
doRefinement(mesh, refineDict, hanging, refLevel);
|
doRefinement(mesh, refineDict, hanging, refLevel);
|
||||||
|
|
||||||
|
|||||||
@ -26,12 +26,12 @@ Description
|
|||||||
Tries to figure out what the refinement level is on refined cartesian
|
Tries to figure out what the refinement level is on refined cartesian
|
||||||
meshes. Run BEFORE snapping.
|
meshes. Run BEFORE snapping.
|
||||||
|
|
||||||
Writes
|
Writes
|
||||||
- volScalarField 'refinementLevel' with current refinement level.
|
- volScalarField 'refinementLevel' with current refinement level.
|
||||||
- cellSet 'refCells' which are the cells that need to be refined to satisfy
|
- cellSet 'refCells' which are the cells that need to be refined to satisfy
|
||||||
2:1 refinement.
|
2:1 refinement.
|
||||||
|
|
||||||
Works by dividing cells into volume bins.
|
Works by dividing cells into volume bins.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ bool limitRefinementLevel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (refCells.size() > oldNCells)
|
if (refCells.size() > oldNCells)
|
||||||
{
|
{
|
||||||
Info<< "Added an additional " << refCells.size() - oldNCells
|
Info<< "Added an additional " << refCells.size() - oldNCells
|
||||||
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
<< lowerLimits[lowerLimits.size()-1] << " .. "
|
<< lowerLimits[lowerLimits.size()-1] << " .. "
|
||||||
<< upperLimits[upperLimits.size()-1] << endl;
|
<< upperLimits[upperLimits.size()-1] << endl;
|
||||||
|
|
||||||
// Create new bin.
|
// Create new bin.
|
||||||
bins.append(DynamicList<label>());
|
bins.append(DynamicList<label>());
|
||||||
lowerLimits.append(sortedVols[i]);
|
lowerLimits.append(sortedVols[i]);
|
||||||
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
||||||
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
labelIOList refLevel
|
labelIOList refLevel
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -308,7 +308,7 @@ int main(int argc, char *argv[])
|
|||||||
bField[faceI] = postRefLevel[own];
|
bField[faceI] = postRefLevel[own];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Determined current refinement level and writing to "
|
Info<< "Determined current refinement level and writing to "
|
||||||
<< postRefLevel.name() << " (as volScalarField; for post processing)"
|
<< postRefLevel.name() << " (as volScalarField; for post processing)"
|
||||||
<< nl
|
<< nl
|
||||||
@ -325,7 +325,7 @@ int main(int argc, char *argv[])
|
|||||||
// Cells to refine
|
// Cells to refine
|
||||||
cellSet refCells(mesh, "refCells", 100);
|
cellSet refCells(mesh, "refCells", 100);
|
||||||
|
|
||||||
while
|
while
|
||||||
(
|
(
|
||||||
limitRefinementLevel
|
limitRefinementLevel
|
||||||
(
|
(
|
||||||
@ -333,7 +333,8 @@ int main(int argc, char *argv[])
|
|||||||
refLevel, // current refinement level
|
refLevel, // current refinement level
|
||||||
refCells // cells to refine
|
refCells // cells to refine
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
if (refCells.size() > 0)
|
if (refCells.size() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -265,7 +265,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&ansysStream);
|
yyFlexLexer lexer(&ansysStream);
|
||||||
while(lexer.yylex() != 0);
|
while(lexer.yylex() != 0)
|
||||||
|
{}
|
||||||
|
|
||||||
Info << "Creating points" << endl;
|
Info << "Creating points" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -583,7 +583,8 @@ endOfSection {space}")"{space}
|
|||||||
<readCellData>{spaceNl}{lbrac} {
|
<readCellData>{spaceNl}{lbrac} {
|
||||||
// Quickly scan to the end of the cell data block and discard
|
// Quickly scan to the end of the cell data block and discard
|
||||||
register int c;
|
register int c;
|
||||||
while ((c = yyinput()) != 0 && c != ')');
|
while ((c = yyinput()) != 0 && c != ')')
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
|
|
||||||
{faceTree} {
|
{faceTree} {
|
||||||
@ -763,7 +764,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
yyFlexLexer lexer(&fluentStream.stdStream());
|
yyFlexLexer lexer(&fluentStream.stdStream());
|
||||||
|
|
||||||
while(lexer.yylex() != 0);
|
while(lexer.yylex() != 0)
|
||||||
|
{}
|
||||||
|
|
||||||
Info<< "\nFINISHED LEXING\n\n";
|
Info<< "\nFINISHED LEXING\n\n";
|
||||||
|
|
||||||
|
|||||||
@ -901,7 +901,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&fluentStream);
|
yyFlexLexer lexer(&fluentStream);
|
||||||
while(lexer.yylex() != 0);
|
while(lexer.yylex() != 0)
|
||||||
|
{}
|
||||||
|
|
||||||
Info<< "\n\nFINISHED LEXING\n\n\n";
|
Info<< "\n\nFINISHED LEXING\n\n\n";
|
||||||
// Lookup table giving number of vertices given a fluent cell type ID
|
// Lookup table giving number of vertices given a fluent cell type ID
|
||||||
|
|||||||
@ -665,7 +665,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&gambitStream);
|
yyFlexLexer lexer(&gambitStream);
|
||||||
while(lexer.yylex() != 0);
|
while(lexer.yylex() != 0)
|
||||||
|
{}
|
||||||
|
|
||||||
Info << "Finished lexing" << endl;
|
Info << "Finished lexing" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ void writeVTK
|
|||||||
faceList setFaces(cellFaces.size());
|
faceList setFaces(cellFaces.size());
|
||||||
labelList faceValues(cellFaces.size());
|
labelList faceValues(cellFaces.size());
|
||||||
label setFaceI = 0;
|
label setFaceI = 0;
|
||||||
|
|
||||||
forAllConstIter(Map<label>, cellFaces, iter)
|
forAllConstIter(Map<label>, cellFaces, iter)
|
||||||
{
|
{
|
||||||
setFaces[setFaceI] = mesh.faces()[iter.key()];
|
setFaces[setFaceI] = mesh.faces()[iter.key()];
|
||||||
@ -217,7 +217,7 @@ void writeVTK
|
|||||||
mesh,
|
mesh,
|
||||||
currentSet,
|
currentSet,
|
||||||
mesh.time().path()/vtkName
|
mesh.time().path()/vtkName
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -331,7 +331,7 @@ bool doCommand
|
|||||||
// Get some size estimate for set.
|
// Get some size estimate for set.
|
||||||
const globalMeshData& parData = mesh.globalData();
|
const globalMeshData& parData = mesh.globalData();
|
||||||
|
|
||||||
label typSize =
|
label typSize =
|
||||||
max
|
max
|
||||||
(
|
(
|
||||||
parData.nTotalCells(),
|
parData.nTotalCells(),
|
||||||
@ -449,7 +449,7 @@ bool doCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (is >> sourceType)
|
if (is >> sourceType)
|
||||||
{
|
{
|
||||||
autoPtr<topoSetSource> setSource
|
autoPtr<topoSetSource> setSource
|
||||||
@ -743,7 +743,7 @@ int main(int argc, char *argv[])
|
|||||||
else if (!read_history(historyFile))
|
else if (!read_history(historyFile))
|
||||||
{
|
{
|
||||||
Info<< "Successfully read history from " << historyFile << endl;
|
Info<< "Successfully read history from " << historyFile << endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -754,7 +754,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.throwExceptions();
|
FatalError.throwExceptions();
|
||||||
FatalIOError.throwExceptions();
|
FatalIOError.throwExceptions();
|
||||||
|
|
||||||
while (1)
|
do
|
||||||
{
|
{
|
||||||
string rawLine;
|
string rawLine;
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,4 @@ EXE_INC = \
|
|||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools
|
||||||
|
|
||||||
|
|||||||
@ -2,5 +2,4 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,4 @@ EXE_INC = \
|
|||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,4 @@ EXE_INC = \
|
|||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,5 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-lmeshTools \
|
-lmeshTools
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
-lgen -lnsl -lsocket -lw -lintl -ldl
|
-lgen -lnsl -lsocket -lw -lintl -ldl
|
||||||
|
|
||||||
#elif defined(sgiN32) || defined(sgiN32Gcc)
|
#elif defined(sgiN32) || defined(sgiN32Gcc)
|
||||||
|
|
||||||
FV_LIBS = \
|
FV_LIBS = \
|
||||||
$(FV_HOME)/user/obj/iris/fv.o \
|
$(FV_HOME)/user/obj/iris/fv.o \
|
||||||
$(FV_HOME)/user/obj/iris/fv2.o \
|
$(FV_HOME)/user/obj/iris/fv2.o \
|
||||||
@ -94,12 +94,9 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/browser/lnInclude \
|
-I$(LIB_SRC)/browser/lnInclude \
|
||||||
-I$(FOAM_SRC)/lagrangian/basic/lnInclude \
|
-I$(FOAM_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
$(FV_LIBS) \
|
$(FV_LIBS) \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,4 +17,3 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lcompressibleLESmodels
|
-lcompressibleLESmodels
|
||||||
|
|
||||||
|
|||||||
@ -4,5 +4,4 @@ EXE_INC = \
|
|||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lsampling \
|
-lsampling
|
||||||
|
|
||||||
|
|||||||
@ -2,5 +2,4 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -2,5 +2,4 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
|||||||
@ -3,7 +3,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
-I$(LIB_SRC)/sampling/lnInclude \
|
||||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
|||||||
@ -2,5 +2,4 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels
|
||||||
|
|
||||||
|
|||||||
@ -7,5 +7,4 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -6,4 +6,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels
|
||||||
|
|||||||
@ -8,4 +8,3 @@ EXE_LIBS = \
|
|||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lspecie
|
-lspecie
|
||||||
|
|
||||||
|
|||||||
@ -2,5 +2,4 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -10,5 +10,4 @@ EXE_LIBS = \
|
|||||||
-lcombustionThermophysicalModels \
|
-lcombustionThermophysicalModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -7,5 +7,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleLESmodels \
|
-lincompressibleLESmodels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,4 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* See the header file progmesh.h for a description of this module
|
* See the header file progmesh.h for a description of this module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -151,11 +151,11 @@ void Vertex::RemoveIfNonNeighbor(Vertex *n) {
|
|||||||
|
|
||||||
|
|
||||||
float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
|
float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
|
||||||
// if we collapse edge uv by moving u to v then how
|
// if we collapse edge uv by moving u to v then how
|
||||||
// much different will the model change, i.e. how much "error".
|
// much different will the model change, i.e. how much "error".
|
||||||
// Texture, vertex normal, and border vertex code was removed
|
// Texture, vertex normal, and border vertex code was removed
|
||||||
// to keep this demo as simple as possible.
|
// to keep this demo as simple as possible.
|
||||||
// The method of determining cost was designed in order
|
// The method of determining cost was designed in order
|
||||||
// to exploit small and coplanar regions for
|
// to exploit small and coplanar regions for
|
||||||
// effective polygon reduction.
|
// effective polygon reduction.
|
||||||
// Is is possible to add some checks here to see if "folds"
|
// Is is possible to add some checks here to see if "folds"
|
||||||
@ -173,7 +173,7 @@ float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
|
|||||||
sides.Add(u->face[i]);
|
sides.Add(u->face[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// use the triangle facing most away from the sides
|
// use the triangle facing most away from the sides
|
||||||
// to determine our curvature term
|
// to determine our curvature term
|
||||||
for(i=0;i<u->face.num;i++) {
|
for(i=0;i<u->face.num;i++) {
|
||||||
float mincurv=1; // curve for face i and closer side to it
|
float mincurv=1; // curve for face i and closer side to it
|
||||||
@ -184,7 +184,7 @@ float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
|
|||||||
}
|
}
|
||||||
curvature = max(curvature,mincurv);
|
curvature = max(curvature,mincurv);
|
||||||
}
|
}
|
||||||
// the more coplanar the lower the curvature term
|
// the more coplanar the lower the curvature term
|
||||||
return edgelength * curvature;
|
return edgelength * curvature;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void ComputeEdgeCostAtVertex(Vertex *v) {
|
|||||||
// from vertex v. Since we are only interested in reducing
|
// from vertex v. Since we are only interested in reducing
|
||||||
// the object by selecting the min cost edge at each step, we
|
// the object by selecting the min cost edge at each step, we
|
||||||
// only cache the cost of the least cost edge at this vertex
|
// only cache the cost of the least cost edge at this vertex
|
||||||
// (in member variable collapse) as well as the value of the
|
// (in member variable collapse) as well as the value of the
|
||||||
// cost (in member variable objdist).
|
// cost (in member variable objdist).
|
||||||
if(v->neighbor.num==0) {
|
if(v->neighbor.num==0) {
|
||||||
// v doesn't have neighbors so it costs nothing to collapse
|
// v doesn't have neighbors so it costs nothing to collapse
|
||||||
@ -247,7 +247,7 @@ void Collapse(Vertex *u,Vertex *v){
|
|||||||
for(i=u->face.num-1;i>=0;i--) {
|
for(i=u->face.num-1;i>=0;i--) {
|
||||||
u->face[i]->ReplaceVertex(u,v);
|
u->face[i]->ReplaceVertex(u,v);
|
||||||
}
|
}
|
||||||
delete u;
|
delete u;
|
||||||
// recompute the edge collapse costs for neighboring vertices
|
// recompute the edge collapse costs for neighboring vertices
|
||||||
for(i=0;i<tmp.num;i++) {
|
for(i=0;i<tmp.num;i++) {
|
||||||
ComputeEdgeCostAtVertex(tmp[i]);
|
ComputeEdgeCostAtVertex(tmp[i]);
|
||||||
@ -256,15 +256,15 @@ void Collapse(Vertex *u,Vertex *v){
|
|||||||
|
|
||||||
void AddVertex(List<Vector> &vert){
|
void AddVertex(List<Vector> &vert){
|
||||||
for(int i=0;i<vert.num;i++) {
|
for(int i=0;i<vert.num;i++) {
|
||||||
Vertex *v = new Vertex(vert[i],i);
|
new Vertex(vert[i],i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void AddFaces(List<tridata> &tri){
|
void AddFaces(List<tridata> &tri){
|
||||||
for(int i=0;i<tri.num;i++) {
|
for(int i=0;i<tri.num;i++) {
|
||||||
Triangle *t=new Triangle(
|
new Triangle(
|
||||||
vertices[tri[i].v[0]],
|
vertices[tri[i].v[0]],
|
||||||
vertices[tri[i].v[1]],
|
vertices[tri[i].v[1]],
|
||||||
vertices[tri[i].v[2]] );
|
vertices[tri[i].v[2]] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ Vertex *MinimumCostEdge(){
|
|||||||
return mn;
|
return mn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgressiveMesh(List<Vector> &vert, List<tridata> &tri,
|
void ProgressiveMesh(List<Vector> &vert, List<tridata> &tri,
|
||||||
List<int> &map, List<int> &permutation)
|
List<int> &map, List<int> &permutation)
|
||||||
{
|
{
|
||||||
AddVertex(vert); // put input data into our data structures
|
AddVertex(vert); // put input data into our data structures
|
||||||
|
|||||||
@ -131,7 +131,8 @@ s/^ //
|
|||||||
|
|
||||||
/SourceFiles/,/^[ ]*$/{
|
/SourceFiles/,/^[ ]*$/{
|
||||||
s?SourceFiles?@par Source files\
|
s?SourceFiles?@par Source files\
|
||||||
<ul>?
|
<ul>\
|
||||||
|
<li><a href="%filePath%">%fileName%</a></li>?
|
||||||
s?^[ ]*$?</ul>\
|
s?^[ ]*$?</ul>\
|
||||||
?
|
?
|
||||||
s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
|
s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
|
||||||
|
|||||||
52
bin/foamEbrowse
Executable file
52
bin/foamEbrowse
Executable file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2007 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
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# foamEbrowse
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build the Ebrowse dadbase for all the .C and .H files
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
headersFile=${TMPDIR:-/tmp}/headersFile.$$
|
||||||
|
sourcesFile=${TMPDIR:-/tmp}/sourcesFile.$$
|
||||||
|
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
echo "Usage : ${0##*/}"
|
||||||
|
echo ""
|
||||||
|
echo "Build the Ebrowse dadbase for all the .C and .H files"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $WM_PROJECT_DIR
|
||||||
|
find -H . -name "*.H" | fgrep -v "lnInclude" > $headersFile
|
||||||
|
find -H . -name "*.C" | fgrep -v "lnInclude" > $sourcesFile
|
||||||
|
ebrowse --files=$headersFile --files=$sourcesFile --output-file=.ebrowse
|
||||||
|
|
||||||
|
# Clean up on termination and on Ctrl-C
|
||||||
|
trap 'rm -f $headersFile $sourcesFile 2>/dev/null; exit 0' EXIT TERM INT
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -73,6 +73,7 @@ find -H $packDir \
|
|||||||
-a ! -name "core" \
|
-a ! -name "core" \
|
||||||
-a ! -name "core.[1-9]*" \
|
-a ! -name "core.[1-9]*" \
|
||||||
-a ! -name "log[0-9]*" \
|
-a ! -name "log[0-9]*" \
|
||||||
|
-a ! -name "\.ebrowse" \
|
||||||
| sed \
|
| sed \
|
||||||
-e "\@$packDir/.git/@d" \
|
-e "\@$packDir/.git/@d" \
|
||||||
-e "\@$packDir/lib/@d" \
|
-e "\@$packDir/lib/@d" \
|
||||||
|
|||||||
@ -141,6 +141,11 @@ public:
|
|||||||
return hitPoint_;
|
return hitPoint_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Point& rawPoint()
|
||||||
|
{
|
||||||
|
return hitPoint_;
|
||||||
|
}
|
||||||
|
|
||||||
void setHit()
|
void setHit()
|
||||||
{
|
{
|
||||||
hit_ = true;
|
hit_ = true;
|
||||||
|
|||||||
@ -81,6 +81,10 @@ public:
|
|||||||
scalar exponent;
|
scalar exponent;
|
||||||
|
|
||||||
specieCoeffs()
|
specieCoeffs()
|
||||||
|
:
|
||||||
|
index(-1),
|
||||||
|
stoichCoeff(0),
|
||||||
|
exponent(1)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
specieCoeffs(const speciesTable& species, Istream& is);
|
specieCoeffs(const speciesTable& species, Istream& is);
|
||||||
@ -157,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
const speciesTable& species_;
|
const speciesTable& species_;
|
||||||
const HashPtrTable<ReactionThermo>& thermoDatabase_;
|
const HashPtrTable<ReactionThermo>& thermoDatabase_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
iNew
|
iNew
|
||||||
@ -257,7 +261,7 @@ public:
|
|||||||
const scalar T,
|
const scalar T,
|
||||||
const scalar p,
|
const scalar p,
|
||||||
const scalarField& c
|
const scalarField& c
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Reverse rate constant from the given forward rate constant
|
//- Reverse rate constant from the given forward rate constant
|
||||||
virtual scalar kr
|
virtual scalar kr
|
||||||
|
|||||||
@ -43,23 +43,10 @@ echo ""
|
|||||||
|
|
||||||
for application in *
|
for application in *
|
||||||
do
|
do
|
||||||
if [ -d "$application" ]
|
if [ -d $application ]
|
||||||
then
|
then
|
||||||
cd $application
|
(cd $application && ../cleanAll)
|
||||||
if [ -f "Allclean" ]
|
fi
|
||||||
then
|
|
||||||
./Allclean
|
|
||||||
else
|
|
||||||
for case in *
|
|
||||||
do
|
|
||||||
if [ -d "$case" ]
|
|
||||||
then
|
|
||||||
cleanCase $case
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
126
tutorials/Allrun
126
tutorials/Allrun
@ -32,94 +32,64 @@
|
|||||||
|
|
||||||
. RunFunctions
|
. RunFunctions
|
||||||
|
|
||||||
applications=\
|
|
||||||
" \
|
|
||||||
icoFoam \
|
|
||||||
turbFoam \
|
|
||||||
simpleFoam \
|
|
||||||
icoDyMFoam \
|
|
||||||
nonNewtonianIcoFoam \
|
|
||||||
boundaryFoam \
|
|
||||||
interFoam \
|
|
||||||
lesInterFoam \
|
|
||||||
rasInterFoam \
|
|
||||||
multiphaseInterFoam \
|
|
||||||
buoyantSimpleFoam \
|
|
||||||
buoyantFoam \
|
|
||||||
potentialFoam \
|
|
||||||
laplacianFoam \
|
|
||||||
scalarTransportFoam \
|
|
||||||
oodles \
|
|
||||||
coodles \
|
|
||||||
channelOodles \
|
|
||||||
dnsFoam \
|
|
||||||
mhdFoam \
|
|
||||||
electrostaticFoam \
|
|
||||||
financialFoam \
|
|
||||||
sonicFoam \
|
|
||||||
rhoSonicFoam \
|
|
||||||
rhopSonicFoam \
|
|
||||||
sonicLiquidFoam \
|
|
||||||
sonicTurbFoam \
|
|
||||||
solidDisplacementFoam \
|
|
||||||
solidEquilibriumDisplacementFoam \
|
|
||||||
XiFoam \
|
|
||||||
Xoodles \
|
|
||||||
dieselFoam \
|
|
||||||
engineFoam \
|
|
||||||
bubbleFoam \
|
|
||||||
twoPhaseEulerFoam \
|
|
||||||
settlingFoam \
|
|
||||||
rhoExplicitPorousSimpleFoam \
|
|
||||||
rhoImplicitPorousSimpleFoam \
|
|
||||||
rhoTurbFoam \
|
|
||||||
cavitatingFoam \
|
|
||||||
MRFSimpleFoam \
|
|
||||||
interDyMFoam \
|
|
||||||
"
|
|
||||||
|
|
||||||
|
# logReport <logfile>
|
||||||
|
# Extracts useful info from log file.
|
||||||
logReport () {
|
logReport () {
|
||||||
case=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
|
case=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
|
||||||
app=`echo $1 | sed s/"\(.*\)\."/""/g`
|
app=`echo $1 | sed s/"\(.*\)\."/""/g`
|
||||||
appAndCase="Application $app - case $case"
|
appAndCase="Application $app - case $case"
|
||||||
|
|
||||||
fatalError=`grep "FOAM FATAL" $1`
|
fatalError=`grep "FOAM FATAL" $1`
|
||||||
UxSS=`grep -E "Ux[:| ]*solution singularity" $1`
|
UxSS=`grep -E "Ux[:| ]*solution singularity" $1`
|
||||||
UySS=`grep -E "Uy[:| ]*solution singularity" $1`
|
UySS=`grep -E "Uy[:| ]*solution singularity" $1`
|
||||||
UzSS=`grep -E "Uz[:| ]*solution singularity" $1`
|
UzSS=`grep -E "Uz[:| ]*solution singularity" $1`
|
||||||
completed=`grep -E "^[\t ]*[eE]nd" $1`
|
completed=`grep -E "^[\t ]*[eE]nd" $1`
|
||||||
|
|
||||||
if [ "$fatalError" ] ; then
|
if [ "$fatalError" ] ; then
|
||||||
echo "$appAndCase: ** FOAM FATAL ERROR **"
|
echo "$appAndCase: ** FOAM FATAL ERROR **"
|
||||||
return
|
return
|
||||||
elif [ "$UxSS" -a "$UySS" -a "$UzSS" ] ; then
|
elif [ "$UxSS" -a "$UySS" -a "$UzSS" ] ; then
|
||||||
echo "$appAndCase: ** Solution singularity **"
|
echo "$appAndCase: ** Solution singularity **"
|
||||||
return
|
return
|
||||||
elif [ "$completed" ] ; then
|
elif [ "$completed" ] ; then
|
||||||
completionTime=`tail -10 $log | grep Execution | cut -d= -f2 | sed 's/^[ \t]*//'`
|
completionTime=`tail -10 $log | grep Execution | cut -d= -f2 | sed 's/^[ \t]*//'`
|
||||||
if [ "$completionTime" ] ; then
|
if [ "$completionTime" ] ; then
|
||||||
completionTime="in $completionTime"
|
completionTime="in $completionTime"
|
||||||
|
fi
|
||||||
|
echo "$appAndCase: completed $completionTime"
|
||||||
|
return
|
||||||
|
else
|
||||||
|
echo "$appAndCase: unconfirmed completion"
|
||||||
fi
|
fi
|
||||||
echo "$appAndCase: completed $completionTime"
|
|
||||||
return
|
|
||||||
else
|
|
||||||
echo "$appAndCase: unconfirmed completion"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Recursively run all tutorials
|
||||||
|
for application in *
|
||||||
|
do
|
||||||
|
if [ -d $application ]
|
||||||
|
then
|
||||||
|
#(cd $application && ../runAll)
|
||||||
|
$WM_SCHEDULER "cd $PWD/$application && ../runAll"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Analyse all log files
|
||||||
rm testLoopReport > /dev/null 2>&1 &
|
rm testLoopReport > /dev/null 2>&1 &
|
||||||
touch testLoopReport
|
touch testLoopReport
|
||||||
for application in $applications
|
for application in *
|
||||||
do
|
do
|
||||||
cd $application
|
if [ -d $application ]
|
||||||
./Allrun
|
then
|
||||||
# echo "$application application completed" >> ../testLoopReport
|
cd $application
|
||||||
for log in `find . -name "log.*" | xargs ls -rt`
|
for log in `find . -name "log.*" | xargs ls -rt`
|
||||||
do
|
do
|
||||||
logReport $log >> ../testLoopReport
|
logReport $log >> ../testLoopReport
|
||||||
done
|
done
|
||||||
echo "" >> ../testLoopReport
|
echo "" >> ../testLoopReport
|
||||||
cd ..
|
cd ..
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
find . -name "log.*" -exec cat {} \; >> logs
|
find . -name "log.*" -exec cat {} \; >> logs
|
||||||
|
|||||||
@ -65,7 +65,22 @@ EOF
|
|||||||
#
|
#
|
||||||
# VARIABLE
|
# VARIABLE
|
||||||
#
|
#
|
||||||
MAIN_CONTROL_DICT=${WM_PROJECT_DIR}/${FOAM_DOT_DIR}/controlDict
|
MAIN_CONTROL_DICT=
|
||||||
|
: ${FOAM_DOT_DIR:=.$WM_PROJECT-$WM_PROJECT_VERSION}
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
$HOME/$FOAM_DOT_DIR \
|
||||||
|
$HOME/.$WM_PROJECT/$WM_PROJECT_VERSION \
|
||||||
|
$HOME/.$WM_PROJECT \
|
||||||
|
$WM_PROJECT_DIR/etc \
|
||||||
|
$WM_PROJECT_DIR/$FOAM_DOT_DIR \
|
||||||
|
;
|
||||||
|
do
|
||||||
|
if [ -f "$i/controlDict" ]; then
|
||||||
|
MAIN_CONTROL_DICT="$i/controlDict"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
TUTORIALS_DIR=.
|
TUTORIALS_DIR=.
|
||||||
TEST_RUN_DIR=../tutorialsTest
|
TEST_RUN_DIR=../tutorialsTest
|
||||||
FV_SCHEMES=\
|
FV_SCHEMES=\
|
||||||
|
|||||||
@ -38,33 +38,33 @@
|
|||||||
# do
|
# do
|
||||||
# if [ $T != "0" ] ; then
|
# if [ $T != "0" ] ; then
|
||||||
# echo "Deleting directory $T"
|
# echo "Deleting directory $T"
|
||||||
# rm -rf $1/${T} > /dev/null 2>&1
|
# rm -rf ${T} > /dev/null 2>&1
|
||||||
# fi
|
# fi
|
||||||
# done
|
# done
|
||||||
# rm -rf $1/{log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
|
# rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
|
||||||
#}
|
#}
|
||||||
|
|
||||||
cleanTimeDirectories ()
|
cleanTimeDirectories ()
|
||||||
{
|
{
|
||||||
echo "Cleaning $case case of $application application"
|
echo "Cleaning $PWD case"
|
||||||
nZeros=0
|
nZeros=0
|
||||||
zeros=""
|
zeros=""
|
||||||
while [ $nZeros -lt 8 ] ; do
|
while [ $nZeros -lt 8 ] ; do
|
||||||
timeDir="0.${zeros}[1-9]*"
|
timeDir="0.${zeros}[1-9]*"
|
||||||
rm -rf $1/${timeDir} > /dev/null 2>&1
|
rm -rf ${timeDir} > /dev/null 2>&1
|
||||||
rm -rf $1/-${timeDir} > /dev/null 2>&1
|
rm -rf ./-${timeDir} > /dev/null 2>&1
|
||||||
zeros=`printf %0${nZeros}d 0`
|
zeros=`printf %0${nZeros}d 0`
|
||||||
nZeros=$(($nZeros + 1))
|
nZeros=$(($nZeros + 1))
|
||||||
done
|
done
|
||||||
rm -rf $1/{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
|
rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.foam} > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanCase ()
|
cleanCase ()
|
||||||
{
|
{
|
||||||
cleanTimeDirectories $1
|
cleanTimeDirectories
|
||||||
|
|
||||||
rm -rf $1/constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
|
rm -rf constant/polyMesh/{allOwner*,cell*,face*,meshModifiers*} \
|
||||||
$1/constant/polyMesh/{owner*,neighbour*,point*,edge*} \
|
constant/polyMesh/{owner*,neighbour*,point*,edge*} \
|
||||||
> /dev/null 2>&1
|
> /dev/null 2>&1
|
||||||
|
|
||||||
for f in `find . -name "*Dict"`
|
for f in `find . -name "*Dict"`
|
||||||
@ -76,25 +76,25 @@ cleanCase ()
|
|||||||
|
|
||||||
cleanParallelCase ()
|
cleanParallelCase ()
|
||||||
{
|
{
|
||||||
cleanCase $1
|
cleanCase
|
||||||
|
|
||||||
rm -rf $1/processor* > /dev/null 2>&1
|
rm -rf processor* > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCase ()
|
removeCase ()
|
||||||
{
|
{
|
||||||
echo "Removing $case case of $application application"
|
echo "Removing $case case"
|
||||||
rm -rf $1
|
rm -rf $1
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanSamples ()
|
cleanSamples ()
|
||||||
{
|
{
|
||||||
rm -rf $1/{samples,sampleSurfaces} > /dev/null 2>&1
|
rm -rf {samples,sampleSurfaces} > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanUcomponents ()
|
cleanUcomponents ()
|
||||||
{
|
{
|
||||||
rm -rf $1/0/{Ux,Uy,Uz} > /dev/null 2>&1
|
rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
17
tutorials/MRFSimpleFoam/mixerVessel2D/Allclean
Executable file
17
tutorials/MRFSimpleFoam/mixerVessel2D/Allclean
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
wclean ../MRFSimpleFoam
|
||||||
19
tutorials/MRFSimpleFoam/mixerVessel2D/Allrun
Executable file
19
tutorials/MRFSimpleFoam/mixerVessel2D/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
compileApplication ../MRFSimpleFoam
|
||||||
|
runApplication makeMesh
|
||||||
|
runApplication $application
|
||||||
|
|
||||||
129
tutorials/README.txt
Normal file
129
tutorials/README.txt
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
To run all : Allrun
|
||||||
|
To run all one iteration : Alltest
|
||||||
|
To clean all : Allclean
|
||||||
|
|
||||||
|
The structure now is that a case that only requires blockMesh
|
||||||
|
and application does not need an Allrun or Allclean script.
|
||||||
|
Only if running is special it requires an Allrun. Similarly
|
||||||
|
if cleaning is non-standard.
|
||||||
|
|
||||||
|
|
||||||
|
run clean
|
||||||
|
boundaryFoam
|
||||||
|
boundaryLaunderSharma ok
|
||||||
|
boundaryWallFunctions ok
|
||||||
|
bubbleFoam
|
||||||
|
bubbleColumn ok
|
||||||
|
buoyantFoam
|
||||||
|
hotRoom ok
|
||||||
|
buoyantSimpleFoam
|
||||||
|
hotRoom ok
|
||||||
|
buoyantSimpleRadiationFoam
|
||||||
|
hotRadiationRoom ok
|
||||||
|
cavitatingFoam
|
||||||
|
nozzle2D No cavitatingFoam solver.
|
||||||
|
channelOodles
|
||||||
|
channel395 ok
|
||||||
|
coodles
|
||||||
|
pitzDaily ok
|
||||||
|
dieselFoam
|
||||||
|
aachenBomb
|
||||||
|
dnsFoam
|
||||||
|
boxTurb16
|
||||||
|
electrostaticFoam
|
||||||
|
chargedWire ok
|
||||||
|
engineFoam
|
||||||
|
kivaTest
|
||||||
|
financialFoam
|
||||||
|
europeanCall ok
|
||||||
|
icoDyMFoam
|
||||||
|
movingCone ok ok
|
||||||
|
icoFoam
|
||||||
|
cavity ok ok
|
||||||
|
cavityFine ok ok
|
||||||
|
cavityGrade ok ok
|
||||||
|
cavityHighRe ok ok
|
||||||
|
cavityClipped ok ok
|
||||||
|
elbow ok ok
|
||||||
|
interDyMFoam
|
||||||
|
damBreakWithObstacle ok ok
|
||||||
|
interFoam
|
||||||
|
damBreak ok ok
|
||||||
|
damBreakFine ok ok
|
||||||
|
laplacianFoam
|
||||||
|
flange ok ok
|
||||||
|
lesInterFoam
|
||||||
|
nozzleFlow2D
|
||||||
|
mdEquilibrationFoam
|
||||||
|
periodicCube
|
||||||
|
mhdFoam ok
|
||||||
|
hartmann
|
||||||
|
MRFSimpleFoam
|
||||||
|
mixerVessel2D
|
||||||
|
multiphaseInterFoam
|
||||||
|
damBreak4phase
|
||||||
|
damBreak4phaseFine
|
||||||
|
nonNewtonianIcoFoam
|
||||||
|
offsetCylinder
|
||||||
|
oodles
|
||||||
|
pitzDaily
|
||||||
|
pitzDailyDirectMapped
|
||||||
|
potentialFoam
|
||||||
|
cylinder
|
||||||
|
pitzDaily
|
||||||
|
rasInterFoam
|
||||||
|
damBreak
|
||||||
|
damBreakFine
|
||||||
|
rhoPimpleFoam
|
||||||
|
angledDuct
|
||||||
|
rhoPorousSimpleFoam
|
||||||
|
angledDuctExplicit
|
||||||
|
angledDuctImplicit
|
||||||
|
rhopSonicFoam
|
||||||
|
shockTube
|
||||||
|
wedge15Ma5
|
||||||
|
rhoSonicFoam
|
||||||
|
forwardStep
|
||||||
|
shockTube No setShock application
|
||||||
|
rhoTurbFoam
|
||||||
|
cavity
|
||||||
|
rhoTurbTwinParcelFoam
|
||||||
|
simplifiedSiwek
|
||||||
|
scalarTransportFoam
|
||||||
|
pitzDaily
|
||||||
|
settlingFoam
|
||||||
|
dahl
|
||||||
|
tank3D
|
||||||
|
simpleFoam
|
||||||
|
pitzDaily
|
||||||
|
pitzDaily3Blocks
|
||||||
|
pitzDailyExptInlet
|
||||||
|
simpleSRFFoam
|
||||||
|
mixer
|
||||||
|
simpleSRFFoam
|
||||||
|
solidDisplacementFoam
|
||||||
|
plateHole
|
||||||
|
solidEquilibriumDisplacementFoam
|
||||||
|
beamEndLoad
|
||||||
|
sonicFoam
|
||||||
|
forwardStep
|
||||||
|
shockTube
|
||||||
|
sonicLiquidFoam
|
||||||
|
decompressionTank
|
||||||
|
decompressionTankFine
|
||||||
|
sonicTurbFoam
|
||||||
|
nacaAirfoil
|
||||||
|
prism
|
||||||
|
turbFoam
|
||||||
|
cavity
|
||||||
|
twoPhaseEulerFoam
|
||||||
|
bed
|
||||||
|
bed2
|
||||||
|
bubbleColumn
|
||||||
|
XiFoam
|
||||||
|
moriyoshiHomogeneous
|
||||||
|
moriyoshiHomogeneousPart2
|
||||||
|
Xoodles
|
||||||
|
pitzDaily
|
||||||
|
pitzDaily3D
|
||||||
|
|
||||||
@ -33,31 +33,29 @@
|
|||||||
runApplication ()
|
runApplication ()
|
||||||
{
|
{
|
||||||
APP_RUN=$1; shift
|
APP_RUN=$1; shift
|
||||||
dir=$1; shift
|
|
||||||
|
|
||||||
if [ -f $dir/log.$APP_RUN ] ; then
|
if [ -f log.$APP_RUN ] ; then
|
||||||
echo "$APP_RUN already run on $dir: remove log file to run"
|
echo "$APP_RUN already run on $PWD: remove log file to run"
|
||||||
else
|
else
|
||||||
echo "Running $APP_RUN on $dir"
|
echo "Running $APP_RUN on $PWD"
|
||||||
( cd $dir && $APP_RUN $* > log.$APP_RUN 2>&1 )
|
$APP_RUN $* > log.$APP_RUN 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
runParallel ()
|
runParallel ()
|
||||||
{
|
{
|
||||||
APP_RUN=$1; shift
|
APP_RUN=$1; shift
|
||||||
dir=$2; shift
|
|
||||||
|
|
||||||
if [ -f $dir/log.$APP_RUN ] ; then
|
if [ -f $log.$APP_RUN ] ; then
|
||||||
echo "$APP_RUN already run on $dir: remove log file to run"
|
echo "$APP_RUN already run on $PWD: remove log file to run"
|
||||||
else
|
else
|
||||||
if [ "$WM_MPLIB" = LAM ]
|
if [ "$WM_MPLIB" = LAM ]
|
||||||
then
|
then
|
||||||
echo "Starting LAM using $2 machines file"
|
echo "Starting LAM using $2 machines file"
|
||||||
lamboot -v $2
|
lamboot -v $2
|
||||||
fi
|
fi
|
||||||
echo "Running $APP_RUN in parallel on $dir using $1 processes"
|
echo "Running $APP_RUN in parallel on $PWD using $1 processes"
|
||||||
( cd $dir && mpirun -np $1 $APP_RUN -parallel < /dev/null > log.$APP_RUN 2>&1 )
|
( mpirun -np $1 $APP_RUN -parallel < /dev/null > log.$APP_RUN 2>&1 )
|
||||||
if [ "$WM_MPLIB" = LAM ]
|
if [ "$WM_MPLIB" = LAM ]
|
||||||
then
|
then
|
||||||
echo "Stopping LAM"
|
echo "Stopping LAM"
|
||||||
@ -68,8 +66,8 @@ runParallel ()
|
|||||||
|
|
||||||
compileApplication ()
|
compileApplication ()
|
||||||
{
|
{
|
||||||
echo "Compiling $1/$2 application"
|
echo "Compiling $1 application"
|
||||||
wmake $1/$2
|
wmake $1
|
||||||
}
|
}
|
||||||
|
|
||||||
cloneCase ()
|
cloneCase ()
|
||||||
|
|||||||
@ -1,16 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keepCases="moriyoshiHomogeneous"
|
keepCases="moriyoshiHomogeneous"
|
||||||
loseCases="moriyoshiHomogeneousPart2"
|
loseCases="moriyoshiHomogeneousPart2"
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
|
||||||
. $tutorialPath/CleanFunctions
|
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
cleanCase $case
|
(cd $case && $tutorialsDir/cleanAll)
|
||||||
done
|
done
|
||||||
|
|
||||||
for case in $loseCases
|
for case in $loseCases
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="moriyoshiHomogeneous moriyoshiHomogeneousPart2"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/RunFunctions
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setControlDict () {
|
setControlDict () {
|
||||||
controlDict="$case/system/controlDict"
|
controlDict="system/controlDict"
|
||||||
sed \
|
sed \
|
||||||
-e s/"\(deltaT[ \t]*\) 5e-06;"/"\1 1e-05;"/g \
|
-e s/"\(deltaT[ \t]*\) 5e-06;"/"\1 1e-05;"/g \
|
||||||
-e s/"\(endTime[ \t]*\) 0.005;"/"\1 0.015;"/g \
|
-e s/"\(endTime[ \t]*\) 0.005;"/"\1 0.015;"/g \
|
||||||
@ -17,14 +23,17 @@ setControlDict () {
|
|||||||
mv temp.$$ $controlDict
|
mv temp.$$ $controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
do
|
|
||||||
if [ "$case" = "moriyoshiHomogeneousPart2" ] ; then
|
# Do moriyoshiHomogeneous
|
||||||
cloneCase moriyoshiHomogeneous $case
|
(cd moriyoshiHomogeneous && $tutorialPath/runAll)
|
||||||
cp -r moriyoshiHomogeneous/0.005 $case
|
|
||||||
setControlDict
|
# Clone case
|
||||||
else
|
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
|
||||||
runApplication blockMesh $case
|
# Modify and execute
|
||||||
fi
|
cd moriyoshiHomogeneousPart2
|
||||||
runApplication $application $case
|
cp -r ../moriyoshiHomogeneous/0.005 .
|
||||||
done
|
setControlDict
|
||||||
|
runApplication $application
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
|||||||
19
tutorials/buoyantFoam/hotRoom/Allclean
Executable file
19
tutorials/buoyantFoam/hotRoom/Allclean
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
cp 0/T.org 0/T
|
||||||
|
wclean setHotRoom
|
||||||
19
tutorials/buoyantFoam/hotRoom/Allrun
Executable file
19
tutorials/buoyantFoam/hotRoom/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
compileApplication setHotRoom
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setHotRoom
|
||||||
|
runApplication $application
|
||||||
@ -24,7 +24,7 @@ FoamFile
|
|||||||
|
|
||||||
application buoyantFoam;
|
application buoyantFoam;
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom startTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,12 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
};
|
};
|
||||||
pd PCG
|
pd PCG
|
||||||
|
{
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0.1;
|
||||||
|
};
|
||||||
|
pdFinal PCG
|
||||||
{
|
{
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-06;
|
tolerance 1e-06;
|
||||||
|
|||||||
18
tutorials/buoyantSimpleFoam/hotRoom/Allclean
Executable file
18
tutorials/buoyantSimpleFoam/hotRoom/Allclean
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
cp 0/T.org 0/T
|
||||||
|
wclean ../../buoyantFoam/hotRoom/setHotRoom
|
||||||
20
tutorials/buoyantSimpleFoam/hotRoom/Allrun
Executable file
20
tutorials/buoyantSimpleFoam/hotRoom/Allrun
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
compileApplication ../../buoyantFoam/hotRoom/setHotRoom
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setHotRoom
|
||||||
|
runApplication $application
|
||||||
20
tutorials/channelOodles/channel395/Allrun
Executable file
20
tutorials/channelOodles/channel395/Allrun
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
runApplication postChannel
|
||||||
|
|
||||||
67
tutorials/cleanAll
Executable file
67
tutorials/cleanAll
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2007 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
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# cleanAll
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Run either Allclean or default cleanCase in current directory
|
||||||
|
# and all its subdirectories.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
tutorialsDir=$PWD
|
||||||
|
while [ ! -f $tutorialsDir/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialsDir="$tutorialsDir/.."
|
||||||
|
done
|
||||||
|
. $tutorialsDir/CleanFunctions
|
||||||
|
|
||||||
|
thisScript=$0
|
||||||
|
if [ "/${thisScript#/}" != "$thisScript" ]
|
||||||
|
then
|
||||||
|
thisScript="$PWD/$thisScript"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "./Allclean" ]
|
||||||
|
then
|
||||||
|
# Specialised script.
|
||||||
|
./Allclean
|
||||||
|
elif [ -d "./system" ]
|
||||||
|
then
|
||||||
|
# Normal case.
|
||||||
|
cleanCase
|
||||||
|
else
|
||||||
|
# Recurse to subdirectories
|
||||||
|
for case in *
|
||||||
|
do
|
||||||
|
if [ -d $case ]
|
||||||
|
then
|
||||||
|
(cd $case && $thisScript)
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
18
tutorials/dnsFoam/boxTurb16/Allclean
Executable file
18
tutorials/dnsFoam/boxTurb16/Allclean
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0
|
||||||
|
cp -r 0.org 0
|
||||||
19
tutorials/dnsFoam/boxTurb16/Allrun
Executable file
19
tutorials/dnsFoam/boxTurb16/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication boxTurb
|
||||||
|
runApplication $application
|
||||||
|
runApplication enstrophy
|
||||||
21
tutorials/engineFoam/kivaTest/Allclean
Executable file
21
tutorials/engineFoam/kivaTest/Allclean
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mv ./-180 temp180
|
||||||
|
rm -rf 0
|
||||||
|
cp system/controlDict.1st system/controlDict
|
||||||
|
cleanCase
|
||||||
|
mv temp180 ./-180
|
||||||
43
tutorials/engineFoam/kivaTest/Allrun
Executable file
43
tutorials/engineFoam/kivaTest/Allrun
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runKivaToFoam ()
|
||||||
|
{
|
||||||
|
if [ -f log.kivaToFoam ] ; then
|
||||||
|
echo "kivaToFoam already run on $PWD: remove log file to run"
|
||||||
|
else
|
||||||
|
echo "kivaToFoam: converting kiva file"
|
||||||
|
kivaToFoam -file $1 > log.kivaToFoam 2>&1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
restartApplication ()
|
||||||
|
{
|
||||||
|
if [ -f log-2.$1 ] ; then
|
||||||
|
echo "$1 already run on $PWD: remove log file to run"
|
||||||
|
else
|
||||||
|
echo "Running $1 on $PWD"
|
||||||
|
$1 > log-2.$1 2>&1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runKivaToFoam . $case/otape17
|
||||||
|
cp system/controlDict.1st system/controlDict
|
||||||
|
runApplication $application
|
||||||
|
cp system/controlDict.2nd system/controlDict
|
||||||
|
restartApplication $application
|
||||||
@ -2,15 +2,24 @@
|
|||||||
|
|
||||||
currDir=`pwd`
|
currDir=`pwd`
|
||||||
application=`basename $currDir`
|
application=`basename $currDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
keepCases="cavity cavityGrade cavityClipped elbow"
|
keepCases="cavity cavityGrade cavityClipped elbow"
|
||||||
loseCases="cavityFine cavityHighRe"
|
loseCases="cavityFine cavityHighRe"
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
|
||||||
. $tutorialPath/CleanFunctions
|
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
cleanCase $case
|
(cd $case && $tutorialPath/cleanAll)
|
||||||
|
|
||||||
if [ "$case" = "elbow" ]
|
if [ "$case" = "elbow" ]
|
||||||
then
|
then
|
||||||
rm -rf $case/fluentInterface
|
rm -rf $case/fluentInterface
|
||||||
|
|||||||
@ -10,19 +10,19 @@ tutorialPath=`dirname $0`/..
|
|||||||
runMapFields ()
|
runMapFields ()
|
||||||
{
|
{
|
||||||
echo "Running mapFields from $1 to $2"
|
echo "Running mapFields from $1 to $2"
|
||||||
mapFields . $1 . $2 > $2/log.mapFields 2>&1
|
mapFields -source $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
runMapFieldsConsistent ()
|
runMapFieldsConsistent ()
|
||||||
{
|
{
|
||||||
echo "Running mapFields from $1 to $2"
|
echo "Running mapFields from $1 to $2"
|
||||||
mapFields . $1 . $2 -consistent > $2/log.mapFields 2>&1
|
mapFields -source $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
runFluentMeshToFoam ()
|
runFluentMeshToFoam ()
|
||||||
{
|
{
|
||||||
echo "fluentMeshToFoam: converting mesh $2"
|
echo "fluentMeshToFoam: converting mesh $2"
|
||||||
fluentMeshToFoam . $1 $2 > $1/log.fluentMeshToFoam 2>&1
|
fluentMeshToFoam $2 -case $1 > $1/log.fluentMeshToFoam 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
copySolutionDirs ()
|
copySolutionDirs ()
|
||||||
@ -34,7 +34,7 @@ copySolutionDirs ()
|
|||||||
setCavityFine ()
|
setCavityFine ()
|
||||||
{
|
{
|
||||||
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
||||||
controlDict="$case/system/controlDict"
|
controlDict="$case/system/controlDict"
|
||||||
sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$
|
sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$
|
||||||
mv temp.$$ $blockMeshDict
|
mv temp.$$ $blockMeshDict
|
||||||
sed \
|
sed \
|
||||||
@ -44,13 +44,13 @@ setCavityFine ()
|
|||||||
-e s/"\(writeControl[ \t]*\) timeStep;"/"\1 runTime;"/g \
|
-e s/"\(writeControl[ \t]*\) timeStep;"/"\1 runTime;"/g \
|
||||||
-e s/"\(writeInterval[ \t]*\) 20;"/"\1 0.1;"/g \
|
-e s/"\(writeInterval[ \t]*\) 20;"/"\1 0.1;"/g \
|
||||||
$controlDict > temp.$$
|
$controlDict > temp.$$
|
||||||
mv temp.$$ $controlDict
|
mv temp.$$ $controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
setCavityHighRe ()
|
setCavityHighRe ()
|
||||||
{
|
{
|
||||||
echo "Setting cavityHighRe to generate a secondary vortex"
|
echo "Setting cavityHighRe to generate a secondary vortex"
|
||||||
controlDict="$case/system/controlDict"
|
controlDict="$case/system/controlDict"
|
||||||
transportProperties="$case/constant/transportProperties"
|
transportProperties="$case/constant/transportProperties"
|
||||||
sed \
|
sed \
|
||||||
-e s/"\(startFrom[ \t]*\) startTime;"/"\1 latestTime;"/g \
|
-e s/"\(startFrom[ \t]*\) startTime;"/"\1 latestTime;"/g \
|
||||||
@ -63,27 +63,27 @@ setCavityHighRe ()
|
|||||||
|
|
||||||
for case in $cavityCases
|
for case in $cavityCases
|
||||||
do
|
do
|
||||||
if [ "$case" = "cavityFine" ]
|
if [ "$case" = "cavityFine" ]
|
||||||
then
|
then
|
||||||
cloneCase cavity $case
|
cloneCase cavity $case
|
||||||
setCavityFine
|
setCavityFine
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$case" = "cavityHighRe" ]
|
if [ "$case" = "cavityHighRe" ]
|
||||||
then
|
then
|
||||||
cloneCase cavity $case
|
cloneCase cavity $case
|
||||||
setCavityHighRe
|
setCavityHighRe
|
||||||
copySolutionDirs $case cavity
|
copySolutionDirs $case cavity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
runApplication blockMesh $case
|
(cd $case && runApplication blockMesh)
|
||||||
#
|
#
|
||||||
if [ "$case" = "cavityFine" -o "$case" = "cavityGrade" ]
|
if [ "$case" = "cavityFine" -o "$case" = "cavityGrade" ]
|
||||||
then
|
then
|
||||||
runMapFieldsConsistent $previousCase $case
|
runMapFieldsConsistent $previousCase $case
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$case" = "cavityClipped" ]
|
if [ "$case" = "cavityClipped" ]
|
||||||
then
|
then
|
||||||
cp -r $case/0 $case/0.5
|
cp -r $case/0 $case/0.5
|
||||||
runMapFields cavity $case
|
runMapFields cavity $case
|
||||||
@ -96,13 +96,13 @@ do
|
|||||||
#
|
#
|
||||||
previousCase="$case"
|
previousCase="$case"
|
||||||
#
|
#
|
||||||
runApplication $application $case
|
(cd $case && runApplication $application)
|
||||||
done
|
done
|
||||||
|
|
||||||
# elbow case for testing Fluent-FOAM conversion tools
|
# elbow case for testing Fluent-FOAM conversion tools
|
||||||
|
|
||||||
runFluentMeshToFoam elbow elbow/elbow.msh
|
runFluentMeshToFoam elbow elbow/elbow.msh
|
||||||
runApplication icoFoam elbow
|
(cd elbow && runApplication $application)
|
||||||
runApplication foamMeshToFluent elbow
|
(cd elbow && runApplication foamMeshToFluent)
|
||||||
runApplication foamDataToFluent elbow
|
(cd elbow && runApplication foamDataToFluent)
|
||||||
|
|
||||||
|
|||||||
20
tutorials/interDyMFoam/damBreakWithObstacle/Allrun
Executable file
20
tutorials/interDyMFoam/damBreakWithObstacle/Allrun
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setSet -batch createObstacle.setSet
|
||||||
|
runApplication subsetMesh c0 -patch walls
|
||||||
|
runApplication setFields -latestTime
|
||||||
|
runApplication $application
|
||||||
@ -1,16 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keepCases="damBreak"
|
keepCases="damBreak"
|
||||||
loseCases="damBreakFine"
|
loseCases="damBreakFine"
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
|
||||||
. $tutorialPath/CleanFunctions
|
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
cleanCase $case
|
(cd $case && $tutorialPath/cleanAll)
|
||||||
|
|
||||||
if [ "$case" = "damBreak" ]
|
if [ "$case" = "damBreak" ]
|
||||||
then
|
then
|
||||||
cp $case/0/gamma.org $case/0/gamma
|
cp $case/0/gamma.org $case/0/gamma
|
||||||
|
|||||||
@ -1,16 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="damBreak damBreakFine"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/RunFunctions
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
setDamBreakFine ()
|
setDamBreakFine ()
|
||||||
{
|
{
|
||||||
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||||
controlDict="$case/system/controlDict"
|
controlDict="system/controlDict"
|
||||||
sed \
|
sed \
|
||||||
-e s/"23 8"/"46 10"/g \
|
-e s/"23 8"/"46 10"/g \
|
||||||
-e s/"19 8"/"40 10"/g \
|
-e s/"19 8"/"40 10"/g \
|
||||||
@ -26,24 +31,23 @@ setDamBreakFine ()
|
|||||||
mv temp.$$ $controlDict
|
mv temp.$$ $controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
do
|
|
||||||
if [ "$case" = "damBreakFine" ]
|
|
||||||
then
|
|
||||||
cloneCase damBreak $case
|
|
||||||
setDamBreakFine
|
|
||||||
cp damBreak/0/gamma.org $case/0/gamma
|
|
||||||
fi
|
|
||||||
|
|
||||||
runApplication blockMesh $case
|
|
||||||
runApplication setFields $case
|
# Do damBreak
|
||||||
if [ "$case" = "damBreakFine" ]
|
(cd damBreak && $tutorialPath/runAll)
|
||||||
then
|
|
||||||
runApplication decomposePar $case
|
# Clone case
|
||||||
hostname > $case/system/machines
|
cloneCase damBreak damBreakFine
|
||||||
runParallel $application $case 4 $case/system/machines
|
|
||||||
runApplication reconstructPar $case
|
cd damBreakFine
|
||||||
else
|
# Modify case
|
||||||
runApplication $application $case
|
setDamBreakFine
|
||||||
fi
|
cp ../damBreak/0/gamma.org 0/gamma
|
||||||
done
|
# And execute
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setFields
|
||||||
|
runApplication decomposePar
|
||||||
|
hostname > system/machines
|
||||||
|
runParallel $application 4 system/machines
|
||||||
|
runApplication reconstructPar
|
||||||
|
cd ..
|
||||||
|
|||||||
19
tutorials/laplacianFoam/flange/Allclean
Executable file
19
tutorials/laplacianFoam/flange/Allclean
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf Fieldview > /dev/null 2>&1
|
||||||
|
rm -rf EnSight > /dev/null 2>&1
|
||||||
|
|
||||||
30
tutorials/laplacianFoam/flange/Allrun
Executable file
30
tutorials/laplacianFoam/flange/Allrun
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runIdeasToFoam ()
|
||||||
|
{
|
||||||
|
if [ -f log.ideasToFoam ] ; then
|
||||||
|
echo "ansysToFoam already run on $PWD: remove log file to run"
|
||||||
|
else
|
||||||
|
echo "ansysToFoam: converting mesh $1"
|
||||||
|
ansysToFoam $1 -scale $2 > log.ansysToFoam 2>&1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
runIdeasToFoam flange.ans 0.001
|
||||||
|
runApplication $application
|
||||||
|
runApplication foamToFieldview
|
||||||
|
runApplication foamToEnsight
|
||||||
18
tutorials/lesInterFoam/nozzleFlow2D/Allclean
Executable file
18
tutorials/lesInterFoam/nozzleFlow2D/Allclean
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
||||||
42
tutorials/lesInterFoam/nozzleFlow2D/Allrun
Executable file
42
tutorials/lesInterFoam/nozzleFlow2D/Allrun
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runRefineMesh ()
|
||||||
|
{
|
||||||
|
echo "Running refineMesh on $PWD"
|
||||||
|
refineMesh -dict > log.refineMesh 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
i=1
|
||||||
|
if [ -f log.cellSet ] ; then
|
||||||
|
i=3
|
||||||
|
fi
|
||||||
|
while [ "$i" -lt 3 ] ; do
|
||||||
|
if [ -f log.cellSet ] ; then
|
||||||
|
mv log.cellSet log.cellSet.1
|
||||||
|
fi
|
||||||
|
cp system/cellSetDict.${i} system/cellSetDict
|
||||||
|
runApplication cellSet
|
||||||
|
runRefineMesh
|
||||||
|
cp -r 1e-08/polyMesh/* constant/polyMesh
|
||||||
|
rm -rf 1e-08
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
||||||
|
|
||||||
|
runApplication $application
|
||||||
18
tutorials/mdEquilibrationFoam/periodicCube/Allrun
Executable file
18
tutorials/mdEquilibrationFoam/periodicCube/Allrun
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication molConfig
|
||||||
|
runApplication $application
|
||||||
18
tutorials/mhdFoam/hartmann/Allclean
Executable file
18
tutorials/mhdFoam/hartmann/Allclean
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
cleanSamples
|
||||||
|
|
||||||
19
tutorials/mhdFoam/hartmann/Allrun
Executable file
19
tutorials/mhdFoam/hartmann/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
runApplication sample
|
||||||
18
tutorials/oodles/pitzDailyDirectMapped/Allrun
Executable file
18
tutorials/oodles/pitzDailyDirectMapped/Allrun
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication changeDictionary
|
||||||
|
runApplication $application
|
||||||
@ -1,23 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="cylinder pitzDaily"
|
|
||||||
utility=analyticalCylinder
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/CleanFunctions
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
do
|
|
||||||
cleanCase $case
|
|
||||||
rm -rf $case/0 > /dev/null 2>&1
|
|
||||||
cp -r $case/0.org $case/0
|
|
||||||
|
|
||||||
if [ "$case" = "cylinder" ]
|
|
||||||
then
|
|
||||||
wclean $case/$utility
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd cylinder
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
cp -r 0.org 0
|
||||||
|
wclean analyticalCylinder
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
cd pitzDaily
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0 > /dev/null 2>&1
|
||||||
|
cp -r 0.org 0
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
|||||||
20
tutorials/potentialFoam/cylinder/Allrun
Executable file
20
tutorials/potentialFoam/cylinder/Allrun
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
compileApplication analyticalCylinder
|
||||||
|
runApplication analyticalCylinder
|
||||||
|
runApplication streamFunction
|
||||||
18
tutorials/potentialFoam/pitzDaily/Allrun
Executable file
18
tutorials/potentialFoam/pitzDaily/Allrun
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath='.'
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="../$tutorialPath"
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
runApplication streamFunction
|
||||||
@ -1,16 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keepCases="damBreak"
|
keepCases="damBreak"
|
||||||
loseCases="damBreakFine"
|
loseCases="damBreakFine"
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
|
||||||
. $tutorialPath/CleanFunctions
|
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
cleanCase $case
|
(cd $case && $tutorialPath/cleanAll)
|
||||||
|
|
||||||
if [ "$case" = "damBreak" ]
|
if [ "$case" = "damBreak" ]
|
||||||
then
|
then
|
||||||
cp $case/0/gamma.org $case/0/gamma
|
cp $case/0/gamma.org $case/0/gamma
|
||||||
|
|||||||
@ -1,16 +1,22 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="damBreak damBreakFine"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/RunFunctions
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setDamBreakFine ()
|
setDamBreakFine ()
|
||||||
{
|
{
|
||||||
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||||
controlDict="$case/system/controlDict"
|
controlDict="system/controlDict"
|
||||||
sed \
|
sed \
|
||||||
-e s/"23 8"/"46 10"/g \
|
-e s/"23 8"/"46 10"/g \
|
||||||
-e s/"19 8"/"40 10"/g \
|
-e s/"19 8"/"40 10"/g \
|
||||||
@ -26,24 +32,22 @@ setDamBreakFine ()
|
|||||||
mv temp.$$ $controlDict
|
mv temp.$$ $controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
do
|
|
||||||
if [ "$case" = "damBreakFine" ]
|
|
||||||
then
|
|
||||||
cloneCase damBreak $case
|
|
||||||
setDamBreakFine
|
|
||||||
cp damBreak/0/gamma.org $case/0/gamma
|
|
||||||
fi
|
|
||||||
|
|
||||||
runApplication blockMesh $case
|
# Do damBreak
|
||||||
runApplication setFields $case
|
(cd damBreak && $tutorialPath/runAll)
|
||||||
if [ "$case" = "damBreakFine" ]
|
|
||||||
then
|
# Clone case
|
||||||
runApplication decomposePar $case
|
cloneCase damBreak damBreakFine
|
||||||
hostname > $case/system/machines
|
|
||||||
runParallel $application $case 4 $case/system/machines
|
cd damBreakFine
|
||||||
runApplication reconstructPar $case
|
# Modify case
|
||||||
else
|
setDamBreakFine
|
||||||
runApplication $application $case
|
cp ../damBreak/0/gamma.org 0/gamma
|
||||||
fi
|
# And execute
|
||||||
done
|
runApplication blockMesh
|
||||||
|
runApplication setFields
|
||||||
|
runApplication decomposePar
|
||||||
|
hostname > system/machines
|
||||||
|
runParallel $application 4 system/machines
|
||||||
|
runApplication reconstructPar
|
||||||
|
cd ..
|
||||||
|
|||||||
19
tutorials/rasInterFoam/damBreak/Allrun
Executable file
19
tutorials/rasInterFoam/damBreak/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setFields
|
||||||
|
runApplication $application
|
||||||
20
tutorials/rhoSonicFoam/shockTube/Allclean
Executable file
20
tutorials/rhoSonicFoam/shockTube/Allclean
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0
|
||||||
|
cp -r 0.org 0
|
||||||
|
cleanSamples
|
||||||
23
tutorials/rhoSonicFoam/shockTube/Allrun
Executable file
23
tutorials/rhoSonicFoam/shockTube/Allrun
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
compileApplication setShock
|
||||||
|
runApplication setShock
|
||||||
|
runApplication $application
|
||||||
|
runApplication magU
|
||||||
|
runApplication sample
|
||||||
|
|
||||||
@ -1,16 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="simplifiedSiwek"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/CleanFunctions
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
wclean $application
|
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
|
|
||||||
|
wclean rhoTurbTwinParcelFoam
|
||||||
|
|
||||||
|
for case in *
|
||||||
do
|
do
|
||||||
cleanCase $case
|
if [ -d $case ]
|
||||||
|
then
|
||||||
|
(cd $case && $tutorialPath/cleanAll)
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
19
tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/Allrun
Executable file
19
tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
compileApplication $application
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
19
tutorials/rhopSonicFoam/shockTube/Allclean
Executable file
19
tutorials/rhopSonicFoam/shockTube/Allclean
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rm -rf 0
|
||||||
|
cp -r 0.org 0
|
||||||
|
cleanCase
|
||||||
19
tutorials/rhopSonicFoam/shockTube/Allrun
Executable file
19
tutorials/rhopSonicFoam/shockTube/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setFields
|
||||||
|
runApplication $application
|
||||||
73
tutorials/runAll
Executable file
73
tutorials/runAll
Executable file
@ -0,0 +1,73 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2007 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
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# runAll
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Run either Allrun or blockMesh/application in current directory
|
||||||
|
# and all its subdirectories.
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
unset WM_COLOURS
|
||||||
|
|
||||||
|
tutorialsDir=$PWD
|
||||||
|
while [ ! -f $tutorialsDir/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialsDir="$tutorialsDir/.."
|
||||||
|
done
|
||||||
|
. $tutorialsDir/RunFunctions
|
||||||
|
|
||||||
|
thisScript=$0
|
||||||
|
if [ "/${thisScript#/}" != "$thisScript" ]
|
||||||
|
then
|
||||||
|
thisScript="$PWD/$thisScript"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "./Allrun" ]
|
||||||
|
then
|
||||||
|
# Specialised script.
|
||||||
|
./Allrun
|
||||||
|
elif [ -d "./system" ]
|
||||||
|
then
|
||||||
|
# Normal case.
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
else
|
||||||
|
# Recurse to subdirectories
|
||||||
|
for case in *
|
||||||
|
do
|
||||||
|
if [ -d $case ]
|
||||||
|
then
|
||||||
|
#(cd $case && $thisScript)
|
||||||
|
$WM_SCHEDULER "cd $PWD/$case && $thisScript"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
16
tutorials/settlingFoam/tank3D/Allclean
Executable file
16
tutorials/settlingFoam/tank3D/Allclean
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanTimeDirectories
|
||||||
17
tutorials/settlingFoam/tank3D/Allrun
Executable file
17
tutorials/settlingFoam/tank3D/Allrun
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication $application
|
||||||
|
|
||||||
17
tutorials/simpleSRFFoam/mixer/Allclean
Executable file
17
tutorials/simpleSRFFoam/mixer/Allclean
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
wclean ../simpleSRFFoam
|
||||||
19
tutorials/simpleSRFFoam/mixer/Allrun
Executable file
19
tutorials/simpleSRFFoam/mixer/Allrun
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
compileApplication ../simpleSRFFoam
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
17
tutorials/solidDisplacementFoam/plateHole/Allclean
Executable file
17
tutorials/solidDisplacementFoam/plateHole/Allclean
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
cleanSamples
|
||||||
18
tutorials/solidDisplacementFoam/plateHole/Allrun
Executable file
18
tutorials/solidDisplacementFoam/plateHole/Allrun
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
runApplication sample
|
||||||
20
tutorials/sonicFoam/shockTube/Allclean
Executable file
20
tutorials/sonicFoam/shockTube/Allclean
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0
|
||||||
|
cp -r 0.org 0
|
||||||
|
cleanSamples
|
||||||
21
tutorials/sonicFoam/shockTube/Allrun
Executable file
21
tutorials/sonicFoam/shockTube/Allrun
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get application name from directory
|
||||||
|
parentDir=`dirname $PWD`
|
||||||
|
application=`basename $parentDir`
|
||||||
|
|
||||||
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
runApplication blockMesh
|
||||||
|
runApplication setFields
|
||||||
|
runApplication $application
|
||||||
|
runApplication magU
|
||||||
|
runApplication sample
|
||||||
|
|
||||||
@ -1,19 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
keepCases="decompressionTank"
|
|
||||||
loseCases="decompressionTankFine"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/CleanFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/CleanFunctions
|
. $tutorialPath/CleanFunctions
|
||||||
|
|
||||||
for case in $keepCases
|
|
||||||
do
|
|
||||||
cleanCase $case
|
|
||||||
done
|
|
||||||
|
|
||||||
for case in $loseCases
|
|
||||||
|
removeCase decompressionTankFine
|
||||||
|
|
||||||
|
for case in *
|
||||||
do
|
do
|
||||||
removeCase $case
|
if [ -d $case ]
|
||||||
|
then
|
||||||
|
(cd $case && $tutorialsDir/cleanAll)
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@ -1,12 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="decompressionTank decompressionTankFine"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/RunFunctions
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setDecompressionTankFine ()
|
setDecompressionTankFine ()
|
||||||
{
|
{
|
||||||
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
||||||
@ -25,14 +31,16 @@ setDecompressionTankFine ()
|
|||||||
mv temp.$$ $controlDict
|
mv temp.$$ $controlDict
|
||||||
}
|
}
|
||||||
|
|
||||||
for case in $cases
|
# Do decompressionTank
|
||||||
do
|
(cd decompressionTank && $tutorialPath/runAll)
|
||||||
if [ "$case" = "decompressionTankFine" ]
|
|
||||||
then
|
# Clone case
|
||||||
cloneCase decompressionTank $case
|
cloneCase decompressionTank decompressionTankFine
|
||||||
setDecompressionTankFine
|
|
||||||
fi
|
cd decompressionTankFine
|
||||||
#
|
# Modify case
|
||||||
runApplication blockMesh $case
|
setDecompressionTankFine
|
||||||
runApplication $application $case
|
# And execute
|
||||||
done
|
runApplication blockMesh
|
||||||
|
runApplication $application
|
||||||
|
cd ..
|
||||||
|
|||||||
@ -1,33 +1,38 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
currDir=`pwd`
|
# Get application name from directory
|
||||||
application=`basename $currDir`
|
application=`basename $PWD`
|
||||||
cases="prism nacaAirfoil"
|
|
||||||
|
|
||||||
tutorialPath=`dirname $0`/..
|
# Find and source additional functions
|
||||||
|
tutorialPath=$PWD
|
||||||
|
while [ ! -f $tutorialPath/RunFunctions ]
|
||||||
|
do
|
||||||
|
tutorialPath="$tutorialPath/.."
|
||||||
|
done
|
||||||
. $tutorialPath/RunFunctions
|
. $tutorialPath/RunFunctions
|
||||||
|
|
||||||
|
|
||||||
runStarToFoam ()
|
runStarToFoam ()
|
||||||
{
|
{
|
||||||
if [ -f $1/log.starToFoam ] ; then
|
if [ -f log.starToFoam ] ; then
|
||||||
echo "starToFoam already run on $1: remove log file to run"
|
echo "starToFoam already run on $PWD: remove log file to run"
|
||||||
else
|
else
|
||||||
echo "starToFoam: converting mesh $2"
|
echo "starToFoam: converting mesh $1"
|
||||||
starToFoam . $1 $2 > $1/log.starToFoam 2>&1
|
starToFoam $1 > log.starToFoam 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
for case in $cases
|
|
||||||
do
|
|
||||||
if [ "$case" = "nacaAirfoil" ] ; then
|
# Do prism
|
||||||
runStarToFoam $case ${case}/prostar/${case}
|
(cd prism && $tutorialPath/runAll)
|
||||||
mv ${case}/constant/polyMesh/boundary temp
|
|
||||||
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
# Special handling for nacaAirFoil
|
||||||
temp > ${case}/constant/polyMesh/boundary
|
cd nacaAirFoil
|
||||||
rm temp
|
runStarToFoam prostar/nacaAirFoil
|
||||||
else
|
mv constant/polyMesh/boundary temp
|
||||||
runApplication blockMesh $case
|
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
|
||||||
fi
|
temp > constant/polyMesh/boundary
|
||||||
runApplication $application $case
|
rm temp
|
||||||
# runApplication Mach $case
|
runApplication $application
|
||||||
done
|
cd ..
|
||||||
|
|||||||
Reference in New Issue
Block a user