mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into particleInteractions
This commit is contained in:
@ -0,0 +1,126 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "interpolateSplineXY.H"
|
||||
#include "primitiveFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::Field<Type> Foam::interpolateSplineXY
|
||||
(
|
||||
const scalarField& xNew,
|
||||
const scalarField& xOld,
|
||||
const Field<Type>& yOld
|
||||
)
|
||||
{
|
||||
Field<Type> yNew(xNew.size());
|
||||
|
||||
forAll(xNew, i)
|
||||
{
|
||||
yNew[i] = interpolateSmoothXY(xNew[i], xOld, yOld);
|
||||
}
|
||||
|
||||
return yNew;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Type Foam::interpolateSplineXY
|
||||
(
|
||||
const scalar x,
|
||||
const scalarField& xOld,
|
||||
const Field<Type>& yOld
|
||||
)
|
||||
{
|
||||
label n = xOld.size();
|
||||
|
||||
// early exit if out of bounds or only one value
|
||||
if (n == 1 || x < xOld[0])
|
||||
{
|
||||
return yOld[0];
|
||||
}
|
||||
if (x > xOld[n - 1])
|
||||
{
|
||||
return yOld[n - 1];
|
||||
}
|
||||
|
||||
// linear interpolation if only two values
|
||||
if (n == 2)
|
||||
{
|
||||
return (x - xOld[0])/(xOld[1] - xOld[0])*(yOld[1] - yOld[0]) + yOld[0];
|
||||
}
|
||||
|
||||
// find bounding knots
|
||||
label hi = 0;
|
||||
while (hi < n && xOld[hi] < x)
|
||||
{
|
||||
hi++;
|
||||
}
|
||||
|
||||
label lo = hi - 1;
|
||||
|
||||
const Type& y1 = yOld[lo];
|
||||
const Type& y2 = yOld[hi];
|
||||
|
||||
Type y0;
|
||||
if (lo == 0)
|
||||
{
|
||||
y0 = 2*y1 - y2;
|
||||
}
|
||||
else
|
||||
{
|
||||
y0 = yOld[lo - 1];
|
||||
}
|
||||
|
||||
Type y3;
|
||||
if (hi + 1 == n)
|
||||
{
|
||||
y3 = 2*y2 - y1;
|
||||
}
|
||||
else
|
||||
{
|
||||
y3 = yOld[hi + 1];
|
||||
}
|
||||
|
||||
// weighting
|
||||
scalar mu = (x - xOld[lo])/(xOld[hi] - xOld[lo]);
|
||||
|
||||
// interpolate
|
||||
return
|
||||
0.5
|
||||
*(
|
||||
2*y1
|
||||
+ mu
|
||||
*(
|
||||
-y0 + y2
|
||||
+ mu*((2*y0 - 5*y1 + 4*y2 - y3) + mu*(-y0 + 3*y1 - 3*y2 + y3))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,84 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
InNamespace
|
||||
Foam
|
||||
|
||||
Description
|
||||
Interpolates y values from one curve to another with a different x
|
||||
distribution.
|
||||
|
||||
Uses Catmull-Rom spline interpolation between points.
|
||||
|
||||
SourceFiles
|
||||
interpolateSplineXY.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef interpolateSplineXY_H
|
||||
#define interpolateSplineXY_H
|
||||
|
||||
#include "scalar.H"
|
||||
#include "primitiveFieldsFwd.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Field<Type> interpolateSplineXY
|
||||
(
|
||||
const scalarField& xNew,
|
||||
const scalarField& xOld,
|
||||
const Field<Type>& yOld
|
||||
);
|
||||
|
||||
|
||||
template<class Type>
|
||||
Type interpolateSplineXY
|
||||
(
|
||||
const scalar x,
|
||||
const scalarField& xOld,
|
||||
const Field<Type>& yOld
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "interpolateSplineXY.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "Tuple2.H"
|
||||
#include "IFstream.H"
|
||||
#include "interpolateXY.H"
|
||||
#include "interpolateSplineXY.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
using namespace Foam::constant::mathematical;
|
||||
@ -98,7 +98,7 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
translationRotationVectors TRV = interpolateXY
|
||||
translationRotationVectors TRV = interpolateSplineXY
|
||||
(
|
||||
t,
|
||||
times_,
|
||||
|
||||
@ -33,7 +33,7 @@ template<class Type>
|
||||
const Foam::wordList Foam::TimeActivatedExplicitSource<Type>::
|
||||
selectionModeTypeNames_
|
||||
(
|
||||
IStringStream("(points cellSet)")()
|
||||
IStringStream("(points cellSet cellZone all)")()
|
||||
);
|
||||
|
||||
|
||||
@ -156,6 +156,15 @@ void Foam::TimeActivatedExplicitSource<Type>::setSelection
|
||||
dict.lookup("cellSet") >> cellSetName_;
|
||||
break;
|
||||
}
|
||||
case smCellZone:
|
||||
{
|
||||
dict.lookup("cellZone") >> cellSetName_;
|
||||
break;
|
||||
}
|
||||
case smAll:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
@ -221,13 +230,14 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
|
||||
{
|
||||
Info<< indent << "- selecting cells using points" << endl;
|
||||
|
||||
labelHashSet cellOwners;
|
||||
labelHashSet selectedCells;
|
||||
|
||||
forAll(points_, i)
|
||||
{
|
||||
label cellI = mesh_.findCell(points_[i]);
|
||||
if (cellI >= 0)
|
||||
{
|
||||
cellOwners.insert(cellI);
|
||||
selectedCells.insert(cellI);
|
||||
}
|
||||
|
||||
label globalCellI = returnReduce(cellI, maxOp<label>());
|
||||
@ -239,7 +249,7 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
|
||||
}
|
||||
}
|
||||
|
||||
cellsPtr_.reset(new cellSet(mesh_, "points", cellOwners));
|
||||
cells_ = selectedCells.toc();
|
||||
|
||||
break;
|
||||
}
|
||||
@ -247,7 +257,32 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
|
||||
{
|
||||
Info<< indent << "- selecting cells using cellSet "
|
||||
<< cellSetName_ << endl;
|
||||
cellsPtr_.reset(new cellSet(mesh_, cellSetName_));
|
||||
|
||||
cellSet selectedCells(mesh_, cellSetName_);
|
||||
cells_ = selectedCells.toc();
|
||||
|
||||
break;
|
||||
}
|
||||
case smCellZone:
|
||||
{
|
||||
Info<< indent << "- selecting cells using cellZone "
|
||||
<< cellSetName_ << endl;
|
||||
label zoneID = mesh_.cellZones().findZoneID(cellSetName_);
|
||||
if (zoneID == -1)
|
||||
{
|
||||
FatalErrorIn("TimeActivatedExplicitSource<Type>::setCellIds()")
|
||||
<< "Cannot find cellZone " << cellSetName_ << endl
|
||||
<< "Valid cellZones are " << mesh_.cellZones().names()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
cells_ = mesh_.cellZones()[zoneID];
|
||||
|
||||
break;
|
||||
}
|
||||
case smAll:
|
||||
{
|
||||
Info<< indent << "- selecting all cells" << endl;
|
||||
cells_ = identity(mesh_.nCells());
|
||||
|
||||
break;
|
||||
}
|
||||
@ -261,21 +296,20 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
|
||||
}
|
||||
}
|
||||
|
||||
const cellSet& cSet = cellsPtr_();
|
||||
|
||||
// Set volume normalisation
|
||||
V_ = scalarField(cSet.size(), 1.0);
|
||||
if (volumeMode_ == vmAbsolute)
|
||||
{
|
||||
label i = 0;
|
||||
forAllConstIter(cellSet, cSet, iter)
|
||||
V_ = 0.0;
|
||||
forAll(cells_, i)
|
||||
{
|
||||
V_[i++] = mesh_.V()[iter.key()];
|
||||
V_ += mesh_.V()[cells_[i]];
|
||||
}
|
||||
reduce(V_, sumOp<scalar>());
|
||||
}
|
||||
|
||||
Info<< indent << "- selected " << returnReduce(cSet.size(), sumOp<label>())
|
||||
<< " cell(s)" << nl << decrIndent << endl;
|
||||
Info<< indent << "- selected "
|
||||
<< returnReduce(cells_.size(), sumOp<label>())
|
||||
<< " cell(s) with volume " << V_ << nl << decrIndent << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -299,8 +333,7 @@ Foam::TimeActivatedExplicitSource<Type>::TimeActivatedExplicitSource
|
||||
selectionMode_(wordToSelectionModeType(dict.lookup("selectionMode"))),
|
||||
points_(),
|
||||
cellSetName_("none"),
|
||||
V_(),
|
||||
cellsPtr_(),
|
||||
V_(1.0),
|
||||
fieldData_(),
|
||||
fieldIds_(fieldNames.size(), -1)
|
||||
{
|
||||
@ -345,12 +378,9 @@ void Foam::TimeActivatedExplicitSource<Type>::addToField
|
||||
setCellSet();
|
||||
}
|
||||
|
||||
const cellSet& cSet = cellsPtr_();
|
||||
|
||||
label i = 0;
|
||||
forAllConstIter(cellSet, cSet, iter)
|
||||
forAll(cells_, i)
|
||||
{
|
||||
Su[iter.key()] = fieldData_[fid].second()/V_[i++];
|
||||
Su[cells_[i]] = fieldData_[fid].second()/V_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
active true; // on/off switch
|
||||
timeStart 0.2; // start time
|
||||
duration 2.0; // duration
|
||||
selectionMode points; // cellSet
|
||||
selectionMode points; // cellSet/cellZone/all
|
||||
volumeMode absolute; // specific
|
||||
|
||||
fieldData // field data - usage for multiple fields
|
||||
@ -48,7 +48,8 @@ Description
|
||||
(2.75 0.5 0)
|
||||
);
|
||||
|
||||
cellSet c0; // cellSet name when selectionMode = cekllSet
|
||||
cellSet c0; // cellSet name when selectionMode=cellSet
|
||||
cellZone c0; // cellZone name when selectionMode=cellZone
|
||||
}
|
||||
|
||||
SourceFiles
|
||||
@ -100,7 +101,9 @@ public:
|
||||
enum selectionModeType
|
||||
{
|
||||
smPoints,
|
||||
smCellSet
|
||||
smCellSet,
|
||||
smCellZone,
|
||||
smAll
|
||||
};
|
||||
|
||||
//- Word list of selection mode type names
|
||||
@ -147,14 +150,14 @@ protected:
|
||||
//- List of points for "points" selectionMode
|
||||
List<point> points_;
|
||||
|
||||
//- Name of cell set for "cellSet" selectionMode
|
||||
//- Name of cell set for "cellSet" and "cellZone" selectionMode
|
||||
word cellSetName_;
|
||||
|
||||
//- Field of cell volumes according to cell set cells
|
||||
scalarList V_;
|
||||
//- Set of cells to apply source to
|
||||
labelList cells_;
|
||||
|
||||
//- Cell set
|
||||
autoPtr<cellSet> cellsPtr_;
|
||||
//- Sum of cell volumes
|
||||
scalar V_;
|
||||
|
||||
//- List of source field name vs value pairs
|
||||
List<fieldNameValuePair> fieldData_;
|
||||
@ -288,12 +291,11 @@ public:
|
||||
// selectionMode
|
||||
inline const word& cellSetName() const;
|
||||
|
||||
//- Return const access to the field of cell volumes according to
|
||||
// cell set cells
|
||||
inline const scalarList& V() const;
|
||||
//- Return const access to the total cell volume
|
||||
inline scalar V() const;
|
||||
|
||||
//- Return const access to the cell set
|
||||
inline const cellSet& cells() const;
|
||||
inline const labelList& cells() const;
|
||||
|
||||
//- Return const access to the source field name vs value pairs
|
||||
inline const List<fieldNameValuePair>& fieldData() const;
|
||||
@ -330,12 +332,11 @@ public:
|
||||
// selectionMode
|
||||
inline word& cellSetName();
|
||||
|
||||
//- Return access to the field of cell volumes according to
|
||||
// cell set cells
|
||||
inline scalarList& V();
|
||||
//- Return access to the total cell volume
|
||||
inline scalar& V();
|
||||
|
||||
//- Return access to the cell set
|
||||
inline cellSet& cells();
|
||||
inline labelList& cells();
|
||||
|
||||
//- Return access to the source field name vs value pairs
|
||||
inline List<fieldNameValuePair>& fieldData();
|
||||
|
||||
@ -103,18 +103,17 @@ Foam::TimeActivatedExplicitSource<Type>::cellSetName() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline const Foam::scalarList&
|
||||
Foam::TimeActivatedExplicitSource<Type>::V() const
|
||||
inline Foam::scalar Foam::TimeActivatedExplicitSource<Type>::V() const
|
||||
{
|
||||
return V_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline const Foam::cellSet&
|
||||
inline const Foam::labelList&
|
||||
Foam::TimeActivatedExplicitSource<Type>::cells() const
|
||||
{
|
||||
return cellsPtr_();
|
||||
return cells_;
|
||||
}
|
||||
|
||||
|
||||
@ -195,16 +194,16 @@ inline Foam::word& Foam::TimeActivatedExplicitSource<Type>::cellSetName()
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::scalarList& Foam::TimeActivatedExplicitSource<Type>::V()
|
||||
inline Foam::scalar& Foam::TimeActivatedExplicitSource<Type>::V()
|
||||
{
|
||||
return V_;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::cellSet& Foam::TimeActivatedExplicitSource<Type>::cells()
|
||||
inline Foam::labelList& Foam::TimeActivatedExplicitSource<Type>::cells()
|
||||
{
|
||||
return cellsPtr_();
|
||||
return cells_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -123,7 +123,8 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
||||
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
|
||||
|
||||
// Change in C mass [kg]
|
||||
scalar dmC = 4.0*constant::mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt;
|
||||
scalar dmC =
|
||||
4.0*constant::mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt;
|
||||
|
||||
// Limit mass transfer by availability of C
|
||||
dmC = min(mass*fComb, dmC);
|
||||
|
||||
@ -140,7 +140,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
||||
const scalar Ap = constant::mathematical::pi*sqr(d);
|
||||
|
||||
// Change in C mass [kg]
|
||||
scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk);
|
||||
scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk)*dt;
|
||||
|
||||
// Limit mass transfer by availability of C
|
||||
dmC = min(mass*fComb, dmC);
|
||||
|
||||
16
tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allclean
Executable file
16
tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allclean
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd wingFlutter_snappyHexMesh
|
||||
cleanCase
|
||||
|
||||
cd ../wingFlutter2D_simpleFoam
|
||||
cleanCase
|
||||
|
||||
cd ../wingFlutter2D_pimpleDyMFoam
|
||||
cleanCase
|
||||
rm -rf 0
|
||||
|
||||
29
tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allrun
Executable file
29
tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allrun
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Make 3D mesh in slab of cells.
|
||||
cd wingFlutter_snappyHexMesh
|
||||
runApplication blockMesh
|
||||
runApplication snappyHexMesh -overwrite
|
||||
|
||||
# Make a 2D mesh by extruding a patch and solve to steady state.
|
||||
cd ../wingFlutter2D_simpleFoam
|
||||
runApplication extrudeMesh
|
||||
runApplication createPatch -overwrite
|
||||
runApplication simpleFoam
|
||||
|
||||
# Copy the mesh from the steady state case and map the results to a
|
||||
# mesh motion case, then solve transient.
|
||||
cd ../wingFlutter2D_pimpleDyMFoam
|
||||
cp -r ../wingFlutter2D_simpleFoam/constant/polyMesh/* constant/polyMesh/
|
||||
cp -r 0.org 0
|
||||
runApplication mapFields ../wingFlutter2D_simpleFoam -sourceTime latestTime -consistent
|
||||
mv 0/pointDisplacement.unmapped 0/pointDisplacement
|
||||
runApplication decomposePar
|
||||
runParallel pimpleDyMFoam 3
|
||||
runApplication reconstructPar
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $flowVelocity;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,15 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,15 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
flowVelocity (100 0 0);
|
||||
pressure 0;
|
||||
turbulentKE 37;
|
||||
turbulentOmega 32;
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $turbulentKE;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wing
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(front|back|topAndBottom|inlet|outlet)"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $turbulentOmega;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $pressure;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,120 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
location "0.01";
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wing
|
||||
{
|
||||
type sixDoFRigidBodyDisplacement;
|
||||
mass 22.9;
|
||||
centreOfMass (0.4974612746 -0.01671895744 0.125);
|
||||
momentOfInertia (1.958864357 3.920839234 2.057121362);
|
||||
orientation
|
||||
(
|
||||
0.9953705935 0.09611129781 0
|
||||
-0.09611129781 0.9953705935 0
|
||||
0 0 1
|
||||
);
|
||||
velocity (0 0 0);
|
||||
acceleration (0 0 0);
|
||||
angularMomentum (0 0 -0.5);
|
||||
torque (0 0 0);
|
||||
rhoName rhoInf;
|
||||
rhoInf 1;
|
||||
g (0 -9.81 0);
|
||||
report on;
|
||||
constraints
|
||||
{
|
||||
maxIterations 500;
|
||||
|
||||
fixedLine1
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint fixedLine;
|
||||
tolerance 1e-9;
|
||||
relaxationFactor 0.7;
|
||||
fixedLineCoeffs
|
||||
{
|
||||
refPoint (0.25 0.007 0.125);
|
||||
direction (0 1 0);
|
||||
}
|
||||
}
|
||||
|
||||
fixedAxis1
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint fixedAxis;
|
||||
tolerance 1e-06;
|
||||
relaxationFactor 0.7;
|
||||
fixedAxisCoeffs
|
||||
{
|
||||
axis ( 0 0 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
restraints
|
||||
{
|
||||
verticalSpring
|
||||
{
|
||||
sixDoFRigidBodyMotionRestraint linearSpring;
|
||||
|
||||
linearSpringCoeffs
|
||||
{
|
||||
anchor (0.25 0.007 0.125);
|
||||
refAttachmentPt (0.25 0.007 0.125);
|
||||
stiffness 4000;
|
||||
damping 2;
|
||||
restLength 0;
|
||||
}
|
||||
}
|
||||
axialSpring
|
||||
{
|
||||
sixDoFRigidBodyMotionRestraint linearAxialAngularSpring;
|
||||
|
||||
linearAxialAngularSpringCoeffs
|
||||
{
|
||||
axis (0 0 1);
|
||||
stiffness 700;
|
||||
damping 0.5;
|
||||
referenceOrientation $orientation;
|
||||
}
|
||||
}
|
||||
}
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,26 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object motionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLaplacian;
|
||||
|
||||
diffusivity inverseDistance (wing);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
topAndBottom
|
||||
{
|
||||
type patch;
|
||||
nFaces 150;
|
||||
startFace 76473;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 76623;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 76671;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 38129;
|
||||
startFace 76719;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 38129;
|
||||
startFace 114848;
|
||||
}
|
||||
wing
|
||||
{
|
||||
type wall;
|
||||
nFaces 778;
|
||||
startFace 152977;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-05;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RASModel;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application pimpleDyMFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1;
|
||||
|
||||
deltaT 1e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 5e-3;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.9;
|
||||
|
||||
libs ("libforces.so");
|
||||
|
||||
functions
|
||||
{
|
||||
forces
|
||||
{
|
||||
type forces;
|
||||
functionObjectLibs ( "libforces.so" );
|
||||
outputControl timeStep;
|
||||
outputInterval 10;
|
||||
patches (wing);
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf;
|
||||
log true;
|
||||
rhoInf 1;
|
||||
CofR (0.25 0.007 0.125);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 3;
|
||||
|
||||
method simple;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n ( 1 3 1 );
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n ( 3 2 1 );
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "cellDecomposition";
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,omega) Gauss limitedLinear 1;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear limited 0.5;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,88 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
cacheAgglomeration on;
|
||||
agglomerator faceAreaPair;
|
||||
nCellsInCoarsestLevel 10;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
cacheAgglomeration on;
|
||||
agglomerator faceAreaPair;
|
||||
nCellsInCoarsestLevel 10;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"(U|k|omega)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
cellDisplacement
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
p 0.3;
|
||||
U 0.7;
|
||||
k 0.7;
|
||||
omega 0.7;
|
||||
}
|
||||
|
||||
cache
|
||||
{
|
||||
grad(U);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $flowVelocity;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,15 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
front
|
||||
{
|
||||
type empty
|
||||
}
|
||||
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,15 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
flowVelocity (100 0 0);
|
||||
pressure 0;
|
||||
turbulentKE 37;
|
||||
turbulentOmega 32;
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $turbulentKE;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,38 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wing
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
"(front|back|topAndBottom|inlet|outlet)"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform $turbulentOmega;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#include "include/fixedInlet"
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "include/initialConditions"
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform $pressure;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
wing
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#include "include/frontBackTopBottomPatches"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object extrudeProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// What to extrude:
|
||||
// patch : from patch of another case ('sourceCase')
|
||||
|
||||
constructFrom patch;
|
||||
sourceCase "../wingFlutter_snappyHexMesh";
|
||||
sourcePatches (front);
|
||||
|
||||
// If construct from patch: patch to use for back (can be same as sourcePatch)
|
||||
exposedPatchName back;
|
||||
|
||||
// Flip surface normals before usage.
|
||||
flipNormals false;
|
||||
|
||||
//- Linear extrusion in point-normal direction
|
||||
extrudeModel linearNormal;
|
||||
|
||||
nLayers 1;
|
||||
|
||||
expansionRatio 1.0;
|
||||
|
||||
linearNormalCoeffs
|
||||
{
|
||||
thickness 0.05;
|
||||
}
|
||||
|
||||
// Do front and back need to be merged? Usually only makes sense for 360
|
||||
// degree wedges.
|
||||
mergeFaces false;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
topAndBottom
|
||||
{
|
||||
type patch;
|
||||
nFaces 150;
|
||||
startFace 76473;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 76623;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 76671;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 38129;
|
||||
startFace 76719;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 38129;
|
||||
startFace 114848;
|
||||
}
|
||||
wing
|
||||
{
|
||||
type wall;
|
||||
nFaces 778;
|
||||
startFace 152977;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu nu [0 2 -1 0 0 0 0] 1e-05;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,67 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application simpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 3000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
forces
|
||||
{
|
||||
type forces;
|
||||
functionObjectLibs ( "libforces.so" );
|
||||
outputControl timeStep;
|
||||
outputInterval 10;
|
||||
patches (wing);
|
||||
pName p;
|
||||
UName U;
|
||||
rhoName rhoInf;
|
||||
log true;
|
||||
rhoInf 1;
|
||||
CofR (0.4974612746 -0.01671895744 0.125);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createPatchDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Tolerance used in matching faces. Absolute tolerance is span of
|
||||
// face times this factor. To load incorrectly matches meshes set this
|
||||
// to a higher value.
|
||||
matchTolerance 1E-3;
|
||||
|
||||
// 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.
|
||||
pointSync true;
|
||||
|
||||
// Patches to create.
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name wing;
|
||||
|
||||
// Type of new patch
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom patches;
|
||||
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches ( wing_5degrees.obj_WALL10 );
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,59 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,omega) Gauss upwind;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,79 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
smoother GaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
cacheAgglomeration on;
|
||||
agglomerator faceAreaPair;
|
||||
nCellsInCoarsestLevel 10;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
nSweeps 1;
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
nSweeps 1;
|
||||
}
|
||||
|
||||
omega
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
nSweeps 1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
p 0.3;
|
||||
U 0.7;
|
||||
k 0.7;
|
||||
omega 0.7;
|
||||
}
|
||||
|
||||
cache
|
||||
{
|
||||
grad(U);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-2.5 -4.8 -0.1)
|
||||
( 10 -4.8 -0.1)
|
||||
( 10 4.8 -0.1)
|
||||
(-2.5 4.8 -0.1)
|
||||
(-2.5 -4.8 0.1)
|
||||
( 10 -4.8 0.1)
|
||||
( 10 4.8 0.1)
|
||||
(-2.5 4.8 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (75 48 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch topAndBottom
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
|
||||
patch outlet
|
||||
(
|
||||
(2 6 5 1)
|
||||
)
|
||||
|
||||
empty front
|
||||
(
|
||||
(4 5 6 7)
|
||||
)
|
||||
|
||||
empty back
|
||||
(
|
||||
(0 3 2 1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
topAndBottom
|
||||
{
|
||||
type patch;
|
||||
nFaces 150;
|
||||
startFace 2098769;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 2098919;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 48;
|
||||
startFace 2098967;
|
||||
}
|
||||
front
|
||||
{
|
||||
type empty;
|
||||
nFaces 38129;
|
||||
startFace 2099015;
|
||||
}
|
||||
back
|
||||
{
|
||||
type empty;
|
||||
nFaces 38120;
|
||||
startFace 2137144;
|
||||
}
|
||||
wing_5degrees.obj_WALL10
|
||||
{
|
||||
type wall;
|
||||
nFaces 49792;
|
||||
startFace 2175264;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application snappyHexMesh;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 3;
|
||||
|
||||
method simple;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n ( 1 3 1 );
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n ( 3 2 1 );
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "cellDecomposition";
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,70 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear limited 0.5;
|
||||
laplacian(DkEff,k) Gauss linear limited 0.5;
|
||||
laplacian(DREff,R) Gauss linear limited 0.5;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5;
|
||||
laplacian(alphaEff,e) Gauss linear limited 0.5;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-12;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
rho
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|e|k|epsilon|R)"
|
||||
{
|
||||
$p;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,326 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object snappyHexMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Which of the steps to run
|
||||
castellatedMesh true;
|
||||
snap true;
|
||||
addLayers true;
|
||||
|
||||
|
||||
// Geometry. Definition of all surfaces. All surfaces are of class
|
||||
// searchableSurface.
|
||||
// Surfaces are used
|
||||
// - to specify refinement for any mesh cell intersecting it
|
||||
// - to specify refinement for any mesh cell inside/outside/near
|
||||
// - to 'snap' the mesh boundary to the surface
|
||||
geometry
|
||||
{
|
||||
wing_5degrees.obj
|
||||
{
|
||||
type triSurfaceMesh;
|
||||
}
|
||||
|
||||
refinementBox
|
||||
{
|
||||
type searchableBox;
|
||||
min (-1 -1 -1);
|
||||
max ( 5 1 1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Settings for the castellatedMesh generation.
|
||||
castellatedMeshControls
|
||||
{
|
||||
|
||||
// Refinement parameters
|
||||
// ~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// If local number of cells is >= maxLocalCells on any processor
|
||||
// switches from from refinement followed by balancing
|
||||
// (current method) to (weighted) balancing before refinement.
|
||||
maxLocalCells 1000000;
|
||||
|
||||
// Overall cell limit (approximately). Refinement will stop immediately
|
||||
// upon reaching this number so a refinement level might not complete.
|
||||
// Note that this is the number of cells before removing the part which
|
||||
// is not 'visible' from the keepPoint. The final number of cells might
|
||||
// actually be a lot less.
|
||||
maxGlobalCells 2000000;
|
||||
|
||||
// The surface refinement loop might spend lots of iterations refining just a
|
||||
// few cells. This setting will cause refinement to stop if <= minimumRefine
|
||||
// are selected for refinement. Note: it will at least do one iteration
|
||||
// (unless the number of cells to refine is 0)
|
||||
minRefinementCells 100;
|
||||
|
||||
// Number of buffer layers between different levels.
|
||||
// 1 means normal 2:1 refinement restriction, larger means slower
|
||||
// refinement.
|
||||
nCellsBetweenLevels 6;
|
||||
|
||||
|
||||
|
||||
// Explicit feature edge refinement
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Specifies a level for any cell intersected by its edges.
|
||||
// This is a featureEdgeMesh, read from constant/triSurface for now.
|
||||
features ();
|
||||
|
||||
|
||||
|
||||
// Surface based refinement
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Specifies two levels for every surface. The first is the minimum level,
|
||||
// every cell intersecting a surface gets refined up to the minimum level.
|
||||
// The second level is the maximum level. Cells that 'see' multiple
|
||||
// intersections where the intersections make an
|
||||
// angle > resolveFeatureAngle get refined up to the maximum level.
|
||||
|
||||
refinementSurfaces
|
||||
{
|
||||
wing_5degrees.obj
|
||||
{
|
||||
// Surface-wise min and max refinement level
|
||||
level (6 6);
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve sharp angles on fridges
|
||||
resolveFeatureAngle 30;
|
||||
|
||||
|
||||
// Region-wise refinement
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Specifies refinement level for cells in relation to a surface. One of
|
||||
// three modes
|
||||
// - distance. 'levels' specifies per distance to the surface the
|
||||
// wanted refinement level. The distances need to be specified in
|
||||
// descending order.
|
||||
// - inside. 'levels' is only one entry and only the level is used. All
|
||||
// cells inside the surface get refined up to the level. The surface
|
||||
// needs to be closed for this to be possible.
|
||||
// - outside. Same but cells outside.
|
||||
|
||||
refinementRegions
|
||||
{
|
||||
refinementBox
|
||||
{
|
||||
mode inside;
|
||||
levels ((1e15 3));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Mesh selection
|
||||
// ~~~~~~~~~~~~~~
|
||||
|
||||
// After refinement patches get added for all refinementSurfaces and
|
||||
// all cells intersecting the surfaces get put into these patches. The
|
||||
// section reachable from the locationInMesh is kept.
|
||||
// NOTE: This point should never be on a face, always inside a cell, even
|
||||
// after refinement.
|
||||
locationInMesh (-0.5 0 0);
|
||||
|
||||
|
||||
// Whether any faceZones (as specified in the refinementSurfaces)
|
||||
// are only on the boundary of corresponding cellZones or also allow
|
||||
// free-standing zone faces. Not used if there are no faceZones.
|
||||
allowFreeStandingZoneFaces true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Settings for the snapping.
|
||||
snapControls
|
||||
{
|
||||
//- Number of patch smoothing iterations before finding correspondence
|
||||
// to surface
|
||||
nSmoothPatch 3;
|
||||
|
||||
//- Relative distance for points to be attracted by surface feature point
|
||||
// or edge. True distance is this factor times local
|
||||
// maximum edge length.
|
||||
tolerance 4.0;
|
||||
|
||||
//- Number of mesh displacement relaxation iterations.
|
||||
nSolveIter 30;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Settings for the layer addition.
|
||||
addLayersControls
|
||||
{
|
||||
// Are the thickness parameters below relative to the undistorted
|
||||
// size of the refined cell outside layer (true) or absolute sizes (false).
|
||||
relativeSizes true;
|
||||
|
||||
// Per final patch (so not geometry!) the layer information
|
||||
layers
|
||||
{
|
||||
"wing.*"
|
||||
{
|
||||
nSurfaceLayers 3;
|
||||
}
|
||||
}
|
||||
|
||||
// Expansion factor for layer mesh
|
||||
expansionRatio 1.3;
|
||||
|
||||
//- 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.7;
|
||||
|
||||
//- Minimum thickness of cell layer. If for any reason layer
|
||||
// cannot be above minThickness do not add layer.
|
||||
// Relative to undistorted size of cell outside layer.
|
||||
// See relativeSizes parameter.
|
||||
minThickness 0.25;
|
||||
|
||||
//- If points get not extruded do nGrow layers of connected faces that are
|
||||
// also not grown. This helps convergence of the layer addition process
|
||||
// close to features.
|
||||
nGrow 0;
|
||||
|
||||
|
||||
// Advanced settings
|
||||
|
||||
//- When not to extrude surface. 0 is flat surface, 90 is when two faces
|
||||
// make straight angle.
|
||||
featureAngle 60;
|
||||
|
||||
//- Maximum number of snapping relaxation iterations. Should stop
|
||||
// before upon reaching a correct mesh.
|
||||
nRelaxIter 5;
|
||||
|
||||
// Number of smoothing iterations of surface normals
|
||||
nSmoothSurfaceNormals 1;
|
||||
|
||||
// Number of smoothing iterations of interior mesh movement direction
|
||||
nSmoothNormals 3;
|
||||
|
||||
// Smooth layer thickness over surface patches
|
||||
nSmoothThickness 10;
|
||||
|
||||
// Stop layer growth on highly warped cells
|
||||
maxFaceThicknessRatio 0.5;
|
||||
|
||||
// Reduce layer growth where ratio thickness to medial
|
||||
// distance is large
|
||||
maxThicknessToMedialRatio 0.3;
|
||||
|
||||
// Angle used to pick up medial axis points
|
||||
// Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
|
||||
minMedianAxisAngle 90;
|
||||
|
||||
// Create buffer region for new layer terminations
|
||||
nBufferCellsNoExtrude 0;
|
||||
|
||||
|
||||
// Overall max number of layer addition iterations. The mesher will exit
|
||||
// if it reaches this number of iterations; possibly with an illegal
|
||||
// mesh.
|
||||
nLayerIter 50;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Generic mesh quality settings. At any undoable phase these determine
|
||||
// where to undo.
|
||||
meshQualityControls
|
||||
{
|
||||
//- Maximum non-orthogonality allowed. Set to 180 to disable.
|
||||
maxNonOrtho 65;
|
||||
|
||||
//- Max skewness allowed. Set to <0 to disable.
|
||||
maxBoundarySkewness 20;
|
||||
maxInternalSkewness 4;
|
||||
|
||||
//- Max concaveness allowed. Is angle (in degrees) below which concavity
|
||||
// is allowed. 0 is straight face, <0 would be convex face.
|
||||
// Set to 180 to disable.
|
||||
maxConcave 80;
|
||||
|
||||
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
|
||||
// Set to a sensible fraction of the smallest cell volume expected.
|
||||
// Set to very negative number (e.g. -1E30) to disable.
|
||||
minVol 1e-13;
|
||||
|
||||
//- Minimum tet volume. Is absolute volume of the tet formed by the
|
||||
// face-centre decomposition triangle and the cell centre.
|
||||
// Set to a sensible fraction of the smallest cell volume expected.
|
||||
// Set to very negative number (e.g. -1E30) to disable.
|
||||
minTetVol 1e-20;
|
||||
|
||||
//- Minimum face area. Set to <0 to disable.
|
||||
minArea -1;
|
||||
|
||||
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
|
||||
//- and face centre triangles normal
|
||||
minTwist 0.05;
|
||||
|
||||
//- minimum normalised cell determinant
|
||||
//- 1 = hex, <= 0 = folded or flattened illegal cell
|
||||
minDeterminant 0.001;
|
||||
|
||||
//- minFaceWeight (0 -> 0.5)
|
||||
minFaceWeight 0.05;
|
||||
|
||||
//- minVolRatio (0 -> 1)
|
||||
minVolRatio 0.01;
|
||||
|
||||
//must be >0 for Fluent compatibility
|
||||
minTriangleTwist -1;
|
||||
|
||||
|
||||
// Advanced
|
||||
|
||||
//- Number of error distribution iterations
|
||||
nSmoothScale 4;
|
||||
//- amount to scale back displacement at error points
|
||||
errorReduction 0.75;
|
||||
}
|
||||
|
||||
|
||||
// Advanced
|
||||
|
||||
// Flags for optional output
|
||||
// 0 : only write final meshes
|
||||
// 1 : write intermediate meshes
|
||||
// 2 : write volScalarField with cellLevel for postprocessing
|
||||
// 4 : write current intersections as .obj files
|
||||
debug 0;
|
||||
|
||||
|
||||
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
|
||||
// Note: the write tolerance needs to be higher than this.
|
||||
mergeTolerance 1E-6;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user