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

This commit is contained in:
william
2014-01-28 14:58:50 +00:00
54 changed files with 248 additions and 100649 deletions

View File

@ -37,14 +37,17 @@ if (mesh.changing())
pcorrTypes
);
// dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0);
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
#ifndef divUCorr
#define divUCorr
#endif
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pcorrEqn
(
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
fvm::laplacian(rAUf, pcorr) == fvc::div(phi) divUCorr
);
pcorrEqn.setReference(pRefCell, pRefValue);
@ -56,5 +59,7 @@ if (mesh.changing())
}
}
#undef divUCorr
#include "continuityErrs.H"
}

View File

@ -82,7 +82,16 @@
0
);
tphiAlpha() += tphiAlphaCorr();
// Under-relax the correction for all but the 1st corrector
if (aCorr == 0)
{
tphiAlpha() += tphiAlphaCorr();
}
else
{
alpha1 = 0.5*alpha1 + 0.5*alpha10;
tphiAlpha() += 0.5*tphiAlphaCorr();
}
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,7 +82,6 @@ int main(int argc, char *argv[])
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1.0)
);
#include "../interFoam/interDyMFoam/correctPhi.H"
#include "createUf.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
@ -106,6 +105,9 @@ int main(int argc, char *argv[])
{
if (pimple.firstIter() || moveMeshOuterCorrectors)
{
// Store divU from the previous mesh for the correctPhi
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
mesh.update();
@ -125,6 +127,7 @@ int main(int argc, char *argv[])
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & Uf;
#define divUCorr -divU
#include "../interFoam/interDyMFoam/correctPhi.H"
// Make the flux relative to the mesh motion

View File

@ -7,7 +7,7 @@ wmake all extrude
wmake all extrude2DMesh
wmake all snappyHexMesh
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
wmake libso foamyHexMesh/conformalVoronoiMesh
wmake all foamyHexMesh

View File

@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
wmake libso conformalVoronoiMesh
wmake

View File

@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$CGAL_ARCH_PATH" ]
if [ -n "$CGAL_ARCH_PATH" ]
then
#- Already built by ../Allwake
#wmake libso ../foamyHexMesh/conformalVoronoiMesh

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,8 +55,8 @@ Usage
\param -fields \n
Use existing geometry decomposition and convert fields only.
\param -sets \n
Decompose cellSets, faceSets, pointSets.
\param -noSets \n
Skip decomposing cellSets, faceSets, pointSets.
\param -force \n
Remove any existing \a processor subdirectories before decomposing the

View File

@ -1,5 +1,4 @@
EXE_INC = \
-DFULLDEBUG -g -O0 \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \

View File

@ -51,3 +51,5 @@ epsAvg/bounding epsilon,/average:
alpha1Min/Min\(alpha1\) =/Min(alpha1) =
alpha1Max/Max\(alpha1\) =/Max(alpha1) =
# AMI
AMIMin/AMI: Patch source sum/average =

View File

@ -214,6 +214,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.sh
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/gperftools.sh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.sh`
# Clean environment paths again. Only remove duplicates

50
etc/config/CGAL.csh Normal file
View File

@ -0,0 +1,50 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014 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/>.
#
# File
# config/CGAL.csh
#
# Description
# Setup file for CGAL (& boost) include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/cshrc
##------------------------------------------------------------------------------
set boost_version=boost-system
set cgal_version=CGAL-4.3
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using CGAL and boost"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
endif
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
endif
unset boost_version cgal_version
# -----------------------------------------------------------------------------

52
etc/config/CGAL.sh Normal file
View File

@ -0,0 +1,52 @@
#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2014 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/>.
#
# File
# config/CGAL.sh
#
# Description
# Setup file for CGAL (& boost) include/libraries.
# Sourced from OpenFOAM-<VERSION>/etc/bashrc
#------------------------------------------------------------------------------
boost_version=boost-system
cgal_version=CGAL-4.3
export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Using CGAL and boost"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
fi
if [ -d "$BOOST_ARCH_PATH" ]
then
_foamAddLib $BOOST_ARCH_PATH/lib
fi
unset boost_version cgal_version
# -----------------------------------------------------------------------------

View File

@ -353,35 +353,6 @@ if ( $?WM_CXXFLAGS ) then
endif
# boost and CGAL
# ~~~~~~~~~~~~~~
set boost_version=boost_1_45_0
set cgal_version=CGAL-4.0
setenv BOOST_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
setenv CGAL_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
# enabled if CGAL is available
if ($?FOAM_VERBOSE && $?prompt) then
echo "Checking for"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
endif
if ( -d "$CGAL_ARCH_PATH" ) then
if ( -d "$BOOST_ARCH_PATH" ) then
_foamAddLib $BOOST_ARCH_PATH/lib
else
unsetenv BOOST_ARCH_PATH
endif
_foamAddLib $CGAL_ARCH_PATH/lib
else
unsetenv BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
endif
unset boost_version cgal_version
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -370,40 +370,6 @@ then
fi
# boost and CGAL
# ~~~~~~~~~~~~~~
boost_version=boost_1_45_0
cgal_version=CGAL-4.0
export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version
export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version
# enabled if CGAL is available
if [ "$FOAM_VERBOSE" -a "$PS1" ]
then
echo "Checking for"
echo " $cgal_version at $CGAL_ARCH_PATH"
echo " $boost_version at $BOOST_ARCH_PATH"
fi
if [ -d "$CGAL_ARCH_PATH" ]
then
if [ -d "$BOOST_ARCH_PATH" ]
then
_foamAddLib $BOOST_ARCH_PATH/lib
_foamAddLib $BOOST_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
else
unset BOOST_ARCH_PATH
fi
_foamAddLib $CGAL_ARCH_PATH/lib
_foamAddLib $CGAL_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
else
unset BOOST_ARCH_PATH CGAL_ARCH_PATH MPFR_ARCH_PATH GMP_ARCH_PATH
fi
unset boost_version cgal_version
# Communications library
# ~~~~~~~~~~~~~~~~~~~~~~

View File

@ -203,6 +203,7 @@ _foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/CGAL.csh`
# Clean environment paths again. Only remove duplicates

View File

@ -21,24 +21,14 @@ runApplication renumberMesh -overwrite
# force removal of fields generated by snappy
\rm -rf 0
# - generate face/cell sets and zones
#runApplication setSet -batch createInletOutletSets.setSet
#mv log.setSet log.createInletOutletSets.setSet
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
#mv log.topoSet log.createInletOutletSets.topoSet
# - create the inlet/outlet and AMI patches
runApplication createPatch -overwrite
# - test by running moveDynamicMes
#runApplication moveDynamicMesh -checkAMI
# - apply the initial fields
# - set the initial fields
cp -rf 0.org 0

View File

@ -64,7 +64,7 @@ geometry
}
}
}
propellerTip.obj
propellerTip.obj.gz
{
type triSurfaceMesh;
name propellerTip;

View File

@ -9,6 +9,7 @@ cleanCase
cd ../wingMotion2D_simpleFoam
cleanCase
rm -rf 0
cd ../wingMotion2D_pimpleDyMFoam
cleanCase

View File

@ -13,6 +13,7 @@ runApplication snappyHexMesh -overwrite
cd ../wingMotion2D_simpleFoam
runApplication extrudeMesh
runApplication createPatch -overwrite
cp -r 0.org 0
runApplication simpleFoam
# Copy the mesh from the steady state case and map the results to a

View File

@ -35,26 +35,26 @@ FoamFile
nFaces 62;
startFace 25291;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 25353;
}
front
{
type empty;
inGroups 1(empty);
nFaces 12565;
startFace 25353;
startFace 25731;
}
back
{
type empty;
inGroups 1(empty);
nFaces 12565;
startFace 37918;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 50483;
startFace 38296;
}
)

View File

@ -35,26 +35,26 @@ FoamFile
nFaces 62;
startFace 25291;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 25353;
}
front
{
type empty;
inGroups 1(empty);
nFaces 12565;
startFace 25353;
startFace 25731;
}
back
{
type empty;
inGroups 1(empty);
nFaces 12565;
startFace 37918;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 50483;
startFace 38296;
}
)

View File

@ -14,55 +14,41 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false;
// Patches to create.
patches
(
{
// Name of new patch
name wing;
name front;
// Type of new patch
patchInfo
{
type wall;
type empty;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches ( wing_5degrees.obj_WALL10 );
patches (symFront);
}
{
// Name of new patch
name back;
// Type of new patch
patchInfo
{
type empty;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (symBack);
}
);

View File

@ -21,10 +21,10 @@ FoamFile
constructFrom patch;
sourceCase "../wingMotion_snappyHexMesh";
sourcePatches (front);
sourcePatches (symFront);
// If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName back;
exposedPatchName symBack;
// Flip surface normals before usage. Valid only for extrude from surface or
// patch.

View File

@ -68,18 +68,18 @@ boundary
);
}
front
symFront
{
type empty;
type symmetryPlane;
faces
(
(4 5 6 7)
);
}
back
symBack
{
type empty;
type symmetryPlane;
faces
(
(0 3 2 1)

View File

@ -30,14 +30,15 @@ geometry
{
wing_5degrees.obj
{
type triSurfaceMesh;
type triSurfaceMesh;
name wing;
}
refinementBox
{
type searchableBox;
min (-1 -1 -1);
max ( 5 1 1);
type searchableBox;
min (-1 -1 -1);
max ( 5 1 1);
}
};
@ -95,7 +96,7 @@ castellatedMeshControls
refinementSurfaces
{
wing_5degrees.obj
wing
{
// Surface-wise min and max refinement level
level (5 5);
@ -180,7 +181,7 @@ addLayersControls
// Per final patch (so not geometry!) the layer information
layers
{
"wing.*"
wing
{
nSurfaceLayers 3;
}

View File

@ -50,7 +50,7 @@ boundaryField
inletValue $internalField;
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -53,7 +53,7 @@ boundaryField
inletValue uniform (0 0 0);
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -59,7 +59,7 @@ boundaryField
value uniform 200;
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -59,7 +59,7 @@ boundaryField
value uniform 1;
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -57,7 +57,7 @@ boundaryField
value uniform 0;
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -47,7 +47,7 @@ boundaryField
value $internalField;
}
porosity_ascii
porosity
{
type zeroGradient;
}

View File

@ -44,7 +44,7 @@ boundaryField
zGround $zGround;
}
"terrain_.*"
terrain
{
type uniformFixedValue;
uniformValue (0 0 0);

View File

@ -25,7 +25,7 @@ boundaryField
{
#include "include/ABLConditions"
"terrain_.*"
terrain
{
type epsilonWallFunction;
Cmu 0.09;

View File

@ -37,7 +37,7 @@ boundaryField
uniformValue constant $turbulentKE;
}
"terrain_.*"
terrain
{
type kqRWallFunction;
value uniform 0.0;

View File

@ -35,7 +35,7 @@ boundaryField
value uniform 0;
}
"terrain_.*"
terrain
{
type nutkAtmRoughWallFunction;
z0 $z0;

View File

@ -33,7 +33,7 @@ boundaryField
uniformValue constant $pressure;
}
"terrain_.*"
terrain
{
type zeroGradient;
}

View File

@ -23,28 +23,12 @@ geometry
{
name sphere;
type triSurfaceMesh;
regions
{
ascii
{
name sphere_patch;
}
}
}
cone_orient.stl
{
name cone;
type triSurfaceMesh;
regions
{
ascii
{
name cone_patch;
}
}
}
// Outside of domain

View File

@ -20,28 +20,28 @@ internalField uniform 1;
boundaryField
{
box_inlet
inlet
{
type fixedValue;
value uniform 1;
}
box_outlet
outlet
{
type zeroGradient;
}
box_bottom
bottom
{
type zeroGradient;
}
box_top
top
{
type zeroGradient;
}
letters_text
letters
{
type zeroGradient;
}

View File

@ -20,18 +20,18 @@ internalField uniform (0 0 0);
boundaryField
{
box_inlet
inlet
{
type fixedValue;
value uniform (3 0 0);
}
box_outlet
outlet
{
type zeroGradient;
}
box_bottom
bottom
{
type supersonicFreestream;
UInf (3 0 0);
@ -40,7 +40,7 @@ boundaryField
gamma 1.4;
}
box_top
top
{
type supersonicFreestream;
UInf (3 0 0);
@ -49,7 +49,7 @@ boundaryField
gamma 1.4;
}
letters_text
letters
{
type fixedValue;
value uniform (0 0 0);

View File

@ -20,28 +20,28 @@ internalField uniform 1;
boundaryField
{
box_inlet
inlet
{
type fixedValue;
value uniform 1;
}
box_outlet
outlet
{
type zeroGradient;
}
box_bottom
bottom
{
type zeroGradient;
}
box_top
top
{
type zeroGradient;
}
letters_text
letters
{
type zeroGradient;
}

View File

@ -27,6 +27,34 @@ geometry
{
name box;
type closedTriSurfaceMesh;
regions
{
back
{
name back;
}
front
{
name front;
}
bottom
{
name bottom;
}
top
{
name top;
}
inlet
{
name inlet;
}
outlet
{
name outlet;
}
}
}
}

View File

@ -20,21 +20,21 @@ FoamFile
inlet
{
type patch;
nFaces 0;
nFaces 652;
startFace 1576984;
}
outlet
{
type patch;
nFaces 0;
startFace 1576984;
nFaces 112;
startFace 1577636;
}
outerCylinder
{
type wall;
inGroups 1(wall);
nFaces 1404;
startFace 1576984;
nFaces 640;
startFace 1577748;
}
propellerTip
{

View File

@ -32,7 +32,6 @@ divSchemes
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
UD Gauss upwind;
div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;

View File

@ -64,7 +64,7 @@ geometry
}
}
}
propellerTip.obj
propellerTip.obj.gz
{
type triSurfaceMesh;
name propellerTip;