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

This commit is contained in:
mattijs
2012-12-17 13:51:35 +00:00
100 changed files with 918 additions and 157 deletions

View File

@ -146,3 +146,5 @@
( (
additionalControlsDict.lookup("solvePrimaryRegion") additionalControlsDict.lookup("solvePrimaryRegion")
); );
IObasicSourceList sources(mesh);

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -7,5 +7,6 @@ wclean interDyMFoam
wclean MRFInterFoam wclean MRFInterFoam
wclean porousInterFoam wclean porousInterFoam
wclean LTSInterFoam wclean LTSInterFoam
wclean interMixingFoam
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -7,5 +7,6 @@ wmake interDyMFoam
wmake MRFInterFoam wmake MRFInterFoam
wmake porousInterFoam wmake porousInterFoam
wmake LTSInterFoam wmake LTSInterFoam
wmake interMixingFoam
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -45,6 +45,7 @@ Description
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "fvcSmooth.H" #include "fvcSmooth.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -4,7 +4,10 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -13,4 +16,7 @@ EXE_LIBS = \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume -lfiniteVolume \
-lmeshTools \
-lfieldSources \
-lsampling

View File

@ -44,6 +44,7 @@ Description
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "IOMRFZoneList.H" #include "IOMRFZoneList.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -4,7 +4,10 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -13,4 +16,7 @@ EXE_LIBS = \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume -lfiniteVolume \
-lmeshTools \
-lfieldSources \
-lsampling

View File

@ -12,10 +12,13 @@
- fvm::laplacian(muEff, U) - fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff)) - (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
==
sources(rho, U)
); );
mrfZones.addCoriolis(rho, UEqn);
mrfZones.addCoriolis(rho, UEqn);
UEqn.relax(); UEqn.relax();
sources.constrain(UEqn);
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {

View File

@ -42,6 +42,7 @@
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
} }
} }

View File

@ -3,7 +3,10 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -12,4 +15,7 @@ EXE_LIBS = \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume -lfiniteVolume \
-lmeshTools \
-lfieldSources \
-lsampling

View File

@ -131,3 +131,5 @@
); );
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
} }
IObasicSourceList sources(mesh);

View File

@ -6,8 +6,10 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude -I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -18,6 +20,8 @@ EXE_LIBS = \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume \ -lfiniteVolume \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools \
-ldynamicFvMesh \ -ldynamicFvMesh \
-ltopoChangerFvMesh -ltopoChangerFvMesh \
-lmeshTools \
-lfieldSources \
-lsampling

View File

@ -40,6 +40,7 @@ Description
#include "twoPhaseMixture.H" #include "twoPhaseMixture.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -48,6 +48,7 @@
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
} }
} }

View File

@ -44,6 +44,7 @@ Description
#include "twoPhaseMixture.H" #include "twoPhaseMixture.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,4 +3,3 @@ threePhaseInterfaceProperties/threePhaseInterfaceProperties.C
interMixingFoam.C interMixingFoam.C
EXE = $(FOAM_APPBIN)/interMixingFoam EXE = $(FOAM_APPBIN)/interMixingFoam

View File

@ -1,14 +1,15 @@
INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam
EXE_INC = \ EXE_INC = \
-I$(INTERFOAM) \ -I.. \
-IincompressibleThreePhaseMixture \ -IincompressibleThreePhaseMixture \
-IthreePhaseInterfaceProperties \ -IthreePhaseInterfaceProperties \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ltwoPhaseInterfaceProperties \ -ltwoPhaseInterfaceProperties \
@ -16,4 +17,7 @@ EXE_LIBS = \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume -lfiniteVolume \
-lmeshTools \
-lfieldSources \
-lsampling

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -165,3 +165,5 @@
); );
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
} }
IObasicSourceList sources(mesh);

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -37,6 +37,7 @@ Description
#include "threePhaseInterfaceProperties.H" #include "threePhaseInterfaceProperties.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -42,6 +42,7 @@
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
sources.correct(U);
} }
} }

View File

@ -5,7 +5,9 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -15,4 +17,6 @@ EXE_LIBS = \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools \
-lfieldSources \
-lsampling

View File

@ -16,11 +16,13 @@
- fvm::laplacian(muEff, U) - fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff)) - (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
==
sources(rho, U)
); );
UEqn.relax(); UEqn.relax();
pZones.addResistance(UEqn); pZones.addResistance(UEqn);
sources.constrain(UEqn);
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {

View File

@ -46,6 +46,7 @@ Description
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "IOporosityModelList.H" #include "IOporosityModelList.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "IObasicSourceList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -37,6 +37,8 @@
# normally use "make" # normally use "make"
make="make" make="make"
runTests=false
skipFirst=false
## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set ## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
#if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ] #if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
@ -73,8 +75,32 @@ then
thisScript="$PWD/$thisScript" thisScript="$PWD/$thisScript"
fi fi
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-t | -test)
runTests=true
shift
;;
-s | -skipFirst)
skipFirst=true
shift
;;
*)
break
;;
esac
done
# If an argument is supplied do not execute ./Allrun to avoid recursion # If an argument is supplied do not execute ./Allrun to avoid recursion
if [ $# = 0 -a -f "./Allrun" ] if ! $skipFirst && $runTests && [ -f "./Alltest" ]
then
# Run a special test script.
./Alltest
elif ! $skipFirst && [ -f "./Allrun" ]
then then
# Specialised script. # Specialised script.
./Allrun ./Allrun
@ -104,7 +130,10 @@ else
#done #done
FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs) FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs)
#$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript" #$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript"
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript"
passArgs=$(if $runTests; then echo "-test"; fi)
$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript" FOAM_ARGS="$passArgs"
fi fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -36,7 +36,7 @@
application: $(FOAM_TARGETS) application: $(FOAM_TARGETS)
$(FOAM_TARGETS): $(FOAM_TARGETS):
+@(cd $@ && $(FOAM_APP)) +@(cd $@ && $(FOAM_APP) $(FOAM_ARGS))
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -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 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License

View File

@ -255,8 +255,10 @@ $(lduMatrix)/solvers/ICCG/ICCG.C
$(lduMatrix)/solvers/BICCG/BICCG.C $(lduMatrix)/solvers/BICCG/BICCG.C
$(lduMatrix)/smoothers/GaussSeidel/GaussSeidelSmoother.C $(lduMatrix)/smoothers/GaussSeidel/GaussSeidelSmoother.C
$(lduMatrix)/smoothers/symGaussSeidel/symGaussSeidelSmoother.C
$(lduMatrix)/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C $(lduMatrix)/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C
$(lduMatrix)/smoothers/DIC/DICSmoother.C $(lduMatrix)/smoothers/DIC/DICSmoother.C
$(lduMatrix)/smoothers/FDIC/FDICSmoother.C
$(lduMatrix)/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C $(lduMatrix)/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C
$(lduMatrix)/smoothers/DILU/DILUSmoother.C $(lduMatrix)/smoothers/DILU/DILUSmoother.C
$(lduMatrix)/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C $(lduMatrix)/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -98,17 +98,17 @@ void Foam::DICSmoother::smooth
rA *= rD_; rA *= rD_;
register label nFaces = matrix_.upper().size(); register label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++) for (register label facei=0; facei<nFaces; facei++)
{ {
register label u = uPtr[face]; register label u = uPtr[facei];
rAPtr[u] -= rDPtr[u]*upperPtr[face]*rAPtr[lPtr[face]]; rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]];
} }
register label nFacesM1 = nFaces - 1; register label nFacesM1 = nFaces - 1;
for (register label face=nFacesM1; face>=0; face--) for (register label facei=nFacesM1; facei>=0; facei--)
{ {
register label l = lPtr[face]; register label l = lPtr[facei];
rAPtr[l] -= rDPtr[l]*upperPtr[face]*rAPtr[uPtr[face]]; rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]];
} }
psi += rA; psi += rA;

View File

@ -0,0 +1,149 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "FDICSmoother.H"
#include "FDICPreconditioner.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(FDICSmoother, 0);
lduMatrix::smoother::addsymMatrixConstructorToTable<FDICSmoother>
addFDICSmootherSymMatrixConstructorToTable_;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::FDICSmoother::FDICSmoother
(
const word& fieldName,
const lduMatrix& matrix,
const FieldField<Field, scalar>& interfaceBouCoeffs,
const FieldField<Field, scalar>& interfaceIntCoeffs,
const lduInterfaceFieldPtrsList& interfaces
)
:
lduMatrix::smoother
(
fieldName,
matrix,
interfaceBouCoeffs,
interfaceIntCoeffs,
interfaces
),
rD_(matrix_.diag()),
rDuUpper_(matrix_.upper().size()),
rDlUpper_(matrix_.upper().size())
{
scalar* __restrict__ rDPtr = rD_.begin();
scalar* __restrict__ rDuUpperPtr = rDuUpper_.begin();
scalar* __restrict__ rDlUpperPtr = rDlUpper_.begin();
const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin();
const label* const __restrict__ lPtr =
matrix_.lduAddr().lowerAddr().begin();
const scalar* const __restrict__ upperPtr =
matrix_.upper().begin();
register label nCells = rD_.size();
register label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++)
{
rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]];
}
// Generate reciprocal FDIC
for (register label cell=0; cell<nCells; cell++)
{
rDPtr[cell] = 1.0/rDPtr[cell];
}
for (register label face=0; face<nFaces; face++)
{
rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face];
rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face];
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::FDICSmoother::smooth
(
scalarField& psi,
const scalarField& source,
const direction cmpt,
const label nSweeps
) const
{
const scalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin();
const scalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin();
const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin();
const label* const __restrict__ lPtr =
matrix_.lduAddr().lowerAddr().begin();
// Temporary storage for the residual
scalarField rA(rD_.size());
scalar* __restrict__ rAPtr = rA.begin();
for (label sweep=0; sweep<nSweeps; sweep++)
{
matrix_.residual
(
rA,
psi,
source,
interfaceBouCoeffs_,
interfaces_,
cmpt
);
rA *= rD_;
register label nFaces = matrix_.upper().size();
for (register label face=0; face<nFaces; face++)
{
rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]];
}
register label nFacesM1 = nFaces - 1;
for (register label face=nFacesM1; face>=0; face--)
{
rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]];
}
psi += rA;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,105 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
Class
Foam::FDICSmoother
Description
Simplified diagonal-based incomplete Cholesky smoother for symmetric
matrices.
To improve efficiency, the residual is evaluated after every nSweeps
sweeps.
SourceFiles
FDICSmoother.C
\*---------------------------------------------------------------------------*/
#ifndef FDICSmoother_H
#define FDICSmoother_H
#include "lduMatrix.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class FDICSmoother Declaration
\*---------------------------------------------------------------------------*/
class FDICSmoother
:
public lduMatrix::smoother
{
// Private data
//- The reciprocal preconditioned diagonal
scalarField rD_;
scalarField rDuUpper_;
scalarField rDlUpper_;
public:
//- Runtime type information
TypeName("FDIC");
// Constructors
//- Construct from matrix components
FDICSmoother
(
const word& fieldName,
const lduMatrix& matrix,
const FieldField<Field, scalar>& interfaceBouCoeffs,
const FieldField<Field, scalar>& interfaceIntCoeffs,
const lduInterfaceFieldPtrsList& interfaces
);
// Member Functions
//- Smooth the solution for a given number of sweeps
void smooth
(
scalarField& psi,
const scalarField& source,
const direction cmpt,
const label nSweeps
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -107,20 +107,12 @@ void Foam::GaussSeidelSmoother::smooth
// To compensate for this, it is necessary to turn the // To compensate for this, it is necessary to turn the
// sign of the contribution. // sign of the contribution.
//FieldField<Field, scalar> mBouCoeffs(interfaceBouCoeffs_.size());
//
//forAll(mBouCoeffs, patchi)
//{
// if (interfaces_.set(patchi))
// {
// mBouCoeffs.set(patchi, -interfaceBouCoeffs_[patchi]);
// }
//}
FieldField<Field, scalar>& mBouCoeffs = FieldField<Field, scalar>& mBouCoeffs =
const_cast<FieldField<Field, scalar>&> const_cast<FieldField<Field, scalar>&>
( (
interfaceBouCoeffs_ interfaceBouCoeffs_
); );
forAll(mBouCoeffs, patchi) forAll(mBouCoeffs, patchi)
{ {
if (interfaces_.set(patchi)) if (interfaces_.set(patchi))
@ -152,35 +144,35 @@ void Foam::GaussSeidelSmoother::smooth
cmpt cmpt
); );
register scalar curPsi; register scalar psii;
register label fStart; register label fStart;
register label fEnd = ownStartPtr[0]; register label fEnd = ownStartPtr[0];
for (register label cellI=0; cellI<nCells; cellI++) for (register label celli=0; celli<nCells; celli++)
{ {
// Start and end of this row // Start and end of this row
fStart = fEnd; fStart = fEnd;
fEnd = ownStartPtr[cellI + 1]; fEnd = ownStartPtr[celli + 1];
// Get the accumulated neighbour side // Get the accumulated neighbour side
curPsi = bPrimePtr[cellI]; psii = bPrimePtr[celli];
// Accumulate the owner product side // Accumulate the owner product side
for (register label curFace=fStart; curFace<fEnd; curFace++) for (register label facei=fStart; facei<fEnd; facei++)
{ {
curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]]; psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
} }
// Finish current psi // Finish psi for this cell
curPsi /= diagPtr[cellI]; psii /= diagPtr[celli];
// Distribute the neighbour side using current psi // Distribute the neighbour side using psi for this cell
for (register label curFace=fStart; curFace<fEnd; curFace++) for (register label facei=fStart; facei<fEnd; facei++)
{ {
bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
} }
psiPtr[cellI] = curPsi; psiPtr[celli] = psii;
} }
} }

View File

@ -0,0 +1,241 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "symGaussSeidelSmoother.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(symGaussSeidelSmoother, 0);
lduMatrix::smoother::addsymMatrixConstructorToTable<symGaussSeidelSmoother>
addsymGaussSeidelSmootherSymMatrixConstructorToTable_;
lduMatrix::smoother::addasymMatrixConstructorToTable<symGaussSeidelSmoother>
addsymGaussSeidelSmootherAsymMatrixConstructorToTable_;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::symGaussSeidelSmoother::symGaussSeidelSmoother
(
const word& fieldName,
const lduMatrix& matrix,
const FieldField<Field, scalar>& interfaceBouCoeffs,
const FieldField<Field, scalar>& interfaceIntCoeffs,
const lduInterfaceFieldPtrsList& interfaces
)
:
lduMatrix::smoother
(
fieldName,
matrix,
interfaceBouCoeffs,
interfaceIntCoeffs,
interfaces
)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::symGaussSeidelSmoother::smooth
(
const word& fieldName_,
scalarField& psi,
const lduMatrix& matrix_,
const scalarField& source,
const FieldField<Field, scalar>& interfaceBouCoeffs_,
const lduInterfaceFieldPtrsList& interfaces_,
const direction cmpt,
const label nSweeps
)
{
register scalar* __restrict__ psiPtr = psi.begin();
register const label nCells = psi.size();
scalarField bPrime(nCells);
register scalar* __restrict__ bPrimePtr = bPrime.begin();
register const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
register const scalar* const __restrict__ upperPtr =
matrix_.upper().begin();
register const scalar* const __restrict__ lowerPtr =
matrix_.lower().begin();
register const label* const __restrict__ uPtr =
matrix_.lduAddr().upperAddr().begin();
register const label* const __restrict__ ownStartPtr =
matrix_.lduAddr().ownerStartAddr().begin();
// Parallel boundary initialisation. The parallel boundary is treated
// as an effective jacobi interface in the boundary.
// Note: there is a change of sign in the coupled
// interface update. The reason for this is that the
// internal coefficients are all located at the l.h.s. of
// the matrix whereas the "implicit" coefficients on the
// coupled boundaries are all created as if the
// coefficient contribution is of a source-kind (i.e. they
// have a sign as if they are on the r.h.s. of the matrix.
// To compensate for this, it is necessary to turn the
// sign of the contribution.
FieldField<Field, scalar>& mBouCoeffs =
const_cast<FieldField<Field, scalar>&>
(
interfaceBouCoeffs_
);
forAll(mBouCoeffs, patchi)
{
if (interfaces_.set(patchi))
{
mBouCoeffs[patchi].negate();
}
}
for (label sweep=0; sweep<nSweeps; sweep++)
{
bPrime = source;
matrix_.initMatrixInterfaces
(
mBouCoeffs,
interfaces_,
psi,
bPrime,
cmpt
);
matrix_.updateMatrixInterfaces
(
mBouCoeffs,
interfaces_,
psi,
bPrime,
cmpt
);
register scalar psii;
register label fStart;
register label fEnd = ownStartPtr[0];
for (register label celli=0; celli<nCells; celli++)
{
// Start and end of this row
fStart = fEnd;
fEnd = ownStartPtr[celli + 1];
// Get the accumulated neighbour side
psii = bPrimePtr[celli];
// Accumulate the owner product side
for (register label facei=fStart; facei<fEnd; facei++)
{
psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
}
// Finish current psi
psii /= diagPtr[celli];
// Distribute the neighbour side using current psi
for (register label facei=fStart; facei<fEnd; facei++)
{
bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
}
psiPtr[celli] = psii;
}
fStart = ownStartPtr[nCells];
for (register label celli=nCells-1; celli>=0; celli--)
{
// Start and end of this row
fEnd = fStart;
fStart = ownStartPtr[celli];
// Get the accumulated neighbour side
psii = bPrimePtr[celli];
// Accumulate the owner product side
for (register label facei=fStart; facei<fEnd; facei++)
{
psii -= upperPtr[facei]*psiPtr[uPtr[facei]];
}
// Finish psi for this cell
psii /= diagPtr[celli];
// Distribute the neighbour side using psi for this cell
for (register label facei=fStart; facei<fEnd; facei++)
{
bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii;
}
psiPtr[celli] = psii;
}
}
// Restore interfaceBouCoeffs_
forAll(mBouCoeffs, patchi)
{
if (interfaces_.set(patchi))
{
mBouCoeffs[patchi].negate();
}
}
}
void Foam::symGaussSeidelSmoother::smooth
(
scalarField& psi,
const scalarField& source,
const direction cmpt,
const label nSweeps
) const
{
smooth
(
fieldName_,
psi,
matrix_,
source,
interfaceBouCoeffs_,
interfaces_,
cmpt,
nSweeps
);
}
// ************************************************************************* //

View File

@ -0,0 +1,108 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\/ 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 3 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, see <http://www.gnu.org/licenses/>.
Class
Foam::symGaussSeidelSmoother
Description
A lduMatrix::smoother for symmetric Gauss-Seidel
SourceFiles
symGaussSeidelSmoother.C
\*---------------------------------------------------------------------------*/
#ifndef symGaussSeidelSmoother_H
#define symGaussSeidelSmoother_H
#include "lduMatrix.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class symGaussSeidelSmoother Declaration
\*---------------------------------------------------------------------------*/
class symGaussSeidelSmoother
:
public lduMatrix::smoother
{
public:
//- Runtime type information
TypeName("symGaussSeidel");
// Constructors
//- Construct from components
symGaussSeidelSmoother
(
const word& fieldName,
const lduMatrix& matrix,
const FieldField<Field, scalar>& interfaceBouCoeffs,
const FieldField<Field, scalar>& interfaceIntCoeffs,
const lduInterfaceFieldPtrsList& interfaces
);
// Member Functions
//- Smooth for the given number of sweeps
static void smooth
(
const word& fieldName,
scalarField& psi,
const lduMatrix& matrix,
const scalarField& source,
const FieldField<Field, scalar>& interfaceBouCoeffs,
const lduInterfaceFieldPtrsList& interfaces,
const direction cmpt,
const label nSweeps
);
//- Smooth the solution for a given number of sweeps
virtual void smooth
(
scalarField& psi,
const scalarField& Source,
const direction cmpt,
const label nSweeps
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,13 +46,10 @@ tmp<fvMatrix<Type> >
gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
( (
const surfaceScalarField& gammaMagSf, const surfaceScalarField& gammaMagSf,
const surfaceScalarField& deltaCoeffs,
const GeometricField<Type, fvPatchField, volMesh>& vf const GeometricField<Type, fvPatchField, volMesh>& vf
) )
{ {
tmp<surfaceScalarField> tdeltaCoeffs =
this->tsnGradScheme_().deltaCoeffs(vf);
const surfaceScalarField& deltaCoeffs = tdeltaCoeffs();
tmp<fvMatrix<Type> > tfvm tmp<fvMatrix<Type> > tfvm
( (
new fvMatrix<Type> new fvMatrix<Type>
@ -66,14 +63,14 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected
fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField(); fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField();
fvm.negSumDiag(); fvm.negSumDiag();
forAll(vf.boundaryField(), patchI) forAll(vf.boundaryField(), patchi)
{ {
const fvPatchField<Type>& psf = vf.boundaryField()[patchI]; const fvPatchField<Type>& psf = vf.boundaryField()[patchi];
const fvsPatchScalarField& patchGamma = const fvsPatchScalarField& patchGamma =
gammaMagSf.boundaryField()[patchI]; gammaMagSf.boundaryField()[patchi];
fvm.internalCoeffs()[patchI] = patchGamma*psf.gradientInternalCoeffs(); fvm.internalCoeffs()[patchi] = patchGamma*psf.gradientInternalCoeffs();
fvm.boundaryCoeffs()[patchI] = -patchGamma*psf.gradientBoundaryCoeffs(); fvm.boundaryCoeffs()[patchi] = -patchGamma*psf.gradientBoundaryCoeffs();
} }
return tfvm; return tfvm;
@ -162,7 +159,12 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacian
); );
const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn); const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn);
tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected(SfGammaSn, vf); tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected
(
SfGammaSn,
this->tsnGradScheme_().deltaCoeffs(vf),
vf
);
fvMatrix<Type>& fvm = tfvm(); fvMatrix<Type>& fvm = tfvm();
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfaceFluxCorrection tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfaceFluxCorrection

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -58,12 +58,6 @@ class gaussLaplacianScheme
{ {
// Private Member Functions // Private Member Functions
tmp<fvMatrix<Type> > fvmLaplacianUncorrected
(
const surfaceScalarField& gammaMagSf,
const GeometricField<Type, fvPatchField, volMesh>&
);
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > gammaSnGradCorr tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > gammaSnGradCorr
( (
const surfaceVectorField& SfGammaCorr, const surfaceVectorField& SfGammaCorr,
@ -116,6 +110,13 @@ public:
// Member Functions // Member Functions
static tmp<fvMatrix<Type> > fvmLaplacianUncorrected
(
const surfaceScalarField& gammaMagSf,
const surfaceScalarField& deltaCoeffs,
const GeometricField<Type, fvPatchField, volMesh>&
);
tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian
( (
const GeometricField<Type, fvPatchField, volMesh>& const GeometricField<Type, fvPatchField, volMesh>&

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,12 @@ Foam::fv::gaussLaplacianScheme<Foam::Type, Foam::scalar>::fvmLaplacian \
gamma*mesh.magSf() \ gamma*mesh.magSf() \
); \ ); \
\ \
tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected(gammaMagSf, vf); \ tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected \
( \
gammaMagSf, \
this->tsnGradScheme_().deltaCoeffs(vf), \
vf \
); \
fvMatrix<Type>& fvm = tfvm(); \ fvMatrix<Type>& fvm = tfvm(); \
\ \
if (this->tsnGradScheme_().corrected()) \ if (this->tsnGradScheme_().corrected()) \

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -111,7 +111,7 @@ snGradScheme<Type>::snGrad
const fvMesh& mesh = vf.mesh(); const fvMesh& mesh = vf.mesh();
// construct GeometricField<Type, fvsPatchField, surfaceMesh> // construct GeometricField<Type, fvsPatchField, surfaceMesh>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tssf tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
( (
new GeometricField<Type, fvsPatchField, surfaceMesh> new GeometricField<Type, fvsPatchField, surfaceMesh>
( (
@ -127,7 +127,7 @@ snGradScheme<Type>::snGrad
vf.dimensions()*tdeltaCoeffs().dimensions() vf.dimensions()*tdeltaCoeffs().dimensions()
) )
); );
GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf(); GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tsf();
// set reference to difference factors array // set reference to difference factors array
const scalarField& deltaCoeffs = tdeltaCoeffs().internalField(); const scalarField& deltaCoeffs = tdeltaCoeffs().internalField();
@ -136,18 +136,30 @@ snGradScheme<Type>::snGrad
const labelUList& owner = mesh.owner(); const labelUList& owner = mesh.owner();
const labelUList& neighbour = mesh.neighbour(); const labelUList& neighbour = mesh.neighbour();
forAll(owner, faceI) forAll(owner, facei)
{ {
ssf[faceI] = ssf[facei] =
deltaCoeffs[faceI]*(vf[neighbour[faceI]] - vf[owner[faceI]]); deltaCoeffs[facei]*(vf[neighbour[facei]] - vf[owner[facei]]);
} }
forAll(vf.boundaryField(), patchI) forAll(vf.boundaryField(), patchi)
{ {
ssf.boundaryField()[patchI] = vf.boundaryField()[patchI].snGrad(); ssf.boundaryField()[patchi] = vf.boundaryField()[patchi].snGrad();
} }
return tssf; return tsf;
}
template<class Type>
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
snGradScheme<Type>::sndGrad
(
const GeometricField<Type, fvPatchField, volMesh>& vf,
const word& sndGradName
)
{
return snGrad(vf, vf.mesh().nonOrthDeltaCoeffs(), sndGradName);
} }
@ -161,7 +173,9 @@ snGradScheme<Type>::snGrad
) const ) const
{ {
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
= snGrad(vf, deltaCoeffs(vf)); (
snGrad(vf, deltaCoeffs(vf))
);
if (corrected()) if (corrected())
{ {
@ -181,10 +195,13 @@ snGradScheme<Type>::snGrad
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
) const ) const
{ {
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterpVf tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf
= snGrad(tvf()); (
tvf.clear(); snGrad(tvf())
return tinterpVf; );
tsf.clear();
return tsf;
} }

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -133,6 +133,14 @@ public:
const word& snGradName = "snGrad" const word& snGradName = "snGrad"
); );
//- Return the sndGrad of the given cell field
static tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
sndGrad
(
const GeometricField<Type, fvPatchField, volMesh>&,
const word& snGradName = "sndGrad"
);
//- Return the interpolation weighting factors for the given field //- Return the interpolation weighting factors for the given field
virtual tmp<surfaceScalarField> deltaCoeffs virtual tmp<surfaceScalarField> deltaCoeffs
( (

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -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 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -68,7 +68,7 @@ logReport()
# Recursively run all tutorials # Recursively run all tutorials
foamRunTutorials cases foamRunTutorials -test -skipFirst
# Analyse all log files # Analyse all log files

View File

@ -3,6 +3,6 @@ nacaAirfoil
* large domain with airfoil section near centre * large domain with airfoil section near centre
* extremely non-orthogonal, highly skew mesh refined around the airfoil * extremely non-orthogonal, highly skew mesh refined around the airfoil
* running at Mach 1.78 * running at Mach 1.78
* limited 0.5 on all laplacianSchemes because the mesh is so poor * limited corrected 0.5 on all laplacianSchemes because the mesh is so poor
* run to t = 0.02 with nextWrite; change to stopAt endTime to continue running * run to t = 0.02 with nextWrite; change to stopAt endTime to continue running
* deltaT can be increased later in the run to 2e-07 * deltaT can be increased later in the run to 2e-07

View File

@ -44,6 +44,7 @@ FoamFile
frontAndBack frontAndBack
{ {
type empty; type empty;
inGroups 1(empty);
nFaces 24450; nFaces 24450;
startFace 24730; startFace 24730;
} }

View File

@ -32,22 +32,24 @@ FoamFile
side1 side1
{ {
type cyclicAMI; type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 400; nFaces 400;
startFace 4478; startFace 4478;
matchTolerance 0.0001; matchTolerance 0.0001;
neighbourPatch side2;
transform rotational; transform rotational;
neighbourPatch side2;
rotationAxis (1 0 0); rotationAxis (1 0 0);
rotationCentre (0 0 0); rotationCentre (0 0 0);
} }
side2 side2
{ {
type cyclicAMI; type cyclicAMI;
inGroups 1(cyclicAMI);
nFaces 250; nFaces 250;
startFace 4878; startFace 4878;
matchTolerance 0.0001; matchTolerance 0.0001;
neighbourPatch side1;
transform rotational; transform rotational;
neighbourPatch side1;
rotationAxis (1 0 0); rotationAxis (1 0 0);
rotationCentre (0 0 0); rotationCentre (0 0 0);
} }

View File

@ -44,6 +44,7 @@ FoamFile
frontAndBack frontAndBack
{ {
type empty; type empty;
inGroups 1(empty);
nFaces 24450; nFaces 24450;
startFace 24730; startFace 24730;
} }

View File

@ -33,10 +33,14 @@ boundaryField
E 9.8; E 9.8;
value $internalField; value $internalField;
} }
outlet outlet
{ {
type zeroGradient; type inletOutlet;
inletValue uniform $turbulentEpsilon;
value $internalField;
} }
inlet inlet
{ {
type atmBoundaryLayerInletEpsilon; type atmBoundaryLayerInletEpsilon;

View File

@ -27,14 +27,16 @@ boundaryField
outlet outlet
{ {
type inletOutlet; type inletOutlet;
inletValue uniform 0.0; inletValue uniform $turbulentKE;
value $internalField; value $internalField;
} }
inlet inlet
{ {
type uniformFixedValue; type uniformFixedValue;
uniformValue constant $turbulentKE; uniformValue constant $turbulentKE;
} }
"terrain_.*" "terrain_.*"
{ {
type kqRWallFunction; type kqRWallFunction;

View File

@ -15,43 +15,37 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6 5
( (
outlet outlet
{ {
type patch; type patch;
nFaces 922; nFaces 600;
startFace 364825; startFace 51900;
} }
sides sides
{ {
type patch; type patch;
nFaces 1834; nFaces 1200;
startFace 365747; startFace 52500;
} }
inlet inlet
{ {
type patch; type patch;
nFaces 923; nFaces 600;
startFace 367581; startFace 53700;
} }
ground ground
{ {
type wall; type wall;
nFaces 0; nFaces 900;
startFace 368504; startFace 54300;
} }
top top
{ {
type patch; type patch;
nFaces 900; nFaces 900;
startFace 368504; startFace 55200;
}
terrain_patch0
{
type wall;
nFaces 14400;
startFace 369404;
} }
) )

View File

@ -0,0 +1,18 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication cvMesh
# Change collapseEdges to only do one iteration
cp system/collapseDict system/collapseDict.org
sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \
system/collapseDict.org > system/collapseDict
runApplication collapseEdges -latestTime -collapseFaces
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication surfaceFeatureExtract
# Create tight-fitting background mesh
runApplication blockMesh
runApplication cvMesh
# Change collapseEdges to only do one iteration
cp system/collapseDict system/collapseDict.org
sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \
system/collapseDict.org > system/collapseDict
runApplication collapseEdges -latestTime -collapseFaces
# ----------------------------------------------------------------- end-of-file

View File

@ -38,6 +38,6 @@ runApplication surfaceFeatureExtract
runApplication cvMesh runApplication cvMesh
# Generate some sets for a bit of mesh inspection # Generate some sets for a bit of mesh inspection
runApplication topoSet -constant -time 0:100 runApplication topoSet -time 0:100
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -39,6 +39,14 @@ boundaryField
inletValue uniform 0; inletValue uniform 0;
value uniform 0; value uniform 0;
} }
porous_half0
{
type cyclic;
}
porous_half1
{
type cyclic;
}
defaultFaces defaultFaces
{ {
type empty; type empty;