Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
3754b27d
Commit
3754b27d
authored
May 26, 2011
by
andy
Browse files
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
parents
6976dc9b
685a578b
Changes
17
Hide whitespace changes
Inline
Side-by-side
ReleaseNotes-dev
View file @
3754b27d
...
...
@@ -241,9 +241,11 @@
- works in parallel
+ =snappyHexMesh=:
+ extrude across multi-processor boundaries
+ preserve faceZones during layering
+ combining
patch faces
after snapping
+ preserve faceZones
shape
during layering
+ combining
coincident patch faces is now default
after snapping
+ *Warning*:
- snapControls::tolerance setting fixed w.r.t. 17x. Is the
multiplication to calculate the local search distance for nearest.
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
90 to get same behaviour as 130 in 17x.
- nGrow did not work in 17x. Set to 0
...
...
@@ -308,6 +310,8 @@
+ multipleBoxes, hotBoxes, panel, evaporationTest
+ =interDyMFoam= tutorials:
+ testTubeMixer: showcases =solidBodyMotionFunction=
+ =snappyHexMesh= tutorials:
+ flange: demonstration of feature lines in snappyHexMesh
* Other
+ compilable with =clang=
...
...
applications/solvers/basic/potentialFoam/potentialFoam.C
View file @
3754b27d
...
...
@@ -49,6 +49,10 @@ int main(int argc, char *argv[])
Info
<<
nl
<<
"Calculating potential flow"
<<
endl
;
// Since solver contains no time loop it would never execute
// function objects so do it ourselves.
runTime
.
functionObjects
().
start
();
adjustPhi
(
phi
,
U
,
p
);
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
...
...
@@ -99,6 +103,9 @@ int main(int argc, char *argv[])
p
.
write
();
}
runTime
.
functionObjects
().
end
();
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s"
<<
" ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
" s"
<<
nl
<<
endl
;
...
...
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict
View file @
3754b27d
...
...
@@ -220,7 +220,7 @@ snapControls
//- Maximum relative distance for points to be attracted by surface.
// True distance is this factor times local maximum edge length.
// Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
tolerance
2
.0;
tolerance
1
.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
...
...
@@ -228,6 +228,10 @@ snapControls
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
//nFeatureSnapIter 10;
}
...
...
@@ -258,6 +262,9 @@ addLayersControls
//- Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// is the thickness of the layer furthest away from the wall.
// See relativeSizes parameter.
finalLayerThickness 0.3;
...
...
@@ -410,7 +417,7 @@ debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1
E
-6;
mergeTolerance 1
e
-6;
// ************************************************************************* //
src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C
View file @
3754b27d
...
...
@@ -613,80 +613,83 @@ void Foam::globalPoints::receivePatchPoints
label
meshPointA
=
meshPoints
[
i
];
label
meshPointB
=
coupledMeshPoints
[
i
];
//Pout<< "Connection between point " << meshPointA
// << " at " << mesh_.points()[meshPointA]
// << " and " << meshPointB
// << " at " << mesh_.points()[meshPointB] << endl;
if
(
meshPointA
!=
meshPointB
)
{
//Pout<< "Connection between point " << meshPointA
// << " at " << mesh_.points()[meshPointA]
// << " and " << meshPointB
// << " at " << mesh_.points()[meshPointB] << endl;
label
localA
=
meshToLocalPoint
(
meshToPatchPoint
,
meshPointA
);
label
localB
=
meshToLocalPoint
(
meshToPatchPoint
,
meshPointB
);
label
localA
=
meshToLocalPoint
(
meshToPatchPoint
,
meshPointA
);
label
localB
=
meshToLocalPoint
(
meshToPatchPoint
,
meshPointB
);
// Do we have information on pointA?
Map
<
label
>::
iterator
procPointA
=
meshToProcPoint_
.
find
(
localA
);
// Do we have information on pointA?
Map
<
label
>::
iterator
procPointA
=
meshToProcPoint_
.
find
(
localA
);
labelPairList
infoA
;
if
(
procPointA
!=
meshToProcPoint_
.
end
())
{
infoA
=
addSendTransform
(
cycPatch
.
index
(),
procPoints_
[
procPointA
()]
);
}
labelPairList
infoA
;
if
(
procPointA
!=
meshToProcPoint_
.
end
())
{
infoA
=
addSendTransform
(
cycPatch
.
index
(),
procPoints_
[
procPointA
()]
);
}
// Same for info on pointB
Map
<
label
>::
iterator
procPointB
=
meshToProcPoint_
.
find
(
localB
);
// Same for info on pointB
Map
<
label
>::
iterator
procPointB
=
meshToProcPoint_
.
find
(
localB
);
labelPairList
infoB
;
if
(
procPointB
!=
meshToProcPoint_
.
end
())
{
infoB
=
addSendTransform
(
cycPatch
.
neighbPatchID
(),
procPoints_
[
procPointB
()]
);
}
labelPairList
infoB
;
if
(
procPointB
!=
meshToProcPoint_
.
end
())
{
infoB
=
addSendTransform
(
cycPatch
.
neighbPatchID
(),
procPoints_
[
procPointB
()]
);
}
if
(
infoA
.
size
())
{
if
(
mergeInfo
(
infoA
,
localB
))
if
(
infoA
.
size
())
{
//Pout<< " Combined info at point "
// << mesh_.points()[meshPointB]
// << " now " << endl;
//printProcPoints
//(
// patchToMeshPoint,
// procPoints_[meshToProcPoint_[localB]]
//);
changedPoints
.
insert
(
localB
);
if
(
mergeInfo
(
infoA
,
localB
))
{
//Pout<< " Combined info at point "
// << mesh_.points()[meshPointB]
// << " now " << endl;
//printProcPoints
//(
// patchToMeshPoint,
// procPoints_[meshToProcPoint_[localB]]
//);
changedPoints
.
insert
(
localB
);
}
}
}
if
(
infoB
.
size
())
{
if
(
mergeInfo
(
infoB
,
localA
))
if
(
infoB
.
size
())
{
//Pout<< " Combined info at point "
// << mesh_.points()[meshPointA]
// << " now " << endl;
//printProcPoints
//(
// patchToMeshPoint,
// procPoints_[meshToProcPoint_[localA]]
//);
changedPoints
.
insert
(
localA
);
if
(
mergeInfo
(
infoB
,
localA
))
{
//Pout<< " Combined info at point "
// << mesh_.points()[meshPointA]
// << " now " << endl;
//printProcPoints
//(
// patchToMeshPoint,
// procPoints_[meshToProcPoint_[localA]]
//);
changedPoints
.
insert
(
localA
);
}
}
}
}
...
...
src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C
View file @
3754b27d
...
...
@@ -480,26 +480,28 @@ Foam::globalIndexAndTransform::globalIndexAndTransform
determinePatchTransformSign
();
if
(
debug
&&
transforms_
.
size
()
>
1
)
if
(
debug
&&
transforms_
.
size
()
>
0
)
{
const
polyBoundaryMesh
&
patches
=
mesh_
.
boundaryMesh
();
Info
<<
"Determined global transforms :"
<<
endl
;
Info
<<
"
\t\t
translation
\t
rotation"
<<
endl
;
forAll
(
transforms_
,
i
)
{
Info
<<
'\t'
<<
i
<<
'\t'
;
if
(
transforms_
[
i
].
hasR
())
const
vectorTensorTransform
&
trafo
=
transforms_
[
i
];
if
(
trafo
.
hasR
())
{
Info
<<
tra
nsforms_
[
i
]
.
t
()
<<
'\t'
<<
tra
nsforms_
[
i
]
.
R
();
Info
<<
tra
fo
.
t
()
<<
'\t'
<<
tra
fo
.
R
();
}
else
{
Info
<<
tra
nsforms_
[
i
]
.
t
()
<<
'\t'
<<
"---"
;
Info
<<
tra
fo
.
t
()
<<
'\t'
<<
"---"
;
}
Info
<<
endl
;
}
Info
<<
endl
;
const
polyBoundaryMesh
&
patches
=
mesh_
.
boundaryMesh
();
Info
<<
"
\t
patch
\t
transform
\t
sign"
<<
endl
;
forAll
(
patchTransformSign_
,
patchI
)
...
...
@@ -513,6 +515,26 @@ Foam::globalIndexAndTransform::globalIndexAndTransform
}
}
Info
<<
endl
;
Info
<<
"Permutations of transformations:"
<<
endl
<<
"
\t\t
translation
\t
rotation"
<<
endl
;
forAll
(
transformPermutations_
,
i
)
{
Info
<<
'\t'
<<
i
<<
'\t'
;
const
vectorTensorTransform
&
trafo
=
transformPermutations_
[
i
];
if
(
trafo
.
hasR
())
{
Info
<<
trafo
.
t
()
<<
'\t'
<<
trafo
.
R
();
}
else
{
Info
<<
trafo
.
t
()
<<
'\t'
<<
"---"
;
}
Info
<<
endl
;
}
Info
<<
"nullTransformIndex:"
<<
nullTransformIndex
()
<<
endl
<<
endl
;
}
}
...
...
src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C
View file @
3754b27d
...
...
@@ -399,7 +399,7 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
*
max
(
dimensionedScalar
(
"zero"
,
dimensionSet
(
0
,
0
,
-
2
,
0
,
0
),
0
.
0
),
zetaTilda2_
*
kappa_
*
S2
*
(
L
/
Lvk2
(
S2
))
zetaTilda2_
*
kappa_
*
S2
*
sqr
(
L
/
Lvk2
(
S2
))
-
2
.
0
/
alphaPhi_
*
k_
*
grad_omega_k
)
);
...
...
src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.H
View file @
3754b27d
...
...
@@ -27,22 +27,12 @@ Class
Description
kOmegaSSTSAS LES turbulence model for incompressible flows
References:
Evaluation of the SST-SAS model: Channel flow, asymmetric diffuser and axi-
symmetric hill
European Conference on Computational Fluid Dynamics
ECCOMAS CFD 2006
Lars Davison
A Scale-Adaptive Simulation Model using Two-Equation Models
AIAA 2005-1095
F. R. Menter and Y. Egorov
DESider A European Effort on Hybrid RANS-LES Modelling:
Results of the European-Union Funded Project, 2004 - 2007
(Notes on Numerical Fluid Mechanics and Multidisciplinary Design).
Chapter 8 Formulation of the Scale-Adaptive Simulation (SAS) Model during
the DESIDER Project.
the DESIDER Project.
Published in Springer-Verlag Berlin Heidelberg 2009.
F. R. Menter and Y. Egorov.
SourceFiles
...
...
tutorials/basic/potentialFoam/cylinder/0/U
deleted
100644 → 0
View file @
6976dc9b
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
down
{
type symmetryPlane;
}
right
{
type zeroGradient;
}
up
{
type symmetryPlane;
}
left
{
type fixedValue;
value uniform (1 0 0);
}
cylinder
{
type symmetryPlane;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //
tutorials/basic/potentialFoam/cylinder/0/p
deleted
100644 → 0
View file @
6976dc9b
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
down
{
type symmetryPlane;
}
right
{
type fixedValue;
value uniform 0;
}
up
{
type symmetryPlane;
}
left
{
type zeroGradient;
}
cylinder
{
type symmetryPlane;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //
tutorials/basic/potentialFoam/cylinder/Allclean
0 → 100755
View file @
3754b27d
#!/bin/sh
cd
${
0
%/*
}
||
exit
1
# run from this directory
# Source tutorial clean functions
.
$WM_PROJECT_DIR
/bin/tools/CleanFunctions
rm
-rf
0
>
/dev/null 2>&1
cleanCase
# ----------------------------------------------------------------- end-of-file
tutorials/basic/potentialFoam/cylinder/Allrun
View file @
3754b27d
...
...
@@ -6,10 +6,9 @@ cd ${0%/*} || exit 1 # run from this directory
application
=
`
getApplication
`
cp
-r
0.org 0
>
/dev/null 2>&1
runApplication blockMesh
runApplication
$application
compileApplication analyticalCylinder
runApplication analyticalCylinder
runApplication streamFunction
# ----------------------------------------------------------------- end-of-file
tutorials/basic/potentialFoam/cylinder/analyticalCylinder/Make/files
deleted
100644 → 0
View file @
6976dc9b
analyticalCylinder.C
EXE = $(FOAM_USER_APPBIN)/analyticalCylinder
tutorials/basic/potentialFoam/cylinder/analyticalCylinder/Make/options
deleted
100644 → 0
View file @
6976dc9b
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lfiniteVolume
tutorials/basic/potentialFoam/cylinder/analyticalCylinder/analyticalCylinder.C
deleted
100644 → 0
View file @
6976dc9b
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ 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/>.
Application
analyticalCylinder
Description
Generates an analytical solution for potential flow around a cylinder.
Can be compared with the solution from the potentialFlow/cylinder example.
\*---------------------------------------------------------------------------*/
#include
"fvCFD.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Evaluating analytical solution"
<<
endl
;
volVectorField
centres
=
UA
.
mesh
().
C
();
volScalarField
magCentres
=
mag
(
centres
);
volScalarField
theta
=
acos
((
centres
&
vector
(
1
,
0
,
0
))
/
magCentres
);
volVectorField
cs2theta
=
cos
(
2
*
theta
)
*
vector
(
1
,
0
,
0
)
+
sin
(
2
*
theta
)
*
vector
(
0
,
1
,
0
);
UA
=
uInfX
*
(
dimensionedVector
(
vector
(
1
,
0
,
0
))
-
pow
((
radius
/
magCentres
),
2
)
*
cs2theta
);
// Force writing of UA (since time has not changed)
UA
.
write
();
Info
<<
"end"
<<
endl
;
return
0
;
}
// ************************************************************************* //
tutorials/basic/potentialFoam/cylinder/analyticalCylinder/createFields.H
deleted
100644 → 0
View file @
6976dc9b
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
),
mesh
);
Info
<<
"Reading inlet velocity uInfX
\n
"
<<
endl
;
dimensionedScalar
uInfX
(
"uInfx"
,
dimensionSet
(
0
,
1
,
-
1
,
0
,
0
),
U
.
boundaryField
()[
3
][
0
].
x
()
);
Info
<<
"U at inlet = "
<<
uInfX
.
value
()
<<
" m/s"
<<
endl
;
dimensionedScalar
radius
(
"radius"
,
dimensionSet
(
0
,
1
,
0
,
0
,
0
),
mag
(
U
.
mesh
().
boundary
()[
4
].
Cf
()[
0
])
);
Info
<<
"Cylinder radius = "
<<
radius
.
value
()
<<
" m"
<<
endl
;
volVectorField
UA
(
IOobject
(
"UA"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
U
);
tutorials/basic/potentialFoam/cylinder/system/controlDict
View file @
3754b27d
...
...
@@ -45,5 +45,74 @@ timePrecision 6;
runTimeModifiable true;
functions
{
difference
{
functionObjectLibs ("libutilityFunctionObjects.so");
type coded;
redirectType error;
code