Merge branch 'master' into develop

This commit is contained in:
Andrew Heather
2018-01-18 09:33:40 +00:00
31 changed files with 318 additions and 247 deletions

View File

@ -79,6 +79,7 @@ functionObjects/Allwmake $targetType $*
wmake $targetType lumpedPointMotion wmake $targetType lumpedPointMotion
wmake $targetType sixDoFRigidBodyMotion wmake $targetType sixDoFRigidBodyMotion
wmake $targetType sixDoFRigidBodyState
wmake $targetType rigidBodyDynamics wmake $targetType rigidBodyDynamics
wmake $targetType rigidBodyMeshMotion wmake $targetType rigidBodyMeshMotion

View File

@ -3,7 +3,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-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -647,7 +647,7 @@ Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
surfaceName, surfaceName,
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -679,7 +679,7 @@ Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
dict.lookup("surface"), dict.lookup("surface"),
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -713,7 +713,7 @@ Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
name, name,
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -3,7 +3,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-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -642,7 +642,7 @@ Foam::discreteSurface::discreteSurface
surfaceName, surfaceName,
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -680,7 +680,7 @@ Foam::discreteSurface::discreteSurface
dict.lookup("surface"), dict.lookup("surface"),
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
@ -716,7 +716,7 @@ Foam::discreteSurface::discreteSurface
name, name,
mesh.time().constant(), // instance mesh.time().constant(), // instance
"triSurface", // local "triSurface", // local
mesh, // registry mesh.time(), // registry
IOobject::NO_READ, IOobject::NO_READ,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false

View File

@ -3,7 +3,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) 2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -46,6 +46,34 @@ namespace functionObjects
} }
} }
const Foam::Enum
<
Foam::functionObjects::sixDoFRigidBodyState::angleTypes
>
Foam::functionObjects::sixDoFRigidBodyState::angleTypeNames_
{
{ angleTypes::RADIANS, "radians" },
{ angleTypes::DEGREES, "degrees" }
};
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::functionObjects::sixDoFRigidBodyState::writeFileHeader(Ostream& os)
{
writeHeader(os, "Motion State");
writeHeaderValue(os, "Angle Units", angleTypeNames_[angleFormat_]);
writeCommented(os, "Time");
os << tab
<< "centreOfRotation" << tab
<< "centreOfMass" << tab
<< "rotation" << tab
<< "velocity" << tab
<< "omega" << endl;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -57,10 +85,11 @@ Foam::functionObjects::sixDoFRigidBodyState::sixDoFRigidBodyState
) )
: :
fvMeshFunctionObject(name, runTime, dict), fvMeshFunctionObject(name, runTime, dict),
logFiles(obr_, name) writeFile(mesh_, name, typeName, dict),
angleFormat_(angleTypes::RADIANS)
{ {
read(dict); read(dict);
resetName(typeName); writeFileHeader(file());
} }
@ -74,27 +103,20 @@ Foam::functionObjects::sixDoFRigidBodyState::~sixDoFRigidBodyState()
bool Foam::functionObjects::sixDoFRigidBodyState::read(const dictionary& dict) bool Foam::functionObjects::sixDoFRigidBodyState::read(const dictionary& dict)
{ {
fvMeshFunctionObject::read(dict); if (fvMeshFunctionObject::read(dict))
angleFormat_ = dict.lookupOrDefault<word>("angleFormat", "radians"); {
angleFormat_ =
angleTypeNames_.lookupOrDefault
(
"angleFormat",
dict,
angleTypes::RADIANS
);
return true; return true;
} }
return false;
void Foam::functionObjects::sixDoFRigidBodyState::writeFileHeader(const label)
{
OFstream& file = this->file();
writeHeader(file, "Motion State");
writeHeaderValue(file, "Angle Units", angleFormat_);
writeCommented(file, "Time");
file<< tab
<< "centreOfRotation" << tab
<< "centreOfMass" << tab
<< "rotation" << tab
<< "velocity" << tab
<< "omega" << endl;
} }
@ -105,10 +127,6 @@ bool Foam::functionObjects::sixDoFRigidBodyState::execute()
bool Foam::functionObjects::sixDoFRigidBodyState::write() bool Foam::functionObjects::sixDoFRigidBodyState::write()
{
logFiles::write();
if (Pstream::master())
{ {
const dynamicMotionSolverFvMesh& mesh = const dynamicMotionSolverFvMesh& mesh =
refCast<const dynamicMotionSolverFvMesh>(obr_); refCast<const dynamicMotionSolverFvMesh>(obr_);
@ -125,7 +143,14 @@ bool Foam::functionObjects::sixDoFRigidBodyState::write()
vector angularVelocity(motion.omega()); vector angularVelocity(motion.omega());
if (angleFormat_ == "degrees") switch (angleFormat_)
{
case angleTypes::RADIANS:
{
// Nothing to do - already in radians
break;
}
case angleTypes::DEGREES:
{ {
rotationAngle.x() = radToDeg(rotationAngle.x()); rotationAngle.x() = radToDeg(rotationAngle.x());
rotationAngle.y() = radToDeg(rotationAngle.y()); rotationAngle.y() = radToDeg(rotationAngle.y());
@ -134,6 +159,14 @@ bool Foam::functionObjects::sixDoFRigidBodyState::write()
angularVelocity.x() = radToDeg(angularVelocity.x()); angularVelocity.x() = radToDeg(angularVelocity.x());
angularVelocity.y() = radToDeg(angularVelocity.y()); angularVelocity.y() = radToDeg(angularVelocity.y());
angularVelocity.z() = radToDeg(angularVelocity.z()); angularVelocity.z() = radToDeg(angularVelocity.z());
break;
}
default:
{
FatalErrorInFunction
<< "Unhandled enumeration " << angleTypeNames_[angleFormat_]
<< abort(FatalError);
}
} }
writeTime(file()); writeTime(file());
@ -144,7 +177,6 @@ bool Foam::functionObjects::sixDoFRigidBodyState::write()
<< rotationAngle << tab << rotationAngle << tab
<< motion.v() << tab << motion.v() << tab
<< angularVelocity << endl; << angularVelocity << endl;
}
return true; return true;
} }

View File

@ -3,7 +3,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) 2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -25,7 +25,7 @@ Class
Foam::functionObjects::sixDoFRigidBodyState Foam::functionObjects::sixDoFRigidBodyState
Group Group
grpFieldFunctionObjects grpSixDoFRigidBodyFunctionObjects
Description Description
Writes the 6-DoF motion state. Writes the 6-DoF motion state.
@ -49,7 +49,7 @@ Usage
See also See also
Foam::functionObjects::fvMeshFunctionObject Foam::functionObjects::fvMeshFunctionObject
Foam::functionObjects::logFiles Foam::functionObjects::writeFile
SourceFiles SourceFiles
sixDoFRigidBodyState.C sixDoFRigidBodyState.C
@ -60,7 +60,8 @@ SourceFiles
#define sixDoFRigidBodyState_H #define sixDoFRigidBodyState_H
#include "fvMeshFunctionObject.H" #include "fvMeshFunctionObject.H"
#include "logFiles.H" #include "writeFile.H"
#include "Enum.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -76,11 +77,21 @@ namespace functionObjects
class sixDoFRigidBodyState class sixDoFRigidBodyState
: :
public fvMeshFunctionObject, public fvMeshFunctionObject,
public logFiles public writeFile
{ {
// Private data // Private data
word angleFormat_; enum class angleTypes
{
RADIANS, //!< Radians
DEGREES //!< Degrees
};
//- Angle type names
static const Enum<angleTypes> angleTypeNames_;
//- Angle format
angleTypes angleFormat_;
// Private Member Functions // Private Member Functions
@ -96,8 +107,8 @@ protected:
// Protected Member Functions // Protected Member Functions
//- overloaded writeFileHeader from writeFile //- Overloaded writeFileHeader from writeFile
virtual void writeFileHeader(const label i = 0); virtual void writeFileHeader(Ostream& os);
public: public:

View File

@ -2,6 +2,17 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
if isTest $@
then
# Reset the controlDict
if [ -f system/controlDict.orig ]
then
echo "$0: restoring the controlDict from controlDict.orig"
mv system/controlDict.orig system/controlDict
fi
fi
runApplication blockMesh runApplication blockMesh
application=$(getApplication) application=$(getApplication)

View File

@ -1,14 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
# Reset the controlDict
if [ -f system/controlDict.orig ]
then
echo "$0: restoring the controlDict from controlDict.orig"
mv system/controlDict.orig system/controlDict
fi
./Allrun
#------------------------------------------------------------------------------

View File

@ -5,4 +5,4 @@
(cd cylinderMesh && ./Allrun.pre) (cd cylinderMesh && ./Allrun.pre)
# Add background mesh # Add background mesh
(cd cylinderAndBackground && ./Allrun) (cd cylinderAndBackground && ./Allrun $*)

View File

@ -4,24 +4,24 @@ cd ${0%/*} || exit 1 # Run from this directory
setControlDict() setControlDict()
{ {
sed \ foamDictionary -entry "deltaT" -set "1e-05" system/controlDict
-e "s/\(deltaT[ \t]*\) 5e-06;/\1 1e-05;/g" \ foamDictionary -entry "endTime" -set "0.015" system/controlDict
-e "s/\(endTime[ \t]*\) 0.005;/\1 0.015;/g" \ foamDictionary -entry "writeInterval" -set "50" system/controlDict
-e "s/\(writeInterval[ \t]*\) 10;/\1 50;/g" \
-i system/controlDict
} }
setCombustionProperties() setCombustionProperties()
{ {
sed \ foamDictionary -entry "laminarFlameSpeedCorrelation" \
-e "s/\(laminarFlameSpeedCorrelation[ \t]*\) Gulders;/\1 RaviPetersen;/g" \ -set "RaviPetersen" constant/combustionProperties
-e "s/\(fuel[ \t]*\) Propane;/\1 HydrogenInAir;/g" \ foamDictionary -entry "fuel" \
-i constant/combustionProperties -set "HydrogenInAir" constant/combustionProperties
} }
# Do moriyoshiHomogeneous # Do moriyoshiHomogeneous
( cd moriyoshiHomogeneous && foamRunTutorials ) ( cd moriyoshiHomogeneous && foamRunTutorials )
if ! isTest $@
then
# Clone case for second phase # Clone case for second phase
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2 cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
@ -54,5 +54,6 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
constant/thermophysicalProperties constant/thermophysicalProperties
runApplication $(getApplication) runApplication $(getApplication)
) )
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -9,6 +9,9 @@ runApplication chemkinToFoam \
runApplication $(getApplication) runApplication $(getApplication)
if ! isTest $@
then
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication) runApplication $(getApplication)
if ! isTest $@
then
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication) runApplication $(getApplication)
if ! isTest $@
then
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication) runApplication $(getApplication)
if ! isTest $@
then
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication $(getApplication) runApplication $(getApplication)
if ! isTest $@
then
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -21,6 +21,9 @@ runParallel $(getApplication)
paraFoam -touch paraFoam -touch
paraFoam -touch -region panelRegion paraFoam -touch -region panelRegion
if ! isTest $@
then
(cd validation && ./createGraphs) (cd validation && ./createGraphs)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -5,8 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Application name # Application name
application=$(getApplication) application=$(getApplication)
rm -f 0 restore0Dir
cp -r 0.orig 0
runApplication chemkinToFoam \ runApplication chemkinToFoam \
chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \ chemkin/grimech30.dat chemkin/thermo30.dat chemkin/transportProperties \
@ -15,8 +14,14 @@ runApplication chemkinToFoam \
runApplication blockMesh runApplication blockMesh
runApplication setFields runApplication setFields
if isTest $@
# Run the application without chemistry until 1500 to let the flow field develop then
# Test without chemistry
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
runApplication $application
else
# Run the application without chemistry until 1500 to let the flow field
# develop
foamDictionary -entry "writeInterval" -set "1500" system/controlDict foamDictionary -entry "writeInterval" -set "1500" system/controlDict
foamDictionary -entry "endTime" -set "1500" system/controlDict foamDictionary -entry "endTime" -set "1500" system/controlDict
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
@ -30,5 +35,6 @@ foamDictionary -entry "endTime" -set "5000" system/controlDict
foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
runApplication -o $application runApplication -o $application
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -5,4 +5,4 @@
(cd cylinderMesh && ./Allrun.pre) (cd cylinderMesh && ./Allrun.pre)
# Add background mesh # Add background mesh
(cd cylinderAndBackground && ./Allrun) (cd cylinderAndBackground && ./Allrun $*)

View File

@ -29,6 +29,8 @@ run resolved
# Run with the plenum modelled by a boundary condition # Run with the plenum modelled by a boundary condition
run modelled run modelled
if ! isTest $@
then
# Plot a comparison of the pressure in the neck # Plot a comparison of the pressure in the neck
cat << EOF | gnuplot -persist cat << EOF | gnuplot -persist
@ -44,5 +46,6 @@ plot \
"modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l "modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l
EOF EOF
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -26,6 +26,8 @@ setDecompressionTankFine()
# Do decompressionTank # Do decompressionTank
( cd decompressionTank && foamRunTutorials ) ( cd decompressionTank && foamRunTutorials )
if ! isTest $@
then
# Clone case # Clone case
cloneCase decompressionTank decompressionTankFine cloneCase decompressionTank decompressionTankFine
@ -39,5 +41,6 @@ cloneCase decompressionTank decompressionTankFine
runApplication blockMesh runApplication blockMesh
runApplication $(getApplication) runApplication $(getApplication)
) )
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -6,6 +6,9 @@ runApplication blockMesh
runApplication $(getApplication) runApplication $(getApplication)
runApplication -s sample postProcess -latestTime -func sample runApplication -s sample postProcess -latestTime -func sample
if ! istest $@
then
runApplication validation/createGraphs runApplication validation/createGraphs
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -32,7 +32,8 @@ do
rm -rf logs rm -rf logs
done done
if ! isTest $@
then
# create validation plot # create validation plot
# Test if gnuplot exists on the system # Test if gnuplot exists on the system
command -v gnuplot >/dev/null 2>&1 || { command -v gnuplot >/dev/null 2>&1 || {
@ -63,6 +64,7 @@ gnuplot<<EOF
plot f(t),t title "Spalding" with lines linetype -1, \ plot f(t),t title "Spalding" with lines linetype -1, \
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6 "yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
EOF EOF
fi
echo Done echo Done

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
(cd cylinderMesh && ./Allrun.pre) (cd cylinderMesh && ./Allrun.pre)
# Add background mesh # Add background mesh
(cd cylinderAndBackground && ./Allrun) (cd cylinderAndBackground && ./Allrun $*)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -15,7 +15,12 @@ runParallel $(getApplication)
# Run noise tool for both point and surface # Run noise tool for both point and surface
if ! isTest $@
then
runParallel -s point noise -dict system/noiseDict-point runParallel -s point noise -dict system/noiseDict-point
runParallel -s surface noise -dict system/noiseDict-surface runParallel -s surface noise -dict system/noiseDict-surface
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,18 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
rm -f system/blockMeshDict
m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
restore0Dir
runApplication decomposePar
runParallel $(getApplication)
# Note: not running the noise utility since no pressure data will be generated
#------------------------------------------------------------------------------

View File

@ -24,6 +24,9 @@ setDamBreakFine ()
# Do damBreak # Do damBreak
(cd damBreak && foamRunTutorials) (cd damBreak && foamRunTutorials)
if ! isTest $@
then
# Clone case # Clone case
cloneCase damBreak damBreakFine cloneCase damBreak damBreakFine
@ -40,5 +43,6 @@ cloneCase damBreak damBreakFine
runParallel $(getApplication) runParallel $(getApplication)
runApplication reconstructPar runApplication reconstructPar
) )
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -24,6 +24,8 @@ setDamBreakFine ()
# Do damBreak # Do damBreak
(cd damBreak && foamRunTutorials) (cd damBreak && foamRunTutorials)
if ! isTest $@
then
# Clone case # Clone case
cloneCase damBreak damBreakFine cloneCase damBreak damBreakFine
@ -40,5 +42,6 @@ cloneCase damBreak damBreakFine
runParallel $(getApplication) runParallel $(getApplication)
runApplication reconstructPar runApplication reconstructPar
) )
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,8 +2,13 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
(cd eulerianInjection && ./Allrun) (cd eulerianInjection && ./Allrun $*)
(cd lagrangianParticleInjection && ./Allrun)
(cd lagrangianDistributionInjection && ./Allrun) if ! isTest $@
then
# Note: particle data only available if running complete case
(cd lagrangianParticleInjection && ./Allrun $*)
(cd lagrangianDistributionInjection && ./Allrun $*)
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,10 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
(cd eulerianInjection && ./Allrun)
# Note: only running the Eulerian test - particle data not yet available
# (after 1 iter) for subsequent Lagrangian cases
#------------------------------------------------------------------------------

View File

@ -4,6 +4,8 @@ cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
params=$@
runApplication blockMesh runApplication blockMesh
cat system/schemesToTest | while read scheme cat system/schemesToTest | while read scheme
@ -16,6 +18,9 @@ do
runApplication -s ${schemeTag} scalarTransportFoam runApplication -s ${schemeTag} scalarTransportFoam
if ! isTest $params
then
# Save the line plot # Save the line plot
mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy
fi
done done