Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x
This commit is contained in:
commit
f3707f0df6
37 changed files with 1080 additions and 194 deletions
|
|
@ -88,7 +88,7 @@ Foam::tmp<Foam::volScalarField> Foam::blendingMethods::noBlending::f1
|
|||
(
|
||||
"f",
|
||||
dimless,
|
||||
phase1.name() == continuousPhase_
|
||||
phase2.name() != continuousPhase_
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
@ -101,7 +101,28 @@ Foam::tmp<Foam::volScalarField> Foam::blendingMethods::noBlending::f2
|
|||
const phaseModel& phase2
|
||||
) const
|
||||
{
|
||||
return f1(phase1, phase2);
|
||||
const fvMesh& mesh(phase1.mesh());
|
||||
|
||||
return
|
||||
tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"f",
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar
|
||||
(
|
||||
"f",
|
||||
dimless,
|
||||
phase1.name() == continuousPhase_
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lcompressibleTurbulenceModel \
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -130,7 +130,7 @@ class domainDecomposition
|
|||
//- Append single element to list
|
||||
static void append(labelList&, const label);
|
||||
|
||||
//- Add face to interProcessor patch.
|
||||
//- Add face to inter-processor patch
|
||||
void addInterProcFace
|
||||
(
|
||||
const label facei,
|
||||
|
|
@ -141,6 +141,19 @@ class domainDecomposition
|
|||
List<DynamicList<DynamicList<label> > >&
|
||||
) const;
|
||||
|
||||
//- Generate sub patch info for processor cyclics
|
||||
template <class BinaryOp>
|
||||
void processInterCyclics
|
||||
(
|
||||
const polyBoundaryMesh& patches,
|
||||
List<DynamicList<DynamicList<label> > >& interPatchFaces,
|
||||
List<Map<label> >& procNbrToInterPatch,
|
||||
List<labelListList>& subPatchIDs,
|
||||
List<labelListList>& subPatchStarts,
|
||||
bool owner,
|
||||
BinaryOp bop
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -187,6 +200,12 @@ public:
|
|||
} // End namespace Foam
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "domainDecompositionTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -32,9 +32,7 @@ Description
|
|||
|
||||
#include "domainDecomposition.H"
|
||||
#include "IOstreams.H"
|
||||
#include "SLPtrList.H"
|
||||
#include "boolList.H"
|
||||
#include "primitiveMesh.H"
|
||||
#include "cyclicPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
|
@ -209,10 +207,11 @@ void Foam::domainDecomposition::decomposeMesh()
|
|||
// Done internal bits of the new mesh and the ordinary patches.
|
||||
|
||||
|
||||
// Per processor, from neighbour processor to the interprocessorpatch that
|
||||
// communicates with that neighbour.
|
||||
// Per processor, from neighbour processor to the inter-processor patch
|
||||
// that communicates with that neighbour
|
||||
List<Map<label> > procNbrToInterPatch(nProcs_);
|
||||
// Per processor the faces per interprocessorpatch.
|
||||
|
||||
// Per processor the faces per inter-processor patch
|
||||
List<DynamicList<DynamicList<label> > > interPatchFaces(nProcs_);
|
||||
|
||||
// Processor boundaries from internal faces
|
||||
|
|
@ -248,95 +247,73 @@ void Foam::domainDecomposition::decomposeMesh()
|
|||
subPatchStarts[procI].setSize(nInterfaces, labelList(1, label(0)));
|
||||
}
|
||||
|
||||
// Processor boundaries from split cyclics
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
if (isA<cyclicPolyPatch>(patches[patchi]))
|
||||
{
|
||||
const cyclicPolyPatch& pp = refCast<const cyclicPolyPatch>
|
||||
(
|
||||
patches[patchi]
|
||||
);
|
||||
|
||||
// cyclic: check opposite side on this processor
|
||||
const labelUList& patchFaceCells = pp.faceCells();
|
||||
const labelUList& nbrPatchFaceCells =
|
||||
pp.neighbPatch().faceCells();
|
||||
// Special handling needed for the case that multiple processor cyclic
|
||||
// patches are created on each local processor domain, e.g. if a 3x3 case
|
||||
// is decomposed using the decomposition:
|
||||
//
|
||||
// | 1 | 0 | 2 |
|
||||
// cyclic left | 2 | 0 | 1 | cyclic right
|
||||
// | 2 | 0 | 1 |
|
||||
//
|
||||
// - processors 1 and 2 will both have pieces of both cyclic left- and
|
||||
// right sub-patches present
|
||||
// - the interface patch faces are stored in a single list, where each
|
||||
// sub-patch is referenced into the list using a patch start index and
|
||||
// size
|
||||
// - if the patches are in order (in the boundary file) of left, right
|
||||
// - processor 1 will send: left, right
|
||||
// - processor 1 will need to receive in reverse order: right, left
|
||||
// - similarly for processor 2
|
||||
// - the sub-patches are therefore generated in 4 passes of the patch lists
|
||||
// 1. add faces from owner patch where local proc i < nbr proc i
|
||||
// 2. add faces from nbr patch where local proc i < nbr proc i
|
||||
// 3. add faces from owner patch where local proc i > nbr proc i
|
||||
// 4. add faces from nbr patch where local proc i > nbr proc i
|
||||
|
||||
// Store old sizes. Used to detect which inter-proc patches
|
||||
// have been added to.
|
||||
labelListList oldInterfaceSizes(nProcs_);
|
||||
forAll(oldInterfaceSizes, procI)
|
||||
{
|
||||
labelList& curOldSizes = oldInterfaceSizes[procI];
|
||||
processInterCyclics
|
||||
(
|
||||
patches,
|
||||
interPatchFaces,
|
||||
procNbrToInterPatch,
|
||||
subPatchIDs,
|
||||
subPatchStarts,
|
||||
true,
|
||||
lessOp<label>()
|
||||
);
|
||||
|
||||
curOldSizes.setSize(interPatchFaces[procI].size());
|
||||
forAll(curOldSizes, interI)
|
||||
{
|
||||
curOldSizes[interI] =
|
||||
interPatchFaces[procI][interI].size();
|
||||
}
|
||||
}
|
||||
processInterCyclics
|
||||
(
|
||||
patches,
|
||||
interPatchFaces,
|
||||
procNbrToInterPatch,
|
||||
subPatchIDs,
|
||||
subPatchStarts,
|
||||
false,
|
||||
lessOp<label>()
|
||||
);
|
||||
|
||||
// Add faces with different owner and neighbour processors
|
||||
forAll(patchFaceCells, facei)
|
||||
{
|
||||
const label ownerProc = cellToProc_[patchFaceCells[facei]];
|
||||
const label nbrProc = cellToProc_[nbrPatchFaceCells[facei]];
|
||||
if (ownerProc != nbrProc)
|
||||
{
|
||||
// inter - processor patch face found.
|
||||
addInterProcFace
|
||||
(
|
||||
pp.start()+facei,
|
||||
ownerProc,
|
||||
nbrProc,
|
||||
procNbrToInterPatch,
|
||||
interPatchFaces
|
||||
);
|
||||
}
|
||||
}
|
||||
processInterCyclics
|
||||
(
|
||||
patches,
|
||||
interPatchFaces,
|
||||
procNbrToInterPatch,
|
||||
subPatchIDs,
|
||||
subPatchStarts,
|
||||
false,
|
||||
greaterOp<label>()
|
||||
);
|
||||
|
||||
// 1. Check if any faces added to existing interfaces
|
||||
forAll(oldInterfaceSizes, procI)
|
||||
{
|
||||
const labelList& curOldSizes = oldInterfaceSizes[procI];
|
||||
|
||||
forAll(curOldSizes, interI)
|
||||
{
|
||||
label oldSz = curOldSizes[interI];
|
||||
if (interPatchFaces[procI][interI].size() > oldSz)
|
||||
{
|
||||
// Added faces to this interface. Add an entry
|
||||
append(subPatchIDs[procI][interI], patchi);
|
||||
append(subPatchStarts[procI][interI], oldSz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Any new interfaces
|
||||
forAll(subPatchIDs, procI)
|
||||
{
|
||||
label nIntfcs = interPatchFaces[procI].size();
|
||||
subPatchIDs[procI].setSize(nIntfcs, labelList(1, patchi));
|
||||
subPatchStarts[procI].setSize(nIntfcs, labelList(1, label(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Shrink processor patch face addressing
|
||||
forAll(interPatchFaces, procI)
|
||||
{
|
||||
DynamicList<DynamicList<label> >& curInterPatchFaces =
|
||||
interPatchFaces[procI];
|
||||
|
||||
forAll(curInterPatchFaces, i)
|
||||
{
|
||||
curInterPatchFaces[i].shrink();
|
||||
}
|
||||
curInterPatchFaces.shrink();
|
||||
}
|
||||
processInterCyclics
|
||||
(
|
||||
patches,
|
||||
interPatchFaces,
|
||||
procNbrToInterPatch,
|
||||
subPatchIDs,
|
||||
subPatchStarts,
|
||||
true,
|
||||
greaterOp<label>()
|
||||
);
|
||||
|
||||
|
||||
// Sort inter-proc patch by neighbour
|
||||
|
|
@ -356,18 +333,18 @@ void Foam::domainDecomposition::decomposeMesh()
|
|||
// Get sorted neighbour processors
|
||||
const Map<label>& curNbrToInterPatch = procNbrToInterPatch[procI];
|
||||
labelList nbrs = curNbrToInterPatch.toc();
|
||||
|
||||
sortedOrder(nbrs, order);
|
||||
|
||||
DynamicList<DynamicList<label> >& curInterPatchFaces =
|
||||
interPatchFaces[procI];
|
||||
|
||||
forAll(order, i)
|
||||
forAll(nbrs, i)
|
||||
{
|
||||
const label nbrProc = nbrs[i];
|
||||
const label interPatch = curNbrToInterPatch[nbrProc];
|
||||
|
||||
procNeighbourProcessors_[procI][i] =
|
||||
nbrProc;
|
||||
procNeighbourProcessors_[procI][i] = nbrProc;
|
||||
procProcessorPatchSize_[procI][i] =
|
||||
curInterPatchFaces[interPatch].size();
|
||||
procProcessorPatchStartIndex_[procI][i] =
|
||||
|
|
|
|||
|
|
@ -0,0 +1,125 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cyclicPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template <class BinaryOp>
|
||||
void Foam::domainDecomposition::processInterCyclics
|
||||
(
|
||||
const polyBoundaryMesh& patches,
|
||||
List<DynamicList<DynamicList<label> > >& interPatchFaces,
|
||||
List<Map<label> >& procNbrToInterPatch,
|
||||
List<labelListList>& subPatchIDs,
|
||||
List<labelListList>& subPatchStarts,
|
||||
bool owner,
|
||||
BinaryOp bop
|
||||
) const
|
||||
{
|
||||
// Processor boundaries from split cyclics
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
if (isA<cyclicPolyPatch>(patches[patchi]))
|
||||
{
|
||||
const cyclicPolyPatch& pp = refCast<const cyclicPolyPatch>
|
||||
(
|
||||
patches[patchi]
|
||||
);
|
||||
|
||||
if (pp.owner() != owner)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// cyclic: check opposite side on this processor
|
||||
const labelUList& patchFaceCells = pp.faceCells();
|
||||
const labelUList& nbrPatchFaceCells =
|
||||
pp.neighbPatch().faceCells();
|
||||
|
||||
// Store old sizes. Used to detect which inter-proc patches
|
||||
// have been added to.
|
||||
labelListList oldInterfaceSizes(nProcs_);
|
||||
forAll(oldInterfaceSizes, procI)
|
||||
{
|
||||
labelList& curOldSizes = oldInterfaceSizes[procI];
|
||||
|
||||
curOldSizes.setSize(interPatchFaces[procI].size());
|
||||
forAll(curOldSizes, interI)
|
||||
{
|
||||
curOldSizes[interI] =
|
||||
interPatchFaces[procI][interI].size();
|
||||
}
|
||||
}
|
||||
|
||||
// Add faces with different owner and neighbour processors
|
||||
forAll(patchFaceCells, facei)
|
||||
{
|
||||
const label ownerProc = cellToProc_[patchFaceCells[facei]];
|
||||
const label nbrProc = cellToProc_[nbrPatchFaceCells[facei]];
|
||||
if (bop(ownerProc, nbrProc))
|
||||
{
|
||||
// inter - processor patch face found.
|
||||
addInterProcFace
|
||||
(
|
||||
pp.start()+facei,
|
||||
ownerProc,
|
||||
nbrProc,
|
||||
procNbrToInterPatch,
|
||||
interPatchFaces
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 1. Check if any faces added to existing interfaces
|
||||
forAll(oldInterfaceSizes, procI)
|
||||
{
|
||||
const labelList& curOldSizes = oldInterfaceSizes[procI];
|
||||
|
||||
forAll(curOldSizes, interI)
|
||||
{
|
||||
label oldSz = curOldSizes[interI];
|
||||
if (interPatchFaces[procI][interI].size() > oldSz)
|
||||
{
|
||||
// Added faces to this interface. Add an entry
|
||||
append(subPatchIDs[procI][interI], patchi);
|
||||
append(subPatchStarts[procI][interI], oldSz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Any new interfaces
|
||||
forAll(subPatchIDs, procI)
|
||||
{
|
||||
label nIntfcs = interPatchFaces[procI].size();
|
||||
subPatchIDs[procI].setSize(nIntfcs, labelList(1, patchi));
|
||||
subPatchStarts[procI].setSize(nIntfcs, labelList(1, label(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -195,41 +195,44 @@ void Foam::ensightMesh::correct()
|
|||
{
|
||||
forAll(mesh_.boundary(), patchi)
|
||||
{
|
||||
const polyPatch& p = mesh_.boundaryMesh()[patchi];
|
||||
|
||||
labelList& tris = boundaryFaceSets_[patchi].tris;
|
||||
labelList& quads = boundaryFaceSets_[patchi].quads;
|
||||
labelList& polys = boundaryFaceSets_[patchi].polys;
|
||||
|
||||
tris.setSize(p.size());
|
||||
quads.setSize(p.size());
|
||||
polys.setSize(p.size());
|
||||
|
||||
label nTris = 0;
|
||||
label nQuads = 0;
|
||||
label nPolys = 0;
|
||||
|
||||
forAll(p, faceI)
|
||||
if (mesh_.boundary()[patchi].size())
|
||||
{
|
||||
const face& f = p[faceI];
|
||||
const polyPatch& p = mesh_.boundaryMesh()[patchi];
|
||||
|
||||
if (f.size() == 3)
|
||||
labelList& tris = boundaryFaceSets_[patchi].tris;
|
||||
labelList& quads = boundaryFaceSets_[patchi].quads;
|
||||
labelList& polys = boundaryFaceSets_[patchi].polys;
|
||||
|
||||
tris.setSize(p.size());
|
||||
quads.setSize(p.size());
|
||||
polys.setSize(p.size());
|
||||
|
||||
label nTris = 0;
|
||||
label nQuads = 0;
|
||||
label nPolys = 0;
|
||||
|
||||
forAll(p, faceI)
|
||||
{
|
||||
tris[nTris++] = faceI;
|
||||
}
|
||||
else if (f.size() == 4)
|
||||
{
|
||||
quads[nQuads++] = faceI;
|
||||
}
|
||||
else
|
||||
{
|
||||
polys[nPolys++] = faceI;
|
||||
const face& f = p[faceI];
|
||||
|
||||
if (f.size() == 3)
|
||||
{
|
||||
tris[nTris++] = faceI;
|
||||
}
|
||||
else if (f.size() == 4)
|
||||
{
|
||||
quads[nQuads++] = faceI;
|
||||
}
|
||||
else
|
||||
{
|
||||
polys[nPolys++] = faceI;
|
||||
}
|
||||
}
|
||||
|
||||
tris.setSize(nTris);
|
||||
quads.setSize(nQuads);
|
||||
polys.setSize(nPolys);
|
||||
}
|
||||
|
||||
tris.setSize(nTris);
|
||||
quads.setSize(nQuads);
|
||||
polys.setSize(nPolys);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -240,9 +243,12 @@ void Foam::ensightMesh::correct()
|
|||
|
||||
if (patchNames_.empty() || patchNames_.found(patchName))
|
||||
{
|
||||
nfp.nTris = boundaryFaceSets_[patchi].tris.size();
|
||||
nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
|
||||
nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
|
||||
if (mesh_.boundary()[patchi].size())
|
||||
{
|
||||
nfp.nTris = boundaryFaceSets_[patchi].tris.size();
|
||||
nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
|
||||
nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
|
||||
}
|
||||
}
|
||||
|
||||
reduce(nfp.nTris, sumOp<label>());
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -56,10 +56,11 @@ Foam::processorPolyPatch::processorPolyPatch
|
|||
const polyBoundaryMesh& bm,
|
||||
const int myProcNo,
|
||||
const int neighbProcNo,
|
||||
const transformType transform
|
||||
const transformType transform,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(name, size, start, index, bm, typeName, transform),
|
||||
coupledPolyPatch(name, size, start, index, bm, patchType, transform),
|
||||
myProcNo_(myProcNo),
|
||||
neighbProcNo_(neighbProcNo),
|
||||
neighbFaceCentres_(),
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -136,7 +136,8 @@ public:
|
|||
const polyBoundaryMesh& bm,
|
||||
const int myProcNo,
|
||||
const int neighbProcNo,
|
||||
const transformType transform = UNKNOWN // transformation type
|
||||
const transformType transform = UNKNOWN, // transformation type
|
||||
const word& patchType = typeName
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
|
|||
const int myProcNo,
|
||||
const int neighbProcNo,
|
||||
const word& referPatchName,
|
||||
const transformType transform
|
||||
const transformType transform,
|
||||
const word& patchType
|
||||
)
|
||||
:
|
||||
processorPolyPatch
|
||||
|
|
@ -61,7 +62,8 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
|
|||
bm,
|
||||
myProcNo,
|
||||
neighbProcNo,
|
||||
transform
|
||||
transform,
|
||||
patchType
|
||||
),
|
||||
referPatchName_(referPatchName),
|
||||
tag_(-1),
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ public:
|
|||
const int myProcNo,
|
||||
const int neighbProcNo,
|
||||
const word& referPatchName,
|
||||
const transformType transform = UNKNOWN
|
||||
const transformType transform = UNKNOWN,
|
||||
const word& patchType = typeName
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -32,7 +32,7 @@ Description
|
|||
amplitude and frequency.
|
||||
|
||||
\f[
|
||||
x_p = (1 + a sin(\pi f t))x_{ref} + x_o
|
||||
x_p = (1 + a sin(2 \pi f t))x_{ref} + x_o
|
||||
\f]
|
||||
|
||||
where
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -95,12 +95,16 @@ bool Foam::MPPICParcel<ParcelType>::move
|
|||
|
||||
scalar f = p.stepFraction();
|
||||
|
||||
scalar a = p.age();
|
||||
|
||||
p.U() = (1.0 - f)*p.UCorrect();
|
||||
|
||||
ParcelType::move(td, trackTime);
|
||||
|
||||
p.U() = U + (p.stepFraction() - f)*p.UCorrect();
|
||||
|
||||
p.age() = a;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -160,7 +160,7 @@ Foam::label Foam::PatchFlowRateInjection<CloudType>::parcelsToInject
|
|||
|
||||
scalar c = concentration_.value(0.5*(time0 + time1));
|
||||
|
||||
scalar nParcels = fraction_*parcelConcentration_*c*flowRate()*dt;
|
||||
scalar nParcels = parcelConcentration_*c*flowRate()*dt;
|
||||
label nParcelsToInject = floor(nParcels);
|
||||
|
||||
// Inject an additional parcel with a probability based on the
|
||||
|
|
@ -205,7 +205,7 @@ Foam::scalar Foam::PatchFlowRateInjection<CloudType>::volumeToInject
|
|||
this->volumeTotal_ = volume;
|
||||
this->massTotal_ = volume*this->owner().constProps().rho0();
|
||||
|
||||
return fraction_*volume;
|
||||
return volume;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -68,8 +68,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
|||
patchInjectionBase::updateMesh(owner.mesh());
|
||||
|
||||
// Set total volume/mass to inject
|
||||
this->volumeTotal_ = fraction_*flowRateProfile_.integrate(0.0, duration_);
|
||||
this->massTotal_ *= fraction_;
|
||||
this->volumeTotal_ = flowRateProfile_.integrate(0.0, duration_);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -121,7 +120,7 @@ Foam::label Foam::PatchInjection<CloudType>::parcelsToInject
|
|||
{
|
||||
if ((time0 >= 0.0) && (time0 < duration_))
|
||||
{
|
||||
scalar nParcels = this->fraction_*(time1 - time0)*parcelsPerSecond_;
|
||||
scalar nParcels = (time1 - time0)*parcelsPerSecond_;
|
||||
|
||||
cachedRandom& rnd = this->owner().rndGen();
|
||||
|
||||
|
|
@ -159,7 +158,7 @@ Foam::scalar Foam::PatchInjection<CloudType>::volumeToInject
|
|||
{
|
||||
if ((time0 >= 0.0) && (time0 < duration_))
|
||||
{
|
||||
return this->fraction_*flowRateProfile_.integrate(time0, time1);
|
||||
return flowRateProfile_.integrate(time0, time1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -42,7 +42,6 @@ Foam::patchInjectionBase::patchInjectionBase
|
|||
patchArea_(0.0),
|
||||
patchNormal_(),
|
||||
cellOwners_(),
|
||||
fraction_(1.0),
|
||||
triFace_(),
|
||||
triToFace_(),
|
||||
triCumulativeMagSf_(),
|
||||
|
|
@ -73,7 +72,6 @@ Foam::patchInjectionBase::patchInjectionBase(const patchInjectionBase& pib)
|
|||
patchArea_(pib.patchArea_),
|
||||
patchNormal_(pib.patchNormal_),
|
||||
cellOwners_(pib.cellOwners_),
|
||||
fraction_(pib.fraction_),
|
||||
triFace_(pib.triFace_),
|
||||
triToFace_(pib.triToFace_),
|
||||
triCumulativeMagSf_(pib.triCumulativeMagSf_),
|
||||
|
|
@ -103,6 +101,9 @@ void Foam::patchInjectionBase::updateMesh(const polyMesh& mesh)
|
|||
DynamicList<face> triFace(2*patch.size());
|
||||
DynamicList<face> tris(5);
|
||||
|
||||
// set zero value at the start of the tri area list
|
||||
triMagSf.append(0.0);
|
||||
|
||||
forAll(patch, faceI)
|
||||
{
|
||||
const face& f = patch[faceI];
|
||||
|
|
@ -138,13 +139,10 @@ void Foam::patchInjectionBase::updateMesh(const polyMesh& mesh)
|
|||
triToFace_.transfer(triToFace);
|
||||
triCumulativeMagSf_.transfer(triMagSf);
|
||||
|
||||
// fraction of injection volume to be injected by this patch
|
||||
fraction_ = sumTriMagSf_[Pstream::myProcNo() + 1]/sum(sumTriMagSf_);
|
||||
|
||||
// convert sumTriMagSf_ into cumulative sum of areas per proc
|
||||
for (label i = 1; i < sumTriMagSf_.size(); i++)
|
||||
{
|
||||
sumTriMagSf_[i] += sumTriMagSf_[i - 1];
|
||||
sumTriMagSf_[i] += sumTriMagSf_[i-1];
|
||||
}
|
||||
|
||||
const scalarField magSf(mag(patch.faceAreas()));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -80,9 +80,6 @@ protected:
|
|||
//- List of cell labels corresponding to injector positions
|
||||
labelList cellOwners_;
|
||||
|
||||
//- Fraction of injection controlled by this processor
|
||||
scalar fraction_;
|
||||
|
||||
//- Decomposed patch faces as a list of triangles
|
||||
faceList triFace_;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -70,15 +70,12 @@ void Foam::partialWrite::read(const dictionary& dict)
|
|||
writeInstance_ = 0;
|
||||
|
||||
Info<< type() << " " << name() << ":" << nl
|
||||
<< " dumping every outputTime :";
|
||||
<< " dumping every " << writeInterval_
|
||||
<< " th outputTime : " << nl << endl ;
|
||||
forAllConstIter(HashSet<word>, objectNames_, iter)
|
||||
{
|
||||
Info<< ' ' << iter.key();
|
||||
}
|
||||
Info<< nl
|
||||
<< " dumping all other fields every "
|
||||
<< writeInterval_ << "th outputTime" << nl
|
||||
<< endl;
|
||||
|
||||
if (writeInterval_ < 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -188,11 +188,7 @@ void Foam::fieldValues::faceSource::setPatchFaces()
|
|||
const polyPatch& pp = mesh().boundaryMesh()[patchId];
|
||||
|
||||
label nFaces = pp.size();
|
||||
if (isA<cyclicPolyPatch>(pp))
|
||||
{
|
||||
nFaces /= 2;
|
||||
}
|
||||
else if (isA<emptyPolyPatch>(pp))
|
||||
if (isA<emptyPolyPatch>(pp))
|
||||
{
|
||||
nFaces = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -28,6 +28,7 @@ License
|
|||
|
||||
#include "specie.H"
|
||||
#include "perfectGas.H"
|
||||
#include "PengRobinsonGas.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "eConstThermo.H"
|
||||
#include "janafThermo.H"
|
||||
|
|
@ -38,6 +39,9 @@ License
|
|||
#include "constTransport.H"
|
||||
#include "sutherlandTransport.H"
|
||||
|
||||
#include "hPolynomialThermo.H"
|
||||
#include "polynomialTransport.H"
|
||||
|
||||
#include "hePsiThermo.H"
|
||||
#include "pureMixture.H"
|
||||
|
||||
|
|
@ -84,6 +88,41 @@ makeThermo
|
|||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleEnthalpy,
|
||||
hConstThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
polynomialTransport,
|
||||
sensibleEnthalpy,
|
||||
hPolynomialThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
polynomialTransport,
|
||||
sensibleEnthalpy,
|
||||
janafThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -31,6 +31,9 @@ License
|
|||
#include "incompressiblePerfectGas.H"
|
||||
#include "rhoConst.H"
|
||||
#include "perfectFluid.H"
|
||||
#include "PengRobinsonGas.H"
|
||||
#include "adiabaticPerfectFluid.H"
|
||||
|
||||
#include "hConstThermo.H"
|
||||
#include "janafThermo.H"
|
||||
#include "sensibleEnthalpy.H"
|
||||
|
|
@ -114,6 +117,18 @@ makeThermo
|
|||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleEnthalpy,
|
||||
hConstThermo,
|
||||
adiabaticPerfectFluid,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
|
|
@ -162,6 +177,41 @@ makeThermo
|
|||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleEnthalpy,
|
||||
hConstThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
polynomialTransport,
|
||||
sensibleEnthalpy,
|
||||
hPolynomialThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
polynomialTransport,
|
||||
sensibleEnthalpy,
|
||||
janafThermo,
|
||||
PengRobinsonGas,
|
||||
specie
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
@ -225,6 +275,18 @@ makeThermo
|
|||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
adiabaticPerfectFluid,
|
||||
specie
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,164 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Perfect gas equation of state.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PengRobinsonGas.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
PengRobinsonGas<Specie>::PengRobinsonGas(Istream& is)
|
||||
:
|
||||
Specie(is),
|
||||
Tc_(readScalar(is)),
|
||||
Pc_(readScalar(is)),
|
||||
omega_(readScalar(is))
|
||||
{
|
||||
is.check("PengRobinsonGas<Specie>::PengRobinsonGas(Istream& is)");
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
Foam::PengRobinsonGas<Specie>::PengRobinsonGas
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
Specie(dict),
|
||||
Tc_(readScalar(dict.subDict("equationOfState").lookup("Tc"))),
|
||||
Pc_(readScalar(dict.subDict("equationOfState").lookup("Pc"))),
|
||||
omega_(readScalar(dict.subDict("equationOfState").lookup("omega")))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
PengRobinsonGas<Specie> operator+
|
||||
(
|
||||
const PengRobinsonGas<Specie>& pg1,
|
||||
const PengRobinsonGas<Specie>& pg2
|
||||
)
|
||||
{
|
||||
scalar nMoles = pg1.nMoles() + pg2.nMoles();
|
||||
scalar molr1 = pg1.nMoles()/nMoles;
|
||||
scalar molr2 = pg2.nMoles()/nMoles;
|
||||
|
||||
return PengRobinsonGas<Specie>
|
||||
(
|
||||
static_cast<const Specie&>(pg1)
|
||||
+ static_cast<const Specie&>(pg2),
|
||||
molr1*pg1.Tc_ + molr2*pg2.Tc_,
|
||||
molr1*pg1.Pc_ + molr2*pg2.Pc_,
|
||||
molr1*pg1.omega_ + molr2*pg2.omega_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
PengRobinsonGas<Specie> operator-
|
||||
(
|
||||
const PengRobinsonGas<Specie>& pg1,
|
||||
const PengRobinsonGas<Specie>& pg2
|
||||
)
|
||||
{
|
||||
scalar nMoles = pg1.nMoles() + pg2.nMoles();
|
||||
scalar molr1 = pg1.nMoles()/nMoles;
|
||||
scalar molr2 = pg2.nMoles()/nMoles;
|
||||
|
||||
return PengRobinsonGas<Specie>
|
||||
(
|
||||
static_cast<const Specie&>(pg1)
|
||||
- static_cast<const Specie&>(pg2),
|
||||
molr1*pg1.Tc_ - molr2*pg2.Tc_,
|
||||
molr1*pg1.Pc_ - molr2*pg2.Pc_,
|
||||
molr1*pg1.omega_ - molr2*pg2.omega_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
PengRobinsonGas<Specie> operator*
|
||||
(
|
||||
const scalar s,
|
||||
const PengRobinsonGas<Specie>& pg
|
||||
)
|
||||
{
|
||||
return PengRobinsonGas<Specie>
|
||||
(
|
||||
s*static_cast<const Specie&>(pg),
|
||||
pg.Tc_,
|
||||
pg.Pc_,
|
||||
pg.omega_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
PengRobinsonGas<Specie> operator==
|
||||
(
|
||||
const PengRobinsonGas<Specie>& pg1,
|
||||
const PengRobinsonGas<Specie>& pg2
|
||||
)
|
||||
{
|
||||
return pg2 - pg1;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const PengRobinsonGas<Specie>& pg
|
||||
)
|
||||
{
|
||||
os << static_cast<const Specie&>(pg)
|
||||
<< token::SPACE << pg.Tc_
|
||||
<< token::SPACE << pg.Pc_
|
||||
<< token::SPACE << pg.omega_;
|
||||
|
||||
os.check
|
||||
(
|
||||
"Ostream& operator<<(Ostream& os, const PengRobinsonGas<Specie>& st)"
|
||||
);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Class
|
||||
Foam::PengRobinsonGas
|
||||
|
||||
Description
|
||||
PengRobinsonGas gas equation of state.
|
||||
|
||||
SourceFiles
|
||||
PengRobinsonGasI.H
|
||||
PengRobinsonGas.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PengRobinsonGas_H
|
||||
#define PengRobinsonGas_H
|
||||
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
|
||||
template<class Specie> class PengRobinsonGas;
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie> operator+
|
||||
(
|
||||
const PengRobinsonGas<Specie>&,
|
||||
const PengRobinsonGas<Specie>&
|
||||
);
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie> operator-
|
||||
(
|
||||
const PengRobinsonGas<Specie>&,
|
||||
const PengRobinsonGas<Specie>&
|
||||
);
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie> operator*
|
||||
(
|
||||
const scalar,
|
||||
const PengRobinsonGas<Specie>&
|
||||
);
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie> operator==
|
||||
(
|
||||
const PengRobinsonGas<Specie>&,
|
||||
const PengRobinsonGas<Specie>&
|
||||
);
|
||||
|
||||
template<class Specie>
|
||||
Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const PengRobinsonGas<Specie>&
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PengRobinsonGas Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Specie>
|
||||
class PengRobinsonGas
|
||||
:
|
||||
public Specie
|
||||
{
|
||||
private:
|
||||
// Private data
|
||||
|
||||
//- Critical Temperature [K]
|
||||
scalar Tc_;
|
||||
|
||||
//- Critical Pressure [Pa]
|
||||
scalar Pc_;
|
||||
|
||||
//- Accentric factor [-]
|
||||
scalar omega_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
inline PengRobinsonGas
|
||||
(
|
||||
const Specie& sp,
|
||||
const scalar& Tc,
|
||||
const scalar& Pc,
|
||||
const scalar& omega
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
PengRobinsonGas(Istream&);
|
||||
|
||||
//- Construct from dictionary
|
||||
PengRobinsonGas(const dictionary& dict);
|
||||
|
||||
//- Construct as named copy
|
||||
inline PengRobinsonGas(const word& name, const PengRobinsonGas&);
|
||||
|
||||
//- Construct and return a clone
|
||||
inline autoPtr<PengRobinsonGas> clone() const;
|
||||
|
||||
// Selector from Istream
|
||||
inline static autoPtr<PengRobinsonGas> New(Istream& is);
|
||||
|
||||
// Selector from dictionary
|
||||
inline static autoPtr<PengRobinsonGas> New
|
||||
(
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Return the instantiated type name
|
||||
static word typeName()
|
||||
{
|
||||
return "PengRobinsonGas<" + word(Specie::typeName_()) + '>';
|
||||
}
|
||||
|
||||
// Fundamental properties
|
||||
|
||||
|
||||
//- Is the equation of state is incompressible i.e. rho != f(p)
|
||||
static const bool incompressible = false;
|
||||
|
||||
//- Is the equation of state is isochoric i.e. rho = const
|
||||
static const bool isochoric = false;
|
||||
|
||||
//- Return density [kg/m^3]
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return compressibility rho/p [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
//- Return compression factor []
|
||||
inline scalar Z(scalar p, scalar T) const;
|
||||
|
||||
//- Return (cp - cv) [J/(kmol K]
|
||||
inline scalar cpMcv(scalar p, scalar T) const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Write to Ostream
|
||||
void write(Ostream& os) const;
|
||||
|
||||
// Member operators
|
||||
|
||||
inline void operator+=(const PengRobinsonGas&);
|
||||
inline void operator-=(const PengRobinsonGas&);
|
||||
|
||||
inline void operator*=(const scalar);
|
||||
|
||||
|
||||
// Friend operators
|
||||
|
||||
friend PengRobinsonGas operator+ <Specie>
|
||||
(
|
||||
const PengRobinsonGas&,
|
||||
const PengRobinsonGas&
|
||||
);
|
||||
|
||||
friend PengRobinsonGas operator- <Specie>
|
||||
(
|
||||
const PengRobinsonGas&,
|
||||
const PengRobinsonGas&
|
||||
);
|
||||
|
||||
friend PengRobinsonGas operator* <Specie>
|
||||
(
|
||||
const scalar s,
|
||||
const PengRobinsonGas&
|
||||
);
|
||||
|
||||
friend PengRobinsonGas operator== <Specie>
|
||||
(
|
||||
const PengRobinsonGas&,
|
||||
const PengRobinsonGas&
|
||||
);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
friend Ostream& operator<< <Specie>
|
||||
(
|
||||
Ostream&,
|
||||
const PengRobinsonGas&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "PengRobinsonGasI.H"
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "PengRobinsonGas.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,239 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PengRobinsonGas.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie>::PengRobinsonGas
|
||||
(
|
||||
const Specie& sp,
|
||||
const scalar& Tc,
|
||||
const scalar& Pc,
|
||||
const scalar& omega
|
||||
)
|
||||
:
|
||||
Specie(sp),
|
||||
Tc_(Tc),
|
||||
Pc_(Pc),
|
||||
omega_(omega)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
inline PengRobinsonGas<Specie>::PengRobinsonGas
|
||||
(
|
||||
const word& name,
|
||||
const PengRobinsonGas& pg
|
||||
)
|
||||
:
|
||||
Specie(name, pg),
|
||||
Tc_(pg.Tc),
|
||||
Pc_(pg.Pc),
|
||||
omega_(pg.omega)
|
||||
{}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline autoPtr<PengRobinsonGas <Specie> > PengRobinsonGas<Specie>::clone() const
|
||||
{
|
||||
return autoPtr<PengRobinsonGas<Specie> >
|
||||
(
|
||||
new PengRobinsonGas<Specie>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline autoPtr<PengRobinsonGas<Specie> > PengRobinsonGas<Specie>::New
|
||||
(
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
return autoPtr<PengRobinsonGas<Specie> >(new PengRobinsonGas<Specie>(is));
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::autoPtr<Foam::PengRobinsonGas<Specie> >
|
||||
Foam::PengRobinsonGas<Specie>::New
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
return autoPtr<PengRobinsonGas<Specie> >
|
||||
(
|
||||
new PengRobinsonGas<Specie>(dict)
|
||||
);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
inline scalar PengRobinsonGas<Specie>::rho(scalar p, scalar T) const
|
||||
{
|
||||
scalar z = Z(p, T);
|
||||
return p/(z*this->R()*T);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline scalar PengRobinsonGas<Specie>::psi(scalar p, scalar T) const
|
||||
{
|
||||
scalar z = Z(p, T);
|
||||
return 1.0/(z*this->R()*T);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline scalar PengRobinsonGas<Specie>::Z(scalar p, scalar T) const
|
||||
{
|
||||
scalar a = 0.45724*sqr(this->R())*sqr(Tc_)/Pc_;
|
||||
scalar b = 0.07780*this->R()*Tc_/Pc_;
|
||||
scalar Tr = T/Tc_;
|
||||
|
||||
scalar alpha =
|
||||
sqr
|
||||
(
|
||||
1.0
|
||||
+ (0.37464 + 1.54226*omega_- 0.26992*sqr(omega_))
|
||||
* (1.0 - sqrt(Tr))
|
||||
);
|
||||
|
||||
scalar B = b*p/(this->R()*T);
|
||||
scalar A = a*alpha*p/sqr(this->R()*T);
|
||||
|
||||
scalar a2 = B - 1.0;
|
||||
scalar a1 = A - 2.0*B - 3.0*sqr(B);
|
||||
scalar a0 = -A*B + sqr(B) + pow3(B);
|
||||
|
||||
scalar Q = (3.0*a1 - a2*a2)/9.0;
|
||||
scalar Rl = (9.0*a2*a1 - 27.0*a0 - 2.0*a2*a2*a2)/54;
|
||||
|
||||
scalar Q3 = Q*Q*Q;
|
||||
scalar D = Q3 + Rl*Rl;
|
||||
|
||||
scalar root = -1.0;
|
||||
|
||||
if (D <= 0.0)
|
||||
{
|
||||
scalar th = ::acos(Rl/sqrt(-Q3));
|
||||
scalar qm = 2.0*sqrt(-Q);
|
||||
scalar r1 = qm*cos(th/3.0) - a2/3.0;
|
||||
scalar r2 = qm*cos((th + 2.0*constant::mathematical::pi)/3.0) - a2/3.0;
|
||||
scalar r3 = qm*cos((th + 4.0*constant::mathematical::pi)/3.0) - a2/3.0;
|
||||
|
||||
root = max(r1, max(r2, r3));
|
||||
}
|
||||
else
|
||||
{
|
||||
// one root is real
|
||||
scalar D05 = sqrt(D);
|
||||
scalar S = pow(Rl + D05, 1.0/3.0);
|
||||
scalar Tl = 0;
|
||||
if (D05 > Rl)
|
||||
{
|
||||
Tl = -pow(mag(Rl - D05), 1.0/3.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Tl = pow(Rl - D05, 1.0/3.0);
|
||||
}
|
||||
|
||||
root = S + Tl - a2/3.0;
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::cpMcv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
) const
|
||||
{
|
||||
return this->RR*Z(p, T);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Specie>
|
||||
inline void PengRobinsonGas<Specie>::operator+=
|
||||
(
|
||||
const PengRobinsonGas<Specie>& pg
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
Specie::operator+=(pg);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = pg.nMoles()/this->nMoles();
|
||||
|
||||
Tc_ = molr1*Tc_ + molr2*pg.Tc_;
|
||||
Pc_ = molr1*Pc_ + molr2*pg.Pc_;
|
||||
omega_ = molr1*omega_ + molr2*pg.omega_;
|
||||
}
|
||||
|
||||
template<class Specie>
|
||||
inline void PengRobinsonGas<Specie>::operator-=
|
||||
(
|
||||
const PengRobinsonGas<Specie>& pg
|
||||
)
|
||||
{
|
||||
scalar molr1 = this->nMoles();
|
||||
|
||||
Specie::operator-=(pg);
|
||||
|
||||
molr1 /= this->nMoles();
|
||||
scalar molr2 = pg.nMoles()/this->nMoles();
|
||||
|
||||
Tc_ = molr1*Tc_ - molr2*pg.Tc_;
|
||||
Pc_ = molr1*Pc_ - molr2*pg.Pc_;
|
||||
omega_ = molr1*omega_ - molr2*pg.omega_;
|
||||
}
|
||||
|
||||
template<class Specie>
|
||||
inline void PengRobinsonGas<Specie>::operator*=(const scalar s)
|
||||
{
|
||||
Specie::operator*=(s);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -563,7 +563,6 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||
{
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -580,7 +580,6 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||
{
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::write
|
|||
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("QrNbr")<< QrNbrName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||
thicknessLayers_.writeEntry("thicknessLayers", os);
|
||||
thicknessLayers_.writeEntry("kappaLayers", os);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -563,7 +563,6 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||
{
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -578,7 +578,6 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||
{
|
||||
fixedValueFvPatchField<scalar>::write(os);
|
||||
writeLocalEntries(os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
|
|
@ -80,7 +80,10 @@ do
|
|||
(
|
||||
[ -d $appDir ] && cd $appDir || exit
|
||||
|
||||
for log in `find . -name "log.*" | xargs ls -rt`
|
||||
logs=`find . -name "log.*"`
|
||||
[ -n "$logs" ] || exit
|
||||
|
||||
for log in `echo $logs | xargs ls -rt`
|
||||
do
|
||||
logReport $log >> ../testLoopReport
|
||||
done
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ for xi in $(seq 1 1 $nx); do
|
|||
z2=`echo $z $l $tol | awk '{print $1 + $2 + $3}'`
|
||||
addToFaceSet cube${pad}${n}_side${side} $x1 $x2 $y1 $y2 $z1 $z2
|
||||
|
||||
let n+=1
|
||||
n=$((n+1))
|
||||
|
||||
z=`echo $z $offset | awk '{print $1 + $2}'`
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue