mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -23,34 +23,58 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
simple generic PtrList MACROS for looping
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PtrListLoop_H
|
||||
#define PtrListLoop_H
|
||||
|
||||
#include "undefListLoopM.H"
|
||||
#include "DynamicField.H"
|
||||
#include "IOstreams.H"
|
||||
#include "labelField.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
// Element access looping using [] for vector and parallel machines
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
{
|
||||
DynamicField<label> dl(10);
|
||||
Pout<< "null construct dl:" << dl << endl;
|
||||
dl.append(3);
|
||||
dl.append(2);
|
||||
dl.append(1);
|
||||
Pout<< "appending : dl:" << dl << endl;
|
||||
}
|
||||
|
||||
#define List_FOR_ALL(f, i) \
|
||||
forAll(f, i) \
|
||||
{ \
|
||||
{
|
||||
DynamicField<label> dl(IStringStream("(1 2 3)")());
|
||||
Pout<< "reading : dl:" << dl << endl;
|
||||
}
|
||||
|
||||
#define List_END_FOR_ALL }
|
||||
{
|
||||
labelField lf(3);
|
||||
lf[0] = 1;
|
||||
lf[1] = 2;
|
||||
lf[2] = 3;
|
||||
DynamicField<label> dl;
|
||||
dl = lf;
|
||||
Pout<< "assigning from labelField : dl:" << dl << endl;
|
||||
}
|
||||
|
||||
#define List_ELEM(f, fp, i) ((f)[i])
|
||||
|
||||
#define List_ACCESS(type, f, fp)
|
||||
#define List_CONST_ACCESS(type, f, fp)
|
||||
{
|
||||
labelField lf(3);
|
||||
lf[0] = 1;
|
||||
lf[1] = 2;
|
||||
lf[2] = 3;
|
||||
DynamicField<label> dl(lf);
|
||||
Pout<< "constructing from labelField dl:" << dl << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Info<< "\nEnd\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
3
applications/test/DynamicField/Make/files
Normal file
3
applications/test/DynamicField/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
DynamicFieldTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/DynamicFieldTest
|
||||
2
applications/test/DynamicField/Make/options
Normal file
2
applications/test/DynamicField/Make/options
Normal file
@ -0,0 +1,2 @@
|
||||
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
|
||||
/* EXE_LIBS = -lfiniteVolume */
|
||||
@ -1,3 +0,0 @@
|
||||
speedTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/speedTest
|
||||
@ -1 +0,0 @@
|
||||
EXE_INC = /* -ffast-math -mtune=core2 */
|
||||
3
applications/test/speed/scalarSpeedTest/Make/files
Normal file
3
applications/test/speed/scalarSpeedTest/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
scalarSpeedTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/scalarSpeedTest
|
||||
192
applications/test/speed/scalarSpeedTest/scalarSpeedTest.C
Normal file
192
applications/test/speed/scalarSpeedTest/scalarSpeedTest.C
Normal file
@ -0,0 +1,192 @@
|
||||
#include "primitiveFields.H"
|
||||
#include "Random.H"
|
||||
#include "cpuTime.H"
|
||||
#include "IOstreams.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
int main()
|
||||
{
|
||||
Info<< "Initialising fields" << endl;
|
||||
|
||||
const label nIter = 100;
|
||||
const label size = 10000000;
|
||||
const label rndAddrSkip = 40;
|
||||
const label redFac = 6;
|
||||
const label redSize = size/redFac;
|
||||
Random genAddr(100);
|
||||
|
||||
double* f1 = new double[size];
|
||||
double* f2 = new double[size];
|
||||
double* f3 = new double[size];
|
||||
double* f4 = new double[size];
|
||||
double* fr = new double[redSize];
|
||||
label* addr = new label[size];
|
||||
label* redAddr = new label[size];
|
||||
label* redAddr2 = new label[size];
|
||||
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f1[i] = 1.0;
|
||||
f2[i] = 1.0;
|
||||
f3[i] = 1.0;
|
||||
addr[i] = i;
|
||||
redAddr[i] = i/redFac;
|
||||
redAddr2[i] = (size - i - 1)/redFac;
|
||||
}
|
||||
|
||||
for (register label i=0; i<size; i+=rndAddrSkip)
|
||||
{
|
||||
addr[i] = genAddr.integer(0, size-1);
|
||||
}
|
||||
|
||||
for (register label i=0; i<redSize; i++)
|
||||
{
|
||||
fr[i] = 1.0;
|
||||
}
|
||||
|
||||
Info<< "Done\n" <<endl;
|
||||
|
||||
{
|
||||
Info<< "Single loop combined operation (expression templates)"
|
||||
<< endl;
|
||||
|
||||
cpuTime executionTime;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[i] = f1[i] + f2[i] - f3[i];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< f4[1] << endl << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "Single loop combined operation with indirect addressing"
|
||||
<< endl;
|
||||
|
||||
cpuTime executionTime;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[addr[i]] = f1[addr[i]] + f2[addr[i]] - f3[addr[i]];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< f4[1] << endl << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "Single loop reduction operation"
|
||||
<< endl;
|
||||
|
||||
cpuTime executionTime;
|
||||
label redOffset = (size - 1)/redFac;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
label j = i/redFac;
|
||||
fr[j] += f1[i];
|
||||
fr[redOffset - j] -= f2[i];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< fr[1] << endl << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "Single loop reduction operation with indirect addressing"
|
||||
<< endl;
|
||||
|
||||
cpuTime executionTime;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
fr[redAddr[i]] += f1[i];
|
||||
fr[redAddr2[i]] -= f2[i];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< fr[1] << endl << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "Separate loops ?= operations" << endl;
|
||||
|
||||
cpuTime executionTime;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[i] = f1[i];
|
||||
}
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[i] += f2[i];
|
||||
}
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[i] -= f3[i];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< f4[1] << endl << endl;
|
||||
}
|
||||
|
||||
{
|
||||
Info<< "OpenFOAM field algebra" << endl;
|
||||
|
||||
scalarField
|
||||
sf1(size, 1.0),
|
||||
sf2(size, 1.0),
|
||||
sf3(size, 1.0),
|
||||
sf4(size);
|
||||
|
||||
cpuTime executionTime;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
//sf4 = sf1 + sf2 - sf3;
|
||||
sf4 = sf1;
|
||||
sf4 += sf2;
|
||||
sf4 -= sf3;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< sf4[1] << endl << endl;
|
||||
}
|
||||
}
|
||||
@ -1,99 +0,0 @@
|
||||
#include "primitiveFields.H"
|
||||
#include "cpuTime.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
int main()
|
||||
{
|
||||
const label nIter = 10;
|
||||
const label size = 10000000;
|
||||
|
||||
double* f1 = new double[size];
|
||||
double* f2 = new double[size];
|
||||
double* f3 = new double[size];
|
||||
double* f4 = new double[size];
|
||||
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f1[i] = 1.0;
|
||||
f2[i] = 1.0;
|
||||
f3[i] = 1.0;
|
||||
}
|
||||
|
||||
cpuTime executionTime1;
|
||||
|
||||
for (int j=0; j<nIter; j++)
|
||||
{
|
||||
for (register label i=0; i<size; i++)
|
||||
{
|
||||
f4[i] = f1[i] + f2[i] - f3[i];
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime1.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Info << f4[1] << endl << endl;
|
||||
|
||||
|
||||
scalarField sf1(size, 1.0), sf2(size, 1.0), sf3(size, 1.0), sf4(size);
|
||||
|
||||
cpuTime executionTime2;
|
||||
|
||||
for (register int j=0; j<nIter; j++)
|
||||
{
|
||||
sf4 = sf1 + sf2 - sf3;
|
||||
//sf4 = sf1;
|
||||
//sf4 += sf2;
|
||||
//sf4 -= sf3;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime2.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Info << sf4[1] << endl << endl;
|
||||
|
||||
|
||||
vectorField
|
||||
vf1(size, vector::one),
|
||||
vf2(size, vector::one),
|
||||
vf3(size, vector::one),
|
||||
vf4(size);
|
||||
|
||||
cpuTime executionTime3;
|
||||
|
||||
for (register int j=0; j<nIter; j++)
|
||||
{
|
||||
vf4 = vf1 + vf2 - vf3;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime3.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Info << vf4[1] << endl << endl;
|
||||
|
||||
cpuTime executionTime4;
|
||||
|
||||
scalarField sf11(size, 1.0), sf12(size, 1.0), sf13(size, 1.0), sf14(size);
|
||||
scalarField sf21(size, 1.0), sf22(size, 1.0), sf23(size, 1.0), sf24(size);
|
||||
scalarField sf31(size, 1.0), sf32(size, 1.0), sf33(size, 1.0), sf34(size);
|
||||
|
||||
for (register int j=0; j<nIter; j++)
|
||||
{
|
||||
sf14 = sf11 + sf12 - sf13;
|
||||
sf24 = sf21 + sf22 - sf23;
|
||||
sf34 = sf31 + sf32 - sf33;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime4.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Info << sf14[1] << sf24[1] << sf34[1] << endl << endl;
|
||||
|
||||
|
||||
}
|
||||
3
applications/test/speed/vectorSpeedTest/Make/files
Normal file
3
applications/test/speed/vectorSpeedTest/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
vectorSpeedTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/vectorSpeedTest
|
||||
39
applications/test/speed/vectorSpeedTest/vectorSpeedTest.C
Normal file
39
applications/test/speed/vectorSpeedTest/vectorSpeedTest.C
Normal file
@ -0,0 +1,39 @@
|
||||
#include "primitiveFields.H"
|
||||
#include "cpuTime.H"
|
||||
#include "IOstreams.H"
|
||||
#include "OFstream.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
int main()
|
||||
{
|
||||
const label nIter = 100;
|
||||
const label size = 1000000;
|
||||
|
||||
Info<< "Initialising fields" << endl;
|
||||
|
||||
vectorField
|
||||
vf1(size, vector::one),
|
||||
vf2(size, vector::one),
|
||||
vf3(size, vector::one),
|
||||
vf4(size);
|
||||
|
||||
Info<< "Done\n" << endl;
|
||||
|
||||
{
|
||||
cpuTime executionTime;
|
||||
|
||||
Info<< "vectorField algebra" << endl;
|
||||
|
||||
for (register int j=0; j<nIter; j++)
|
||||
{
|
||||
vf4 = vf1 + vf2 - vf3;
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = "
|
||||
<< executionTime.elapsedCpuTime()
|
||||
<< " s\n" << endl;
|
||||
|
||||
Snull<< vf4[1] << endl << endl;
|
||||
}
|
||||
}
|
||||
@ -657,6 +657,16 @@ void readCells
|
||||
<< " tet :" << nTet << endl
|
||||
<< endl;
|
||||
|
||||
if (cells.size() == 0)
|
||||
{
|
||||
FatalErrorIn("readCells(..)")
|
||||
<< "No cells read from file " << inFile.name() << nl
|
||||
<< "Does your file specify any 3D elements (hex=" << MSHHEX
|
||||
<< ", prism=" << MSHPRISM << ", pyramid=" << MSHPYR
|
||||
<< ", tet=" << MSHTET << ")?" << nl
|
||||
<< "Perhaps you have not exported the 3D elements?"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
Info<< "CellZones:" << nl
|
||||
<< "Zone\tSize" << endl;
|
||||
|
||||
@ -46,11 +46,14 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
#include "addRegionOption.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
#include "createMesh.H"
|
||||
#include "createNamedMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,7 +63,7 @@ primitives/random/Random.C
|
||||
containers/HashTables/HashTable/HashTableName.C
|
||||
containers/HashTables/StaticHashTable/StaticHashTableName.C
|
||||
containers/Lists/SortableList/ParSortableListName.C
|
||||
containers/Lists/PackedList/PackedListCore.C
|
||||
containers/Lists/PackedList/PackedListName.C
|
||||
containers/Lists/ListOps/ListOps.C
|
||||
containers/LinkedLists/linkTypes/SLListBase/SLListBase.C
|
||||
containers/LinkedLists/linkTypes/DLListBase/DLListBase.C
|
||||
|
||||
@ -31,8 +31,6 @@ Description
|
||||
#ifndef ListLoop_H
|
||||
#define ListLoop_H
|
||||
|
||||
#include "undefListLoopM.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef vectorMachine
|
||||
@ -48,8 +46,11 @@ Description
|
||||
|
||||
#define List_ELEM(f, fp, i) (fp[i])
|
||||
|
||||
#define List_ACCESS(type, f, fp) type* __restrict__ fp = (f).begin()
|
||||
#define List_CONST_ACCESS(type, f, fp) const type* __restrict__ fp = (f).begin()
|
||||
#define List_ACCESS(type, f, fp) \
|
||||
type* const __restrict__ fp = (f).begin()
|
||||
|
||||
#define List_CONST_ACCESS(type, f, fp) \
|
||||
const type* const __restrict__ fp = (f).begin()
|
||||
|
||||
#else
|
||||
|
||||
@ -64,8 +65,11 @@ Description
|
||||
|
||||
#define List_ELEM(f, fp, i) (*fp++)
|
||||
|
||||
#define List_ACCESS(type, f, fp) register type* __restrict__ fp = (f).begin()
|
||||
#define List_CONST_ACCESS(type, f, fp) register const type* __restrict__ fp = (f).begin()
|
||||
#define List_ACCESS(type, f, fp) \
|
||||
register type* __restrict__ fp = (f).begin()
|
||||
|
||||
#define List_CONST_ACCESS(type, f, fp) \
|
||||
register const type* __restrict__ fp = (f).begin()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 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
|
||||
A List\<Type\> is a 1D array of objects of type 'Type',
|
||||
where the size of the array is known and used for subscript
|
||||
bounds checking, etc.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef List_FOR_ALL
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#undef List_FOR_ALL
|
||||
#undef List_END_FOR_ALL
|
||||
#undef List_ELEM
|
||||
#undef List_ACCESS
|
||||
#undef List_CONST_ACCESS
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -22,8 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "PackedList.H"
|
||||
@ -27,7 +27,6 @@ License
|
||||
#include "error.H"
|
||||
|
||||
#include "PtrList.H"
|
||||
#include "PtrListLoopM.H"
|
||||
#include "SLPtrList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -27,7 +27,6 @@ License
|
||||
#include "error.H"
|
||||
|
||||
#include "UPtrList.H"
|
||||
#include "PtrListLoopM.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ void transform
|
||||
{
|
||||
TFOR_ALL_F_OP_FUNC_F_F
|
||||
(
|
||||
Type, rtf, =, transform, tensor, trf, Type, tf
|
||||
Type, rtf, =, transform, symmTensor, trf, Type, tf
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,6 +298,7 @@ Foam::argList::argList
|
||||
jobInfo.add("startTime", timeString);
|
||||
jobInfo.add("userName", userName());
|
||||
jobInfo.add("foamVersion", word(FOAMversion));
|
||||
jobInfo.add("foamBuild", Foam::FOAMbuild);
|
||||
jobInfo.add("code", executable_);
|
||||
jobInfo.add("argList", argListString);
|
||||
jobInfo.add("currentDir", cwd());
|
||||
|
||||
@ -67,38 +67,15 @@ void Foam::lduMatrix::Amul
|
||||
register const label nCells = diag().size();
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&psiPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&diagPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&ApsiPtr[cell+96],1,1);
|
||||
#endif
|
||||
|
||||
ApsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
|
||||
}
|
||||
|
||||
|
||||
register const label nFaces = upper().size();
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma swp
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lowerPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[lPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&ApsiPtr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
ApsiPtr[uPtr[face]] += lowerPtr[face]*psiPtr[lPtr[face]];
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&upperPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&ApsiPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
ApsiPtr[lPtr[face]] += upperPtr[face]*psiPtr[uPtr[face]];
|
||||
}
|
||||
|
||||
@ -151,34 +128,13 @@ void Foam::lduMatrix::Tmul
|
||||
register const label nCells = diag().size();
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&psiPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&diagPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&TpsiPtr[cell+96],1,1);
|
||||
#endif
|
||||
|
||||
TpsiPtr[cell] = diagPtr[cell]*psiPtr[cell];
|
||||
}
|
||||
|
||||
register const label nFaces = upper().size();
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lPtr[face+32],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[lPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&TpsiPtr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
TpsiPtr[uPtr[face]] += upperPtr[face]*psiPtr[lPtr[face]];
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&lowerPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&TpsiPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
TpsiPtr[lPtr[face]] += lowerPtr[face]*psiPtr[uPtr[face]];
|
||||
}
|
||||
|
||||
@ -218,34 +174,12 @@ void Foam::lduMatrix::sumA
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&diagPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&sumAPtr[cell+96],1,1);
|
||||
#endif
|
||||
|
||||
sumAPtr[cell] = diagPtr[cell];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma swp
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lowerPtr[face+32],0,1);
|
||||
__builtin_prefetch (&sumAPtr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
sumAPtr[uPtr[face]] += lowerPtr[face];
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&upperPtr[face+32],0,1);
|
||||
__builtin_prefetch (&sumAPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
sumAPtr[lPtr[face]] += upperPtr[face];
|
||||
}
|
||||
|
||||
@ -323,39 +257,15 @@ void Foam::lduMatrix::residual
|
||||
register const label nCells = diag().size();
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&psiPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&diagPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&sourcePtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],1,1);
|
||||
#endif
|
||||
|
||||
rAPtr[cell] = sourcePtr[cell] - diagPtr[cell]*psiPtr[cell];
|
||||
}
|
||||
|
||||
|
||||
register const label nFaces = upper().size();
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma swp
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lowerPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[lPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&rAPtr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
rAPtr[uPtr[face]] -= lowerPtr[face]*psiPtr[lPtr[face]];
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&upperPtr[face+32],0,1);
|
||||
__builtin_prefetch (&psiPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&rAPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
rAPtr[lPtr[face]] -= upperPtr[face]*psiPtr[uPtr[face]];
|
||||
}
|
||||
|
||||
|
||||
@ -353,20 +353,7 @@ Foam::tmp<Foam::scalarField > Foam::lduMatrix::H1() const
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lPtr[face+32],0,0);
|
||||
__builtin_prefetch (&lowerPtr[face+32],0,1);
|
||||
__builtin_prefetch (&H1Ptr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
H1Ptr[uPtr[face]] -= lowerPtr[face];
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&upperPtr[face+32],0,1);
|
||||
__builtin_prefetch (&H1Ptr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
H1Ptr[lPtr[face]] -= upperPtr[face];
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,29 +71,15 @@ void Foam::DICPreconditioner::calcReciprocalD
|
||||
register const label nFaces = matrix.upper().size();
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face+24]],0,1);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+24]],1,1);
|
||||
#endif
|
||||
|
||||
rDPtr[uPtr[face]] -= upperPtr[face]*upperPtr[face]/rDPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
|
||||
// Calculate the reciprocal of the preconditioned diagonal
|
||||
register const label nCells = rD.size();
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
rDPtr[cell] = 1.0/rDPtr[cell];
|
||||
}
|
||||
}
|
||||
@ -120,61 +106,18 @@ void Foam::DICPreconditioner::precondition
|
||||
register label nFaces = solver_.matrix().upper().size();
|
||||
register label nFacesM1 = nFaces - 1;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,upperPtr,rDPtr,wAPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,0);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[uPtr[face]] -= rDPtr[uPtr[face]]*upperPtr[face]*wAPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,rDPtr,wAPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=nFacesM1; face>=0; face--)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face-95],0,0);
|
||||
__builtin_prefetch (&lPtr[face-95],0,0);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-32]],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[lPtr[face]] -= rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,30 +72,15 @@ void Foam::DILUPreconditioner::calcReciprocalD
|
||||
register label nFaces = matrix.upper().size();
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,1);
|
||||
__builtin_prefetch (&lowerPtr[face+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face+24]],0,1);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+24]],1,1);
|
||||
#endif
|
||||
|
||||
rDPtr[uPtr[face]] -= upperPtr[face]*lowerPtr[face]/rDPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
|
||||
// Calculate the reciprocal of the preconditioned diagonal
|
||||
register label nCells = rD.size();
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
rDPtr[cell] = 1.0/rDPtr[cell];
|
||||
}
|
||||
}
|
||||
@ -128,26 +113,14 @@ void Foam::DILUPreconditioner::precondition
|
||||
register label nFaces = solver_.matrix().upper().size();
|
||||
register label nFacesM1 = nFaces - 1;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
|
||||
}
|
||||
|
||||
|
||||
register label sface;
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
sface = losortPtr[face];
|
||||
@ -155,28 +128,8 @@ void Foam::DILUPreconditioner::precondition
|
||||
rDPtr[uPtr[sface]]*lowerPtr[sface]*wAPtr[lPtr[sface]];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,rDPtr,wAPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=nFacesM1; face>=0; face--)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face-95],0,0);
|
||||
__builtin_prefetch (&lPtr[face-95],0,0);
|
||||
__builtin_prefetch (&upperPtr[face-95],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face-32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-32]],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[lPtr[face]] -=
|
||||
rDPtr[lPtr[face]]*upperPtr[face]*wAPtr[uPtr[face]];
|
||||
}
|
||||
@ -210,46 +163,20 @@ void Foam::DILUPreconditioner::preconditionT
|
||||
register label nFaces = solver_.matrix().upper().size();
|
||||
register label nFacesM1 = nFaces - 1;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wTPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rTPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wTPtr[cell] = rDPtr[cell]*rTPtr[cell];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,upperPtr,rDPtr,wTPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&wTPtr[lPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&wTPtr[uPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
wTPtr[uPtr[face]] -=
|
||||
rDPtr[uPtr[face]]*upperPtr[face]*wTPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
|
||||
register label sface;
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=nFacesM1; face>=0; face--)
|
||||
{
|
||||
sface = losortPtr[face];
|
||||
|
||||
@ -66,47 +66,17 @@ Foam::FDICPreconditioner::FDICPreconditioner
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face+24]],0,1);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+24]],1,1);
|
||||
#endif
|
||||
|
||||
rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
// Generate reciprocal FDIC
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
rDPtr[cell] = 1.0/rDPtr[cell];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&upperPtr[face+96],0,0);
|
||||
__builtin_prefetch (&rDuUpperPtr[face+96],0,0);
|
||||
__builtin_prefetch (&rDlUpperPtr[face+96],0,0);
|
||||
__builtin_prefetch (&rDPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&rDPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face];
|
||||
rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face];
|
||||
}
|
||||
@ -138,58 +108,18 @@ void Foam::FDICPreconditioner::precondition
|
||||
register label nFaces = solver_.matrix().upper().size();
|
||||
register label nFacesM1 = nFaces - 1;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,rDuUpperPtr,wAPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=0; face<nFaces; face++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face+96],0,0);
|
||||
__builtin_prefetch (&lPtr[face+96],0,0);
|
||||
__builtin_prefetch (&rDuUpperPtr[face+96],0,0);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face+32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face+32]],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[uPtr[face]] -= rDuUpperPtr[face]*wAPtr[lPtr[face]];
|
||||
}
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma noprefetch uPtr,lPtr,rDlUpperPtr,wAPtr
|
||||
#pragma nounroll
|
||||
#endif
|
||||
|
||||
for (register label face=nFacesM1; face>=0; face--)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&uPtr[face-95],0,0);
|
||||
__builtin_prefetch (&lPtr[face-95],0,0);
|
||||
__builtin_prefetch (&rDlUpperPtr[face-95],0,0);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-16]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-24]],0,1);
|
||||
__builtin_prefetch (&wAPtr[lPtr[face-32]],0,1);
|
||||
__builtin_prefetch (&wAPtr[uPtr[face-32]],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[lPtr[face]] -= rDlUpperPtr[face]*wAPtr[uPtr[face]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,18 +58,9 @@ Foam::diagonalPreconditioner::diagonalPreconditioner
|
||||
|
||||
register label nCells = rD.size();
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
// Generate reciprocal diagonal
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&DPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
rDPtr[cell] = 1.0/DPtr[cell];
|
||||
}
|
||||
}
|
||||
@ -90,18 +81,8 @@ void Foam::diagonalPreconditioner::precondition
|
||||
|
||||
register label nCells = wA.size();
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rDPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,17 +68,8 @@ void Foam::noPreconditioner::precondition
|
||||
|
||||
register label nCells = wA.size();
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
wAPtr[cell] = rAPtr[cell];
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,19 +146,6 @@ void Foam::GaussSeidelSmoother::smooth
|
||||
|
||||
for (register label cellI=0; cellI<nCells; cellI++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&psiPtr[cellI+64],0,1);
|
||||
__builtin_prefetch (&bPrimePtr[cellI+64],0,1);
|
||||
__builtin_prefetch (&ownStartPtr[cellI+64],0,1);
|
||||
__builtin_prefetch (&diagPtr[cellI+64],0,1);
|
||||
__builtin_prefetch (&uPtr[ownStartPtr[cellI+24]],0,1);
|
||||
__builtin_prefetch (&uPtr[ownStartPtr[cellI+25]],0,1);
|
||||
__builtin_prefetch (&uPtr[ownStartPtr[cellI+26]],0,1);
|
||||
__builtin_prefetch (&uPtr[ownStartPtr[cellI+27]],0,1);
|
||||
__builtin_prefetch (&upperPtr[ownStartPtr[cellI+24]],0,1);
|
||||
__builtin_prefetch (&lowerPtr[ownStartPtr[cellI+24]],0,1);
|
||||
#endif
|
||||
|
||||
// Start and end of this row
|
||||
fStart = fEnd;
|
||||
fEnd = ownStartPtr[cellI + 1];
|
||||
|
||||
@ -144,19 +144,8 @@ Foam::lduMatrix::solverPerformance Foam::PBiCG::solve
|
||||
|
||||
if (solverPerf.nIterations() == 0)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&pTPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wTPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
pAPtr[cell] = wAPtr[cell];
|
||||
pTPtr[cell] = wTPtr[cell];
|
||||
}
|
||||
@ -165,19 +154,8 @@ Foam::lduMatrix::solverPerformance Foam::PBiCG::solve
|
||||
{
|
||||
scalar beta = wArT/wArTold;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&pTPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wTPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell];
|
||||
pTPtr[cell] = wTPtr[cell] + beta*pTPtr[cell];
|
||||
}
|
||||
@ -199,21 +177,8 @@ Foam::lduMatrix::solverPerformance Foam::PBiCG::solve
|
||||
|
||||
scalar alpha = wArT/wApT;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wTPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&psiPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rTPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
psiPtr[cell] += alpha*pAPtr[cell];
|
||||
rAPtr[cell] -= alpha*wAPtr[cell];
|
||||
rTPtr[cell] -= alpha*wTPtr[cell];
|
||||
|
||||
@ -134,17 +134,8 @@ Foam::lduMatrix::solverPerformance Foam::PCG::solve
|
||||
|
||||
if (solverPerf.nIterations() == 0)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
pAPtr[cell] = wAPtr[cell];
|
||||
}
|
||||
}
|
||||
@ -152,17 +143,8 @@ Foam::lduMatrix::solverPerformance Foam::PCG::solve
|
||||
{
|
||||
scalar beta = wArA/wArAold;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
pAPtr[cell] = wAPtr[cell] + beta*pAPtr[cell];
|
||||
}
|
||||
}
|
||||
@ -182,19 +164,8 @@ Foam::lduMatrix::solverPerformance Foam::PCG::solve
|
||||
|
||||
scalar alpha = wArA/wApA;
|
||||
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
#pragma ivdep
|
||||
#endif
|
||||
|
||||
for (register label cell=0; cell<nCells; cell++)
|
||||
{
|
||||
#ifdef ICC_IA64_PREFETCH
|
||||
__builtin_prefetch (&pAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&wAPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&psiPtr[cell+96],0,1);
|
||||
__builtin_prefetch (&rAPtr[cell+96],0,1);
|
||||
#endif
|
||||
|
||||
psiPtr[cell] += alpha*pAPtr[cell];
|
||||
rAPtr[cell] -= alpha*wAPtr[cell];
|
||||
}
|
||||
|
||||
@ -81,30 +81,43 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Start of procI+1 data
|
||||
inline const labelList& offsets() const;
|
||||
////- Start of procI+1 data
|
||||
//inline const labelList& offsets() const;
|
||||
|
||||
//- my local size
|
||||
inline label localSize() const;
|
||||
|
||||
//- Global sum of localSizes
|
||||
inline label size() const;
|
||||
// Queries relating to my processor
|
||||
|
||||
//- From local to global
|
||||
inline label toGlobal(const label i) const;
|
||||
//- my local size
|
||||
inline label localSize() const;
|
||||
|
||||
//- Is on local processor
|
||||
inline bool isLocal(const label i) const;
|
||||
//- From local to global
|
||||
inline label toGlobal(const label i) const;
|
||||
|
||||
//- From global to local on procI
|
||||
inline label toLocal(const label procI, const label i) const;
|
||||
//- Is on local processor
|
||||
inline bool isLocal(const label i) const;
|
||||
|
||||
//- From global to local on current processor.
|
||||
// FatalError if not on local processor.
|
||||
inline label toLocal(const label i) const;
|
||||
//- From global to local on current processor.
|
||||
// FatalError if not on local processor.
|
||||
inline label toLocal(const label i) const;
|
||||
|
||||
|
||||
// Global queries
|
||||
|
||||
//- Global sum of localSizes
|
||||
inline label size() const;
|
||||
|
||||
//- From global to local on procI
|
||||
inline label toLocal(const label procI, const label i) const;
|
||||
|
||||
//- Which processor does global come from? Binary search.
|
||||
inline label whichProcID(const label i) const;
|
||||
|
||||
//- Start of procI data
|
||||
inline label offset(const label procI) const;
|
||||
|
||||
//- Size of procI data
|
||||
inline label localSize(const label procI) const;
|
||||
|
||||
//- Which processor does global come from?
|
||||
inline label whichProcID(const label i) const;
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
@ -28,20 +28,32 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::labelList& Foam::globalIndex::offsets() const
|
||||
//inline const Foam::labelList& Foam::globalIndex::offsets() const
|
||||
//{
|
||||
// return offsets_;
|
||||
//}
|
||||
|
||||
|
||||
inline Foam::label Foam::globalIndex::offset(const label procI) const
|
||||
{
|
||||
return offsets_;
|
||||
return (procI == 0 ? 0 : offsets_[procI-1]);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::label Foam::globalIndex::localSize(const label procI) const
|
||||
{
|
||||
return
|
||||
(
|
||||
procI == 0
|
||||
? offsets_[procI]
|
||||
: offsets_[procI] - offsets_[procI-1]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::label Foam::globalIndex::localSize() const
|
||||
{
|
||||
return
|
||||
(
|
||||
Pstream::myProcNo() == 0
|
||||
? offsets_[Pstream::myProcNo()]
|
||||
: offsets_[Pstream::myProcNo()] - offsets_[Pstream::myProcNo()-1]
|
||||
);
|
||||
return localSize(Pstream::myProcNo());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -354,8 +354,7 @@ public:
|
||||
//- Range of global indices that can be returned.
|
||||
virtual label globalSize() const
|
||||
{
|
||||
const labelList& offsets = globalTris().offsets();
|
||||
return offsets[offsets.size()-1];
|
||||
return globalTris().size();
|
||||
}
|
||||
|
||||
virtual void findNearest
|
||||
|
||||
@ -26,7 +26,8 @@ Class
|
||||
Foam::searchableSurfaceCollection
|
||||
|
||||
Description
|
||||
Union of transformed searchableSurfaces
|
||||
Set of transformed searchableSurfaces. Does not do boolean operations.
|
||||
So when meshing might find parts 'inside'.
|
||||
|
||||
SourceFiles
|
||||
searchableSurfaceCollection.C
|
||||
|
||||
17
tutorials/combustion/XiFoam/les/Allrun
Executable file
17
tutorials/combustion/XiFoam/les/Allrun
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name from directory
|
||||
application="XiFoam"
|
||||
|
||||
cases=" \
|
||||
pitzDaily \
|
||||
pitzDaily3D
|
||||
"
|
||||
|
||||
for i in $cases; do
|
||||
blockMesh -case $i
|
||||
$application -case $i
|
||||
done
|
||||
|
||||
49
tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs
Normal file
49
tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphaSgs;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
49
tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs
Normal file
49
tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphaSgs;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -23,7 +23,7 @@ boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type alphatWallFunction;
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -23,7 +23,7 @@ boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 90;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -23,7 +23,7 @@ boundaryField
|
||||
{
|
||||
walls
|
||||
{
|
||||
type kQRWallFunction;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -15,9 +15,11 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
psiChemistryModel ODEChemistryModel<gasThermoPhysics>;
|
||||
|
||||
chemistry off;
|
||||
|
||||
chemistrySolver ODE;
|
||||
chemistrySolver ode;
|
||||
|
||||
initialChemicalTimeStep 1e-07;
|
||||
|
||||
@ -32,7 +34,7 @@ EulerImplicitCoeffs
|
||||
equilibriumRateLimiter off;
|
||||
}
|
||||
|
||||
ODECoeffs
|
||||
odeCoeffs
|
||||
{
|
||||
ODESolver SIBS;
|
||||
eps 0.05;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hMixtureThermo<reactingMixture>;
|
||||
thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
|
||||
|
||||
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp";
|
||||
|
||||
|
||||
@ -23,22 +23,22 @@ boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type alphatWallFunction;
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
back
|
||||
{
|
||||
type alphatWallFunction;
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type alphatWallFunction;
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type alphatWallFunction;
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
|
||||
@ -23,27 +23,27 @@ boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 200;
|
||||
}
|
||||
back
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 200;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 200;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 200;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
type compressible::turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.005;
|
||||
value uniform 200;
|
||||
}
|
||||
|
||||
@ -23,22 +23,22 @@ boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type kQRWallFunction;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
back
|
||||
{
|
||||
type kQRWallFunction;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type kQRWallFunction;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type kQRWallFunction;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 1;
|
||||
}
|
||||
inlet
|
||||
|
||||
@ -22,25 +22,25 @@ boundaryField
|
||||
{
|
||||
floor
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
box
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
floor
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
box
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -41,7 +41,7 @@ laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),pd) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
@ -62,7 +62,7 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
@ -69,14 +69,14 @@ solvers
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pdRefCell 0;
|
||||
pdRefValue 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
rho 1;
|
||||
pd 0.3;
|
||||
p 0.3;
|
||||
U 0.7;
|
||||
h 0.7;
|
||||
k 0.7;
|
||||
|
||||
@ -22,25 +22,25 @@ boundaryField
|
||||
{
|
||||
floor
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
|
||||
box
|
||||
{
|
||||
type calculated;
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
floor
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
box
|
||||
{
|
||||
type fixedFluxBuoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -42,7 +42,7 @@ laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),pd) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
|
||||
laplacian(alphaEff,h) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
@ -63,7 +63,7 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-06;
|
||||
@ -73,14 +73,14 @@ solvers
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pdRefCell 0;
|
||||
pdRefValue 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
rho 1.0;
|
||||
pd 0.3;
|
||||
p 0.3;
|
||||
U 0.7;
|
||||
h 0.7;
|
||||
k 0.7;
|
||||
|
||||
@ -15,13 +15,13 @@ runApplication splitMeshRegions -cellZones
|
||||
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
do
|
||||
changeDictionary -region $i
|
||||
changeDictionary -region $i >& log.changeDictionary.$i
|
||||
done
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
do
|
||||
rm -f 0*/$i/{mut,alphat,epsilon,k,p,pd,U}
|
||||
rm -f 0*/$i/{mut,alphat,epsilon,k,p,p,U}
|
||||
done
|
||||
|
||||
# remove solid fields from fluid regions (important for post-processing)
|
||||
@ -37,7 +37,7 @@ done
|
||||
# Decompose
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
do
|
||||
decomposePar -region $i
|
||||
decomposePar -region $i >& log.decomposePar.$i
|
||||
done
|
||||
|
||||
# Run
|
||||
@ -47,7 +47,7 @@ runParallel chtMultiRegionFoam 4 system/machines
|
||||
# Reconstruct
|
||||
for i in bottomAir topAir heater leftSolid rightSolid
|
||||
do
|
||||
reconstructPar -region $i
|
||||
reconstructPar -region $i >& log.reconstructPar.$i
|
||||
done
|
||||
|
||||
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -x
|
||||
|
||||
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
|
||||
blockMesh
|
||||
cellSet
|
||||
blockMesh >& log.blockMesh
|
||||
cellSet >& log.cellSet
|
||||
|
||||
#- MRF determines its own faceZone if not supplied
|
||||
#cp system/faceSetDict_rotorFaces system/faceSetDict
|
||||
#faceSet
|
||||
#cp system/faceSetDict_noBoundaryFaces system/faceSetDict
|
||||
#faceSet
|
||||
setsToZones -noFlipMap
|
||||
setsToZones -noFlipMap >& log.setsToZones
|
||||
|
||||
@ -17,7 +17,7 @@ FoamFile
|
||||
|
||||
radiation off;
|
||||
|
||||
radiationModel noRadiation;
|
||||
radiationModel none;
|
||||
|
||||
solverFreq 10;
|
||||
|
||||
|
||||
@ -4,9 +4,10 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/combustion/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-llagrangian \
|
||||
@ -15,7 +16,7 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lthermophysicalFunctions \
|
||||
-lbasicThermophysicalModels \
|
||||
-lcombustionThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiation \
|
||||
-lcompressibleRASModels \
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
thermoCloud1.SU1()
|
||||
+ kinematicCloud1.SU1()
|
||||
thermoCloud1.SU()
|
||||
+ kinematicCloud1.SU()
|
||||
+ rho.dimensionedInternalField()*g
|
||||
);
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
thermo()
|
||||
thermo
|
||||
);
|
||||
|
||||
Info<< "Constructing kinematicCloud1" << endl;
|
||||
@ -14,7 +14,7 @@
|
||||
"kinematicCloud1",
|
||||
rho,
|
||||
U,
|
||||
thermo().mu(),
|
||||
thermo.mu(),
|
||||
g
|
||||
);
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<basicThermo> thermo
|
||||
autoPtr<basicPsiThermo> pThermo
|
||||
(
|
||||
basicThermo::New(mesh)
|
||||
basicPsiThermo::New(mesh)
|
||||
);
|
||||
basicPsiThermo& thermo = pThermo();
|
||||
|
||||
volScalarField& p = thermo->p();
|
||||
volScalarField& h = thermo->h();
|
||||
const volScalarField& psi = thermo->psi();
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& h = thermo.h();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
@ -19,7 +20,7 @@
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo->rho()
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
@ -48,7 +49,7 @@
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo()
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
DpDt
|
||||
+ thermoCloud1.Sh1()
|
||||
+ thermoCloud1.Sh()
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
hEqn.solve();
|
||||
|
||||
thermo->correct();
|
||||
thermo.correct();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
rho = thermo->rho();
|
||||
rho = thermo.rho();
|
||||
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
U = rUA*UEqn.H();
|
||||
@ -8,7 +8,7 @@ if (transonic)
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(thermo->psi())
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
@ -35,8 +35,8 @@ if (transonic)
|
||||
else
|
||||
{
|
||||
phi =
|
||||
fvc::interpolate(rho)*
|
||||
(
|
||||
fvc::interpolate(rho)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||
);
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicThermo.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
#include "basicThermoCloud.H"
|
||||
@ -41,62 +41,59 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
# include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readEnvironmentalProperties.H"
|
||||
#include "createFields.H"
|
||||
#include "createClouds.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "readEnvironmentalProperties.H"
|
||||
# include "createFields.H"
|
||||
# include "createClouds.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "initContinuityErrs.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
# include "compressibleCourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
Info<< "Evolving thermoCloud1" << endl;
|
||||
thermoCloud1.evolve();
|
||||
thermoCloud1.info();
|
||||
|
||||
Info<< "Evolving kinematicCloud1" << endl;
|
||||
kinematicCloud1.evolve();
|
||||
kinematicCloud1.info();
|
||||
|
||||
|
||||
# include "rhoEqn.H"
|
||||
#include "rhoEqn.H"
|
||||
|
||||
// --- PIMPLE loop
|
||||
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
|
||||
{
|
||||
# include "UEqn.H"
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=1; corr<=nCorr; corr++)
|
||||
{
|
||||
# include "hEqn.H"
|
||||
# include "pEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
rho = thermo->rho();
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,6 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -22,28 +23,28 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 5390.5;
|
||||
}
|
||||
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,6 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -22,28 +23,28 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 37.5;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 37.5;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type compressible::kQRWallFunction;
|
||||
value uniform 37.5;
|
||||
}
|
||||
|
||||
symmetry
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -21,20 +21,27 @@ DragModel SphereDrag;
|
||||
|
||||
DispersionModel StochasticDispersionRAS;
|
||||
|
||||
WallInteractionModel StandardWallInteraction;
|
||||
PatchInteractionModel StandardWallInteraction;
|
||||
|
||||
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
|
||||
|
||||
rho0 rho0 [ 1 -3 0 0 0 ] 5000;
|
||||
PostProcessingModel none;
|
||||
|
||||
coupled true;
|
||||
|
||||
cellValueSourceCorrection on;
|
||||
|
||||
parcelTypeId 2;
|
||||
|
||||
constantProperties
|
||||
{
|
||||
rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15;
|
||||
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
|
||||
rho0 rho0 [ 1 -3 0 0 0 ] 5000;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
rho cell;
|
||||
U cellPointFace;
|
||||
U cellPoint;
|
||||
mu cell;
|
||||
}
|
||||
|
||||
@ -43,12 +50,21 @@ integrationSchemes
|
||||
U Euler;
|
||||
}
|
||||
|
||||
particleForces
|
||||
{
|
||||
gravity on;
|
||||
virtualMass off;
|
||||
Cvm 0.5;
|
||||
pressureGradient off;
|
||||
gradU gradU;
|
||||
}
|
||||
|
||||
ManualInjectionCoeffs
|
||||
{
|
||||
parcelBasisType mass;
|
||||
massTotal massTotal [ 1 0 0 0 0 ] 0.0002;
|
||||
parcelBasisType mass;
|
||||
SOI 0;
|
||||
positionsFile kinematicCloud1Positions;
|
||||
positionsFile "kinematicCloud1Positions";
|
||||
U0 ( 0 0 0 );
|
||||
parcelPDF
|
||||
{
|
||||
@ -70,29 +86,10 @@ ConeInjectionCoeffs
|
||||
position ( 0.25 0.25 0.05 );
|
||||
direction ( 0 -1 0 );
|
||||
parcelsPerSecond 10000;
|
||||
volumeFlowRate Constant;
|
||||
volumeFlowRateCoeffs
|
||||
{
|
||||
value 0.01;
|
||||
}
|
||||
|
||||
Umag Constant;
|
||||
UmagCoeffs
|
||||
{
|
||||
value 50;
|
||||
}
|
||||
|
||||
thetaInner Constant;
|
||||
thetaInnerCoeffs
|
||||
{
|
||||
value 0;
|
||||
}
|
||||
|
||||
thetaOuter Constant;
|
||||
thetaOuterCoeffs
|
||||
{
|
||||
value 30;
|
||||
}
|
||||
volumeFlowRate Constant 0.01;
|
||||
Umag Constant 50;
|
||||
thetaInner Constant 0;
|
||||
thetaOuter Constant 30;
|
||||
|
||||
parcelPDF
|
||||
{
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,6 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -21,33 +21,37 @@ DragModel SphereDrag;
|
||||
|
||||
DispersionModel StochasticDispersionRAS;
|
||||
|
||||
WallInteractionModel StandardWallInteraction;
|
||||
PatchInteractionModel StandardWallInteraction;
|
||||
|
||||
HeatTransferModel RanzMarshall;
|
||||
|
||||
PostProcessingModel none;
|
||||
|
||||
radiation off;
|
||||
|
||||
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
|
||||
|
||||
rho0 rho0 [ 1 -3 0 0 0 ] 2500;
|
||||
|
||||
T0 T0 [ 0 0 0 1 0 ] 300;
|
||||
|
||||
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
|
||||
|
||||
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
|
||||
|
||||
f0 f0 [ 0 0 0 0 0 ] 0.5;
|
||||
|
||||
coupled true;
|
||||
|
||||
cellValueSourceCorrection on;
|
||||
|
||||
parcelTypeId 1;
|
||||
|
||||
constantProperties
|
||||
{
|
||||
rhoMin rhoMin [ 1 -3 0 0 0 ] 1e-15;
|
||||
TMin TMin [ 0 0 0 1 0 ] 200;
|
||||
minParticleMass minParticleMass [ 1 0 0 0 0 ] 1e-15;
|
||||
rho0 rho0 [ 1 -3 0 0 0 ] 2500;
|
||||
T0 T0 [ 0 0 0 1 0 ] 300;
|
||||
cp0 cp0 [ 0 2 -2 -1 0 ] 900;
|
||||
epsilon0 epsilon0 [ 0 0 0 0 0 ] 1;
|
||||
f0 f0 [ 0 0 0 0 0 ] 0.5;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
rho cell;
|
||||
U cellPointFace;
|
||||
mu cell;
|
||||
U cellPoint;
|
||||
T cell;
|
||||
Cp cell;
|
||||
}
|
||||
@ -58,12 +62,21 @@ integrationSchemes
|
||||
T Analytical;
|
||||
}
|
||||
|
||||
particleForces
|
||||
{
|
||||
gravity on;
|
||||
virtualMass off;
|
||||
Cvm 0.5;
|
||||
pressureGradient off;
|
||||
gradU gradU;
|
||||
}
|
||||
|
||||
ManualInjectionCoeffs
|
||||
{
|
||||
massTotal massTotal [ 1 0 0 0 0 ] 0.0001;
|
||||
parcelBasisType mass;
|
||||
SOI 0;
|
||||
positionsFile thermoCloud1Positions;
|
||||
positionsFile "thermoCloud1Positions";
|
||||
U0 ( 0 0 0 );
|
||||
parcelPDF
|
||||
{
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.5 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\ / O peration | Version: 1.5.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
@ -10,11 +10,12 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object spray;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
(
|
||||
)
|
||||
simulationType RASModel;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.004 -0.001 -1) (0.012 0.001 1);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.0045 -0.00075 -1) (0.0095 0.00075 1);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.3;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0.00475 -0.000375 -1) (0.009 0.000375 1);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.1;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.2;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object cellSetDict.3;
|
||||
@ -19,7 +19,13 @@ name c0;
|
||||
|
||||
action new;
|
||||
|
||||
topoSetSources ( boxToCell { box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; } );
|
||||
topoSetSources
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 );
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -7,6 +7,6 @@ application="compressibleInterFoam"
|
||||
|
||||
runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
cp 0/pd.org 0/pd
|
||||
cp 0/p.org 0/p
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rho*phi,U) Gauss upwind;
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss interfaceCompression 1;
|
||||
div(phi,pd) Gauss upwind;
|
||||
div(phi,p) Gauss upwind;
|
||||
div(phi,k) Gauss vanLeer;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
@ -53,9 +53,9 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
pcorr ;
|
||||
gamma ;
|
||||
p;
|
||||
pcorr;
|
||||
gamma;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ solvers
|
||||
solver diagonal;
|
||||
}
|
||||
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-07;
|
||||
@ -60,7 +60,7 @@ solvers
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
pdFinal
|
||||
pFinal
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
|
||||
@ -15,9 +15,33 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues ( volScalarFieldValue alpha1 1 volScalarFieldValue pd 100000 );
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 1
|
||||
volScalarFieldValue p 100000
|
||||
);
|
||||
|
||||
regions ( sphereToCell { centre ( 0.5 0.5 0 ) ; radius 0.1 ; fieldValues ( volScalarFieldValue alpha1 0 volScalarFieldValue pd 1000000 ) ; } boxToCell { box ( -10 1 -1 ) ( 10 10 1 ) ; fieldValues ( volScalarFieldValue alpha1 0 ) ; } );
|
||||
regions
|
||||
(
|
||||
sphereToCell
|
||||
{
|
||||
centre ( 0.5 0.5 0 );
|
||||
radius 0.1;
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 0
|
||||
volScalarFieldValue p 1000000
|
||||
);
|
||||
}
|
||||
boxToCell
|
||||
{
|
||||
box ( -10 1 -1 ) ( 10 10 1 );
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 0
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd.org;
|
||||
object p.org;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,4 +2,4 @@
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf processor*
|
||||
rm -rf 0/pd.gz 0/alpha1.gz
|
||||
rm -rf 0/p.gz 0/alpha1.gz
|
||||
|
||||
@ -7,7 +7,7 @@ application="compressibleInterFoam"
|
||||
|
||||
runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
cp 0/pd.org 0/pd
|
||||
cp 0/p.org 0/p
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
hostname > system/machines
|
||||
|
||||
@ -30,7 +30,7 @@ divSchemes
|
||||
div(rho*phi,U) Gauss upwind;
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss interfaceCompression 1;
|
||||
div(phi,pd) Gauss upwind;
|
||||
div(phi,p) Gauss upwind;
|
||||
div(phi,k) Gauss vanLeer;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
@ -53,9 +53,9 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
pcorr ;
|
||||
gamma ;
|
||||
p;
|
||||
pcorr;
|
||||
gamma;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ solvers
|
||||
solver diagonal;
|
||||
}
|
||||
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-07;
|
||||
@ -60,7 +60,7 @@ solvers
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
pdFinal
|
||||
pFinal
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
|
||||
@ -15,9 +15,33 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues ( volScalarFieldValue alpha1 1 volScalarFieldValue pd 100000 );
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 1
|
||||
volScalarFieldValue p 100000
|
||||
);
|
||||
|
||||
regions ( sphereToCell { centre ( 0.5 0.5 0.5 ) ; radius 0.1 ; fieldValues ( volScalarFieldValue alpha1 0 volScalarFieldValue pd 1000000 ) ; } boxToCell { box ( -10 1 -1 ) ( 10 10 1 ) ; fieldValues ( volScalarFieldValue alpha1 0 ) ; } );
|
||||
regions
|
||||
(
|
||||
sphereToCell
|
||||
{
|
||||
centre ( 0.5 0.5 0.5 );
|
||||
radius 0.1;
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 0
|
||||
volScalarFieldValue p 1000000
|
||||
);
|
||||
}
|
||||
boxToCell
|
||||
{
|
||||
box ( -10 1 -1 ) ( 10 10 1 );
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 0
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -52,9 +52,9 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
pcorr ;
|
||||
alpha ;
|
||||
p;
|
||||
pcorr;
|
||||
alpha;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ solvers
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
@ -55,7 +55,7 @@ solvers
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
pdFinal
|
||||
pFinal
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
@ -122,9 +122,8 @@ PISO
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1;
|
||||
|
||||
pdRefPoint (0.51 0.51 0.51);
|
||||
pdRefValue 0;
|
||||
pRefValue 0;
|
||||
pRefPoint (0.51 0.51 0.51);
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object pd;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -54,7 +54,7 @@ functions
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
name probes;
|
||||
functionObjectLibs ( "libsampling.so" );
|
||||
outputControl timeStep;
|
||||
outputInterval 1;
|
||||
probeLocations
|
||||
|
||||
@ -52,9 +52,9 @@ snGradSchemes
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pd ;
|
||||
pcorr ;
|
||||
alpha ;
|
||||
p;
|
||||
pcorr;
|
||||
alpha;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ solvers
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
pd
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
@ -55,7 +55,7 @@ solvers
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
pdFinal
|
||||
pFinal
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
@ -99,8 +99,7 @@ PISO
|
||||
cAlpha 1.5;
|
||||
correctPhi no;
|
||||
|
||||
pdRefPoint (0 0 0.15);
|
||||
pdRefValue 0;
|
||||
pRefPoint (0 0 0.15);
|
||||
pRefValue 1e5;
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,10 @@ regions
|
||||
boxToCell
|
||||
{
|
||||
box ( -100 -100 -100 ) ( 100 100 0 );
|
||||
fieldValues ( volScalarFieldValue alpha1 1 );
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user