mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: adjustments for code integration
- adjust contributor names to include windows port BUG: bash script marked as sh (fixes #1890)
This commit is contained in:
@ -33,12 +33,13 @@ It is likely incomplete...
|
|||||||
- Haakan Nilsson
|
- Haakan Nilsson
|
||||||
- Niklas Nordin
|
- Niklas Nordin
|
||||||
- Mark Olesen
|
- Mark Olesen
|
||||||
- Vaggelis Papoutsis
|
- Evangelos Papoutsis-Kiachagias
|
||||||
- Juho Peltola
|
- Juho Peltola
|
||||||
- Johan Roenby
|
- Johan Roenby
|
||||||
- Henrik Rusche
|
- Henrik Rusche
|
||||||
- Bruno Santos
|
- Bruno Santos
|
||||||
- Henning Scheufler
|
- Henning Scheufler
|
||||||
|
- Richard Smith
|
||||||
- Prashant Sonakar
|
- Prashant Sonakar
|
||||||
- Hilary Spencer
|
- Hilary Spencer
|
||||||
- Gavin Tabor
|
- Gavin Tabor
|
||||||
@ -48,4 +49,3 @@ It is likely incomplete...
|
|||||||
- Norbert Weber
|
- Norbert Weber
|
||||||
- Henry Weller
|
- Henry Weller
|
||||||
- Niklas Wikstrom
|
- Niklas Wikstrom
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/fileFormats/lnInclude \
|
-I$(LIB_SRC)/fileFormats/lnInclude \
|
||||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
|
-I$(LIB_SRC)/mesh/blockMesh/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
-lfileFormats \
|
-lfileFormats \
|
||||||
|
|||||||
@ -58,14 +58,14 @@ polyline::polyline(const dictionary& dict)
|
|||||||
),
|
),
|
||||||
x_(segments_.size() + 1),
|
x_(segments_.size() + 1),
|
||||||
y_(segments_.size() + 1),
|
y_(segments_.size() + 1),
|
||||||
relTol_(coeffDict_.lookupOrDefault("toleranceCheck", SMALL))
|
relTol_(coeffDict_.getOrDefault<scalar>("toleranceCheck", SMALL))
|
||||||
{
|
{
|
||||||
// Check continuity and smoothness of the supplied polyline
|
// Check continuity and smoothness of the supplied polyline
|
||||||
for(label i=1; i < segments_.size(); i++)
|
for (label i=1; i < segments_.size(); ++i)
|
||||||
{
|
{
|
||||||
// Check continuity
|
// Check continuity
|
||||||
vector x0 = segments_[i-1].position(1);
|
const vector x0 = segments_[i-1].position(1);
|
||||||
vector x1 = segments_[i].position(0);
|
const vector x1 = segments_[i].position(0);
|
||||||
|
|
||||||
if (mag(x1-x0) > SMALL)
|
if (mag(x1-x0) > SMALL)
|
||||||
{
|
{
|
||||||
@ -75,12 +75,19 @@ polyline::polyline(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check smoothness
|
// Check smoothness
|
||||||
vector v0 = (segments_[i-1].position(1)
|
const vector v0 =
|
||||||
- segments_[i-1].position(1-DELTA));
|
normalised
|
||||||
v0 /= mag(v0);
|
(
|
||||||
vector v1 = (segments_[i].position(DELTA)
|
segments_[i-1].position(1)
|
||||||
- segments_[i].position(0));
|
- segments_[i-1].position(1-DELTA)
|
||||||
v1 /= mag(v1);
|
);
|
||||||
|
|
||||||
|
const vector v1 =
|
||||||
|
normalised
|
||||||
|
(
|
||||||
|
segments_[i].position(DELTA)
|
||||||
|
- segments_[i].position(0)
|
||||||
|
);
|
||||||
|
|
||||||
if ((v1 & v0) < (1 - relTol_))
|
if ((v1 & v0) < (1 - relTol_))
|
||||||
{
|
{
|
||||||
@ -91,9 +98,9 @@ polyline::polyline(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate cumulative length along polyline
|
// Calculate cumulative length along polyline
|
||||||
x_[0] = 0.0;
|
x_[0] = 0;
|
||||||
y_[0] = 0.0;
|
y_[0] = 0;
|
||||||
scalar totalLength = 0.0;
|
scalar totalLength = 0;
|
||||||
forAll(segments_, i)
|
forAll(segments_, i)
|
||||||
{
|
{
|
||||||
totalLength += segments_[i].length();
|
totalLength += segments_[i].length();
|
||||||
@ -109,21 +116,16 @@ polyline::polyline(const dictionary& dict)
|
|||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< tab << "Polyline start: " << p0_ << nl
|
Info
|
||||||
|
<< tab << "Polyline start: " << p0_ << nl
|
||||||
<< tab << "Polyline normal at start: " << n0_ << nl
|
<< tab << "Polyline normal at start: " << n0_ << nl
|
||||||
<< tab << "Polyline end: "
|
<< tab << "Polyline end: "
|
||||||
<< segments_[segments_.size()-1].position(1.0) << nl
|
<< segments_.last().position(1) << nl
|
||||||
<< tab << "Total length: " << totalLength << endl;
|
<< tab << "Total length: " << totalLength << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
polyline::~polyline()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
point polyline::operator()
|
point polyline::operator()
|
||||||
@ -160,8 +162,7 @@ point polyline::operator()
|
|||||||
// Rotate point to align with current normal vector
|
// Rotate point to align with current normal vector
|
||||||
if (cosTheta < (1-SMALL))
|
if (cosTheta < (1-SMALL))
|
||||||
{
|
{
|
||||||
vector axis = (n0_^n);
|
const vector axis = normalised(n0_ ^ n);
|
||||||
axis /= mag(axis);
|
|
||||||
|
|
||||||
dp = quaternion(axis, cosTheta, true).transform(dp);
|
dp = quaternion(axis, cosTheta, true).transform(dp);
|
||||||
}
|
}
|
||||||
@ -193,9 +194,12 @@ void polyline::positionAndDirection
|
|||||||
// Normal vector at current position
|
// Normal vector at current position
|
||||||
// Estimated normal vector using numerical differencing since
|
// Estimated normal vector using numerical differencing since
|
||||||
// blockEdge doesn't include a normal function
|
// blockEdge doesn't include a normal function
|
||||||
n = segments_[i].position(min(s + DELTA, 1))
|
|
||||||
- segments_[i].position(max(s - DELTA, 0));
|
n = normalised
|
||||||
n /= mag(n);
|
(
|
||||||
|
segments_[i].position(min(s + DELTA, 1))
|
||||||
|
- segments_[i].position(max(s - DELTA, 0))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class polyline
|
|||||||
:
|
:
|
||||||
public extrudeModel
|
public extrudeModel
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Dummy object needed to use blockEdge
|
//- Dummy object needed to use blockEdge
|
||||||
searchableSurfaces geometry_;
|
searchableSurfaces geometry_;
|
||||||
@ -97,14 +97,15 @@ public:
|
|||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("polyline");
|
TypeName("polyline");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
polyline(const dictionary& dict);
|
explicit polyline(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~polyline();
|
virtual ~polyline() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|||||||
@ -4,7 +4,12 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
runApplication extrudeMesh
|
runApplication extrudeMesh
|
||||||
mkdir 0
|
|
||||||
|
# For output fields from checkMesh
|
||||||
|
mkdir -p 1
|
||||||
|
|
||||||
runApplication checkMesh -writeAllFields
|
runApplication checkMesh -writeAllFields
|
||||||
|
|
||||||
|
paraFoam -touch -vtk
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | foam-extend: Open Source CFD |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 3.1 |
|
| \\ / O peration | Version: v2012 |
|
||||||
| \\ / A nd | Web: http://www.extend-project.de |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application simpleFoam;
|
application extrudeMesh;
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom latestTime;
|
||||||
|
|
||||||
@ -24,11 +24,11 @@ stopAt endTime;
|
|||||||
|
|
||||||
endTime 5;
|
endTime 5;
|
||||||
|
|
||||||
deltaT 0.0001;
|
deltaT 0;
|
||||||
|
|
||||||
writeControl runTime;
|
writeControl timeStep;
|
||||||
|
|
||||||
writeInterval 0.1;
|
writeInterval 1;
|
||||||
|
|
||||||
purgeWrite 0;
|
purgeWrite 0;
|
||||||
|
|
||||||
@ -36,12 +36,12 @@ writeFormat binary;
|
|||||||
|
|
||||||
writePrecision 8;
|
writePrecision 8;
|
||||||
|
|
||||||
writeCompression uncompressed;
|
writeCompression off;
|
||||||
|
|
||||||
timeFormat general;
|
timeFormat general;
|
||||||
|
|
||||||
timePrecision 6;
|
timePrecision 6;
|
||||||
|
|
||||||
runTimeModifiable yes;
|
runTimeModifiable true;
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 2.2.2 |
|
| \\ / O peration | Version: v2012 |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | foam-extend: Open Source CFD |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 3.1 |
|
| \\ / O peration | Version: v2006 |
|
||||||
| \\ / A nd | Web: http://www.extend-project.de |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -15,49 +15,22 @@ FoamFile
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
ddtSchemes
|
ddtSchemes
|
||||||
{
|
{}
|
||||||
default Euler;
|
|
||||||
}
|
|
||||||
|
|
||||||
gradSchemes
|
gradSchemes
|
||||||
{
|
{}
|
||||||
// default Gauss linear;
|
|
||||||
default cellMDLimited leastSquares 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
divSchemes
|
divSchemes
|
||||||
{
|
{}
|
||||||
default none;
|
|
||||||
div(phi,U) bounded Gauss upwind;
|
|
||||||
div(phi,k) bounded Gauss upwind;
|
|
||||||
div(phi,omega) bounded Gauss upwind;
|
|
||||||
div(phi,epsilon) bounded Gauss upwind;
|
|
||||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
|
||||||
div((nuEff*dev(T(grad(U))))) Gauss linear;
|
|
||||||
div(U) Gauss linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
{
|
{}
|
||||||
// default Gauss linear corrected;
|
|
||||||
default Gauss linear limited 0.5 corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
{
|
{}
|
||||||
default linear;
|
|
||||||
interpolate(U) linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
{
|
{}
|
||||||
default limited 0.5 corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
fluxRequired
|
|
||||||
{
|
|
||||||
default no;
|
|
||||||
p;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | foam-extend: Open Source CFD |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 3.1 |
|
| \\ / O peration | Version: v2006 |
|
||||||
| \\ / A nd | Web: http://www.extend-project.de |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -14,96 +14,4 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
solvers
|
|
||||||
{
|
|
||||||
"p|pFinal"
|
|
||||||
{
|
|
||||||
solver GAMG;
|
|
||||||
tolerance 1e-7;
|
|
||||||
relTol 1e-3;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
nPreSweeps 0;
|
|
||||||
nPostSweeps 2;
|
|
||||||
cacheAgglomeration on;
|
|
||||||
agglomerator faceAreaPair;
|
|
||||||
nCellsInCoarsestLevel 10;
|
|
||||||
mergeLevels 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
U
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-8;
|
|
||||||
relTol 1e-3;
|
|
||||||
nSweeps 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
k
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-8;
|
|
||||||
relTol 1e-3;
|
|
||||||
nSweeps 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
epsilon
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-8;
|
|
||||||
relTol 1e-3;
|
|
||||||
nSweeps 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
omega
|
|
||||||
{
|
|
||||||
solver smoothSolver;
|
|
||||||
smoother GaussSeidel;
|
|
||||||
tolerance 1e-8;
|
|
||||||
relTol 1e-3;
|
|
||||||
nSweeps 1;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
blockSolver
|
|
||||||
{
|
|
||||||
nNonOrthogonalCorrectors 1;
|
|
||||||
nCorrectors 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
SIMPLE
|
|
||||||
{
|
|
||||||
nNonOrthogonalCorrectors 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
PISO
|
|
||||||
{
|
|
||||||
nCorrectors 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
PIMPLE
|
|
||||||
{
|
|
||||||
nOuterCorrectors 2;
|
|
||||||
nCorrectors 2;
|
|
||||||
nNonOrthogonalCorrectors 0;
|
|
||||||
pRefCell 0;
|
|
||||||
pRefValue 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
potentialFlow
|
|
||||||
{
|
|
||||||
nNonOrthogonalCorrectors 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
relaxationFactors
|
|
||||||
{
|
|
||||||
p 0.3;
|
|
||||||
U 0.7;
|
|
||||||
k 0.7;
|
|
||||||
omega 0.7;
|
|
||||||
epsilon 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
|||||||
Reference in New Issue
Block a user