Skip to content
Snippets Groups Projects
Commit 72c89ca2 authored by andy's avatar andy
Browse files

Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

parents e6f58fa7 77ecd66a
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) ...@@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh.magSf() mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs() * mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(RASModel->nuEff()) * fvc::interpolate(RASModel->nuEff())
) )
) )
); );
} }
...@@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) ...@@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh, mesh,
IOobject::NO_READ IOobject::NO_READ
), ),
mesh.surfaceInterpolation::deltaCoeffs() mag(phi)
* (mag(phi)/mesh.magSf())*(runTime.deltaT()/nu) /(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* nu
)
) )
); );
} }
...@@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) ...@@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
mesh, mesh,
IOobject::NO_READ IOobject::NO_READ
), ),
mesh.surfaceInterpolation::deltaCoeffs() mag(phi)
* (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu) /(
mesh.magSf()
* mesh.surfaceInterpolation::deltaCoeffs()
* mu
)
) )
); );
} }
...@@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) ...@@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
<< abort(FatalError); << abort(FatalError);
} }
// can also check how many cells exceed a particular Pe limit
/*
{
label count = 0;
label PeLimit = 200;
forAll(PePtr(), i)
{
if (PePtr()[i] > PeLimit)
{
count++;
}
}
Info<< "Fraction > " << PeLimit << " = "
<< scalar(count)/Pe.size() << endl;
}
*/
Info<< "Pe max : " << max(PePtr()).value() << endl; Info<< "Pe max : " << max(PePtr()).value() << endl;
if (writeResults) if (writeResults)
......
...@@ -50,6 +50,7 @@ The 'target' is a Makefile target: ...@@ -50,6 +50,7 @@ The 'target' is a Makefile target:
e.g., Make/linux64GccDPOpt/fvMesh.o e.g., Make/linux64GccDPOpt/fvMesh.o
or a special target: or a special target:
dwim search up directories tree for Make sub-directory and build
all all subdirectories, uses any Allwmake files if they exist all all subdirectories, uses any Allwmake files if they exist
exe build statically linked executable exe build statically linked executable
lib build statically linked archive lib (.a) lib build statically linked archive lib (.a)
...@@ -136,7 +137,7 @@ fi ...@@ -136,7 +137,7 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# check arguments and change to the directory in which to run wmake # Check arguments and change to the directory in which to run wmake
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
unset dir makeType unset dir makeType
...@@ -167,6 +168,51 @@ then ...@@ -167,6 +168,51 @@ then
fi fi
#------------------------------------------------------------------------------
# Search up directories tree for the Make sub-directory and build there
#------------------------------------------------------------------------------
unset dir
MakeDir=Make
expandpath()
{
dir=`dirname $1`
cwd=$PWD
cd $dir
exPath=$PWD
cd $cwd
}
find_target()
{
expandpath $1
if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then
echo "$Script error: could not find Make directory"
elif [ -d "$1/Make" ]; then
echo Target $1
dir=$1
else
find_target "$1/.."
fi
}
if [ "$makeType" = dwim ]
then
find_target .
makeType=
if [ "$dir" ]
then
cd $dir 2>/dev/null || {
echo "$Script error: could not change to directory '$dir'" 1>&2
exit 1
}
fi
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Recurse the application directories tree # Recurse the application directories tree
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
...@@ -254,8 +300,9 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc ...@@ -254,8 +300,9 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc
rc=$? rc=$?
[ $rc -eq 0 ] || exit $rc [ $rc -eq 0 ] || exit $rc
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# make the object files and link # Make the object files and link
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment