mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'opencfd/master' into olesenm
This commit is contained in:
@ -240,11 +240,14 @@
|
|||||||
+ =snappyHexMesh=:
|
+ =snappyHexMesh=:
|
||||||
+ extrude across multi-processor boundaries
|
+ extrude across multi-processor boundaries
|
||||||
+ preserve faceZones during layering
|
+ preserve faceZones during layering
|
||||||
|
+ combining patch faces after snapping
|
||||||
+ *Warning*:
|
+ *Warning*:
|
||||||
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
|
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
|
||||||
90 to get same behaviour as 130 in 17x.
|
90 to get same behaviour as 130 in 17x.
|
||||||
- nGrow did not work in 17x. Set to 0
|
- nGrow did not work in 17x. Set to 0
|
||||||
to get same behaviour as 130 in 17x.
|
to get same behaviour as 130 in 17x.
|
||||||
|
- nSolveIter reinstated to smooth internal mesh. Set to 0
|
||||||
|
to get same behaviour at 17x.
|
||||||
- new minTetQuality setting (see tracking). Disable for 17x
|
- new minTetQuality setting (see tracking). Disable for 17x
|
||||||
compatibility.
|
compatibility.
|
||||||
* Post-processing
|
* Post-processing
|
||||||
@ -309,3 +312,8 @@
|
|||||||
* Other
|
* Other
|
||||||
+ compilable with =clang=
|
+ compilable with =clang=
|
||||||
In your prefs.sh set the WM_COMPILER to Clang
|
In your prefs.sh set the WM_COMPILER to Clang
|
||||||
|
+ dlclose error: upon exit of e.g. paraFoam you can get the error
|
||||||
|
Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion
|
||||||
|
`map->l_init_called' failed!
|
||||||
|
This seems to happen with a mix of system libraries and a thirdParty
|
||||||
|
compiler.
|
||||||
|
|||||||
@ -47,4 +47,10 @@
|
|||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
setRefCell
|
||||||
|
(
|
||||||
|
p,
|
||||||
|
potentialFlow,
|
||||||
|
pRefCell,
|
||||||
|
pRefValue
|
||||||
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,8 +42,8 @@ int main(int argc, char *argv[])
|
|||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
#include "readControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "readSIMPLEControls.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
6
applications/solvers/basic/potentialFoam/readControls.H
Normal file
6
applications/solvers/basic/potentialFoam/readControls.H
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
const dictionary& potentialFlow =
|
||||||
|
mesh.solutionDict().subDict("potentialFlow");
|
||||||
|
|
||||||
|
const int nNonOrthCorr =
|
||||||
|
potentialFlow.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||||
|
|
||||||
@ -19,7 +19,7 @@
|
|||||||
pimple.lookupOrDefault<scalar>("maxDeltaT", GREAT)
|
pimple.lookupOrDefault<scalar>("maxDeltaT", GREAT)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField rDeltaT0 = rDeltaT;
|
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
|
||||||
|
|
||||||
// Set the reciprocal time-step from the local Courant number
|
// Set the reciprocal time-step from the local Courant number
|
||||||
rDeltaT.dimensionedInternalField() = max
|
rDeltaT.dimensionedInternalField() = max
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
tmp<fvVectorMatrix> UEqn
|
tmp<fvVectorMatrix> UEqn
|
||||||
(
|
(
|
||||||
//pZones.ddt(rho, U)
|
//pZones.ddt(rho, U)
|
||||||
fvc::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(phi, U)
|
+ fvm::div(phi, U)
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
piso.lookupOrDefault<scalar>("maxDeltaT", GREAT)
|
piso.lookupOrDefault<scalar>("maxDeltaT", GREAT)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField rDeltaT0 = rDeltaT;
|
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
|
||||||
|
|
||||||
// Set the reciprocal time-step from the local Courant number
|
// Set the reciprocal time-step from the local Courant number
|
||||||
rDeltaT.dimensionedInternalField() = max
|
rDeltaT.dimensionedInternalField() = max
|
||||||
@ -64,7 +64,7 @@
|
|||||||
// Further limit the reciprocal time-step
|
// Further limit the reciprocal time-step
|
||||||
// in the vicinity of the interface
|
// in the vicinity of the interface
|
||||||
|
|
||||||
volScalarField alpha1Bar = fvc::average(alpha1);
|
volScalarField alpha1Bar(fvc::average(alpha1));
|
||||||
|
|
||||||
rDeltaT.dimensionedInternalField() = max
|
rDeltaT.dimensionedInternalField() = max
|
||||||
(
|
(
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
//pZones.ddt(rho, U)
|
//pZones.ddt(rho, U)
|
||||||
fvc::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
- fvm::laplacian(muEff, U)
|
- fvm::laplacian(muEff, U)
|
||||||
- (fvc::grad(U) & fvc::grad(muEff))
|
- (fvc::grad(U) & fvc::grad(muEff))
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -268,7 +268,7 @@ label selectOutsideCells
|
|||||||
// Find cell containing point. Linear search.
|
// Find cell containing point. Linear search.
|
||||||
label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
|
label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
|
||||||
|
|
||||||
if (cellType[cellI] == MESH)
|
if (cellI != -1 && cellType[cellI] == MESH)
|
||||||
{
|
{
|
||||||
Info<< "Marking cell " << cellI << " containing outside point "
|
Info<< "Marking cell " << cellI << " containing outside point "
|
||||||
<< outsidePts[outsidePtI] << " with type " << cellType[cellI]
|
<< outsidePts[outsidePtI] << " with type " << cellType[cellI]
|
||||||
@ -388,7 +388,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const point& outsidePoint = outsidePts[outsideI];
|
const point& outsidePoint = outsidePts[outsideI];
|
||||||
|
|
||||||
if (queryMesh.findCell(outsidePoint, -1, false) == -1)
|
label cellI = queryMesh.findCell(outsidePoint, -1, false);
|
||||||
|
if (returnReduce(cellI, maxOp<label>()) == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "outsidePoint " << outsidePoint
|
<< "outsidePoint " << outsidePoint
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,7 +86,6 @@ void starMesh::readPoints(const scalar scaleFactor)
|
|||||||
if (pointsFile.good())
|
if (pointsFile.good())
|
||||||
{
|
{
|
||||||
label pointLabel;
|
label pointLabel;
|
||||||
scalar x, y, z;
|
|
||||||
|
|
||||||
maxLabel = -1;
|
maxLabel = -1;
|
||||||
while (pointsFile)
|
while (pointsFile)
|
||||||
@ -97,9 +96,9 @@ void starMesh::readPoints(const scalar scaleFactor)
|
|||||||
|
|
||||||
maxLabel = max(maxLabel, pointLabel);
|
maxLabel = max(maxLabel, pointLabel);
|
||||||
|
|
||||||
x = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
y = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
z = readVtxCmpt(pointsFile);
|
readVtxCmpt(pointsFile);
|
||||||
|
|
||||||
readToNl(pointsFile);
|
readToNl(pointsFile);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,6 +44,7 @@ Description
|
|||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "cellSet.H"
|
#include "cellSet.H"
|
||||||
#include "faceSet.H"
|
#include "faceSet.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,6 +37,7 @@ Description
|
|||||||
#include "autoLayerDriver.H"
|
#include "autoLayerDriver.H"
|
||||||
#include "searchableSurfaces.H"
|
#include "searchableSurfaces.H"
|
||||||
#include "refinementSurfaces.H"
|
#include "refinementSurfaces.H"
|
||||||
|
#include "refinementFeatures.H"
|
||||||
#include "shellSurfaces.H"
|
#include "shellSurfaces.H"
|
||||||
#include "decompositionMethod.H"
|
#include "decompositionMethod.H"
|
||||||
#include "fvMeshDistribute.H"
|
#include "fvMeshDistribute.H"
|
||||||
@ -250,6 +251,20 @@ int main(int argc, char *argv[])
|
|||||||
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
|
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
// Read feature meshes
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Info<< "Reading features." << endl;
|
||||||
|
refinementFeatures features
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
refineDict.lookup("features")
|
||||||
|
);
|
||||||
|
Info<< "Read features in = "
|
||||||
|
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Refinement engine
|
// Refinement engine
|
||||||
// ~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -265,6 +280,7 @@ int main(int argc, char *argv[])
|
|||||||
mergeDist, // tolerance used in sorting coordinates
|
mergeDist, // tolerance used in sorting coordinates
|
||||||
overwrite, // overwrite mesh files?
|
overwrite, // overwrite mesh files?
|
||||||
surfaces, // for surface intersection refinement
|
surfaces, // for surface intersection refinement
|
||||||
|
features, // for feature edges/point based refinement
|
||||||
shells // for volume (inside/outside) refinement
|
shells // for volume (inside/outside) refinement
|
||||||
);
|
);
|
||||||
Info<< "Calculated surface intersections in = "
|
Info<< "Calculated surface intersections in = "
|
||||||
@ -429,13 +445,19 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Snap parameters
|
// Snap parameters
|
||||||
snapParameters snapParams(snapDict);
|
snapParameters snapParams(snapDict);
|
||||||
|
// Temporary hack to get access to resolveFeatureAngle
|
||||||
|
scalar curvature;
|
||||||
|
{
|
||||||
|
refinementParameters refineParams(refineDict);
|
||||||
|
curvature = refineParams.curvature();
|
||||||
|
}
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
const_cast<Time&>(mesh.time())++;
|
const_cast<Time&>(mesh.time())++;
|
||||||
}
|
}
|
||||||
|
|
||||||
snapDriver.doSnap(snapDict, motionDict, snapParams);
|
snapDriver.doSnap(snapDict, motionDict, curvature, snapParams);
|
||||||
|
|
||||||
writeMesh
|
writeMesh
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.7.1 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -217,10 +217,10 @@ snapControls
|
|||||||
// to surface
|
// to surface
|
||||||
nSmoothPatch 3;
|
nSmoothPatch 3;
|
||||||
|
|
||||||
//- Relative distance for points to be attracted by surface feature point
|
//- Maximum relative distance for points to be attracted by surface.
|
||||||
// or edge. True distance is this factor times local
|
// True distance is this factor times local maximum edge length.
|
||||||
// maximum edge length.
|
// Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
|
||||||
tolerance 4.0;
|
tolerance 2.0;
|
||||||
|
|
||||||
//- Number of mesh displacement relaxation iterations.
|
//- Number of mesh displacement relaxation iterations.
|
||||||
nSolveIter 30;
|
nSolveIter 30;
|
||||||
|
|||||||
@ -179,7 +179,7 @@ Foam::label Foam::checkTopology
|
|||||||
if (nTwoCells > 0)
|
if (nTwoCells > 0)
|
||||||
{
|
{
|
||||||
Info<< " <<Writing " << nTwoCells
|
Info<< " <<Writing " << nTwoCells
|
||||||
<< " cells with with single non-boundary face to set "
|
<< " cells with with two non-boundary faces to set "
|
||||||
<< twoCells.name()
|
<< twoCells.name()
|
||||||
<< endl;
|
<< endl;
|
||||||
twoCells.instance() = mesh.pointsInstance();
|
twoCells.instance() = mesh.pointsInstance();
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,6 +44,7 @@ Description
|
|||||||
#include "labelIOList.H"
|
#include "labelIOList.H"
|
||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -33,7 +33,6 @@ EXE_LIBS = \
|
|||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lIOFunctionObjects \
|
-lIOFunctionObjects \
|
||||||
-ljobControl \
|
-ljobControl \
|
||||||
-lkineticTheoryModel \
|
|
||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,6 +148,11 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
// Make sure we do not use the master-only reading since we read
|
||||||
|
// fields (different per processor) as dictionaries.
|
||||||
|
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
fileName meshDir = polyMesh::meshSubDir;
|
fileName meshDir = polyMesh::meshSubDir;
|
||||||
fileName regionPrefix = "";
|
fileName regionPrefix = "";
|
||||||
word regionName = polyMesh::defaultRegion;
|
word regionName = polyMesh::defaultRegion;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -183,12 +183,14 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
|
# include "addRegionOption.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
# include "createMesh.H"
|
# include "createNamedMesh.H"
|
||||||
|
|
||||||
// Initialize name mapping table
|
// Initialize name mapping table
|
||||||
FieldviewNames.insert("alpha", "aalpha");
|
FieldviewNames.insert("alpha", "aalpha");
|
||||||
@ -260,10 +262,23 @@ int main(int argc, char *argv[])
|
|||||||
// make a directory called FieldView in the case
|
// make a directory called FieldView in the case
|
||||||
fileName fvPath(runTime.path()/"Fieldview");
|
fileName fvPath(runTime.path()/"Fieldview");
|
||||||
|
|
||||||
|
if (regionName != polyMesh::defaultRegion)
|
||||||
|
{
|
||||||
|
fvPath = fvPath/regionName;
|
||||||
|
}
|
||||||
|
|
||||||
if (isDir(fvPath))
|
if (isDir(fvPath))
|
||||||
{
|
{
|
||||||
|
if (regionName != polyMesh::defaultRegion)
|
||||||
|
{
|
||||||
|
Info<< "Keeping old FieldView files in " << fvPath << nl << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Deleting old FieldView files in " << fvPath << nl << endl;
|
||||||
rmDir(fvPath);
|
rmDir(fvPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mkDir(fvPath);
|
mkDir(fvPath);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -383,16 +383,12 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
|
|||||||
|
|
||||||
forAll(quadFcs, quadI)
|
forAll(quadFcs, quadI)
|
||||||
{
|
{
|
||||||
label thisCellI;
|
|
||||||
|
|
||||||
if (substituteCell)
|
if (substituteCell)
|
||||||
{
|
{
|
||||||
thisCellI = cellI;
|
|
||||||
substituteCell = false;
|
substituteCell = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thisCellI = mesh.nCells() + addCellI;
|
|
||||||
superCells[addCellI++] = cellI;
|
superCells[addCellI++] = cellI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,16 +426,12 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
|
|||||||
|
|
||||||
forAll(triFcs, triI)
|
forAll(triFcs, triI)
|
||||||
{
|
{
|
||||||
label thisCellI;
|
|
||||||
|
|
||||||
if (substituteCell)
|
if (substituteCell)
|
||||||
{
|
{
|
||||||
thisCellI = cellI;
|
|
||||||
substituteCell = false;
|
substituteCell = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thisCellI = mesh.nCells() + addCellI;
|
|
||||||
superCells[addCellI++] = cellI;
|
superCells[addCellI++] = cellI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.7.1 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -150,29 +150,29 @@ surfaces
|
|||||||
interpolate true;
|
interpolate true;
|
||||||
}
|
}
|
||||||
|
|
||||||
movingWall_constant
|
walls_constant
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
patchName movingWall;
|
patches ( ".*Wall.*" );
|
||||||
// Optional: whether to leave as faces (=default) or triangulate
|
// Optional: whether to leave as faces (=default) or triangulate
|
||||||
// triangulate false;
|
// triangulate false;
|
||||||
}
|
}
|
||||||
|
|
||||||
movingWall_interpolated
|
walls_interpolated
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
patchName movingWall;
|
patches ( ".*Wall.*" );
|
||||||
interpolate true;
|
interpolate true;
|
||||||
// Optional: whether to leave as faces (=default) or triangulate
|
// Optional: whether to leave as faces (=default) or triangulate
|
||||||
// triangulate false;
|
// triangulate false;
|
||||||
}
|
}
|
||||||
|
|
||||||
movingNearWall_interpolated
|
nearWalls_interpolated
|
||||||
{
|
{
|
||||||
// Sample cell values off patch. Does not need to be the near-wall
|
// Sample cell values off patch. Does not need to be the near-wall
|
||||||
// cell, can be arbitrarily far away.
|
// cell, can be arbitrarily far away.
|
||||||
type patchInternalField;
|
type patchInternalField;
|
||||||
patchName movingWall;
|
patches ( ".*Wall.*" );
|
||||||
distance 0.0001;
|
distance 0.0001;
|
||||||
interpolate true;
|
interpolate true;
|
||||||
// Optional: whether to leave as faces (=default) or triangulate
|
// Optional: whether to leave as faces (=default) or triangulate
|
||||||
|
|||||||
@ -305,6 +305,11 @@ int main(int argc, char *argv[])
|
|||||||
instance = args.options()["instance"];
|
instance = args.options()["instance"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure we do not use the master-only reading since we read
|
||||||
|
// fields (different per processor) as dictionaries.
|
||||||
|
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
// Get the replacement rules from a dictionary
|
// Get the replacement rules from a dictionary
|
||||||
IOdictionary dict
|
IOdictionary dict
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -405,6 +405,12 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|
||||||
|
// Make sure we do not use the master-only reading since we read
|
||||||
|
// fields (different per processor) as dictionaries.
|
||||||
|
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
const bool isTestRun = args.optionFound("test");
|
const bool isTestRun = args.optionFound("test");
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -40,6 +40,7 @@ Description
|
|||||||
#include "treeBoundBox.H"
|
#include "treeBoundBox.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -90,6 +91,55 @@ void deleteBox
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Unmark non-manifold edges if individual triangles are not features
|
||||||
|
void unmarkBaffles
|
||||||
|
(
|
||||||
|
const triSurface& surf,
|
||||||
|
const scalar includedAngle,
|
||||||
|
List<surfaceFeatures::edgeStatus>& edgeStat
|
||||||
|
)
|
||||||
|
{
|
||||||
|
scalar minCos = Foam::cos(degToRad(180.0 - includedAngle));
|
||||||
|
|
||||||
|
const labelListList& edgeFaces = surf.edgeFaces();
|
||||||
|
|
||||||
|
forAll(edgeFaces, edgeI)
|
||||||
|
{
|
||||||
|
const labelList& eFaces = edgeFaces[edgeI];
|
||||||
|
|
||||||
|
if (eFaces.size() > 2)
|
||||||
|
{
|
||||||
|
label i0 = eFaces[0];
|
||||||
|
//const labelledTri& f0 = surf[i0];
|
||||||
|
const vector& n0 = surf.faceNormals()[i0];
|
||||||
|
|
||||||
|
//Pout<< "edge:" << edgeI << " n0:" << n0 << endl;
|
||||||
|
|
||||||
|
bool same = true;
|
||||||
|
|
||||||
|
for (label i = 1; i < eFaces.size(); i++)
|
||||||
|
{
|
||||||
|
//const labelledTri& f = surf[i];
|
||||||
|
const vector& n = surf.faceNormals()[eFaces[i]];
|
||||||
|
|
||||||
|
//Pout<< " mag(n&n0): " << mag(n&n0) << endl;
|
||||||
|
|
||||||
|
if (mag(n&n0) < minCos)
|
||||||
|
{
|
||||||
|
same = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (same)
|
||||||
|
{
|
||||||
|
edgeStat[edgeI] = surfaceFeatures::NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
@ -138,6 +188,11 @@ int main(int argc, char *argv[])
|
|||||||
"((x0 y0 z0)(x1 y1 z1))",
|
"((x0 y0 z0)(x1 y1 z1))",
|
||||||
"remove edges within specified bounding box"
|
"remove edges within specified bounding box"
|
||||||
);
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"writeObj",
|
||||||
|
"write extendedFeatureEdgeMesh obj files"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -145,6 +200,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Feature line extraction is only valid on closed manifold surfaces."
|
Info<< "Feature line extraction is only valid on closed manifold surfaces."
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
bool writeObj = args.optionFound("writeObj");
|
||||||
|
|
||||||
const fileName surfFileName = args[1];
|
const fileName surfFileName = args[1];
|
||||||
const fileName outFileName = args[2];
|
const fileName outFileName = args[2];
|
||||||
@ -153,6 +209,8 @@ int main(int argc, char *argv[])
|
|||||||
<< "Output feature set : " << outFileName << nl
|
<< "Output feature set : " << outFileName << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
fileName sFeatFileName = surfFileName.lessExt().name();
|
||||||
|
|
||||||
|
|
||||||
// Read
|
// Read
|
||||||
// ~~~~
|
// ~~~~
|
||||||
@ -164,7 +222,6 @@ int main(int argc, char *argv[])
|
|||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Either construct features from surface&featureangle or read set.
|
// Either construct features from surface&featureangle or read set.
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -187,9 +244,9 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
set = surfaceFeatures(surf, includedAngle);
|
set = surfaceFeatures(surf, includedAngle);
|
||||||
|
|
||||||
Info<< nl << "Writing initial features" << endl;
|
// Info<< nl << "Writing initial features" << endl;
|
||||||
set.write("initial.fSet");
|
// set.write("initial.fSet");
|
||||||
set.writeObj("initial");
|
// set.writeObj("initial");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -200,7 +257,6 @@ int main(int argc, char *argv[])
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "Initial feature set:" << nl
|
<< "Initial feature set:" << nl
|
||||||
<< " feature points : " << set.featurePoints().size() << nl
|
<< " feature points : " << set.featurePoints().size() << nl
|
||||||
@ -284,8 +340,8 @@ int main(int argc, char *argv[])
|
|||||||
Info<< endl << "Writing trimmed features to " << outFileName << endl;
|
Info<< endl << "Writing trimmed features to " << outFileName << endl;
|
||||||
newSet.write(outFileName);
|
newSet.write(outFileName);
|
||||||
|
|
||||||
Info<< endl << "Writing edge objs." << endl;
|
// Info<< endl << "Writing edge objs." << endl;
|
||||||
newSet.writeObj("final");
|
// newSet.writeObj("final");
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "Final feature set:" << nl
|
<< "Final feature set:" << nl
|
||||||
@ -297,20 +353,22 @@ int main(int argc, char *argv[])
|
|||||||
<< " internal edges : " << newSet.nInternalEdges() << nl
|
<< " internal edges : " << newSet.nInternalEdges() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
// Extracting and writing a featureEdgeMesh
|
// Extracting and writing a extendedFeatureEdgeMesh
|
||||||
|
|
||||||
extendedFeatureEdgeMesh feMesh
|
extendedFeatureEdgeMesh feMesh
|
||||||
(
|
(
|
||||||
newSet,
|
newSet,
|
||||||
runTime,
|
runTime,
|
||||||
surfFileName.lessExt().name() + ".featureEdgeMesh"
|
sFeatFileName + ".extendedFeatureEdgeMesh"
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< nl << "Writing extendedFeatureEdgeMesh to " << feMesh.objectPath()
|
Info<< nl << "Writing extendedFeatureEdgeMesh to " << feMesh.objectPath()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
if (writeObj)
|
||||||
|
{
|
||||||
feMesh.writeObj(surfFileName.lessExt().name());
|
feMesh.writeObj(surfFileName.lessExt().name());
|
||||||
|
}
|
||||||
|
|
||||||
feMesh.write();
|
feMesh.write();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -95,6 +95,7 @@ cleanCase()
|
|||||||
> /dev/null 2>&1 \
|
> /dev/null 2>&1 \
|
||||||
)
|
)
|
||||||
rm -rf VTK > /dev/null 2>&1
|
rm -rf VTK > /dev/null 2>&1
|
||||||
|
rm -f 0/cellLevel 0/pointLevel
|
||||||
|
|
||||||
if [ -e constant/polyMesh/blockMeshDict.m4 ]
|
if [ -e constant/polyMesh/blockMeshDict.m4 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@ -39,7 +39,6 @@
|
|||||||
#
|
#
|
||||||
# Checks for
|
# Checks for
|
||||||
# - illegal code, e.g. <TAB>
|
# - illegal code, e.g. <TAB>
|
||||||
# - copyright is current, e.g. if present, contains XXX-<current-year>
|
|
||||||
# - columns greater than 80 for *.[CH] files
|
# - columns greater than 80 for *.[CH] files
|
||||||
#
|
#
|
||||||
# Note
|
# Note
|
||||||
@ -138,8 +137,8 @@ checkIllegalCode()
|
|||||||
{
|
{
|
||||||
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
||||||
|
|
||||||
reBad="(N""abla|"$'\t'")"
|
reBad="("$'\t'")"
|
||||||
msgBad="N""abla or <TAB>"
|
msgBad="<TAB>"
|
||||||
|
|
||||||
scope=$(gitScope $@)
|
scope=$(gitScope $@)
|
||||||
|
|
||||||
@ -167,40 +166,6 @@ checkIllegalCode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# check that OpenCFD copyright is current
|
|
||||||
#
|
|
||||||
checkCopyright()
|
|
||||||
{
|
|
||||||
year=$(date +%Y)
|
|
||||||
echo "$hookName: check copyright ..." 1>&2
|
|
||||||
|
|
||||||
scope=$(gitScope $@)
|
|
||||||
|
|
||||||
badFiles=$(
|
|
||||||
for f in $fileList
|
|
||||||
do
|
|
||||||
# NB: need to have OpenCFD on a separate line to prevent
|
|
||||||
# this check being caught by itself!
|
|
||||||
#
|
|
||||||
# parse line numbers from grep output:
|
|
||||||
# <lineNr>: contents
|
|
||||||
#
|
|
||||||
lines=$(git grep -F -hn -e Copyright \
|
|
||||||
--and -e OpenCFD \
|
|
||||||
--and --not -e "$year" \
|
|
||||||
$scope"$f" |
|
|
||||||
sed -e 's@:.*@@' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)
|
|
||||||
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
dieOnBadFiles "Update copyright year, e.g. XXXX-$year"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# limit line length to 80-columns
|
# limit line length to 80-columns
|
||||||
#
|
#
|
||||||
@ -308,9 +273,6 @@ bad=$(git diff-index --cached --check $against --) || die "$bad"
|
|||||||
# check for illegal code, e.g. <TAB>, etc
|
# check for illegal code, e.g. <TAB>, etc
|
||||||
checkIllegalCode
|
checkIllegalCode
|
||||||
|
|
||||||
# ensure OpenCFD copyright contains correct year
|
|
||||||
checkCopyright
|
|
||||||
|
|
||||||
# ensure code conforms to 80 columns max
|
# ensure code conforms to 80 columns max
|
||||||
checkLineLengthNonDirective
|
checkLineLengthNonDirective
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,6 @@
|
|||||||
#
|
#
|
||||||
# Checks for
|
# Checks for
|
||||||
# - illegal code, e.g. <TAB>
|
# - illegal code, e.g. <TAB>
|
||||||
# - copyright is current, e.g. if present, contains XXX-<current-year>
|
|
||||||
# - columns greater than 80 for *.[CH] files
|
# - columns greater than 80 for *.[CH] files
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -101,8 +100,8 @@ checkIllegalCode()
|
|||||||
{
|
{
|
||||||
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
||||||
|
|
||||||
reBad="(N""abla|"$'\t'"|"$'\r\n'")"
|
reBad="("$'\t'"|"$'\r\n'")"
|
||||||
msgBad="N""abla, <TAB> or DOS-line-endings"
|
msgBad="<TAB> or DOS-line-endings"
|
||||||
|
|
||||||
scope=$(gitScope $@)
|
scope=$(gitScope $@)
|
||||||
|
|
||||||
@ -130,40 +129,6 @@ checkIllegalCode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# check that OpenCFD copyright is current
|
|
||||||
#
|
|
||||||
checkCopyright()
|
|
||||||
{
|
|
||||||
year=$(date +%Y)
|
|
||||||
echo "$hookName: check copyright ..." 1>&2
|
|
||||||
|
|
||||||
scope=$(gitScope $@)
|
|
||||||
|
|
||||||
badFiles=$(
|
|
||||||
for f in $fileList
|
|
||||||
do
|
|
||||||
# NB: need to have OpenCFD on a separate line to prevent
|
|
||||||
# this check being caught by itself!
|
|
||||||
#
|
|
||||||
# parse line numbers from grep output:
|
|
||||||
# <lineNr>: contents
|
|
||||||
#
|
|
||||||
lines=$(git grep -F -hn -e Copyright \
|
|
||||||
--and -e OpenCFD \
|
|
||||||
--and --not -e "$year" \
|
|
||||||
$scope"$f" |
|
|
||||||
sed -e 's@:.*@@' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)
|
|
||||||
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
||||||
dieOnBadFiles "Update copyright year, e.g. XXXX-$year"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# limit line length to 80-columns
|
# limit line length to 80-columns
|
||||||
#
|
#
|
||||||
@ -297,9 +262,6 @@ do
|
|||||||
# check for illegal code, e.g. <TAB>, etc
|
# check for illegal code, e.g. <TAB>, etc
|
||||||
checkIllegalCode $newSHA1
|
checkIllegalCode $newSHA1
|
||||||
|
|
||||||
# ensure OpenCFD copyright contains correct year
|
|
||||||
checkCopyright $newSHA1
|
|
||||||
|
|
||||||
# ensure code conforms to 80 columns max
|
# ensure code conforms to 80 columns max
|
||||||
checkLineLengthNonDirective $newSHA1
|
checkLineLengthNonDirective $newSHA1
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: 1.7 |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -388,6 +388,10 @@ case SYSTEMOPENMPI:
|
|||||||
setenv PLIBS "`mpicc --showme:link`"
|
setenv PLIBS "`mpicc --showme:link`"
|
||||||
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
set libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||||
|
|
||||||
|
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
|
||||||
|
# include files and libraries.
|
||||||
|
setenv MPI_ARCH_PATH "${libDir:h}"
|
||||||
|
|
||||||
if ($?FOAM_VERBOSE && $?prompt) then
|
if ($?FOAM_VERBOSE && $?prompt) then
|
||||||
echo "Using system installed MPI:"
|
echo "Using system installed MPI:"
|
||||||
echo " compile flags : $PINC"
|
echo " compile flags : $PINC"
|
||||||
|
|||||||
@ -408,6 +408,10 @@ SYSTEMOPENMPI)
|
|||||||
export PLIBS="`mpicc --showme:link`"
|
export PLIBS="`mpicc --showme:link`"
|
||||||
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`
|
||||||
|
|
||||||
|
# Bit of a hack: strip off 'lib' and hope this is the path to openmpi
|
||||||
|
# include files and libraries.
|
||||||
|
export MPI_ARCH_PATH="${libDir%/*}"
|
||||||
|
|
||||||
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
if [ "$FOAM_VERBOSE" -a "$PS1" ]
|
||||||
then
|
then
|
||||||
echo "Using system installed MPI:"
|
echo "Using system installed MPI:"
|
||||||
|
|||||||
@ -126,7 +126,7 @@ Foam::treeDataCell::treeDataCell
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::pointField Foam::treeDataCell::points() const
|
Foam::pointField Foam::treeDataCell::shapePoints() const
|
||||||
{
|
{
|
||||||
pointField cc(cellLabels_.size());
|
pointField cc(cellLabels_.size());
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ public:
|
|||||||
|
|
||||||
//- Get representative point cloud for all shapes inside
|
//- Get representative point cloud for all shapes inside
|
||||||
// (one point per shape)
|
// (one point per shape)
|
||||||
pointField points() const;
|
pointField shapePoints() const;
|
||||||
|
|
||||||
|
|
||||||
// Search
|
// Search
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -287,7 +287,7 @@ Foam::Xfer<Foam::labelList> Foam::PackedBoolList::used() const
|
|||||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::PackedBoolList&
|
Foam::PackedBoolList&
|
||||||
Foam::PackedBoolList::operator=(const UList<bool>& lst)
|
Foam::PackedBoolList::operator=(const Foam::UList<bool>& lst)
|
||||||
{
|
{
|
||||||
this->setSize(lst.size());
|
this->setSize(lst.size());
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ public:
|
|||||||
inline PackedBoolList(const Xfer<PackedList<1> >&);
|
inline PackedBoolList(const Xfer<PackedList<1> >&);
|
||||||
|
|
||||||
//- Construct from a list of bools
|
//- Construct from a list of bools
|
||||||
explicit inline PackedBoolList(const UList<bool>&);
|
explicit inline PackedBoolList(const Foam::UList<bool>&);
|
||||||
|
|
||||||
//- Construct from a list of labels
|
//- Construct from a list of labels
|
||||||
// using the labels as indices to indicate which bits are set
|
// using the labels as indices to indicate which bits are set
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,7 +73,7 @@ inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedList<1> >& lst)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::PackedBoolList::PackedBoolList(const UList<bool>& lst)
|
inline Foam::PackedBoolList::PackedBoolList(const Foam::UList<bool>& lst)
|
||||||
:
|
:
|
||||||
PackedList<1>()
|
PackedList<1>()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,9 +47,6 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class Istream;
|
|
||||||
class Ostream;
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
template<class T, class BaseType> class CompactIOField;
|
template<class T, class BaseType> class CompactIOField;
|
||||||
|
|
||||||
@ -58,6 +55,7 @@ template<class T, class BaseType> Istream& operator>>
|
|||||||
Istream&,
|
Istream&,
|
||||||
CompactIOField<T, BaseType>&
|
CompactIOField<T, BaseType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class T, class BaseType> Ostream& operator<<
|
template<class T, class BaseType> Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
@ -122,23 +120,6 @@ public:
|
|||||||
void operator=(const CompactIOField<T, BaseType>&);
|
void operator=(const CompactIOField<T, BaseType>&);
|
||||||
|
|
||||||
void operator=(const Field<T>&);
|
void operator=(const Field<T>&);
|
||||||
|
|
||||||
|
|
||||||
// IOstream operators
|
|
||||||
|
|
||||||
//- Read Field from Istream, discarding contents of existing Field.
|
|
||||||
friend Istream& operator>> <T, BaseType>
|
|
||||||
(
|
|
||||||
Istream&,
|
|
||||||
CompactIOField<T, BaseType>&
|
|
||||||
);
|
|
||||||
|
|
||||||
// Write Field to Ostream.
|
|
||||||
friend Ostream& operator<< <T, BaseType>
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const CompactIOField<T, BaseType>&
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -124,16 +124,14 @@ Foam::IOdictionary::IOdictionary(const IOobject& io)
|
|||||||
regIOobject(io)
|
regIOobject(io)
|
||||||
{
|
{
|
||||||
// Temporary warning
|
// Temporary warning
|
||||||
if (io.readOpt() == IOobject::MUST_READ)
|
if (debug && io.readOpt() == IOobject::MUST_READ)
|
||||||
{
|
{
|
||||||
WarningIn("IOdictionary::IOdictionary(const IOobject&)")
|
WarningIn("IOdictionary::IOdictionary(const IOobject&)")
|
||||||
//FatalErrorIn("IOdictionary::IOdictionary(const IOobject&)")
|
|
||||||
<< "Dictionary " << name()
|
<< "Dictionary " << name()
|
||||||
<< " constructed with IOobject::MUST_READ"
|
<< " constructed with IOobject::MUST_READ"
|
||||||
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl
|
" instead of IOobject::MUST_READ_IF_MODIFIED." << nl
|
||||||
<< "Use MUST_READ_IF_MODIFIED if you need automatic rereading."
|
<< "Use MUST_READ_IF_MODIFIED if you need automatic rereading."
|
||||||
<< endl;
|
<< endl;
|
||||||
//<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Everyone check or just master
|
// Everyone check or just master
|
||||||
@ -182,7 +180,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict)
|
|||||||
regIOobject(io)
|
regIOobject(io)
|
||||||
{
|
{
|
||||||
// Temporary warning
|
// Temporary warning
|
||||||
if (io.readOpt() == IOobject::MUST_READ)
|
if (debug && io.readOpt() == IOobject::MUST_READ)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -168,6 +168,12 @@ void Foam::Time::readDict()
|
|||||||
|
|
||||||
Pout.precision(IOstream::defaultPrecision());
|
Pout.precision(IOstream::defaultPrecision());
|
||||||
Perr.precision(IOstream::defaultPrecision());
|
Perr.precision(IOstream::defaultPrecision());
|
||||||
|
|
||||||
|
FatalError().precision(IOstream::defaultPrecision());
|
||||||
|
FatalIOError.error::operator()().precision
|
||||||
|
(
|
||||||
|
IOstream::defaultPrecision()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controlDict_.found("writeCompression"))
|
if (controlDict_.found("writeCompression"))
|
||||||
|
|||||||
@ -55,6 +55,10 @@ Foam::dlLibraryTable::~dlLibraryTable()
|
|||||||
{
|
{
|
||||||
forAllConstIter(dlLibraryTable, *this, iter)
|
forAllConstIter(dlLibraryTable, *this, iter)
|
||||||
{
|
{
|
||||||
|
// bug in dlclose - does not call static destructors of
|
||||||
|
// loaded library when actually unloading the library.
|
||||||
|
// See https://bugzilla.novell.com/show_bug.cgi?id=680125 and 657627.
|
||||||
|
// Seems related to using a non-system compiler!
|
||||||
dlClose(iter.key());
|
dlClose(iter.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -55,6 +55,7 @@ Ostream& operator<<
|
|||||||
Ostream&,
|
Ostream&,
|
||||||
const DynamicField<T, SizeInc, SizeMult, SizeDiv>&
|
const DynamicField<T, SizeInc, SizeMult, SizeDiv>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv>
|
||||||
Istream& operator>>
|
Istream& operator>>
|
||||||
(
|
(
|
||||||
@ -234,23 +235,6 @@ public:
|
|||||||
|
|
||||||
//- Assignment from UList
|
//- Assignment from UList
|
||||||
inline void operator=(const UList<T>&);
|
inline void operator=(const UList<T>&);
|
||||||
|
|
||||||
|
|
||||||
// IOstream operators
|
|
||||||
|
|
||||||
// Write DynamicField to Ostream.
|
|
||||||
friend Ostream& operator<< <T, SizeInc, SizeMult, SizeDiv>
|
|
||||||
(
|
|
||||||
Ostream&,
|
|
||||||
const DynamicField<T, SizeInc, SizeMult, SizeDiv>&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Read from Istream, discarding contents of existing DynamicField.
|
|
||||||
friend Istream& operator>> <T, SizeInc, SizeMult, SizeDiv>
|
|
||||||
(
|
|
||||||
Istream&,
|
|
||||||
DynamicField<T, SizeInc, SizeMult, SizeDiv>&
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
// checkTimeOptions.H
|
// checkTimeOptions.H
|
||||||
// ~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Foam::label startTime = 0;
|
Foam::label startTime = 0;
|
||||||
Foam::label endTime = Times.size();
|
Foam::label endTime = Times.size();
|
||||||
|
|
||||||
// unless -constant is present, skip startTime if it is "constant"
|
// unless -constant is present, skip startTime if it is "constant"
|
||||||
# include "checkConstantOption.H"
|
#include "checkConstantOption.H"
|
||||||
|
|
||||||
// check -time and -latestTime options
|
// check -time and -latestTime options
|
||||||
# include "checkTimeOption.H"
|
#include "checkTimeOption.H"
|
||||||
|
|||||||
@ -34,6 +34,9 @@ License
|
|||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
#include "polyMeshTetDecomposition.H"
|
#include "polyMeshTetDecomposition.H"
|
||||||
|
#include "indexedOctree.H"
|
||||||
|
#include "treeDataCell.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
|
||||||
#include "pointMesh.H"
|
#include "pointMesh.H"
|
||||||
|
|
||||||
|
|||||||
@ -55,6 +55,8 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
|
|||||||
|
|
||||||
const point& oCc = pC[oCI];
|
const point& oCc = pC[oCI];
|
||||||
|
|
||||||
|
List<scalar> tetQualities(2, 0.0);
|
||||||
|
|
||||||
forAll(f, faceBasePtI)
|
forAll(f, faceBasePtI)
|
||||||
{
|
{
|
||||||
scalar thisBaseMinTetQuality = VGREAT;
|
scalar thisBaseMinTetQuality = VGREAT;
|
||||||
@ -66,8 +68,6 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
|
|||||||
label facePtI = (tetPtI + faceBasePtI) % f.size();
|
label facePtI = (tetPtI + faceBasePtI) % f.size();
|
||||||
label otherFacePtI = f.fcIndex(facePtI);
|
label otherFacePtI = f.fcIndex(facePtI);
|
||||||
|
|
||||||
List<scalar> tetQualities(2, 0.0);
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// owner cell tet
|
// owner cell tet
|
||||||
label ptAI = f[facePtI];
|
label ptAI = f[facePtI];
|
||||||
|
|||||||
@ -35,6 +35,7 @@ License
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "diagTensor.H"
|
#include "diagTensor.H"
|
||||||
#include "transformField.H"
|
#include "transformField.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@ License
|
|||||||
#include "contiguous.H"
|
#include "contiguous.H"
|
||||||
#include "transform.H"
|
#include "transform.H"
|
||||||
#include "transformList.H"
|
#include "transformList.H"
|
||||||
|
#include "SubField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,8 @@ License
|
|||||||
|
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
#include "indexedOctree.H"
|
||||||
|
#include "treeDataCell.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -56,8 +56,6 @@ SourceFiles
|
|||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "edgeList.H"
|
#include "edgeList.H"
|
||||||
#include "pointField.H"
|
#include "pointField.H"
|
||||||
#include "SubField.H"
|
|
||||||
#include "SubList.H"
|
|
||||||
#include "faceList.H"
|
#include "faceList.H"
|
||||||
#include "cellList.H"
|
#include "cellList.H"
|
||||||
#include "cellShapeList.H"
|
#include "cellShapeList.H"
|
||||||
@ -65,16 +63,16 @@ SourceFiles
|
|||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "HashSet.H"
|
#include "HashSet.H"
|
||||||
#include "Map.H"
|
#include "Map.H"
|
||||||
#include "EdgeMap.H"
|
|
||||||
#include "boundBox.H"
|
|
||||||
#include "indexedOctree.H"
|
|
||||||
#include "treeDataCell.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward declaration of classes
|
||||||
|
class treeDataCell;
|
||||||
|
template<class Type> class indexedOctree;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class primitiveMesh Declaration
|
Class primitiveMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,7 +29,7 @@ License
|
|||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "SortableList.H"
|
#include "SortableList.H"
|
||||||
|
#include "EdgeMap.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,11 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
|
#include "indexedOctree.H"
|
||||||
|
#include "treeDataCell.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
#include "indexedOctree.H"
|
||||||
|
#include "treeDataCell.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
#include "primitiveMesh.H"
|
#include "primitiveMesh.H"
|
||||||
#include "cell.H"
|
#include "cell.H"
|
||||||
|
#include "boundBox.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
|||||||
cellVolumes_[0] = vols[ignCell];
|
cellVolumes_[0] = vols[ignCell];
|
||||||
|
|
||||||
scalar minDist = GREAT;
|
scalar minDist = GREAT;
|
||||||
label nearestCell = 0;
|
|
||||||
label nIgnCells = 1;
|
label nIgnCells = 1;
|
||||||
|
|
||||||
forAll(centres, celli)
|
forAll(centres, celli)
|
||||||
@ -60,7 +59,6 @@ void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh)
|
|||||||
|
|
||||||
if (dist < minDist)
|
if (dist < minDist)
|
||||||
{
|
{
|
||||||
nearestCell = celli;
|
|
||||||
minDist = dist;
|
minDist = dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,8 +39,10 @@ correction
|
|||||||
{
|
{
|
||||||
const fvMesh& mesh = this->mesh();
|
const fvMesh& mesh = this->mesh();
|
||||||
|
|
||||||
GeometricField<Type, pointPatchField, pointMesh> pvf =
|
GeometricField<Type, pointPatchField, pointMesh> pvf
|
||||||
volPointInterpolation::New(mesh).interpolate(vf);
|
(
|
||||||
|
volPointInterpolation::New(mesh).interpolate(vf)
|
||||||
|
);
|
||||||
|
|
||||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr =
|
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsfCorr =
|
||||||
linearInterpolate(vf);
|
linearInterpolate(vf);
|
||||||
|
|||||||
@ -654,8 +654,6 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange
|
|||||||
{
|
{
|
||||||
List<label> permutationIndices(nTrans, 0);
|
List<label> permutationIndices(nTrans, 0);
|
||||||
|
|
||||||
vector s = vector::zero;
|
|
||||||
|
|
||||||
if (nTrans == 0 && procI != Pstream::myProcNo())
|
if (nTrans == 0 && procI != Pstream::myProcNo())
|
||||||
{
|
{
|
||||||
treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI];
|
treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI];
|
||||||
|
|||||||
@ -32,6 +32,8 @@ Foam::label Foam::particle::particleCount_ = 0;
|
|||||||
|
|
||||||
const Foam::scalar Foam::particle::trackingCorrectionTol = 1e-5;
|
const Foam::scalar Foam::particle::trackingCorrectionTol = 1e-5;
|
||||||
|
|
||||||
|
const Foam::scalar Foam::particle::lambdaDistanceToleranceCoeff = 1e3*SMALL;
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(particle, 0);
|
defineTypeNameAndDebug(particle, 0);
|
||||||
|
|||||||
@ -164,7 +164,8 @@ protected:
|
|||||||
DynamicList<label>& faceList,
|
DynamicList<label>& faceList,
|
||||||
const tetPointRef& tet,
|
const tetPointRef& tet,
|
||||||
const FixedList<vector, 4>& tetAreas,
|
const FixedList<vector, 4>& tetAreas,
|
||||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||||
|
const scalar tol
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Find the lambda value for the line to-from across the
|
//- Find the lambda value for the line to-from across the
|
||||||
@ -178,7 +179,8 @@ protected:
|
|||||||
const label tetPlaneBasePtI,
|
const label tetPlaneBasePtI,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI,
|
||||||
|
const scalar tol
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Find the lambda value for a moving tri face
|
//- Find the lambda value for a moving tri face
|
||||||
@ -191,7 +193,8 @@ protected:
|
|||||||
const label tetPlaneBasePtI,
|
const label tetPlaneBasePtI,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI,
|
||||||
|
const scalar tol
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Modify the tet owner data by crossing triI
|
//- Modify the tet owner data by crossing triI
|
||||||
@ -291,6 +294,10 @@ public:
|
|||||||
// 'rescue' it from a tracking problem
|
// 'rescue' it from a tracking problem
|
||||||
static const scalar trackingCorrectionTol;
|
static const scalar trackingCorrectionTol;
|
||||||
|
|
||||||
|
//- Fraction of the cell volume to use in determining tolerance values
|
||||||
|
// for the denominator and numerator of lambda
|
||||||
|
static const scalar lambdaDistanceToleranceCoeff;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,8 @@ inline void Foam::particle::findTris
|
|||||||
DynamicList<label>& faceList,
|
DynamicList<label>& faceList,
|
||||||
const tetPointRef& tet,
|
const tetPointRef& tet,
|
||||||
const FixedList<vector, 4>& tetAreas,
|
const FixedList<vector, 4>& tetAreas,
|
||||||
const FixedList<label, 4>& tetPlaneBasePtIs
|
const FixedList<label, 4>& tetPlaneBasePtIs,
|
||||||
|
const scalar tol
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
faceList.clear();
|
faceList.clear();
|
||||||
@ -52,7 +53,8 @@ inline void Foam::particle::findTris
|
|||||||
tetPlaneBasePtIs[i],
|
tetPlaneBasePtIs[i],
|
||||||
cellI_,
|
cellI_,
|
||||||
tetFaceI_,
|
tetFaceI_,
|
||||||
tetPtI_
|
tetPtI_,
|
||||||
|
tol
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((lambda > 0.0) && (lambda < 1.0))
|
if ((lambda > 0.0) && (lambda < 1.0))
|
||||||
@ -72,7 +74,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
|||||||
const label tetPlaneBasePtI,
|
const label tetPlaneBasePtI,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI,
|
||||||
|
const scalar tol
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const pointField& pPts = mesh_.points();
|
const pointField& pPts = mesh_.points();
|
||||||
@ -88,7 +91,8 @@ inline Foam::scalar Foam::particle::tetLambda
|
|||||||
tetPlaneBasePtI,
|
tetPlaneBasePtI,
|
||||||
cellI,
|
cellI,
|
||||||
tetFaceI,
|
tetFaceI,
|
||||||
tetPtI
|
tetPtI,
|
||||||
|
tol
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,12 +101,17 @@ inline Foam::scalar Foam::particle::tetLambda
|
|||||||
scalar lambdaNumerator = (base - from) & n;
|
scalar lambdaNumerator = (base - from) & n;
|
||||||
scalar lambdaDenominator = (to - from) & n;
|
scalar lambdaDenominator = (to - from) & n;
|
||||||
|
|
||||||
if (mag(lambdaDenominator) < SMALL)
|
// n carries the area of the tet faces, so the dot product with a
|
||||||
|
// delta-length has the units of volume. Comparing the component of each
|
||||||
|
// delta-length in the direction of n times the face area to a fraction of
|
||||||
|
// the cell volume.
|
||||||
|
|
||||||
|
if (mag(lambdaDenominator) < tol)
|
||||||
{
|
{
|
||||||
if (mag(lambdaNumerator) < SMALL)
|
if (mag(lambdaNumerator) < tol)
|
||||||
{
|
{
|
||||||
// Track starts on the face, and is potentially
|
// Track starts on the face, and is potentially
|
||||||
// parallel to it. +-SMALL/+-SMALL is not a good
|
// parallel to it. +-tol/+-tol is not a good
|
||||||
// comparison, return 0.0, in anticipation of tet
|
// comparison, return 0.0, in anticipation of tet
|
||||||
// centre correction.
|
// centre correction.
|
||||||
|
|
||||||
@ -110,10 +119,11 @@ inline Foam::scalar Foam::particle::tetLambda
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mag((to - from)) < SMALL)
|
if (mag((to - from)) < tol/mag(n))
|
||||||
{
|
{
|
||||||
// Zero length track, not along the face, face
|
// 'Zero' length track (compared to the tolerance, which is
|
||||||
// cannot be crossed.
|
// based on the cell volume, divided by the tet face area), not
|
||||||
|
// along the face, face cannot be crossed.
|
||||||
|
|
||||||
return GREAT;
|
return GREAT;
|
||||||
}
|
}
|
||||||
@ -139,7 +149,8 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
|||||||
const label tetPlaneBasePtI,
|
const label tetPlaneBasePtI,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const label tetFaceI,
|
const label tetFaceI,
|
||||||
const label tetPtI
|
const label tetPtI,
|
||||||
|
const scalar tol
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const pointField& pPts = mesh_.points();
|
const pointField& pPts = mesh_.points();
|
||||||
@ -291,12 +302,12 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mag(lambdaDenominator) < SMALL)
|
if (mag(lambdaDenominator) < tol)
|
||||||
{
|
{
|
||||||
if (mag(lambdaNumerator) < SMALL)
|
if (mag(lambdaNumerator) < tol)
|
||||||
{
|
{
|
||||||
// Track starts on the face, and is potentially
|
// Track starts on the face, and is potentially
|
||||||
// parallel to it. +-SMALL)/+-SMALL is not a good
|
// parallel to it. +-tol)/+-tol is not a good
|
||||||
// comparison, return 0.0, in anticipation of tet
|
// comparison, return 0.0, in anticipation of tet
|
||||||
// centre correction.
|
// centre correction.
|
||||||
|
|
||||||
@ -304,7 +315,7 @@ inline Foam::scalar Foam::particle::movingTetLambda
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mag((to - from)) < SMALL)
|
if (mag((to - from)) < tol/mag(n))
|
||||||
{
|
{
|
||||||
// Zero length track, not along the face, face
|
// Zero length track, not along the face, face
|
||||||
// cannot be crossed.
|
// cannot be crossed.
|
||||||
|
|||||||
@ -30,6 +30,7 @@ License
|
|||||||
#include "symmetryPolyPatch.H"
|
#include "symmetryPolyPatch.H"
|
||||||
#include "wallPolyPatch.H"
|
#include "wallPolyPatch.H"
|
||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
|
#include "meshTools.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -285,6 +286,11 @@ Foam::scalar Foam::particle::trackToFace
|
|||||||
// be a different tet to the one that the particle occupies.
|
// be a different tet to the one that the particle occupies.
|
||||||
tetIndices faceHitTetIs;
|
tetIndices faceHitTetIs;
|
||||||
|
|
||||||
|
// What tolerance is appropriate the minimum lambda numerator and
|
||||||
|
// denominator for tracking in this cell.
|
||||||
|
scalar lambdaDistanceTolerance =
|
||||||
|
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (triI != -1)
|
if (triI != -1)
|
||||||
@ -370,7 +376,15 @@ Foam::scalar Foam::particle::trackToFace
|
|||||||
tetPlaneBasePtIs[2] = basePtI;
|
tetPlaneBasePtIs[2] = basePtI;
|
||||||
tetPlaneBasePtIs[3] = basePtI;
|
tetPlaneBasePtIs[3] = basePtI;
|
||||||
|
|
||||||
findTris(endPosition, tris, tet, tetAreas, tetPlaneBasePtIs);
|
findTris
|
||||||
|
(
|
||||||
|
endPosition,
|
||||||
|
tris,
|
||||||
|
tet,
|
||||||
|
tetAreas,
|
||||||
|
tetPlaneBasePtIs,
|
||||||
|
lambdaDistanceTolerance
|
||||||
|
);
|
||||||
|
|
||||||
// Reset variables for new track
|
// Reset variables for new track
|
||||||
triI = -1;
|
triI = -1;
|
||||||
@ -414,7 +428,8 @@ Foam::scalar Foam::particle::trackToFace
|
|||||||
tetPlaneBasePtIs[tI],
|
tetPlaneBasePtIs[tI],
|
||||||
cellI_,
|
cellI_,
|
||||||
tetFaceI_,
|
tetFaceI_,
|
||||||
tetPtI_
|
tetPtI_,
|
||||||
|
lambdaDistanceTolerance
|
||||||
);
|
);
|
||||||
|
|
||||||
if (lam < lambdaMin)
|
if (lam < lambdaMin)
|
||||||
@ -463,7 +478,7 @@ Foam::scalar Foam::particle::trackToFace
|
|||||||
// << origId_ << " " << origProc_<< nl
|
// << origId_ << " " << origProc_<< nl
|
||||||
// << "# face: " << tetFaceI_ << nl
|
// << "# face: " << tetFaceI_ << nl
|
||||||
// << "# tetPtI: " << tetPtI_ << nl
|
// << "# tetPtI: " << tetPtI_ << nl
|
||||||
// << "# tetBasePtI: " << mesh.tetBasePtIs()[tetFaceI_] << nl
|
// << "# tetBasePtI: " << mesh_.tetBasePtIs()[tetFaceI_] << nl
|
||||||
// << "# tet.mag(): " << tet.mag() << nl
|
// << "# tet.mag(): " << tet.mag() << nl
|
||||||
// << "# tet.quality(): " << tet.quality()
|
// << "# tet.quality(): " << tet.quality()
|
||||||
// << endl;
|
// << endl;
|
||||||
@ -703,6 +718,9 @@ void Foam::particle::hitWallFaces
|
|||||||
|
|
||||||
const Foam::cell& thisCell = mesh_.cells()[cellI_];
|
const Foam::cell& thisCell = mesh_.cells()[cellI_];
|
||||||
|
|
||||||
|
scalar lambdaDistanceTolerance =
|
||||||
|
lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_];
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
forAll(thisCell, cFI)
|
forAll(thisCell, cFI)
|
||||||
@ -754,7 +772,8 @@ void Foam::particle::hitWallFaces
|
|||||||
f[tetIs.faceBasePt()],
|
f[tetIs.faceBasePt()],
|
||||||
cellI_,
|
cellI_,
|
||||||
fI,
|
fI,
|
||||||
tetIs.tetPt()
|
tetIs.tetPt(),
|
||||||
|
lambdaDistanceTolerance
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((tetClambda <= 0.0) || (tetClambda >= 1.0))
|
if ((tetClambda <= 0.0) || (tetClambda >= 1.0))
|
||||||
@ -780,7 +799,8 @@ void Foam::particle::hitWallFaces
|
|||||||
f[tetIs.faceBasePt()],
|
f[tetIs.faceBasePt()],
|
||||||
cellI_,
|
cellI_,
|
||||||
fI,
|
fI,
|
||||||
tetIs.tetPt()
|
tetIs.tetPt(),
|
||||||
|
lambdaDistanceTolerance
|
||||||
);
|
);
|
||||||
|
|
||||||
pointHit hitInfo(vector::zero);
|
pointHit hitInfo(vector::zero);
|
||||||
|
|||||||
@ -440,7 +440,6 @@ void Foam::parcel::updateParcelProperties
|
|||||||
scalar oldhv = fuels.hl(pg, T(), X());
|
scalar oldhv = fuels.hl(pg, T(), X());
|
||||||
scalar Np = N(oldDensity);
|
scalar Np = N(oldDensity);
|
||||||
|
|
||||||
scalar newDensity = oldDensity;
|
|
||||||
scalar newMass = oldMass;
|
scalar newMass = oldMass;
|
||||||
scalar newhg = oldhg;
|
scalar newhg = oldhg;
|
||||||
scalar newhv = oldhv;
|
scalar newhv = oldhv;
|
||||||
@ -460,7 +459,6 @@ void Foam::parcel::updateParcelProperties
|
|||||||
// first time
|
// first time
|
||||||
if (n > 1)
|
if (n > 1)
|
||||||
{
|
{
|
||||||
newDensity = fuels.rho(pg, Tnew, X());
|
|
||||||
newMass = m();
|
newMass = m();
|
||||||
newhg = 0.0;
|
newhg = 0.0;
|
||||||
scalarField Ynew(fuels.Y(X()));
|
scalarField Ynew(fuels.Y(X()));
|
||||||
|
|||||||
@ -112,11 +112,10 @@ void Foam::LISA::atomizeParcel
|
|||||||
vector uDir = p.U()/mag(p.U());
|
vector uDir = p.U()/mag(p.U());
|
||||||
|
|
||||||
scalar uGas = mag(vel & uDir);
|
scalar uGas = mag(vel & uDir);
|
||||||
vector Ug = uGas*uDir;
|
|
||||||
|
|
||||||
// Might be the relative velocity between Liquid and Gas, but using the
|
// Might be the relative velocity between Liquid and Gas, but using the
|
||||||
// absolute velocity of the parcel as suggested by the authors
|
// absolute velocity of the parcel as suggested by the authors
|
||||||
// scalar U = mag(p.Urel(vel));
|
// scalar U = mag(p.Urel(vel));
|
||||||
scalar U = mag(p.U());
|
scalar U = mag(p.U());
|
||||||
|
|
||||||
p.ct() += deltaT;
|
p.ct() += deltaT;
|
||||||
|
|||||||
@ -118,9 +118,6 @@ void Foam::SHF::breakupParcel
|
|||||||
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
|
scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid);
|
||||||
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
|
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
|
||||||
|
|
||||||
vector acceleration = p.Urel(vel)/p.tMom();
|
|
||||||
vector trajectory = p.U()/mag(p.U());
|
|
||||||
|
|
||||||
vector vRel = p.Urel(vel);
|
vector vRel = p.Urel(vel);
|
||||||
|
|
||||||
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
|
scalar weGasCorr = weGas/(1.0 + weCorrCoeff_*ohnesorge);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -246,9 +246,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar hOLD = -100.0;
|
|
||||||
scalar xOLD = -100.0;
|
|
||||||
|
|
||||||
label i;
|
label i;
|
||||||
|
|
||||||
for (i=0; i<20; i++)
|
for (i=0; i<20; i++)
|
||||||
@ -267,10 +264,6 @@ void Foam::blobsSwirlInjector::calculateHX
|
|||||||
);
|
);
|
||||||
|
|
||||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||||
|
|
||||||
hOLD = h_;
|
|
||||||
xOLD = x_;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
x_ = sqr(1.0 - 2.0*h_/injectorDiameter);
|
||||||
|
|||||||
@ -607,12 +607,17 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
|||||||
pPtr->rho()
|
pPtr->rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add the new parcel
|
if (pPtr->move(td, dt))
|
||||||
|
{
|
||||||
td.cloud().addParticle(pPtr);
|
td.cloud().addParticle(pPtr);
|
||||||
|
|
||||||
massAdded += pPtr->nParticle()*pPtr->mass();
|
massAdded += pPtr->nParticle()*pPtr->mass();
|
||||||
parcelsAdded++;
|
parcelsAdded++;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delete pPtr;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -163,13 +163,14 @@ void Foam::NonInertialFrameForce<CloudType>::cacheFields(const bool store)
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
uniformDimensionedVectorField omegaDot = this->mesh().template
|
uniformDimensionedVectorField centreOfRotation =
|
||||||
|
this->mesh().template
|
||||||
lookupObject<uniformDimensionedVectorField>
|
lookupObject<uniformDimensionedVectorField>
|
||||||
(
|
(
|
||||||
centreOfRotationName_
|
centreOfRotationName_
|
||||||
);
|
);
|
||||||
|
|
||||||
centreOfRotation_ = omegaDot.value();
|
centreOfRotation_ = centreOfRotation.value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,7 +188,7 @@ Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled
|
|||||||
{
|
{
|
||||||
forceSuSp value(vector::zero, 0.0);
|
forceSuSp value(vector::zero, 0.0);
|
||||||
|
|
||||||
const vector& r = p.position() - centreOfRotation_;
|
const vector r = p.position() - centreOfRotation_;
|
||||||
|
|
||||||
value.Su() =
|
value.Su() =
|
||||||
mass
|
mass
|
||||||
|
|||||||
@ -4,6 +4,7 @@ autoHexMeshDriver = $(autoHexMesh)/autoHexMeshDriver
|
|||||||
$(autoHexMeshDriver)/autoLayerDriver.C
|
$(autoHexMeshDriver)/autoLayerDriver.C
|
||||||
$(autoHexMeshDriver)/autoLayerDriverShrink.C
|
$(autoHexMeshDriver)/autoLayerDriverShrink.C
|
||||||
$(autoHexMeshDriver)/autoSnapDriver.C
|
$(autoHexMeshDriver)/autoSnapDriver.C
|
||||||
|
$(autoHexMeshDriver)/autoSnapDriverFeature.C
|
||||||
$(autoHexMeshDriver)/autoRefineDriver.C
|
$(autoHexMeshDriver)/autoRefineDriver.C
|
||||||
|
|
||||||
$(autoHexMeshDriver)/layerParameters/layerParameters.C
|
$(autoHexMeshDriver)/layerParameters/layerParameters.C
|
||||||
@ -16,6 +17,7 @@ $(autoHexMesh)/meshRefinement/meshRefinement.C
|
|||||||
$(autoHexMesh)/meshRefinement/meshRefinementMerge.C
|
$(autoHexMesh)/meshRefinement/meshRefinementMerge.C
|
||||||
$(autoHexMesh)/meshRefinement/meshRefinementProblemCells.C
|
$(autoHexMesh)/meshRefinement/meshRefinementProblemCells.C
|
||||||
$(autoHexMesh)/meshRefinement/meshRefinementRefine.C
|
$(autoHexMesh)/meshRefinement/meshRefinementRefine.C
|
||||||
|
$(autoHexMesh)/refinementFeatures/refinementFeatures.C
|
||||||
$(autoHexMesh)/refinementSurfaces/refinementSurfaces.C
|
$(autoHexMesh)/refinementSurfaces/refinementSurfaces.C
|
||||||
$(autoHexMesh)/shellSurfaces/shellSurfaces.C
|
$(autoHexMesh)/shellSurfaces/shellSurfaces.C
|
||||||
$(autoHexMesh)/trackedParticle/trackedParticle.C
|
$(autoHexMesh)/trackedParticle/trackedParticle.C
|
||||||
|
|||||||
@ -59,622 +59,6 @@ defineTypeNameAndDebug(autoLayerDriver, 0);
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::label Foam::autoLayerDriver::mergePatchFacesUndo
|
|
||||||
(
|
|
||||||
const scalar minCos,
|
|
||||||
const scalar concaveCos,
|
|
||||||
const dictionary& motionDict
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
// Patch face merging engine
|
|
||||||
combineFaces faceCombiner(mesh, true);
|
|
||||||
|
|
||||||
// Pick up all candidate cells on boundary
|
|
||||||
labelHashSet boundaryCells(mesh.nFaces()-mesh.nInternalFaces());
|
|
||||||
|
|
||||||
{
|
|
||||||
labelList patchIDs(meshRefiner_.meshedPatches());
|
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
|
||||||
|
|
||||||
forAll(patchIDs, i)
|
|
||||||
{
|
|
||||||
label patchI = patchIDs[i];
|
|
||||||
|
|
||||||
const polyPatch& patch = patches[patchI];
|
|
||||||
|
|
||||||
if (!patch.coupled())
|
|
||||||
{
|
|
||||||
forAll(patch, i)
|
|
||||||
{
|
|
||||||
boundaryCells.insert(mesh.faceOwner()[patch.start()+i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get all sets of faces that can be merged
|
|
||||||
labelListList allFaceSets
|
|
||||||
(
|
|
||||||
faceCombiner.getMergeSets
|
|
||||||
(
|
|
||||||
minCos,
|
|
||||||
concaveCos,
|
|
||||||
boundaryCells
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
label nFaceSets = returnReduce(allFaceSets.size(), sumOp<label>());
|
|
||||||
|
|
||||||
Info<< "Merging " << nFaceSets << " sets of faces." << nl << endl;
|
|
||||||
|
|
||||||
if (nFaceSets > 0)
|
|
||||||
{
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
faceSet allSets(mesh, "allFaceSets", allFaceSets.size());
|
|
||||||
forAll(allFaceSets, setI)
|
|
||||||
{
|
|
||||||
forAll(allFaceSets[setI], i)
|
|
||||||
{
|
|
||||||
allSets.insert(allFaceSets[setI][i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Pout<< "Writing all faces to be merged to set "
|
|
||||||
<< allSets.objectPath() << endl;
|
|
||||||
allSets.instance() = mesh.time().timeName();
|
|
||||||
allSets.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Topology changes container
|
|
||||||
polyTopoChange meshMod(mesh);
|
|
||||||
|
|
||||||
// Merge all faces of a set into the first face of the set.
|
|
||||||
faceCombiner.setRefinement(allFaceSets, meshMod);
|
|
||||||
|
|
||||||
// Experimental: store data for all the points that have been deleted
|
|
||||||
meshRefiner_.storeData
|
|
||||||
(
|
|
||||||
faceCombiner.savedPointLabels(), // points to store
|
|
||||||
labelList(0), // faces to store
|
|
||||||
labelList(0) // cells to store
|
|
||||||
);
|
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false, true);
|
|
||||||
|
|
||||||
// Update fields
|
|
||||||
mesh.updateMesh(map);
|
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
|
||||||
if (map().hasMotionPoints())
|
|
||||||
{
|
|
||||||
mesh.movePoints(map().preMotionPoints());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Delete mesh volumes.
|
|
||||||
mesh.clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
faceCombiner.updateMesh(map);
|
|
||||||
|
|
||||||
meshRefiner_.updateMesh(map, labelList(0));
|
|
||||||
|
|
||||||
|
|
||||||
for (label iteration = 0; iteration < 100; iteration++)
|
|
||||||
{
|
|
||||||
Info<< nl
|
|
||||||
<< "Undo iteration " << iteration << nl
|
|
||||||
<< "----------------" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Check mesh for errors
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
faceSet errorFaces
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
"errorFaces",
|
|
||||||
mesh.nFaces()-mesh.nInternalFaces()
|
|
||||||
);
|
|
||||||
bool hasErrors = motionSmoother::checkMesh
|
|
||||||
(
|
|
||||||
false, // report
|
|
||||||
mesh,
|
|
||||||
motionDict,
|
|
||||||
errorFaces
|
|
||||||
);
|
|
||||||
|
|
||||||
//if (checkEdgeConnectivity)
|
|
||||||
//{
|
|
||||||
// Info<< "Checking edge-face connectivity (duplicate faces"
|
|
||||||
// << " or non-consecutive shared vertices)" << endl;
|
|
||||||
//
|
|
||||||
// label nOldSize = errorFaces.size();
|
|
||||||
//
|
|
||||||
// hasErrors =
|
|
||||||
// mesh.checkFaceFaces
|
|
||||||
// (
|
|
||||||
// false,
|
|
||||||
// &errorFaces
|
|
||||||
// )
|
|
||||||
// || hasErrors;
|
|
||||||
//
|
|
||||||
// Info<< "Detected additional "
|
|
||||||
// << returnReduce
|
|
||||||
// (
|
|
||||||
// errorFaces.size() - nOldSize,
|
|
||||||
// sumOp<label>()
|
|
||||||
// )
|
|
||||||
// << " faces with illegal face-face connectivity"
|
|
||||||
// << endl;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (!hasErrors)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
errorFaces.instance() = mesh.time().timeName();
|
|
||||||
Pout<< "Writing all faces in error to faceSet "
|
|
||||||
<< errorFaces.objectPath() << nl << endl;
|
|
||||||
errorFaces.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Check any master cells for using any of the error faces
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
DynamicList<label> mastersToRestore(allFaceSets.size());
|
|
||||||
|
|
||||||
forAll(allFaceSets, setI)
|
|
||||||
{
|
|
||||||
label masterFaceI = faceCombiner.masterFace()[setI];
|
|
||||||
|
|
||||||
if (masterFaceI != -1)
|
|
||||||
{
|
|
||||||
label masterCellII = mesh.faceOwner()[masterFaceI];
|
|
||||||
|
|
||||||
const cell& cFaces = mesh.cells()[masterCellII];
|
|
||||||
|
|
||||||
forAll(cFaces, i)
|
|
||||||
{
|
|
||||||
if (errorFaces.found(cFaces[i]))
|
|
||||||
{
|
|
||||||
mastersToRestore.append(masterFaceI);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mastersToRestore.shrink();
|
|
||||||
|
|
||||||
label nRestore = returnReduce
|
|
||||||
(
|
|
||||||
mastersToRestore.size(),
|
|
||||||
sumOp<label>()
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Masters that need to be restored:"
|
|
||||||
<< nRestore << endl;
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
faceSet restoreSet(mesh, "mastersToRestore", mastersToRestore);
|
|
||||||
restoreSet.instance() = mesh.time().timeName();
|
|
||||||
Pout<< "Writing all " << mastersToRestore.size()
|
|
||||||
<< " masterfaces to be restored to set "
|
|
||||||
<< restoreSet.objectPath() << endl;
|
|
||||||
restoreSet.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (nRestore == 0)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Undo
|
|
||||||
// ~~~~
|
|
||||||
|
|
||||||
// Topology changes container
|
|
||||||
polyTopoChange meshMod(mesh);
|
|
||||||
|
|
||||||
// Merge all faces of a set into the first face of the set.
|
|
||||||
// Experimental:mark all points/faces/cells that have been restored.
|
|
||||||
Map<label> restoredPoints(0);
|
|
||||||
Map<label> restoredFaces(0);
|
|
||||||
Map<label> restoredCells(0);
|
|
||||||
|
|
||||||
faceCombiner.setUnrefinement
|
|
||||||
(
|
|
||||||
mastersToRestore,
|
|
||||||
meshMod,
|
|
||||||
restoredPoints,
|
|
||||||
restoredFaces,
|
|
||||||
restoredCells
|
|
||||||
);
|
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false, true);
|
|
||||||
|
|
||||||
// Update fields
|
|
||||||
mesh.updateMesh(map);
|
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
|
||||||
if (map().hasMotionPoints())
|
|
||||||
{
|
|
||||||
mesh.movePoints(map().preMotionPoints());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Delete mesh volumes.
|
|
||||||
mesh.clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
faceCombiner.updateMesh(map);
|
|
||||||
|
|
||||||
// Renumber restore maps
|
|
||||||
inplaceMapKey(map().reversePointMap(), restoredPoints);
|
|
||||||
inplaceMapKey(map().reverseFaceMap(), restoredFaces);
|
|
||||||
inplaceMapKey(map().reverseCellMap(), restoredCells);
|
|
||||||
|
|
||||||
// Experimental:restore all points/face/cells in maps
|
|
||||||
meshRefiner_.updateMesh
|
|
||||||
(
|
|
||||||
map,
|
|
||||||
labelList(0), // changedFaces
|
|
||||||
restoredPoints,
|
|
||||||
restoredFaces,
|
|
||||||
restoredCells
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "Writing merged-faces mesh to time "
|
|
||||||
<< meshRefiner_.timeName() << nl << endl;
|
|
||||||
mesh.write();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< "No faces merged ..." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nFaceSets;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Remove points. pointCanBeDeleted is parallel synchronised.
|
|
||||||
Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRemovePoints
|
|
||||||
(
|
|
||||||
removePoints& pointRemover,
|
|
||||||
const boolList& pointCanBeDeleted
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
// Topology changes container
|
|
||||||
polyTopoChange meshMod(mesh);
|
|
||||||
|
|
||||||
pointRemover.setRefinement(pointCanBeDeleted, meshMod);
|
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false, true);
|
|
||||||
|
|
||||||
// Update fields
|
|
||||||
mesh.updateMesh(map);
|
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
|
||||||
if (map().hasMotionPoints())
|
|
||||||
{
|
|
||||||
mesh.movePoints(map().preMotionPoints());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Delete mesh volumes.
|
|
||||||
mesh.clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
pointRemover.updateMesh(map);
|
|
||||||
meshRefiner_.updateMesh(map, labelList(0));
|
|
||||||
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Restore faces (which contain removed points)
|
|
||||||
Foam::autoPtr<Foam::mapPolyMesh> Foam::autoLayerDriver::doRestorePoints
|
|
||||||
(
|
|
||||||
removePoints& pointRemover,
|
|
||||||
const labelList& facesToRestore
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
// Topology changes container
|
|
||||||
polyTopoChange meshMod(mesh);
|
|
||||||
|
|
||||||
// Determine sets of points and faces to restore
|
|
||||||
labelList localFaces, localPoints;
|
|
||||||
pointRemover.getUnrefimentSet
|
|
||||||
(
|
|
||||||
facesToRestore,
|
|
||||||
localFaces,
|
|
||||||
localPoints
|
|
||||||
);
|
|
||||||
|
|
||||||
// Undo the changes on the faces that are in error.
|
|
||||||
pointRemover.setUnrefinement
|
|
||||||
(
|
|
||||||
localFaces,
|
|
||||||
localPoints,
|
|
||||||
meshMod
|
|
||||||
);
|
|
||||||
|
|
||||||
// Change the mesh (no inflation)
|
|
||||||
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, false, true);
|
|
||||||
|
|
||||||
// Update fields
|
|
||||||
mesh.updateMesh(map);
|
|
||||||
|
|
||||||
// Move mesh (since morphing does not do this)
|
|
||||||
if (map().hasMotionPoints())
|
|
||||||
{
|
|
||||||
mesh.movePoints(map().preMotionPoints());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Delete mesh volumes.
|
|
||||||
mesh.clearOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
pointRemover.updateMesh(map);
|
|
||||||
meshRefiner_.updateMesh(map, labelList(0));
|
|
||||||
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Collect all faces that are both in candidateFaces and in the set.
|
|
||||||
// If coupled face also collects the coupled face.
|
|
||||||
Foam::labelList Foam::autoLayerDriver::collectFaces
|
|
||||||
(
|
|
||||||
const labelList& candidateFaces,
|
|
||||||
const labelHashSet& set
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
// Has face been selected?
|
|
||||||
boolList selected(mesh.nFaces(), false);
|
|
||||||
|
|
||||||
forAll(candidateFaces, i)
|
|
||||||
{
|
|
||||||
label faceI = candidateFaces[i];
|
|
||||||
|
|
||||||
if (set.found(faceI))
|
|
||||||
{
|
|
||||||
selected[faceI] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
syncTools::syncFaceList
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
selected,
|
|
||||||
orEqOp<bool>() // combine operator
|
|
||||||
);
|
|
||||||
|
|
||||||
labelList selectedFaces(findIndices(selected, true));
|
|
||||||
|
|
||||||
return selectedFaces;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Pick up faces of cells of faces in set.
|
|
||||||
Foam::labelList Foam::autoLayerDriver::growFaceCellFace
|
|
||||||
(
|
|
||||||
const labelHashSet& set
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
const fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
boolList selected(mesh.nFaces(), false);
|
|
||||||
|
|
||||||
forAllConstIter(faceSet, set, iter)
|
|
||||||
{
|
|
||||||
label faceI = iter.key();
|
|
||||||
|
|
||||||
label own = mesh.faceOwner()[faceI];
|
|
||||||
|
|
||||||
const cell& ownFaces = mesh.cells()[own];
|
|
||||||
forAll(ownFaces, ownFaceI)
|
|
||||||
{
|
|
||||||
selected[ownFaces[ownFaceI]] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mesh.isInternalFace(faceI))
|
|
||||||
{
|
|
||||||
label nbr = mesh.faceNeighbour()[faceI];
|
|
||||||
|
|
||||||
const cell& nbrFaces = mesh.cells()[nbr];
|
|
||||||
forAll(nbrFaces, nbrFaceI)
|
|
||||||
{
|
|
||||||
selected[nbrFaces[nbrFaceI]] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
syncTools::syncFaceList
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
selected,
|
|
||||||
orEqOp<bool>() // combine operator
|
|
||||||
);
|
|
||||||
return findIndices(selected, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Remove points not used by any face or points used by only two faces where
|
|
||||||
// the edges are in line
|
|
||||||
Foam::label Foam::autoLayerDriver::mergeEdgesUndo
|
|
||||||
(
|
|
||||||
const scalar minCos,
|
|
||||||
const dictionary& motionDict
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fvMesh& mesh = meshRefiner_.mesh();
|
|
||||||
|
|
||||||
Info<< nl
|
|
||||||
<< "Merging all points on surface that" << nl
|
|
||||||
<< "- are used by only two boundary faces and" << nl
|
|
||||||
<< "- make an angle with a cosine of more than " << minCos
|
|
||||||
<< "." << nl << endl;
|
|
||||||
|
|
||||||
// Point removal analysis engine with undo
|
|
||||||
removePoints pointRemover(mesh, true);
|
|
||||||
|
|
||||||
// Count usage of points
|
|
||||||
boolList pointCanBeDeleted;
|
|
||||||
label nRemove = pointRemover.countPointUsage(minCos, pointCanBeDeleted);
|
|
||||||
|
|
||||||
if (nRemove > 0)
|
|
||||||
{
|
|
||||||
Info<< "Removing " << nRemove
|
|
||||||
<< " straight edge points ..." << nl << endl;
|
|
||||||
|
|
||||||
// Remove points
|
|
||||||
// ~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
doRemovePoints(pointRemover, pointCanBeDeleted);
|
|
||||||
|
|
||||||
|
|
||||||
for (label iteration = 0; iteration < 100; iteration++)
|
|
||||||
{
|
|
||||||
Info<< nl
|
|
||||||
<< "Undo iteration " << iteration << nl
|
|
||||||
<< "----------------" << endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Check mesh for errors
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
faceSet errorFaces
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
"errorFaces",
|
|
||||||
mesh.nFaces()-mesh.nInternalFaces()
|
|
||||||
);
|
|
||||||
bool hasErrors = motionSmoother::checkMesh
|
|
||||||
(
|
|
||||||
false, // report
|
|
||||||
mesh,
|
|
||||||
motionDict,
|
|
||||||
errorFaces
|
|
||||||
);
|
|
||||||
//if (checkEdgeConnectivity)
|
|
||||||
//{
|
|
||||||
// Info<< "Checking edge-face connectivity (duplicate faces"
|
|
||||||
// << " or non-consecutive shared vertices)" << endl;
|
|
||||||
//
|
|
||||||
// label nOldSize = errorFaces.size();
|
|
||||||
//
|
|
||||||
// hasErrors =
|
|
||||||
// mesh.checkFaceFaces
|
|
||||||
// (
|
|
||||||
// false,
|
|
||||||
// &errorFaces
|
|
||||||
// )
|
|
||||||
// || hasErrors;
|
|
||||||
//
|
|
||||||
// Info<< "Detected additional "
|
|
||||||
// << returnReduce(errorFaces.size()-nOldSize,sumOp<label>())
|
|
||||||
// << " faces with illegal face-face connectivity"
|
|
||||||
// << endl;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (!hasErrors)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
errorFaces.instance() = mesh.time().timeName();
|
|
||||||
Pout<< "**Writing all faces in error to faceSet "
|
|
||||||
<< errorFaces.objectPath() << nl << endl;
|
|
||||||
errorFaces.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
labelList masterErrorFaces
|
|
||||||
(
|
|
||||||
collectFaces
|
|
||||||
(
|
|
||||||
pointRemover.savedFaceLabels(),
|
|
||||||
errorFaces
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
label n = returnReduce(masterErrorFaces.size(), sumOp<label>());
|
|
||||||
|
|
||||||
Info<< "Detected " << n
|
|
||||||
<< " error faces on boundaries that have been merged."
|
|
||||||
<< " These will be restored to their original faces." << nl
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
if (n == 0)
|
|
||||||
{
|
|
||||||
if (hasErrors)
|
|
||||||
{
|
|
||||||
Info<< "Detected "
|
|
||||||
<< returnReduce(errorFaces.size(), sumOp<label>())
|
|
||||||
<< " error faces in mesh."
|
|
||||||
<< " Restoring neighbours of faces in error." << nl
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
labelList expandedErrorFaces
|
|
||||||
(
|
|
||||||
growFaceCellFace
|
|
||||||
(
|
|
||||||
errorFaces
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
doRestorePoints(pointRemover, expandedErrorFaces);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
doRestorePoints(pointRemover, masterErrorFaces);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "Writing merged-edges mesh to time "
|
|
||||||
<< meshRefiner_.timeName() << nl << endl;
|
|
||||||
mesh.write();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< "No straight edges simplified and no points removed ..." << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nRemove;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// For debugging: Dump displacement to .obj files
|
// For debugging: Dump displacement to .obj files
|
||||||
void Foam::autoLayerDriver::dumpDisplacement
|
void Foam::autoLayerDriver::dumpDisplacement
|
||||||
(
|
(
|
||||||
@ -793,7 +177,7 @@ void Foam::autoLayerDriver::checkMeshManifold() const
|
|||||||
<< " points where this happens to pointSet "
|
<< " points where this happens to pointSet "
|
||||||
<< nonManifoldPoints.name() << endl;
|
<< nonManifoldPoints.name() << endl;
|
||||||
|
|
||||||
nonManifoldPoints.instance() = mesh.time().timeName();
|
nonManifoldPoints.instance() = meshRefiner_.timeName();
|
||||||
nonManifoldPoints.write();
|
nonManifoldPoints.write();
|
||||||
}
|
}
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
@ -1080,7 +464,6 @@ void Foam::autoLayerDriver::handleWarpedFaces
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//// No extrusion on cells with multiple patch faces. There ususally is a reason
|
//// No extrusion on cells with multiple patch faces. There ususally is a reason
|
||||||
//// why combinePatchFaces hasn't succeeded.
|
//// why combinePatchFaces hasn't succeeded.
|
||||||
//void Foam::autoLayerDriver::handleMultiplePatchFaces
|
//void Foam::autoLayerDriver::handleMultiplePatchFaces
|
||||||
@ -1133,7 +516,7 @@ void Foam::autoLayerDriver::handleWarpedFaces
|
|||||||
//
|
//
|
||||||
// if (nMultiPatchCells > 0)
|
// if (nMultiPatchCells > 0)
|
||||||
// {
|
// {
|
||||||
// multiPatchCells.instance() = mesh.time().timeName();
|
// multiPatchCells.instance() = meshRefiner_.timeName();
|
||||||
// Info<< "Writing " << nMultiPatchCells
|
// Info<< "Writing " << nMultiPatchCells
|
||||||
// << " cells with multiple (connected) patch faces to cellSet "
|
// << " cells with multiple (connected) patch faces to cellSet "
|
||||||
// << multiPatchCells.objectPath() << endl;
|
// << multiPatchCells.objectPath() << endl;
|
||||||
@ -2547,9 +1930,15 @@ void Foam::autoLayerDriver::mergePatchFacesUndo
|
|||||||
<< " (0=straight, 180=fully concave)" << nl
|
<< " (0=straight, 180=fully concave)" << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
label nChanged = mergePatchFacesUndo(minCos, concaveCos, motionDict);
|
label nChanged = meshRefiner_.mergePatchFacesUndo
|
||||||
|
(
|
||||||
|
minCos,
|
||||||
|
concaveCos,
|
||||||
|
meshRefiner_.meshedPatches(),
|
||||||
|
motionDict
|
||||||
|
);
|
||||||
|
|
||||||
nChanged += mergeEdgesUndo(minCos, motionDict);
|
nChanged += meshRefiner_.mergeEdgesUndo(minCos, motionDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3191,6 +2580,7 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
"addedCells",
|
"addedCells",
|
||||||
findIndices(flaggedCells, true)
|
findIndices(flaggedCells, true)
|
||||||
);
|
);
|
||||||
|
addedCellSet.instance() = meshRefiner_.timeName();
|
||||||
Info<< "Writing "
|
Info<< "Writing "
|
||||||
<< returnReduce(addedCellSet.size(), sumOp<label>())
|
<< returnReduce(addedCellSet.size(), sumOp<label>())
|
||||||
<< " added cells to cellSet "
|
<< " added cells to cellSet "
|
||||||
@ -3203,6 +2593,7 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
"layerFaces",
|
"layerFaces",
|
||||||
findIndices(flaggedCells, true)
|
findIndices(flaggedCells, true)
|
||||||
);
|
);
|
||||||
|
layerFacesSet.instance() = meshRefiner_.timeName();
|
||||||
Info<< "Writing "
|
Info<< "Writing "
|
||||||
<< returnReduce(layerFacesSet.size(), sumOp<label>())
|
<< returnReduce(layerFacesSet.size(), sumOp<label>())
|
||||||
<< " faces inside added layer to faceSet "
|
<< " faces inside added layer to faceSet "
|
||||||
@ -3279,6 +2670,9 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
mesh.clearOut();
|
mesh.clearOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the instance for if in overwrite mode
|
||||||
|
mesh.setInstance(meshRefiner_.timeName());
|
||||||
|
|
||||||
meshRefiner_.updateMesh(map, labelList(0));
|
meshRefiner_.updateMesh(map, labelList(0));
|
||||||
|
|
||||||
|
|
||||||
@ -3345,6 +2739,7 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
// ~~~~~~~~~~
|
// ~~~~~~~~~~
|
||||||
|
|
||||||
cellSet addedCellSet(mesh, "addedCells", findIndices(flaggedCells, true));
|
cellSet addedCellSet(mesh, "addedCells", findIndices(flaggedCells, true));
|
||||||
|
addedCellSet.instance() = meshRefiner_.timeName();
|
||||||
Info<< "Writing "
|
Info<< "Writing "
|
||||||
<< returnReduce(addedCellSet.size(), sumOp<label>())
|
<< returnReduce(addedCellSet.size(), sumOp<label>())
|
||||||
<< " added cells to cellSet "
|
<< " added cells to cellSet "
|
||||||
@ -3352,6 +2747,7 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
addedCellSet.write();
|
addedCellSet.write();
|
||||||
|
|
||||||
faceSet layerFacesSet(mesh, "layerFaces", findIndices(flaggedFaces, true));
|
faceSet layerFacesSet(mesh, "layerFaces", findIndices(flaggedFaces, true));
|
||||||
|
layerFacesSet.instance() = meshRefiner_.timeName();
|
||||||
Info<< "Writing "
|
Info<< "Writing "
|
||||||
<< returnReduce(layerFacesSet.size(), sumOp<label>())
|
<< returnReduce(layerFacesSet.size(), sumOp<label>())
|
||||||
<< " faces inside added layer to faceSet "
|
<< " faces inside added layer to faceSet "
|
||||||
|
|||||||
@ -105,46 +105,6 @@ class autoLayerDriver
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
|
||||||
// Face merging
|
|
||||||
|
|
||||||
//- Merge patch faces. Undo until no checkMesh errors.
|
|
||||||
label mergePatchFacesUndo
|
|
||||||
(
|
|
||||||
const scalar minCos,
|
|
||||||
const scalar concaveCos,
|
|
||||||
const dictionary&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Remove points.
|
|
||||||
autoPtr<mapPolyMesh> doRemovePoints
|
|
||||||
(
|
|
||||||
removePoints& pointRemover,
|
|
||||||
const boolList& pointCanBeDeleted
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Restore faces (which contain removed points)
|
|
||||||
autoPtr<mapPolyMesh> doRestorePoints
|
|
||||||
(
|
|
||||||
removePoints& pointRemover,
|
|
||||||
const labelList& facesToRestore
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Return candidateFaces that are also in set.
|
|
||||||
labelList collectFaces
|
|
||||||
(
|
|
||||||
const labelList& candidateFaces,
|
|
||||||
const labelHashSet& set
|
|
||||||
) const;
|
|
||||||
|
|
||||||
//- Pick up faces of cells of faces in set.
|
|
||||||
labelList growFaceCellFace(const labelHashSet&) const;
|
|
||||||
|
|
||||||
//- Remove points not used by any face or points used by only
|
|
||||||
// two faces where the edges are in line
|
|
||||||
label mergeEdgesUndo(const scalar minCos, const dictionary&);
|
|
||||||
|
|
||||||
|
|
||||||
// Layers
|
// Layers
|
||||||
|
|
||||||
//- For debugging: Dump displacement to .obj files
|
//- For debugging: Dump displacement to .obj files
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user