diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index 5e71a2eeebf3fc0aafefd77baa2ffe543d47b1c6..7b5b83784da166fb003cb9f965321d1503e18384 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -166,6 +166,9 @@ { phaseModel& phase = iter(); + phase.phi().boundaryField() == + (mesh.Sf().boundaryField() & phase.U().boundaryField()); + mrfZones.relativeFlux(phase.phi().oldTime()); mrfZones.relativeFlux(phase.phi()); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C index 4254348b18ae2d236309bc0bee77e4b9c1f2cf80..5c886900e82f6e172f7a4329d32c1e50e92eb674 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstruct.C @@ -56,20 +56,7 @@ reconstruct const fvMesh& mesh = ssf.mesh(); - surfaceVectorField faceVols - ( - mesh.Sf()/(mesh.magSf()*mesh.nonOrthDeltaCoeffs()) - ); - - faceVols.internalField() *= (1.0 - mesh.weights().internalField()); - forAll(faceVols.boundaryField(), patchi) - { - if (faceVols.boundaryField()[patchi].coupled()) - { - faceVols.boundaryField()[patchi] *= - (1.0 - mesh.weights().boundaryField()[patchi]); - } - } + surfaceVectorField SfHat(mesh.Sf()/mesh.magSf()); tmp<GeometricField<GradType, fvPatchField, volMesh> > treconField ( @@ -83,7 +70,7 @@ reconstruct IOobject::NO_READ, IOobject::NO_WRITE ), - inv(surfaceSum(mesh.Sf()*faceVols))&surfaceSum(faceVols*ssf), + inv(surfaceSum(SfHat*mesh.Sf()))&surfaceSum(SfHat*ssf), zeroGradientFvPatchField<GradType>::typeName ) ); diff --git a/wmake/wmake b/wmake/wmake index e5d939656567eb4459bb8830e7a3aad6096b4c54..0f8e2cc41f0266271448a807934ffd180e6033b7 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -50,7 +50,6 @@ The 'target' is a Makefile target: e.g., Make/linux64GccDPOpt/fvMesh.o 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 exe build statically linked executable lib build statically linked archive lib (.a) @@ -86,9 +85,11 @@ do esac done -# -# check environment variables -# + +#------------------------------------------------------------------------------ +# Check environment variables +#------------------------------------------------------------------------------ + for check in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR do eval test "\$$check" || { @@ -103,13 +104,13 @@ done [ "$1" = exe -o \( "$WM_PROJECT" -a "$WM_PROJECT_DIR" \) ] || { echo "$Script error:" 1>&2 echo " environment variable \$WM_PROJECT or \$WM_PROJECT_DIR not set" 1>&2 - echo " while building project library" 1>&2 + echo " while building project library" 1>&2 exit 1 } #------------------------------------------------------------------------------ -# Select the version of make to be used +# Select the version of make use #------------------------------------------------------------------------------ # set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set @@ -169,8 +170,30 @@ then fi +#------------------------------------------------------------------------------ +# Recurse the application directories tree +#------------------------------------------------------------------------------ + +if [ "$makeType" = all ] +then + if [ -e Allwmake ] + then + ./Allwmake + exit $? + elif [ ! -d $MakeDir ] + then + # FOAM_APPS=$(find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name Optional -a ! -name Make \) -printf "%f ") + # avoid 'find' with '-printf' ... not entirely portable + FOAM_APPS=$(for d in *; do [ -d "$d" -a "$d" != Optional -a "$d" != Make ] && echo "$d"; done | xargs) + $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS" + exit $? + fi +fi + + #------------------------------------------------------------------------------ # Search up directories tree for the Make sub-directory and build there +# Also check the existance of the 'files' file #------------------------------------------------------------------------------ unset dir @@ -189,18 +212,22 @@ find_target() { expandpath $1 - if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then + 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 + echo " Found target directory " $1 dir=$1 else find_target "$1/.." fi } -if [ "$makeType" = dwim ] +if [ ! -d $MakeDir ] then + echo "$Script: '$MakeDir' directory does not exist in $PWD" 1>&2 + echo " Searching up directories tree for Make directory" + find_target . makeType= @@ -214,41 +241,16 @@ then fi -#------------------------------------------------------------------------------ -# Recurse the application directories tree -#------------------------------------------------------------------------------ - -if [ "$makeType" = all ] -then - if [ -e Allwmake ] - then - ./Allwmake - exit $? - elif [ ! -d $MakeDir ] - then - # FOAM_APPS=$(find . -maxdepth 1 \( -type d -a ! -name "." -a ! -name Optional -a ! -name Make \) -printf "%f ") - # avoid 'find' with '-printf' ... not entirely portable - FOAM_APPS=$(for d in *; do [ -d "$d" -a "$d" != Optional -a "$d" != Make ] && echo "$d"; done | xargs) - $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS" - exit $? - fi -fi - - -#------------------------------------------------------------------------------ -# Require the existence of the 'Make' directory and 'files' file -#------------------------------------------------------------------------------ - -[ -d $MakeDir ] || { - echo "$Script error: '$MakeDir' directory does not exist in $PWD" 1>&2 - exit 1 -} - [ -r $MakeDir/files ] || { echo "$Script error: file '$MakeDir/files' does not exist in $PWD" 1>&2 exit 1 } + +#------------------------------------------------------------------------------ +# Transform options +#------------------------------------------------------------------------------ + # transform "all" or no option to "libso" if that looks appropriate or remove it # so that the call to make builds the application if [ "$makeType" = all -o "$makeType" = "" ] @@ -261,8 +263,11 @@ then fi +#------------------------------------------------------------------------------ # Spawn a sub-shell and unset MAKEFLAGS in that sub-shell to avoid # files and options being built in parallel +#------------------------------------------------------------------------------ + ( cd $MakeDir unset MAKEFLAGS