mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
OpenFOAM field reading: Automated the handling of <field>.orig files
Now if a <field> file does not exist first the compressed <field>.gz file is searched for and if that also does not exist the <field>.orig file is searched for. This simplifies case setup and run scripts as now setField for example can read the <field>.orig file directly and generate the <field> file from it which is then read by the solver. Additionally the cleanCase function used by foamCleanCase and the Allclean scripts automatically removed <field> files if there is a corresponding <field>.orig file. So now there is no need for the Allrun scripts to copy <field>.orig files into <field> or for the Allclean scripts to explicitly remove them.
This commit is contained in:
@ -59,13 +59,6 @@ cleanCase()
|
|||||||
rm -rf jobInfo > /dev/null 2>&1
|
rm -rf jobInfo > /dev/null 2>&1
|
||||||
rm -rf postProcessing > /dev/null 2>&1
|
rm -rf postProcessing > /dev/null 2>&1
|
||||||
rm -rf TDAC > /dev/null 2>&1
|
rm -rf TDAC > /dev/null 2>&1
|
||||||
rm -rf probes* > /dev/null 2>&1
|
|
||||||
rm -rf forces* > /dev/null 2>&1
|
|
||||||
rm -rf graphs* > /dev/null 2>&1
|
|
||||||
rm -rf sets > /dev/null 2>&1
|
|
||||||
rm -rf surfaceSampling > /dev/null 2>&1
|
|
||||||
rm -rf cuttingPlane > /dev/null 2>&1
|
|
||||||
rm -rf system/machines > /dev/null 2>&1
|
|
||||||
|
|
||||||
if [ -d constant/polyMesh ]
|
if [ -d constant/polyMesh ]
|
||||||
then
|
then
|
||||||
@ -83,12 +76,16 @@ cleanCase()
|
|||||||
rm -rf constant/tetDualMesh > /dev/null 2>&1
|
rm -rf constant/tetDualMesh > /dev/null 2>&1
|
||||||
|
|
||||||
rm -rf VTK > /dev/null 2>&1
|
rm -rf VTK > /dev/null 2>&1
|
||||||
|
rm -rf sequencedVTK > /dev/null 2>&1
|
||||||
|
|
||||||
rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
|
rm -f 0/cellLevel 0/pointLevel 0/cellDist constant/cellDecomposition
|
||||||
|
|
||||||
if [ -e system/blockMeshDict.m4 ]
|
if [ -e system/blockMeshDict.m4 ]
|
||||||
then
|
then
|
||||||
rm -f system/blockMeshDict > /dev/null 2>&1
|
rm -f system/blockMeshDict > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
find . -name "*.orig" -type f -exec sh -c 'rm -f ${0%.*} ${0%.*}.gz' {} \;
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCase()
|
removeCase()
|
||||||
|
|||||||
@ -563,9 +563,11 @@ bool Foam::isFile
|
|||||||
error::printStack(Pout);
|
error::printStack(Pout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
S_ISREG(mode(name, followLink))
|
S_ISREG(mode(name, followLink))
|
||||||
|| (checkGzip && S_ISREG(mode(name + ".gz", followLink)));
|
|| (checkGzip && S_ISREG(mode(name + ".gz", followLink)))
|
||||||
|
|| (checkGzip && S_ISREG(mode(name + ".orig", followLink)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,15 +53,17 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
|
|||||||
ifPtr_ = new ifstream(pathname.c_str());
|
ifPtr_ = new ifstream(pathname.c_str());
|
||||||
|
|
||||||
// If the file is compressed, decompress it before reading.
|
// If the file is compressed, decompress it before reading.
|
||||||
if (!ifPtr_->good() && isFile(pathname + ".gz", false))
|
if (!ifPtr_->good())
|
||||||
{
|
{
|
||||||
|
if (isFile(pathname + ".gz", false))
|
||||||
|
{
|
||||||
|
delete ifPtr_;
|
||||||
|
|
||||||
if (IFstream::debug)
|
if (IFstream::debug)
|
||||||
{
|
{
|
||||||
InfoInFunction << "Decompressing " << pathname + ".gz" << endl;
|
InfoInFunction << "Decompressing " << pathname + ".gz" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete ifPtr_;
|
|
||||||
|
|
||||||
ifPtr_ = new igzstream((pathname + ".gz").c_str());
|
ifPtr_ = new igzstream((pathname + ".gz").c_str());
|
||||||
|
|
||||||
if (ifPtr_->good())
|
if (ifPtr_->good())
|
||||||
@ -69,6 +71,13 @@ Foam::IFstreamAllocator::IFstreamAllocator(const fileName& pathname)
|
|||||||
compression_ = IOstream::COMPRESSED;
|
compression_ = IOstream::COMPRESSED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (isFile(pathname + ".orig", false))
|
||||||
|
{
|
||||||
|
delete ifPtr_;
|
||||||
|
|
||||||
|
ifPtr_ = new ifstream((pathname + ".orig").c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,6 @@ rm log.createPatch
|
|||||||
# create actual patches
|
# create actual patches
|
||||||
runApplication createPatch -region filmRegion -overwrite
|
runApplication createPatch -region filmRegion -overwrite
|
||||||
|
|
||||||
cp 0/ph_rgh.orig 0/ph_rgh
|
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -26,8 +26,6 @@ runApplication -s fBurner \
|
|||||||
|
|
||||||
runApplication createPatch -overwrite
|
runApplication createPatch -overwrite
|
||||||
|
|
||||||
cp 0/ph_rgh.orig 0/ph_rgh
|
|
||||||
|
|
||||||
runApplication -s master \
|
runApplication -s master \
|
||||||
decomposePar -force
|
decomposePar -force
|
||||||
|
|
||||||
|
|||||||
@ -8,10 +8,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication topoSet
|
runApplication topoSet
|
||||||
runApplication createPatch -overwrite
|
runApplication createPatch -overwrite
|
||||||
|
|
||||||
cp 0/ph_rgh.orig 0/ph_rgh
|
|
||||||
|
|
||||||
# Run
|
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,12 +9,7 @@ application=`getApplication`
|
|||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication topoSet
|
runApplication topoSet
|
||||||
runApplication createPatch -overwrite
|
runApplication createPatch -overwrite
|
||||||
|
|
||||||
cp 0/ph_rgh.orig 0/ph_rgh
|
|
||||||
|
|
||||||
runApplication decomposePar -force
|
runApplication decomposePar -force
|
||||||
|
|
||||||
# Run
|
|
||||||
runParallel $application
|
runParallel $application
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,9 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Set application name
|
# Set application name
|
||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
rm -f 0/T
|
|
||||||
cp 0/T.orig 0/T
|
|
||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
|
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
|
||||||
constant/reactionsGRI constant/thermo.compressibleGasGRI
|
constant/reactionsGRI constant/thermo.compressibleGasGRI
|
||||||
|
|||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm -f 0/T
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/T.orig 0/T
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
rm -f 0/T
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/T.orig 0/T
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object T;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 1 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 300;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
floor
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
ceiling
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
fixedWalls
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
cp 0/T.orig 0/T
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,8 +9,6 @@ rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1
|
|||||||
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
|
||||||
rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
|
rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1
|
||||||
|
|
||||||
rm -rf 0 > /dev/null 2>&1
|
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -10,8 +10,6 @@ runApplication surfaceFeatureExtract
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
[ ! -d 0 ] && cp -r 0.orig 0
|
|
||||||
|
|
||||||
runApplication decomposePar -copyZero
|
runApplication decomposePar -copyZero
|
||||||
runParallel snappyHexMesh -overwrite
|
runParallel snappyHexMesh -overwrite
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object alpha.water;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
leftWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
rightWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
lowerWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
atmosphere
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object alpha.water.org;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
leftWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
rightWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
lowerWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
atmosphere
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
porous_half0
|
|
||||||
{
|
|
||||||
type cyclic;
|
|
||||||
}
|
|
||||||
porous_half1
|
|
||||||
{
|
|
||||||
type cyclic;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -7,10 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
./Allmesh
|
./Allmesh
|
||||||
|
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -6,9 +6,5 @@
|
|||||||
cp -r 0.orig 0 > /dev/null 2>&1
|
cp -r 0.orig 0 > /dev/null 2>&1
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
|
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
|
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object alpha.water;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
leftWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
rightWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
lowerWall
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
atmosphere
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -5,6 +5,5 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -37,7 +37,7 @@ writeFormat ascii;
|
|||||||
|
|
||||||
writePrecision 6;
|
writePrecision 6;
|
||||||
|
|
||||||
writeCompression uncompressed;
|
writeCompression compressed;
|
||||||
|
|
||||||
timeFormat general;
|
timeFormat general;
|
||||||
|
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
object alpha.water;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
walls
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
obstacle
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
|
|
||||||
atmosphere
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
runApplication ./makeMesh
|
runApplication ./makeMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication snappyHexMesh -overwrite
|
runApplication snappyHexMesh -overwrite
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
m4 system/blockMeshDict.m4 > system/blockMeshDict
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,5 @@
|
|||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
foamCleanTutorials cases
|
foamCleanTutorials cases
|
||||||
rm -rf alpha.air alpha.other alpha.water \
|
|
||||||
alpha.air.gz alpha.other.gz alpha.water.gz
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -5,9 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
cp 0/alpha.air.orig 0/alpha.air
|
|
||||||
cp 0/alpha.other.orig 0/alpha.other
|
|
||||||
cp 0/alpha.water.orig 0/alpha.water
|
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication `getApplication`
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object alpha.airI;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
inlet
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 0.25;
|
|
||||||
}
|
|
||||||
outlet
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
phi phi.airI;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
walls
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object alpha.airI;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 0 0 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
inlet
|
|
||||||
{
|
|
||||||
type fixedValue;
|
|
||||||
value uniform 0.25;
|
|
||||||
}
|
|
||||||
outlet
|
|
||||||
{
|
|
||||||
type inletOutlet;
|
|
||||||
phi phi.airI;
|
|
||||||
inletValue uniform 0;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
walls
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
defaultFaces
|
|
||||||
{
|
|
||||||
type empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
# Set application name
|
# Set application name
|
||||||
application=`getApplication`
|
application=`getApplication`
|
||||||
|
|
||||||
cp 0/alpha.air.orig 0/alpha.air
|
|
||||||
cp 0/f.air.bubbles.orig 0/f.air.bubbles
|
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication topoSet
|
runApplication topoSet
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: dev |
|
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object controlDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
application solidEquilibriumDisplacementFoam;
|
|
||||||
|
|
||||||
startFrom startTime;
|
|
||||||
|
|
||||||
startTime 0;
|
|
||||||
|
|
||||||
stopAt endTime;
|
|
||||||
|
|
||||||
endTime 5000;
|
|
||||||
|
|
||||||
deltaT 1;
|
|
||||||
|
|
||||||
writeControl runTime;
|
|
||||||
|
|
||||||
writeInterval 1000;
|
|
||||||
|
|
||||||
purgeWrite 0;
|
|
||||||
|
|
||||||
writeFormat ascii;
|
|
||||||
|
|
||||||
writeCompression off;
|
|
||||||
|
|
||||||
timeFormat general;
|
|
||||||
|
|
||||||
timePrecision 6;
|
|
||||||
|
|
||||||
runTimeModifiable true;
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
Reference in New Issue
Block a user