GIT: Resolved conflict on merge from upstream

This commit is contained in:
Andrew Heather
2015-12-22 16:49:44 +00:00
381 changed files with 10834 additions and 2450 deletions

View File

@ -90,3 +90,27 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
label pRefCell = 0;
scalar pRefValue = 0.0;
if (p_rgh.needReference())
{
setRefCell
(
p,
p_rgh,
pimple.dict(),
pRefCell,
pRefValue
);
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho));

View File

@ -1,4 +1,9 @@
{
bool closedVolume = p_rgh.needReference();
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
rho = thermo.rho();
// Thermodynamic density needs to be updated by psi*d(p) after the
@ -36,19 +41,27 @@
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
);
fvScalarMatrix p_rghDDtEqn
tmp<fvScalarMatrix> p_rghDDtEqn
(
new fvScalarMatrix(p_rgh, dimMass/dimTime)
);
if (compressible)
{
p_rghDDtEqn =
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phiHbyA)
==
fvOptions(psi, p_rgh, rho.name())
);
}
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
p_rghDDtEqn
p_rghDDtEqn()
+ fvc::div(phiHbyA)
- fvm::laplacian(rAUf, p_rgh)
);
@ -81,6 +94,32 @@
dpdt = fvc::ddt(p);
}
if (compressible)
{
#include "rhoEqn.H"
}
#include "compressibleContinuityErrs.H"
if (closedVolume)
{
if (!compressible)
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
else
{
p += (initialMass - fvc::domainIntegrate(thermo.rho()))
/compressibility;
rho = thermo.rho();
}
p_rgh = p - rho*gh;
}
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
<< endl;
}

View File

@ -37,9 +37,9 @@ volVectorField U
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::New<compressible::RASModel>
compressible::turbulenceModel::New
(
rho,
U,

View File

@ -34,6 +34,7 @@
)/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
);
while (simple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
@ -64,12 +65,27 @@
p = p_rgh + rho*gh;
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if (closedVolume)
{
if(!compressible)
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
else
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
p_rgh = p - rho*gh;
}

View File

@ -36,12 +36,21 @@
)/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
);
tmp<fvScalarMatrix> p_rghDDtEqn
(
new fvScalarMatrix(p_rgh, dimMass/dimTime)
);
{
fvScalarMatrix p_rghDDtEqn
if (compressible)
{
p_rghDDtEqn =
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phiHbyA)
==
fvOptions(psi, p_rgh, rho.name())
);
}
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1:
@ -52,6 +61,7 @@
fvScalarMatrix p_rghEqn
(
p_rghDDtEqn
+ fvc::div(phiHbyA)
- fvm::laplacian(rhorAUf, p_rgh)
);
@ -93,8 +103,11 @@
dpdt = fvc::ddt(p);
}
if (compressible)
{
// Solve continuity
#include "rhoEqn.H"
}
// Update continuity errors
#include "compressibleContinuityErrors.H"

View File

@ -0,0 +1,3 @@
simpleCoalParcelFoam.C
EXE = $(FOAM_APPBIN)/simpleCoalParcelFoam

View File

@ -0,0 +1,57 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(FOAM_SOLVERS)/lagrangian/reactingParcelFoam/simpleReactingParcelFoam
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lfluidThermophysicalModels \
-lliquidProperties \
-lliquidMixtureProperties \
-lsolidProperties \
-lsolidMixtureProperties \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiationModels \
-lODE \
-lregionModels \
-lsurfaceFilmModels \
-lcombustionModels \
-lfvOptions \
-lsampling \
-lcoalCombustion

View File

@ -0,0 +1,9 @@
Info<< "\nConstructing coal cloud" << endl;
coalCloud parcels
(
"reactingCloud1",
rho,
U,
g,
slgThermo
);

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
simpleReactingParcelFoam
Description
Steady state SIMPLE solver for laminar or turbulent flow with coal
Lagrangian parcels.
Note:
- including run-time selectable finite volume options,e.g. sources,
constraints
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "coalCloud.H"
#include "rhoCombustionModel.H"
#include "radiationModel.H"
#include "IOporosityModelList.H"
#include "fvOptions.H"
#include "SLGThermo.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
simpleControl simple(mesh);
#include "createFields.H"
#include "createRadiationModel.H"
#include "createClouds.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
parcels.evolve();
// --- Pressure-velocity SIMPLE corrector loop
{
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
#include "pEqn.H"
}
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //

View File

@ -2,24 +2,17 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: http://www.openfoam.org |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
location "system";
object collapseDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// If on, after collapsing check the quality of the mesh. If bad faces are

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -1077,7 +1077,7 @@ void Foam::conformalVoronoiMesh::writeMesh
IOobject::AUTO_WRITE
),
pointMesh::New(mesh),
scalar(labelMin)
dimensionedScalar("min", dimless, scalar(labelMin))
);
labelIOList boundaryPtsIO

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -58,6 +58,7 @@ Description
#include "globalIndex.H"
#include "IOmanip.H"
#include "decompositionModel.H"
#include "fvMeshTools.H"
using namespace Foam;
@ -813,6 +814,7 @@ int main(int argc, char *argv[])
readScalar(meshDict.lookup("mergeTolerance"))
);
const Switch keepPatches(meshDict.lookupOrDefault("keepPatches", false));
// Read decomposePar dictionary
@ -1517,6 +1519,12 @@ int main(int argc, char *argv[])
motionDict
);
// Remove zero sized patches originating from faceZones
if (!keepPatches && !wantSnap && !wantLayers)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Refined mesh",
@ -1559,6 +1567,12 @@ int main(int argc, char *argv[])
snapParams
);
// Remove zero sized patches originating from faceZones
if (!keepPatches && !wantLayers)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Snapped mesh",
@ -1609,6 +1623,12 @@ int main(int argc, char *argv[])
distributor
);
// Remove zero sized patches originating from faceZones
if (!keepPatches)
{
fvMeshTools::removeEmptyPatches(mesh, true);
}
writeMesh
(
"Layer mesh",
@ -1622,6 +1642,7 @@ int main(int argc, char *argv[])
}
{
// Check final mesh
Info<< "Checking final mesh ..." << endl;

View File

@ -187,7 +187,8 @@ castellatedMeshControls
//faceZone sphere;
//cellZone sphere;
//cellZoneInside inside; //outside/insidePoint
//cellZoneInside inside; // outside/insidePoint
//insidePoint (1 1 1); // if (cellZoneInside == insidePoint)
//- Optional specification of what to do with faceZone faces:
// internal : keep them as internal faces (default)
@ -259,7 +260,12 @@ castellatedMeshControls
}
// Limit refinement in geometric region
// Optionally limit refinement in geometric region. This limits all
// refinement (from features, refinementSurfaces, refinementRegions)
// in a given geometric region. The syntax is exactly the same as for the
// refinementRegions; the cell level now specifies the upper limit
// for any cell. Note that it does not override the refinement constraints
// given by the nCellsBetweenLevels settting.
limitRegions
{
}
@ -290,14 +296,25 @@ castellatedMeshControls
locationInMesh (5 0.28 0.43);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
// are only on the boundary of corresponding cellZones.
// Not used if there are no faceZones. The behaviour has changed
// with respect to previous versions:
// true : all intersections with surface are put in faceZone
// (same behaviour as before)
// false : depending on the type of surface intersected:
// - if intersecting surface has faceZone only (so no cellZone)
// leave in faceZone (so behave as if set to true) (= changed
// behaviour)
// - if intersecting surface has faceZone and cellZone
// remove if inbetween same cellZone or if on boundary
// (same behaviour as before)
allowFreeStandingZoneFaces true;
// 2. Specify multiple locations with optional cellZones for the
// regions. faceZones are automatically constructed from the
// regions (use cellZone "none" to specify the unzoned cells)
// FaceZones are automatically constructed from the
// names of the cellZones: <cellZoneA> _to_ <cellZoneB>
// where the cellZoneA is the lowest numbered cellZone (non-cellZone
// cells are in a special region called "none" which is always

View File

@ -1827,6 +1827,8 @@ int main(int argc, char *argv[])
if (detectOnly)
{
Info<< "End\n" << endl;
return 0;
}

View File

@ -183,7 +183,7 @@ void Foam::helpType::init()
(
"browse",
"word",
"display documentation for boundary condition in browser"
"display documentation in browser"
);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -290,6 +290,10 @@ void calc
mesh
);
// Note: fvOptions not directly used but constructs fvOptions so
// e.g. porosity modelling is effective for use in forces fo.
#include "createFvOptions.H"
if (phi.dimensions() == dimVolume/dimTime)
{
IOobject turbulencePropertiesHeader
@ -436,18 +440,23 @@ autoPtr<functionObjectList> readFunctionObjects
int main(int argc, char *argv[])
{
Foam::timeSelector::addOptions();
timeSelector::addOptions();
#include "addRegionOption.H"
Foam::argList::addBoolOption
argList::addBoolOption
(
"noFlow",
"suppress creating flow models"
);
argList::addBoolOption
(
"noRead",
"do not read any field data"
);
#include "addDictOption.H"
#include "setRootCase.H"
#include "createTime.H"
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
instantList timeDirs = timeSelector::select0(runTime, args);
#include "createNamedMesh.H"
// Externally stored dictionary for functionObjectList

View File

@ -23,21 +23,6 @@ dict.add
);
dict.add("mergeDistance", SMALL);
labelHashSet includePatches;
forAll(patches, patchI)
{
const polyPatch& pp = patches[patchI];
if
(
!pp.coupled()
&& !isA<cyclicAMIPolyPatch>(pp)
&& !isA<emptyPolyPatch>(pp)
)
{
includePatches.insert(patchI);
}
}
labelList triSurfaceToAgglom(5*nFineFaces);
const triSurface localSurface = triangulate
@ -69,6 +54,4 @@ distributedTriSurfaceMesh surfacesMesh
triSurfaceToAgglom.resize(surfacesMesh.size());
//surfacesMesh.searchableSurface::write();
surfacesMesh.setField(triSurfaceToAgglom);

View File

@ -87,8 +87,8 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++)
DynamicList<label> dRayIs;
// Collect the rays which has not hit obstacle inbetween rayStartFace
// and rayEndFace. If the ray hit itself get stored in dRayIs
// Collect the rays which have no obstacle in between rayStartFace
// and rayEndFace. If the ray hit itself, it gets stored in dRayIs
forAll(hitInfo, rayI)
{
if (!hitInfo[rayI].hit())

View File

@ -29,33 +29,42 @@ Description
(finalAgglom generated by faceAgglomerate utility).
Each view factor between the agglomerated faces i and j (Fij) is calculated
using a double integral of the sub-areas composing the agglomaration.
using a double integral of the sub-areas composing the agglomeration.
The patches involved in the view factor calculation are taken from the Qr
volScalarField (radiative flux) when is greyDiffusiveRadiationViewFactor
otherwise they are not included.
The patches involved in the view factor calculation are taken from the
boundary file and should be part on the group viewFactorWall. ie.:
floor
{
type wall;
inGroups 2(wall viewFactorWall);
nFaces 100;
startFace 3100;
}
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "fvMesh.H"
#include "singleCellFvMesh.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "fixedValueFvPatchFields.H"
#include "distributedTriSurfaceMesh.H"
#include "cyclicAMIPolyPatch.H"
#include "mapDistribute.H"
#include "meshTools.H"
#include "uindirectPrimitivePatch.H"
#include "DynamicField.H"
#include "unitConversion.H"
#include "scalarMatrices.H"
#include "labelListIOList.H"
#include "scalarListIOList.H"
#include "singleCellFvMesh.H"
#include "IOmapDistribute.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
triSurface triangulate
(
@ -116,7 +125,7 @@ triSurface triangulate
newPatchI++;
}
triSurfaceToAgglom.resize(localTriFaceI);
//striSurfaceToAgglom.resize(localTriFaceI-1);
triangles.shrink();
@ -264,6 +273,8 @@ int main(int argc, char *argv[])
)
);
const word viewFactorWall("viewFactorWall");
const bool writeViewFactors =
viewFactorDict.lookupOrDefault<bool>("writeViewFactorMatrix", false);
@ -272,19 +283,6 @@ int main(int argc, char *argv[])
const label debug = viewFactorDict.lookupOrDefault<label>("debug", 0);
volScalarField Qr
(
IOobject
(
"Qr",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);
// Read agglomeration map
labelListIOList finalAgglom
(
@ -336,26 +334,13 @@ int main(int argc, char *argv[])
const polyBoundaryMesh& patches = mesh.boundaryMesh();
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
labelList viewFactorsPatches(patches.size());
const volScalarField::GeometricBoundaryField& Qrb = Qr.boundaryField();
label count = 0;
forAll(Qrb, patchI)
labelList viewFactorsPatches(patches.findIndices(viewFactorWall));
forAll (viewFactorsPatches, i)
{
const polyPatch& pp = patches[patchI];
const fvPatchScalarField& QrpI = Qrb[patchI];
if ((isA<fixedValueFvPatchScalarField>(QrpI)) && (pp.size() > 0))
{
viewFactorsPatches[count] = QrpI.patch().index();
label patchI = viewFactorsPatches[i];
nCoarseFaces += coarsePatches[patchI].size();
nFineFaces += patches[patchI].size();
count ++;
}
}
viewFactorsPatches.resize(count);
// total number of coarse faces
label totalNCoarseFaces = nCoarseFaces;
@ -381,21 +366,27 @@ int main(int argc, char *argv[])
DynamicList<label> localAgg(nCoarseFaces);
forAll (viewFactorsPatches, i)
labelHashSet includePatches;
forAll(viewFactorsPatches, i)
{
const label patchID = viewFactorsPatches[i];
const polyPatch& pp = patches[patchID];
const labelList& agglom = finalAgglom[patchID];
includePatches.insert(patchID);
if (agglom.size() > 0)
{
label nAgglom = max(agglom)+1;
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
const labelList& coarsePatchFace =
coarseMesh.patchFaceMap()[patchID];
const pointField& coarseCf = coarseMesh.Cf().boundaryField()[patchID];
const pointField& coarseSf = coarseMesh.Sf().boundaryField()[patchID];
labelHashSet includePatches;
includePatches.insert(patchID);
const pointField& coarseCf =
coarseMesh.Cf().boundaryField()[patchID];
const pointField& coarseSf =
coarseMesh.Sf().boundaryField()[patchID];
forAll(coarseCf, faceI)
{
@ -449,9 +440,10 @@ int main(int argc, char *argv[])
localCoarseCf.append(cf);
localCoarseSf.append(sf);
localAgg.append(agglomI);
}
}
}
}
}
// Distribute local coarse Cf and Sf for shooting rays
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -478,7 +470,6 @@ int main(int argc, char *argv[])
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include "searchingEngine.H"
// Determine rays between coarse face centres
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DynamicList<label> rayStartFace(nCoarseFaces + 0.01*nCoarseFaces);
@ -486,8 +477,8 @@ int main(int argc, char *argv[])
DynamicList<label> rayEndFace(rayStartFace.size());
// Return rayStartFace in local index andrayEndFace in global index
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Return rayStartFace in local index and rayEndFace in global index
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include "shootRays.H"
@ -508,7 +499,6 @@ int main(int argc, char *argv[])
nViewFactors += nVisibleFaceFaces[faceI];
}
// - Construct compact numbering
// - return map from remote to compact indices
// (per processor (!= myProcNo) a map from remote index to compact index)
@ -519,54 +509,6 @@ int main(int argc, char *argv[])
mapDistribute map(globalNumbering, rayEndFace, compactMap);
labelListIOList IOsubMap
(
IOobject
(
"subMap",
mesh.facesInstance(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
map.subMap()
);
IOsubMap.write();
labelListIOList IOconstructMap
(
IOobject
(
"constructMap",
mesh.facesInstance(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
map.constructMap()
);
IOconstructMap.write();
IOList<label> consMapDim
(
IOobject
(
"constructMapDim",
mesh.facesInstance(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
List<label>(1, map.constructSize())
);
consMapDim.write();
// visibleFaceFaces has:
// (local face, local viewed face) = compact viewed face
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -600,10 +542,14 @@ int main(int argc, char *argv[])
forAll(viewFactorsPatches, i)
{
label patchID = viewFactorsPatches[i];
const labelList& agglom = finalAgglom[patchID];
if (agglom.size() > 0)
{
label nAgglom = max(agglom)+1;
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
const labelList& coarsePatchFace = coarseMesh.patchFaceMap()[patchID];
const labelList& coarsePatchFace =
coarseMesh.patchFaceMap()[patchID];
forAll(coarseToFine, coarseI)
{
@ -629,6 +575,7 @@ int main(int argc, char *argv[])
);
}
}
}
// Do all swapping
map.distribute(compactCoarseSf);
@ -837,6 +784,8 @@ int main(int argc, char *argv[])
{
label patchID = viewFactorsPatches[i];
const labelList& agglom = finalAgglom[patchID];
if (agglom.size() > 0)
{
label nAgglom = max(agglom)+1;
labelListList coarseToFine(invertOneToMany(nAgglom, agglom));
const labelList& coarsePatchFace =
@ -855,6 +804,7 @@ int main(int argc, char *argv[])
compactI++;
}
}
}
viewFactorField.write();
}
@ -886,10 +836,6 @@ int main(int argc, char *argv[])
}
if (Pstream::master())
{
scalarSquareMatrix Fmatrix(totalNCoarseFaces, totalNCoarseFaces, 0.0);
labelListList globalFaceFaces(visibleFaceFaces.size());
// Create globalFaceFaces needed to insert view factors
@ -917,35 +863,37 @@ int main(int argc, char *argv[])
globalFaceFaces
);
IOglobalFaceFaces.write();
}
else
{
labelListList globalFaceFaces(visibleFaceFaces.size());
forAll(globalFaceFaces, faceI)
{
globalFaceFaces[faceI] = renumber
(
compactToGlobal,
visibleFaceFaces[faceI]
);
}
labelListIOList IOglobalFaceFaces
labelListIOList IOvisibleFaceFaces
(
IOobject
(
"globalFaceFaces",
"visibleFaceFaces",
mesh.facesInstance(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
globalFaceFaces
visibleFaceFaces
);
IOvisibleFaceFaces.write();
IOmapDistribute IOmapDist
(
IOobject
(
"mapDist",
mesh.facesInstance(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
map.xfer()
);
IOglobalFaceFaces.write();
}
IOmapDist.write();
Info<< "End\n" << endl;
return 0;

View File

@ -74,14 +74,17 @@ void writeProcStats
forAll(surfBb, procI)
{
const List<treeBoundBox>& bbs = meshBb[procI];
Info<< "processor" << procI << nl;
Info<< "processor" << procI << nl
<< "\tMesh bounds : " << bbs[0] << nl;
const List<treeBoundBox>& bbs = meshBb[procI];
if (bbs.size())
{
Info<< "\tMesh bounds : " << bbs[0] << nl;
for (label i = 1; i < bbs.size(); i++)
{
Info<< "\t " << bbs[i]<< nl;
}
}
Info<< "\tSurface bounding box : " << surfBb[procI] << nl
<< "\tTriangles : " << nFaces[procI] << nl
<< "\tVertices : " << nPoints[procI]
@ -112,12 +115,13 @@ int main(int argc, char *argv[])
runTime.functionObjects().off();
const fileName surfFileName = args[1];
const word distType = args[2];
const word distTypeName = args[2];
const label distType =
distributedTriSurfaceMesh::distributionTypeNames_[distTypeName];
Info<< "Reading surface from " << surfFileName << nl << nl
<< "Using distribution method "
<< distributedTriSurfaceMesh::distributionTypeNames_[distType]
<< " " << distType << nl << endl;
<< distTypeName << nl << endl;
const bool keepNonMapped = args.options().found("keepNonMapped");
@ -141,13 +145,14 @@ int main(int argc, char *argv[])
}
#include "createPolyMesh.H"
Random rndGen(653213);
// Determine mesh bounding boxes:
List<List<treeBoundBox> > meshBb(Pstream::nProcs());
if (distType == distributedTriSurfaceMesh::FOLLOW)
{
#include "createPolyMesh.H"
meshBb[Pstream::myProcNo()] = List<treeBoundBox>
(
1,
@ -160,6 +165,23 @@ int main(int argc, char *argv[])
Pstream::scatterList(meshBb);
}
// Temporarily: override master-only checking
regIOobject::fileCheckTypes oldCheckType =
regIOobject::fileModificationChecking;
if (oldCheckType == regIOobject::timeStampMaster)
{
regIOobject::fileModificationChecking = regIOobject::timeStamp;
}
else if (oldCheckType == regIOobject::inotifyMaster)
{
regIOobject::fileModificationChecking = regIOobject::inotify;
}
IOobject io
(
surfFileName, // name
@ -175,83 +197,48 @@ int main(int argc, char *argv[])
fileName localPath(actualPath);
localPath.replace(runTime.rootPath() + '/', "");
autoPtr<distributedTriSurfaceMesh> surfMeshPtr;
if (actualPath == io.objectPath())
{
Info<< "Loading local (decomposed) surface " << localPath << nl <<endl;
surfMeshPtr.reset(new distributedTriSurfaceMesh(io));
}
else
{
Info<< "Loading undecomposed surface " << localPath << nl << endl;
Info<< "Loading undecomposed surface " << localPath
<< " on master only" << endl;
triSurface s;
List<treeBoundBox> bbs;
if (Pstream::master())
{
// Actually load the surface
triSurfaceMesh surf(io);
s = surf;
bbs = List<treeBoundBox>(1, treeBoundBox(boundBox::greatBox));
}
else
{
bbs = List<treeBoundBox>(1, treeBoundBox(boundBox::invertedBox));
}
// Create dummy dictionary for bounding boxes if does not exist.
if (!isFile(actualPath / "Dict"))
{
dictionary dict;
dict.add("bounds", meshBb[Pstream::myProcNo()]);
dict.add("distributionType", distType);
dict.add("distributionType", distTypeName);
dict.add("mergeDistance", SMALL);
dict.add("bounds", bbs);
IOdictionary ioDict
(
IOobject
(
io.name() + "Dict",
io.instance(),
io.local(),
io.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
dict
);
// Scatter patch information
Pstream::scatter(s.patches());
Info<< "Writing dummy bounds dictionary to " << ioDict.name()
<< nl << endl;
// Force writing in ascii
ioDict.regIOobject::writeObject
(
IOstream::ASCII,
IOstream::currentVersion,
ioDict.time().writeCompression()
);
// Construct distributedTrisurfaceMesh from components
IOobject notReadIO(io);
notReadIO.readOpt() = IOobject::NO_READ;
surfMeshPtr.reset(new distributedTriSurfaceMesh(notReadIO, s, dict));
}
// Load surface
distributedTriSurfaceMesh surfMesh(io);
Info<< "Loaded surface" << nl << endl;
// Generate a test field
{
const triSurface& s = static_cast<const triSurface&>(surfMesh);
autoPtr<triSurfaceVectorField> fcPtr
(
new triSurfaceVectorField
(
IOobject
(
"faceCentres", // name
surfMesh.searchableSurface::time().timeName(), // instance
surfMesh.searchableSurface::local(), // local
surfMesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
surfMesh,
dimLength,
s.faceCentres()
)
);
// Steal pointer and store object on surfMesh
fcPtr.ptr()->store();
}
distributedTriSurfaceMesh& surfMesh = surfMeshPtr();
// Write per-processor stats
@ -284,6 +271,10 @@ int main(int argc, char *argv[])
Info<< "Writing surface." << nl << endl;
surfMesh.objectRegistry::write();
regIOobject::fileModificationChecking = oldCheckType;
Info<< "End\n" << endl;
return 0;

View File

@ -3,7 +3,7 @@
<div class="footer">
<p>
Copyright&nbsp;&copy;&nbsp;2011-2013&nbsp;
<a href="http://www.openfoam.org/about">OpenFOAM Foundation</a>
<a href="http://www.openfoam.com/about">OpenFOAM</a>
|
OPENFOAM&reg; is a registered
<a href="http://www.openfoam.com/legal/trademark-policy.php">trademarks

View File

@ -22,12 +22,12 @@
<div class="page-container">
<div class="header">
<div class="header-top">
<a class="sitelogo" href="http://www.openfoam.org" title="Home">
<a class="sitelogo" href="http://www.openfoam.com" title="Home">
<img class=left src="../css/img/OpenFOAMlogo.png">
</a>
<div class="sitename">
<h1>
<a href="http://foam.sourceforge.net/doc/Doxygen/html/"
<a href="http://www.openfoam.com/doc/Doxygen/html/"
title="Source Guide">OpenFOAM C++ Documentation
</a>
</h1>

View File

@ -127,7 +127,7 @@ case SunOS:
default:
echo
echo "Your '$WM_ARCH' operating system is not supported by this release"
echo "of OpenFOAM. For further assistance, please contact www.OpenFOAM.org"
echo "of OpenFOAM. For further assistance, please contact www.OpenFOAM.com"
echo
breaksw

View File

@ -156,7 +156,7 @@ SunOS)
/bin/cat <<USAGE 1>&2
Your "$WM_ARCH" operating system is not supported by this release
of OpenFOAM. For further assistance, please contact www.OpenFOAM.org
of OpenFOAM. For further assistance, please contact www.OpenFOAM.com
USAGE
;;

View File

@ -237,10 +237,8 @@ void Foam::sigFpe::unset(const bool verbose)
if (sigaction(SIGFPE, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigFpe::unset(const bool)"
) << "Cannot reset SIGFPE trapping"
FatalErrorInFunction
<< "Cannot reset SIGFPE trapping"
<< abort(FatalError);
}
@ -254,10 +252,8 @@ void Foam::sigFpe::unset(const bool verbose)
if (oldExcept == -1)
{
FatalErrorIn
(
"sigFpe::unset(const bool)"
) << "Cannot reset SIGFPE trapping"
FatalErrorInFunction
<< "Cannot reset SIGFPE trapping"
<< abort(FatalError);
}
sigFpeActive_ = false;

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -1115,7 +1115,7 @@ void Foam::argList::printUsage() const
Info<< nl
<<"Using: OpenFOAM-" << Foam::FOAMversion
<< " (see www.OpenFOAM.org)" << nl
<< " (see www.OpenFOAM.com)" << nl
<<"Build: " << Foam::FOAMbuild << nl
<< endl;
}

View File

@ -28,13 +28,12 @@ License
\section about About OpenFOAM
OpenFOAM is a free, open source CFD software package released free and
open-source under the GNU General Public License by the,
<a href="http://www.openfoam.org">OpenFOAM Foundation</a>. It has a large
open-source under the GNU General Public License. It has a large
user base across most areas of engineering and science, from both commercial
and academic organisations. OpenFOAM has an extensive range of features to
solve anything from complex fluid flows involving chemical reactions,
turbulence and heat transfer, to solid dynamics and electromagnetics.
<a href="http://www.openfoam.org/features">More ...</a>
<a href="http://www.openfoam.com/features">More ...</a>
\section layout Code Layout

View File

@ -25,6 +25,7 @@ License
#include "uniformInterpolationTable.H"
#include "Time.H"
#include "IOstream.H"
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
@ -228,7 +229,12 @@ void Foam::uniformInterpolationTable<Type>::write() const
dict.add("bound", bound_);
}
dict.regIOobject::write();
dict.regIOobject::writeObject
(
IOstream::ASCII,
IOstream::currentVersion,
dict.time().writeCompression()
);
}

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -997,7 +997,7 @@ bool Foam::polyMesh::upToDatePoints(const regIOobject& io) const
void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const
{
io.eventNo() = points_.eventNo();
io.eventNo() = points_.eventNo()+1;
}

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -62,7 +62,12 @@ tmp<volScalarField> kOmegaSSTDES<BasicTurbulenceModel>::dTilda
const volScalarField& k = this->k_;
const volScalarField& omega = this->omega_;
return min(CDES*this->delta(), sqrt(k)/(this->betaStar_*omega));
return
min
(
CDES*this->delta(),
sqrt(k + this->kMin_)/(this->betaStar_*omega)
);
}

View File

@ -48,7 +48,13 @@ volScalarField dynamicKEqn<BasicTurbulenceModel>::Ck
const volSymmTensorField MM
(
simpleFilter_(-2.0*this->delta()*sqrt(KK)*filter_(D))
simpleFilter_
(
-2.0*this->delta()*sqrt
(
max(KK, dimensionedScalar("zero", KK.dimensions(), 0.0))
)*filter_(D)
)
);
const volScalarField Ck

View File

@ -155,7 +155,9 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
}
// Local references
const surfaceScalarField& phi = this->phi_;
const alphaField& alpha = this->alpha_;
const rhoField& rho = this->rho_;
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
const volVectorField& U = this->U_;
LESeddyViscosity<BasicTurbulenceModel>::correct();
@ -185,11 +187,11 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
fvScalarMatrix flmEqn
(
fvm::ddt(flm_)
+ fvm::div(phi, flm_)
fvm::ddt(alpha, rho, flm_)
+ fvm::div(alphaRhoPhi, flm_)
==
invT*LM
- fvm::Sp(invT, flm_)
rho*invT*LM
- fvm::Sp(rho*invT, flm_)
);
flmEqn.relax();
@ -201,11 +203,11 @@ void dynamicLagrangian<BasicTurbulenceModel>::correct()
fvScalarMatrix fmmEqn
(
fvm::ddt(fmm_)
+ fvm::div(phi, fmm_)
fvm::ddt(alpha, rho, fmm_)
+ fvm::div(alphaRhoPhi, fmm_)
==
invT*MM
- fvm::Sp(invT, fmm_)
rho*invT*MM
- fvm::Sp(rho*invT, fmm_)
);
fmmEqn.relax();

View File

@ -284,6 +284,17 @@ void realizableKE<BasicTurbulenceModel>::correct()
// Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs();
// SAF: limiting thermo->nu(). If psiThermo is used rho might be < 0
// temporarily when p < 0 then nu < 0 which needs limiting
volScalarField nuLimited
(
max
(
this->nu(),
dimensionedScalar("zero", this->nu()().dimensions(), 0.0)
)
);
// Dissipation equation
tmp<fvScalarMatrix> epsEqn
(
@ -294,7 +305,7 @@ void realizableKE<BasicTurbulenceModel>::correct()
C1*alpha*rho*magS*epsilon_
- fvm::Sp
(
C2_*alpha*rho*epsilon_/(k_ + sqrt(this->nu()*epsilon_)),
C2_*alpha*rho*epsilon_/(k_ + sqrt(nuLimited*epsilon_)),
epsilon_
)
+ epsilonSource()

View File

@ -38,16 +38,47 @@ namespace RASModels
template<class BasicTurbulenceModel>
tmp<volScalarField> v2f<BasicTurbulenceModel>::Ts() const
{
return max(k_/epsilon_, 6.0*sqrt(this->nu()/epsilon_));
// SAF: limiting thermo->nu(). If psiThermo is used rho might be < 0
// temporarily when p < 0 then nu < 0 which needs limiting
return
max
(
k_/epsilon_,
6.0*sqrt
(
max
(
this->nu(),
dimensionedScalar("zero", this->nu()().dimensions(), 0.0)
)
/ epsilon_
)
);
}
template<class BasicTurbulenceModel>
tmp<volScalarField> v2f<BasicTurbulenceModel>::Ls() const
{
// SAF: limiting thermo->nu(). If psiThermo is used rho might be < 0
// temporarily when p < 0 then nu < 0 which needs limiting
return
CL_*max(pow(k_, 1.5)
/epsilon_, Ceta_*pow025(pow3(this->nu())/epsilon_));
CL_
* max
(
pow(k_, 1.5)/epsilon_,
Ceta_*pow025
(
pow3
(
max
(
this->nu(),
dimensionedScalar("zero", this->nu()().dimensions(), 0.0)
)
)/epsilon_
)
);
}

View File

@ -109,7 +109,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
)
);
scalarField nuEff(turbModel.nuEff()()[patch().index()]);
tmp<scalarField> nuEff(turbModel.nuEff(patch().index()));
const vectorField Uc(patchInternalField());
@ -117,7 +117,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
const scalarField& ry = patch().deltaCoeffs();
operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff)) + Uc)));
operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff())) + Uc)));
fixedValueFvPatchVectorField::updateCoeffs();
}

View File

@ -860,16 +860,62 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectUnrefinePoints
// All points that can be unrefined
const labelList splitPoints(meshCutter_.getSplitPoints());
const labelListList& pointCells = this->pointCells();
// If we have any protected cells make sure they also are not being
// unrefined
PackedBoolList protectedPoint(nPoints());
if (protectedCell_.size())
{
// Get all points on a protected cell
forAll(pointCells, pointI)
{
const labelList& pCells = pointCells[pointI];
forAll(pCells, pCellI)
{
label cellI = pCells[pCellI];
if (protectedCell_[cellI])
{
protectedPoint[pointI] = true;
break;
}
}
}
syncTools::syncPointList
(
*this,
protectedPoint,
orEqOp<unsigned int>(),
0U
);
if (debug)
{
Info<< "From "
<< returnReduce(protectedCell_.count(), sumOp<label>())
<< " protected cells found "
<< returnReduce(protectedPoint.count(), sumOp<label>())
<< " protected points." << endl;
}
}
DynamicList<label> newSplitPoints(splitPoints.size());
forAll(splitPoints, i)
{
label pointI = splitPoints[i];
if (pFld[pointI] < unrefineLevel)
if (!protectedPoint[pointI] && pFld[pointI] < unrefineLevel)
{
// Check that all cells are not marked
const labelList& pCells = pointCells()[pointI];
const labelList& pCells = pointCells[pointI];
bool hasMarked = false;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -355,6 +355,69 @@ void Foam::fvMeshTools::reorderPatches
}
Foam::labelList Foam::fvMeshTools::removeEmptyPatches
(
fvMesh& mesh,
const bool validBoundary
)
{
const polyBoundaryMesh& pbm = mesh.boundaryMesh();
labelList newToOld(pbm.size());
labelList oldToNew(pbm.size(), -1);
label newI = 0;
// Assumes all non-coupled boundaries are on all processors!
forAll(pbm, patchI)
{
const polyPatch& pp = pbm[patchI];
if (!isA<processorPolyPatch>(pp))
{
label nFaces = pp.size();
if (validBoundary)
{
reduce(nFaces, sumOp<label>());
}
if (nFaces > 0)
{
newToOld[newI] = patchI;
oldToNew[patchI] = newI++;
}
}
}
// Same for processor patches (but need no reduction)
forAll(pbm, patchI)
{
const polyPatch& pp = pbm[patchI];
if (isA<processorPolyPatch>(pp) && pp.size())
{
newToOld[newI] = patchI;
oldToNew[patchI] = newI++;
}
}
newToOld.setSize(newI);
// Move all deleteable patches to the end
forAll(oldToNew, patchI)
{
if (oldToNew[patchI] == -1)
{
oldToNew[patchI] = newI++;
}
}
reorderPatches(mesh, oldToNew, newToOld.size(), validBoundary);
return newToOld;
}
Foam::autoPtr<Foam::fvMesh> Foam::fvMeshTools::newMesh
(
const IOobject& io,

View File

@ -113,7 +113,7 @@ public:
static void zeroPatchFields(fvMesh& mesh, const label patchI);
//- Reorder and remove trailing patches. If validBoundary call is parallel
// synced and all add the same patch with same settings
// synced
static void reorderPatches
(
fvMesh&,
@ -122,6 +122,11 @@ public:
const bool validBoundary
);
//- Remove zero sized patches. All but processor patches are
// assumed to be present on all processors (so size will be reduced
// if validBoundary). Return map from new
// to old patches
static labelList removeEmptyPatches(fvMesh&, const bool validBoundary);
//- Read mesh or create dummy mesh (0 cells, >0 patches). Works in two
// modes according to masterOnlyReading:
@ -133,7 +138,6 @@ public:
const IOobject& io,
const bool masterOnlyReading
);
};

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -47,8 +47,6 @@ average
const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf
)
{
Info<< "average" << endl;
const fvMesh& mesh = ssf.mesh();
tmp<GeometricField<Type, fvPatchField, volMesh> > taverage

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

Some files were not shown because too many files have changed in this diff Show More