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:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,6 +39,9 @@ const Foam::word Foam::functionEntries::includeEntry::typeName
|
||||
// might include includeEntry
|
||||
int Foam::functionEntries::includeEntry::debug(0);
|
||||
|
||||
bool Foam::functionEntries::includeEntry::report(false);
|
||||
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace functionEntries
|
||||
@ -89,10 +92,15 @@ bool Foam::functionEntries::includeEntry::execute
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
IFstream ifs(includeFileName(is));
|
||||
const fileName fName(includeFileName(is));
|
||||
IFstream ifs(fName);
|
||||
|
||||
if (ifs)
|
||||
{
|
||||
if (Foam::functionEntries::includeEntry::report)
|
||||
{
|
||||
Info<< fName << endl;
|
||||
}
|
||||
parentDict.read(ifs);
|
||||
return true;
|
||||
}
|
||||
@ -119,10 +127,15 @@ bool Foam::functionEntries::includeEntry::execute
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
IFstream ifs(includeFileName(is));
|
||||
const fileName fName(includeFileName(is));
|
||||
IFstream ifs(fName);
|
||||
|
||||
if (ifs)
|
||||
{
|
||||
if (Foam::functionEntries::includeEntry::report)
|
||||
{
|
||||
Info<< fName << endl;
|
||||
}
|
||||
entry.read(parentDict, ifs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -82,6 +82,12 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Report which file is included to stdout
|
||||
static bool report;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
ClassName("include");
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,10 +69,15 @@ bool Foam::functionEntries::includeIfPresentEntry::execute
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
IFstream ifs(includeFileName(is));
|
||||
const fileName fName(includeFileName(is));
|
||||
IFstream ifs(fName);
|
||||
|
||||
if (ifs)
|
||||
{
|
||||
if (Foam::functionEntries::includeEntry::report)
|
||||
{
|
||||
Info<< fName << endl;
|
||||
}
|
||||
parentDict.read(ifs);
|
||||
}
|
||||
|
||||
@ -87,10 +92,15 @@ bool Foam::functionEntries::includeIfPresentEntry::execute
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
IFstream ifs(includeFileName(is));
|
||||
const fileName fName(includeFileName(is));
|
||||
IFstream ifs(fName);
|
||||
|
||||
if (ifs)
|
||||
{
|
||||
if (Foam::functionEntries::includeEntry::report)
|
||||
{
|
||||
Info<< fName << endl;
|
||||
}
|
||||
entry.read(parentDict, ifs);
|
||||
}
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dynamicCode
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::dynamicCodeContext
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -548,10 +548,14 @@ Foam::argList::argList
|
||||
|
||||
if (options_.found("roots"))
|
||||
{
|
||||
source = "'-roots' option";
|
||||
IStringStream str(options_["roots"]);
|
||||
str >> roots;
|
||||
dictNProcs = roots.size()+1;
|
||||
source = "-roots";
|
||||
IStringStream is(options_["roots"]);
|
||||
roots = readList<fileName>(is);
|
||||
|
||||
if (roots.size() != 1)
|
||||
{
|
||||
dictNProcs = roots.size()+1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -579,6 +583,21 @@ Foam::argList::argList
|
||||
}
|
||||
}
|
||||
|
||||
// convenience:
|
||||
// when a single root is specified, use it for all processes
|
||||
if (roots.size() == 1)
|
||||
{
|
||||
const fileName rootName(roots[0]);
|
||||
roots.setSize(Pstream::nProcs()-1, rootName);
|
||||
|
||||
// adjust dictNProcs for command-line '-roots' option
|
||||
if (dictNProcs < 0)
|
||||
{
|
||||
dictNProcs = roots.size()+1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check number of processors.
|
||||
// nProcs => number of actual procs
|
||||
// dictNProcs => number of procs specified in decompositionDict
|
||||
@ -602,11 +621,6 @@ Foam::argList::argList
|
||||
// distributed data
|
||||
if (roots.size())
|
||||
{
|
||||
forAll(roots, i)
|
||||
{
|
||||
roots[i].expand();
|
||||
}
|
||||
|
||||
if (roots.size() != Pstream::nProcs()-1)
|
||||
{
|
||||
FatalError
|
||||
@ -617,6 +631,11 @@ Foam::argList::argList
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
forAll(roots, i)
|
||||
{
|
||||
roots[i].expand();
|
||||
}
|
||||
|
||||
// Distribute the master's argument list (with new root)
|
||||
bool hadCaseOpt = options_.found("case");
|
||||
for
|
||||
@ -626,11 +645,7 @@ Foam::argList::argList
|
||||
slave++
|
||||
)
|
||||
{
|
||||
options_.set
|
||||
(
|
||||
"case",
|
||||
fileName(roots[slave-1])/globalCase_
|
||||
);
|
||||
options_.set("case", roots[slave-1]/globalCase_);
|
||||
|
||||
OPstream toSlave(Pstream::scheduled, slave);
|
||||
toSlave << args_ << options_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::tableReader
|
||||
Foam::csvTableReader
|
||||
|
||||
Description
|
||||
Reads an interpolation table from a file - CSV-format
|
||||
@ -44,7 +44,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class csvTableReader Declaration
|
||||
Class csvTableReader Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -52,26 +52,30 @@ class csvTableReader
|
||||
:
|
||||
public tableReader<Type>
|
||||
{
|
||||
//- does the file have a header line?
|
||||
const bool headerLine_;
|
||||
// Private data
|
||||
|
||||
//- column of the time
|
||||
const label timeColumn_;
|
||||
//- Does the file have a header line?
|
||||
const bool headerLine_;
|
||||
|
||||
//- labels of the components
|
||||
const labelList componentColumns_;
|
||||
//- Column of the time
|
||||
const label timeColumn_;
|
||||
|
||||
//- read the next value from the splitted string
|
||||
Type readValue(const List<string>&);
|
||||
//- Labels of the components
|
||||
const labelList componentColumns_;
|
||||
|
||||
//- Read the next value from the splitted string
|
||||
Type readValue(const List<string>&);
|
||||
|
||||
//- Separator character
|
||||
const char separator_;
|
||||
|
||||
//- separator character
|
||||
const char separator_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("csv");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
@ -91,8 +95,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
virtual ~csvTableReader();
|
||||
virtual ~csvTableReader();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -102,7 +105,6 @@ public:
|
||||
|
||||
//- write the remaining parameters
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,13 +22,13 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::tableReader
|
||||
Foam::openFoamTableReader
|
||||
|
||||
Description
|
||||
Reads an interpolation table from a file - OpenFOAM-format
|
||||
|
||||
SourceFiles
|
||||
tableReader.C
|
||||
openFoamTableReader.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -43,7 +43,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class openFoamTableReader Declaration
|
||||
Class openFoamTableReader Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -57,6 +57,7 @@ public:
|
||||
//- Runtime type information
|
||||
TypeName("openFoam");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
@ -76,15 +77,13 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
virtual ~openFoamTableReader();
|
||||
virtual ~openFoamTableReader();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Read the table
|
||||
virtual void operator()(const fileName&, List<Tuple2<scalar, Type> > &);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,7 +51,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class tableReader Declaration
|
||||
Class tableReader Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
@ -91,8 +91,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
virtual ~tableReader();
|
||||
virtual ~tableReader();
|
||||
|
||||
|
||||
// Member functions
|
||||
@ -106,7 +105,6 @@ public:
|
||||
|
||||
//- Write additional information
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -491,51 +491,52 @@ void Foam::face::flip()
|
||||
}
|
||||
|
||||
|
||||
Foam::point Foam::face::centre(const pointField& meshPoints) const
|
||||
Foam::point Foam::face::centre(const pointField& points) const
|
||||
{
|
||||
// Calculate the centre by breaking the face into triangles and
|
||||
// area-weighted averaging their centres
|
||||
|
||||
const label nPoints = size();
|
||||
|
||||
// If the face is a triangle, do a direct calculation
|
||||
if (size() == 3)
|
||||
if (nPoints)
|
||||
{
|
||||
return
|
||||
(1.0/3.0)
|
||||
*(
|
||||
meshPoints[operator[](0)]
|
||||
+ meshPoints[operator[](1)]
|
||||
+ meshPoints[operator[](2)]
|
||||
points[operator[](0)]
|
||||
+ points[operator[](1)]
|
||||
+ points[operator[](2)]
|
||||
);
|
||||
}
|
||||
|
||||
label nPoints = size();
|
||||
|
||||
point centrePoint = point::zero;
|
||||
for (register label pI=0; pI<nPoints; pI++)
|
||||
for (register label pI=0; pI<nPoints; ++pI)
|
||||
{
|
||||
centrePoint += meshPoints[operator[](pI)];
|
||||
centrePoint += points[operator[](pI)];
|
||||
}
|
||||
centrePoint /= nPoints;
|
||||
|
||||
scalar sumA = 0;
|
||||
vector sumAc = vector::zero;
|
||||
|
||||
for (register label pI=0; pI<nPoints; pI++)
|
||||
for (register label pI=0; pI<nPoints; ++pI)
|
||||
{
|
||||
const point& nextPoint = meshPoints[operator[]((pI + 1) % nPoints)];
|
||||
const point& nextPoint = points[operator[]((pI + 1) % nPoints)];
|
||||
|
||||
// Calculate 3*triangle centre
|
||||
vector ttc
|
||||
const vector ttc
|
||||
(
|
||||
meshPoints[operator[](pI)]
|
||||
points[operator[](pI)]
|
||||
+ nextPoint
|
||||
+ centrePoint
|
||||
);
|
||||
|
||||
// Calculate 2*triangle area
|
||||
scalar ta = Foam::mag
|
||||
const scalar ta = Foam::mag
|
||||
(
|
||||
(meshPoints[operator[](pI)] - centrePoint)
|
||||
(points[operator[](pI)] - centrePoint)
|
||||
^ (nextPoint - centrePoint)
|
||||
);
|
||||
|
||||
@ -545,7 +546,7 @@ Foam::point Foam::face::centre(const pointField& meshPoints) const
|
||||
|
||||
if (sumA > VSMALL)
|
||||
{
|
||||
return sumAc/(3*sumA);
|
||||
return sumAc/(3.0*sumA);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -556,6 +557,8 @@ Foam::point Foam::face::centre(const pointField& meshPoints) const
|
||||
|
||||
Foam::vector Foam::face::normal(const pointField& p) const
|
||||
{
|
||||
const label nPoints = size();
|
||||
|
||||
// Calculate the normal by summing the face triangle normals.
|
||||
// Changed to deal with small concavity by using a central decomposition
|
||||
//
|
||||
@ -563,7 +566,7 @@ Foam::vector Foam::face::normal(const pointField& p) const
|
||||
// If the face is a triangle, do a direct calculation to avoid round-off
|
||||
// error-related problems
|
||||
//
|
||||
if (size() == 3)
|
||||
if (nPoints == 3)
|
||||
{
|
||||
return triPointRef
|
||||
(
|
||||
@ -573,12 +576,10 @@ Foam::vector Foam::face::normal(const pointField& p) const
|
||||
).normal();
|
||||
}
|
||||
|
||||
label nPoints = size();
|
||||
|
||||
register label pI;
|
||||
|
||||
point centrePoint = vector::zero;
|
||||
for (pI = 0; pI < nPoints; pI++)
|
||||
for (pI = 0; pI < nPoints; ++pI)
|
||||
{
|
||||
centrePoint += p[operator[](pI)];
|
||||
}
|
||||
@ -588,7 +589,7 @@ Foam::vector Foam::face::normal(const pointField& p) const
|
||||
|
||||
point nextPoint = centrePoint;
|
||||
|
||||
for (pI = 0; pI < nPoints; pI++)
|
||||
for (pI = 0; pI < nPoints; ++pI)
|
||||
{
|
||||
if (pI < nPoints - 1)
|
||||
{
|
||||
|
||||
@ -178,7 +178,7 @@ public:
|
||||
void flip();
|
||||
|
||||
//- Return the points corresponding to this face
|
||||
inline pointField points(const pointField& meshPoints) const;
|
||||
inline pointField points(const pointField&) const;
|
||||
|
||||
//- Centre point of face
|
||||
point centre(const pointField&) const;
|
||||
@ -187,7 +187,7 @@ public:
|
||||
template<class Type>
|
||||
Type average(const pointField&, const Field<Type>&) const;
|
||||
|
||||
//- Scalar magnitude
|
||||
//- Magnitude of face area
|
||||
inline scalar mag(const pointField&) const;
|
||||
|
||||
//- Vector normal; magnitude is equal to area of face
|
||||
@ -228,8 +228,8 @@ public:
|
||||
|
||||
//- Return potential intersection with face with a ray starting
|
||||
// at p, direction n (does not need to be normalized)
|
||||
// Does face-center decomposition and returns triangle intersection
|
||||
// point closest to p. Face-center is calculated from point average.
|
||||
// Does face-centre decomposition and returns triangle intersection
|
||||
// point closest to p. Face-centre is calculated from point average.
|
||||
// For a hit, the distance is signed. Positive number
|
||||
// represents the point in front of triangle
|
||||
// In case of miss the point is the nearest point on the face
|
||||
@ -242,20 +242,20 @@ public:
|
||||
(
|
||||
const point& p,
|
||||
const vector& n,
|
||||
const pointField& meshPoints,
|
||||
const pointField&,
|
||||
const intersection::algorithm alg = intersection::FULL_RAY,
|
||||
const intersection::direction dir = intersection::VECTOR
|
||||
) const;
|
||||
|
||||
//- Fast intersection with a ray.
|
||||
// Does face-center decomposition and returns triangle intersection
|
||||
// Does face-centre decomposition and returns triangle intersection
|
||||
// point closest to p. See triangle::intersection for details.
|
||||
pointHit intersection
|
||||
(
|
||||
const point& p,
|
||||
const vector& q,
|
||||
const point& ctr,
|
||||
const pointField& meshPoints,
|
||||
const pointField&,
|
||||
const intersection::algorithm alg,
|
||||
const scalar tol = 0.0
|
||||
) const;
|
||||
@ -264,7 +264,7 @@ public:
|
||||
pointHit nearestPoint
|
||||
(
|
||||
const point& p,
|
||||
const pointField& meshPoints
|
||||
const pointField&
|
||||
) const;
|
||||
|
||||
//- Return nearest point to face and classify it:
|
||||
@ -276,7 +276,7 @@ public:
|
||||
pointHit nearestPointClassify
|
||||
(
|
||||
const point& p,
|
||||
const pointField& meshPoints,
|
||||
const pointField&,
|
||||
label& nearType,
|
||||
label& nearLabel
|
||||
) const;
|
||||
@ -286,13 +286,13 @@ public:
|
||||
(
|
||||
const point& p,
|
||||
const vector& n,
|
||||
const pointField& meshPoints
|
||||
const pointField&
|
||||
) const;
|
||||
|
||||
//- Return area in contact, given the displacement in vertices
|
||||
scalar areaInContact
|
||||
(
|
||||
const pointField& points,
|
||||
const pointField&,
|
||||
const scalarField& v
|
||||
) const;
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ public:
|
||||
inline void flip();
|
||||
|
||||
//- Return the points corresponding to this face
|
||||
inline pointField points(const pointField& meshPoints) const;
|
||||
inline pointField points(const pointField&) const;
|
||||
|
||||
//- Return triangle as a face
|
||||
inline face triFaceFace() const;
|
||||
@ -118,10 +118,10 @@ public:
|
||||
template<class Type>
|
||||
Type average(const pointField&, const Field<Type>&) const;
|
||||
|
||||
//- Return scalar magnitude
|
||||
//- Magnitude of face area
|
||||
inline scalar mag(const pointField&) const;
|
||||
|
||||
//- Return vector normal
|
||||
//- Vector normal; magnitude is equal to area of face
|
||||
inline vector normal(const pointField&) const;
|
||||
|
||||
//- Number of triangles after splitting
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -176,6 +176,7 @@ inline Foam::scalar Foam::triFace::mag(const pointField& points) const
|
||||
return ::Foam::mag(normal(points));
|
||||
}
|
||||
|
||||
|
||||
// could also delegate to triPointRef(...).normal()
|
||||
inline Foam::vector Foam::triFace::normal(const pointField& points) const
|
||||
{
|
||||
|
||||
@ -1,8 +1,31 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
makeType=${1:-libso}
|
||||
set -x
|
||||
|
||||
|
||||
#
|
||||
# define how to create an mpi-versioned library of $makeType
|
||||
# compile into qualified directory
|
||||
# use sentinel file to handle version changes
|
||||
#
|
||||
wmakeMpiLib()
|
||||
{
|
||||
set +x
|
||||
for libName
|
||||
do
|
||||
(
|
||||
WM_OPTIONS="$WM_OPTIONS$WM_MPLIB"
|
||||
whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI"
|
||||
[ -e "$whichmpi" ] || wclean $libName
|
||||
echo "wmake $makeType $libName"
|
||||
wmake $makeType $libName
|
||||
touch "$whichmpi"
|
||||
)
|
||||
done
|
||||
set -x
|
||||
}
|
||||
|
||||
set -x
|
||||
wmake $makeType dummy
|
||||
|
||||
case "$WM_MPLIB" in
|
||||
@ -11,9 +34,7 @@ case "$WM_MPLIB" in
|
||||
echo
|
||||
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
||||
echo
|
||||
set -x
|
||||
# force compilation into qualified directory
|
||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeType mpi
|
||||
wmakeMpiLib mpi
|
||||
;;
|
||||
|
||||
#GAMMA)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::directMappedFixedInternalValueFvPatchField
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::directMappedFixedPushedInternalValueFvPatchField
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -42,16 +42,6 @@ SourceFiles
|
||||
fvMesh.C
|
||||
fvMeshGeometry.C
|
||||
|
||||
See Also
|
||||
hmm
|
||||
|
||||
Usage
|
||||
oeuoeuoeu
|
||||
|
||||
ToDo
|
||||
oeuoeuoeu
|
||||
oeueouoeu
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fvMesh_H
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
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 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
|
||||
@ -19,8 +19,7 @@ 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
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
||||
@ -19,7 +19,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
|
||||
@ -25,12 +25,13 @@ License
|
||||
|
||||
#include "coalCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeThermoParcelForces.H" // thermo variant
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
|
||||
// Thermodynamic
|
||||
#include "makeParcelHeatTransferModels.H"
|
||||
@ -50,12 +51,13 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(coalCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeThermoParcelForces(coalCloud);
|
||||
makeParcelDispersionModels(coalCloud);
|
||||
makeReactingMultiphaseParcelInjectionModels(coalCloud);
|
||||
makeParcelPatchInteractionModels(coalCloud);
|
||||
makeParcelPostProcessingModels(coalCloud);
|
||||
|
||||
// Thermo sub-models
|
||||
makeParcelHeatTransferModels(coalCloud);
|
||||
|
||||
@ -44,7 +44,8 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0)
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -55,6 +56,8 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
|
||||
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
|
||||
WC_ = WCO2 - WO2_;
|
||||
|
||||
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
|
||||
|
||||
if (Sb_ < 0)
|
||||
{
|
||||
FatalErrorIn
|
||||
@ -158,14 +161,11 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
|
||||
// carrier enthalpy transfer handled by change in composition
|
||||
// const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T);
|
||||
// dhsTrans -= dmO2*HsO2;
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dmC*HsC - dmCO2*HCO2;
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -86,6 +86,9 @@ class COxidationDiffusionLimitedRate
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Formation enthalpy for CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -45,7 +45,8 @@ COxidationKineticDiffusionLimitedRate
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0)
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -56,6 +57,8 @@ COxidationKineticDiffusionLimitedRate
|
||||
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
|
||||
WC_ = WCO2 - WO2_;
|
||||
|
||||
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
|
||||
|
||||
const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_];
|
||||
const scalar YSolidTot = owner.composition().YMixture0()[idSolid];
|
||||
Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl;
|
||||
@ -161,14 +164,11 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
|
||||
// carrier enthalpy transfer handled by change in composition
|
||||
// const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T);
|
||||
// dhsTrans -= dmO2*HsO2;
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dmC*HsC - dmCO2*HCO2;
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -94,6 +94,9 @@ class COxidationKineticDiffusionLimitedRate
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Formation enthalpy for CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -57,7 +57,8 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
O2GlobalId_(owner.composition().globalCarrierId("O2")),
|
||||
CO2GlobalId_(owner.composition().globalCarrierId("CO2")),
|
||||
WC_(0.0),
|
||||
WO2_(0.0)
|
||||
WO2_(0.0),
|
||||
HcCO2_(0.0)
|
||||
{
|
||||
// Determine Cs ids
|
||||
label idSolid = owner.composition().idSolid();
|
||||
@ -68,6 +69,8 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
|
||||
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
|
||||
WC_ = WCO2 - WO2_;
|
||||
|
||||
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
|
||||
|
||||
const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_];
|
||||
const scalar YSolidTot = owner.composition().YMixture0()[idSolid];
|
||||
Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl;
|
||||
@ -221,14 +224,11 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
||||
dMassSolid[CsLocalId_] += dOmega*WC_;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T);
|
||||
|
||||
// carrier enthalpy transfer handled by change in composition
|
||||
// const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T);
|
||||
// dhsTrans -= dmO2*HsO2;
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction
|
||||
return dOmega*(WC_*HsC - (WC_ + WO2_)*HCO2);
|
||||
// Heat of reaction [J]
|
||||
return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -115,6 +115,9 @@ class COxidationMurphyShaddix
|
||||
//- Molecular weight of O2 [kg/kmol]
|
||||
scalar WO2_;
|
||||
|
||||
//- Formation enthalpy for CO2 [J/kg]
|
||||
scalar HcCO2_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -232,20 +232,20 @@ void Foam::parcel::setRelaxationTimes
|
||||
tBoilingSurface
|
||||
);
|
||||
scalar dp = pBoil - pressure;
|
||||
if ( (dp > 0.0) && (dp0 > 0.0) )
|
||||
if ((dp > 0.0) && (dp0 > 0.0))
|
||||
{
|
||||
tBoilingSurface -= deltaT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( (dp < 0.0) && (dp0 < 0.0) )
|
||||
if ((dp < 0.0) && (dp0 < 0.0))
|
||||
{
|
||||
tBoilingSurface += deltaT;
|
||||
}
|
||||
else
|
||||
{
|
||||
deltaT *= 0.5;
|
||||
if ( (dp > 0.0) && (dp0 < 0.0) )
|
||||
if ((dp > 0.0) && (dp0 < 0.0))
|
||||
{
|
||||
tBoilingSurface -= deltaT;
|
||||
}
|
||||
|
||||
@ -19,7 +19,8 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
|
||||
@ -31,7 +31,6 @@ License
|
||||
#include "DispersionModel.H"
|
||||
#include "InjectionModel.H"
|
||||
#include "PatchInteractionModel.H"
|
||||
#include "PostProcessingModel.H"
|
||||
#include "SurfaceFilmModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
@ -66,15 +65,6 @@ void Foam::KinematicCloud<CloudType>::setModels()
|
||||
).ptr()
|
||||
);
|
||||
|
||||
postProcessingModel_.reset
|
||||
(
|
||||
PostProcessingModel<KinematicCloud<CloudType> >::New
|
||||
(
|
||||
subModelProperties_,
|
||||
*this
|
||||
).ptr()
|
||||
);
|
||||
|
||||
surfaceFilmModel_.reset
|
||||
(
|
||||
SurfaceFilmModel<KinematicCloud<CloudType> >::New
|
||||
@ -245,9 +235,10 @@ void Foam::KinematicCloud<CloudType>::postEvolve()
|
||||
}
|
||||
|
||||
this->dispersion().cacheFields(false);
|
||||
|
||||
forces_.cacheFields(false);
|
||||
|
||||
this->postProcessing().post();
|
||||
functions_.postEvolve();
|
||||
|
||||
solution_.nextIter();
|
||||
}
|
||||
@ -262,10 +253,11 @@ void Foam::KinematicCloud<CloudType>::cloudReset(KinematicCloud<CloudType>& c)
|
||||
|
||||
forces_.transfer(c.forces_);
|
||||
|
||||
functions_.transfer(c.functions_);
|
||||
|
||||
dispersionModel_.reset(c.dispersionModel_.ptr());
|
||||
injectionModel_.reset(c.injectionModel_.ptr());
|
||||
patchInteractionModel_.reset(c.patchInteractionModel_.ptr());
|
||||
postProcessingModel_.reset(c.postProcessingModel_.ptr());
|
||||
surfaceFilmModel_.reset(c.surfaceFilmModel_.ptr());
|
||||
|
||||
UIntegrator_.reset(c.UIntegrator_.ptr());
|
||||
@ -309,7 +301,9 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
rndGen_
|
||||
(
|
||||
label(0),
|
||||
solution_.steadyState() ?
|
||||
particleProperties_.lookupOrDefault<label>("randomSampleSize", 100000)
|
||||
: -1
|
||||
),
|
||||
cellOccupancyPtr_(),
|
||||
rho_(rho),
|
||||
@ -327,10 +321,15 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
),
|
||||
solution_.active()
|
||||
),
|
||||
functions_
|
||||
(
|
||||
*this,
|
||||
particleProperties_.subOrEmptyDict("cloudFunctions"),
|
||||
solution_.active()
|
||||
),
|
||||
dispersionModel_(NULL),
|
||||
injectionModel_(NULL),
|
||||
patchInteractionModel_(NULL),
|
||||
postProcessingModel_(NULL),
|
||||
surfaceFilmModel_(NULL),
|
||||
UIntegrator_(NULL),
|
||||
UTrans_
|
||||
@ -405,10 +404,10 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
mu_(c.mu_),
|
||||
g_(c.g_),
|
||||
forces_(c.forces_),
|
||||
functions_(c.functions_),
|
||||
dispersionModel_(c.dispersionModel_->clone()),
|
||||
injectionModel_(c.injectionModel_->clone()),
|
||||
patchInteractionModel_(c.patchInteractionModel_->clone()),
|
||||
postProcessingModel_(c.postProcessingModel_->clone()),
|
||||
surfaceFilmModel_(c.surfaceFilmModel_->clone()),
|
||||
UIntegrator_(c.UIntegrator_->clone()),
|
||||
UTrans_
|
||||
@ -480,10 +479,10 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
|
||||
mu_(c.mu_),
|
||||
g_(c.g_),
|
||||
forces_(*this, mesh),
|
||||
functions_(*this),
|
||||
dispersionModel_(NULL),
|
||||
injectionModel_(NULL),
|
||||
patchInteractionModel_(NULL),
|
||||
postProcessingModel_(NULL),
|
||||
surfaceFilmModel_(NULL),
|
||||
UIntegrator_(NULL),
|
||||
UTrans_(NULL),
|
||||
|
||||
@ -27,17 +27,19 @@ Class
|
||||
Description
|
||||
Templated base class for kinematic cloud
|
||||
|
||||
- particle forces
|
||||
- cloud function objects
|
||||
|
||||
- particle forces, e.g.
|
||||
- buoyancy
|
||||
- drag
|
||||
- pressure gradient
|
||||
- ...
|
||||
|
||||
- sub-models:
|
||||
- Dispersion model
|
||||
- Injection model
|
||||
- Patch interaction model
|
||||
- Post-processing model
|
||||
- Surface film model
|
||||
- dispersion model
|
||||
- injection model
|
||||
- patch interaction model
|
||||
- surface film model
|
||||
|
||||
SourceFiles
|
||||
KinematicCloudI.H
|
||||
@ -61,6 +63,7 @@ SourceFiles
|
||||
#include "cloudSolution.H"
|
||||
|
||||
#include "ParticleForceList.H"
|
||||
#include "CloudFunctionObjectList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -78,9 +81,6 @@ class InjectionModel;
|
||||
template<class CloudType>
|
||||
class PatchInteractionModel;
|
||||
|
||||
template<class CloudType>
|
||||
class PostProcessingModel;
|
||||
|
||||
template<class CloudType>
|
||||
class SurfaceFilmModel;
|
||||
|
||||
@ -108,9 +108,13 @@ public:
|
||||
//- Convenience typedef for this cloud type
|
||||
typedef KinematicCloud<CloudType> kinematicCloudType;
|
||||
|
||||
//- Force type
|
||||
//- Force models type
|
||||
typedef ParticleForceList<KinematicCloud<CloudType> > forceType;
|
||||
|
||||
//- Function object type
|
||||
typedef CloudFunctionObjectList<KinematicCloud<CloudType> >
|
||||
functionType;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -176,6 +180,9 @@ protected:
|
||||
//- Optional particle forces
|
||||
forceType forces_;
|
||||
|
||||
//- Optional cloud function objects
|
||||
functionType functions_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
@ -191,10 +198,6 @@ protected:
|
||||
autoPtr<PatchInteractionModel<KinematicCloud<CloudType> > >
|
||||
patchInteractionModel_;
|
||||
|
||||
//- Post-processing model
|
||||
autoPtr<PostProcessingModel<KinematicCloud<CloudType> > >
|
||||
postProcessingModel_;
|
||||
|
||||
//- Surface film model
|
||||
autoPtr<SurfaceFilmModel<KinematicCloud<CloudType> > >
|
||||
surfaceFilmModel_;
|
||||
@ -369,6 +372,9 @@ public:
|
||||
// inline const typename parcelType::forceType& forces() const;
|
||||
inline const forceType& forces() const;
|
||||
|
||||
//- Optional cloud function objects
|
||||
inline functionType& functions();
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
@ -396,10 +402,6 @@ public:
|
||||
inline PatchInteractionModel<KinematicCloud<CloudType> >&
|
||||
patchInteraction();
|
||||
|
||||
//- Return reference to post-processing model
|
||||
inline PostProcessingModel<KinematicCloud<CloudType> >&
|
||||
postProcessing();
|
||||
|
||||
//- Return const-access to the surface film model
|
||||
inline const SurfaceFilmModel<KinematicCloud<CloudType> >&
|
||||
surfaceFilm() const;
|
||||
|
||||
@ -118,6 +118,14 @@ Foam::KinematicCloud<CloudType>::forces() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline typename Foam::KinematicCloud<CloudType>::functionType&
|
||||
Foam::KinematicCloud<CloudType>::functions()
|
||||
{
|
||||
return functions_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::DispersionModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::dispersion() const
|
||||
@ -166,14 +174,6 @@ Foam::KinematicCloud<CloudType>::injection()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline Foam::PostProcessingModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::postProcessing()
|
||||
{
|
||||
return postProcessingModel_();
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline const Foam::SurfaceFilmModel<Foam::KinematicCloud<CloudType> >&
|
||||
Foam::KinematicCloud<CloudType>::surfaceFilm() const
|
||||
|
||||
@ -104,13 +104,10 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// Define local properties at beginning of time step
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const scalar np0 = nParticle_;
|
||||
const scalar d0 = d_;
|
||||
const vector U0 = U_;
|
||||
const scalar rho0 = rho_;
|
||||
const scalar mass0 = mass();
|
||||
|
||||
// Reynolds number
|
||||
const scalar Re = this->Re(U0, d0, rhoc_, muc_);
|
||||
const scalar Re = this->Re(U_, d_, rhoc_, muc_);
|
||||
|
||||
|
||||
// Sources
|
||||
@ -119,6 +116,9 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// Explicit momentum source for particle
|
||||
vector Su = vector::zero;
|
||||
|
||||
// Linearised momentum source coefficient
|
||||
scalar Spu = 0.0;
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
@ -127,23 +127,7 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
scalar Spu = 0.0;
|
||||
vector U1 =
|
||||
calcVelocity
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Re,
|
||||
muc_,
|
||||
d0,
|
||||
U0,
|
||||
rho0,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->U_ = calcVelocity(td, dt, cellI, Re, muc_, mass0, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
@ -156,11 +140,6 @@ void Foam::KinematicParcel<ParcelType>::calc
|
||||
// Update momentum transfer coefficient
|
||||
td.cloud().UCoeff()[cellI] += np0*Spu;
|
||||
}
|
||||
|
||||
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
U_ = U1;
|
||||
}
|
||||
|
||||
|
||||
@ -173,9 +152,6 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
||||
const label cellI,
|
||||
const scalar Re,
|
||||
const scalar mu,
|
||||
const scalar d,
|
||||
const vector& U,
|
||||
const scalar rho,
|
||||
const scalar mass,
|
||||
const vector& Su,
|
||||
vector& dUTrans,
|
||||
@ -205,7 +181,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
|
||||
Spu = dt*Feff.Sp();
|
||||
|
||||
IntegrationScheme<vector>::integrationResult Ures =
|
||||
td.cloud().UIntegrator().integrate(U, dt, abp, bp);
|
||||
td.cloud().UIntegrator().integrate(U_, dt, abp, bp);
|
||||
|
||||
vector Unew = Ures.value();
|
||||
|
||||
@ -361,7 +337,7 @@ void Foam::KinematicParcel<ParcelType>::hitFace(TrackData& td)
|
||||
typename TrackData::cloudType::parcelType& p =
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
td.cloud().postProcessing().postFace(p);
|
||||
td.cloud().functions().postFace(p);
|
||||
}
|
||||
|
||||
|
||||
@ -385,7 +361,7 @@ bool Foam::KinematicParcel<ParcelType>::hitPatch
|
||||
static_cast<typename TrackData::cloudType::parcelType&>(*this);
|
||||
|
||||
// Invoke post-processing model
|
||||
td.cloud().postProcessing().postPatch(p, patchI);
|
||||
td.cloud().functions().postPatch(p, patchI);
|
||||
|
||||
// Invoke surface film model
|
||||
if (td.cloud().surfaceFilm().transferParcel(p, pp, td.keepParticle))
|
||||
|
||||
@ -297,9 +297,6 @@ protected:
|
||||
const label cellI, // owner cell
|
||||
const scalar Re, // Reynolds number
|
||||
const scalar mu, // local carrier viscosity
|
||||
const scalar d, // diameter
|
||||
const vector& U, // velocity
|
||||
const scalar rho, // density
|
||||
const scalar mass, // mass
|
||||
const vector& Su, // explicit particle momentum source
|
||||
vector& dUTrans, // momentum transfer to carrier
|
||||
|
||||
@ -172,12 +172,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
// Define local properties at beginning of timestep
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
const scalar np0 = this->nParticle_;
|
||||
const scalar d0 = this->d_;
|
||||
const vector& U0 = this->U_;
|
||||
const scalar rho0 = this->rho_;
|
||||
const scalar T0 = this->T_;
|
||||
const scalar Cp0 = this->Cp_;
|
||||
const scalar mass0 = this->mass();
|
||||
|
||||
const scalar pc = this->pc_;
|
||||
@ -189,11 +188,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
|
||||
// Calc surface values
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
scalar Ts, rhos, mus, Prs, kappas;
|
||||
this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
||||
|
||||
// Reynolds number
|
||||
scalar Res = this->Re(U0, d0, rhos, mus);
|
||||
|
||||
|
||||
@ -203,16 +199,25 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
// Explicit momentum source for particle
|
||||
vector Su = vector::zero;
|
||||
|
||||
// Linearised momentum source coefficient
|
||||
scalar Spu = 0.0;
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
// Explicit enthalpy source for particle
|
||||
scalar Sh = 0.0;
|
||||
|
||||
// Linearised enthalpy source coefficient
|
||||
scalar Sph = 0.0;
|
||||
|
||||
// Sensible enthalpy transfer from the particle to the carrier phase
|
||||
scalar dhsTrans = 0.0;
|
||||
|
||||
|
||||
// 1. Compute models that contribute to mass transfer - U, T held constant
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Phase change in liquid phase
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -310,28 +315,78 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
);
|
||||
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
this->correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, d0, rhos, mus);
|
||||
|
||||
|
||||
// Update component mass fractions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// 2. Update the parcel properties due to change in mass
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
scalarField dMassGas(dMassDV + dMassSRGas);
|
||||
scalarField dMassLiquid(dMassPC + dMassSRLiquid);
|
||||
scalarField dMassSolid(dMassSRSolid);
|
||||
|
||||
scalar mass1 =
|
||||
updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
|
||||
|
||||
this->Cp_ = CpEff(td, pc, T0, idG, idL, idS);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
}
|
||||
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
if (np0*mass1 < td.cloud().constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
scalar dm = np0*mass1;
|
||||
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[GAS]*YGas_[i];
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i];
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[SLD]*YSolid_[i];
|
||||
}
|
||||
*/
|
||||
td.cloud().UTrans()[cellI] += dm*U0;
|
||||
|
||||
td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T0, idG, idL, idS);
|
||||
|
||||
td.cloud().addToMassPhaseChange(dm);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
this->correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, this->d_, rhos, mus);
|
||||
|
||||
|
||||
// 3. Compute heat- and momentum transfers
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Heat transfer
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
// Calculate new particle temperature
|
||||
scalar Sph = 0.0;
|
||||
scalar T1 =
|
||||
this->T_ =
|
||||
this->calcHeatTransfer
|
||||
(
|
||||
td,
|
||||
@ -340,10 +395,6 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
Res,
|
||||
Prs,
|
||||
kappas,
|
||||
d0,
|
||||
rho0,
|
||||
T0,
|
||||
Cp0,
|
||||
NCpW,
|
||||
Sh,
|
||||
dhsTrans,
|
||||
@ -351,35 +402,23 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
);
|
||||
|
||||
|
||||
this->Cp_ = CpEff(td, pc, this->T_, idG, idL, idS);
|
||||
|
||||
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
scalar Spu = 0;
|
||||
vector U1 =
|
||||
this->calcVelocity
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Res,
|
||||
mus,
|
||||
d0,
|
||||
U0,
|
||||
rho0,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->U_ =
|
||||
this->calcVelocity(td, dt, cellI, Res, mus, mass1, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// 4. Accumulate carrier phase source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
// Transfer mass lost from particle to carrier mass source
|
||||
// Transfer mass lost to carrier mass, momentum and enthalpy sources
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
scalar dm = np0*dMassGas[i];
|
||||
@ -421,76 +460,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
|
||||
// Update momentum transfer
|
||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||
|
||||
// Update momentum transfer coefficient
|
||||
td.cloud().UCoeff()[cellI] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||
|
||||
// Update sensible enthalpy coefficient
|
||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||
}
|
||||
|
||||
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (np0*mass1 < td.cloud().constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
scalar dm = np0*mass1;
|
||||
|
||||
// Absorb parcel into carrier phase
|
||||
forAll(YGas_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(GAS, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[GAS]*YGas_[i];
|
||||
}
|
||||
forAll(YLiquid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(LIQ, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i];
|
||||
}
|
||||
/*
|
||||
// No mapping between solid components and carrier phase
|
||||
forAll(YSolid_, i)
|
||||
{
|
||||
label gid = composition.localToGlobalCarrierId(SLD, i);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm*YMix[SLD]*YSolid_[i];
|
||||
}
|
||||
*/
|
||||
td.cloud().UTrans()[cellI] += dm*U1;
|
||||
|
||||
td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T1, idG, idL, idS);
|
||||
|
||||
td.cloud().addToMassPhaseChange(dm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
else
|
||||
{
|
||||
this->Cp_ = CpEff(td, pc, T1, idG, idL, idS);
|
||||
this->T_ = T1;
|
||||
this->U_ = U1;
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -267,21 +267,17 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
|
||||
// Define local properties at beginning of time step
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
const scalar np0 = this->nParticle_;
|
||||
const scalar d0 = this->d_;
|
||||
const vector& U0 = this->U_;
|
||||
const scalar rho0 = this->rho_;
|
||||
const scalar T0 = this->T_;
|
||||
const scalar Cp0 = this->Cp_;
|
||||
const scalar mass0 = this->mass();
|
||||
|
||||
|
||||
// Calc surface values
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
scalar Ts, rhos, mus, Prs, kappas;
|
||||
this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas);
|
||||
|
||||
// Reynolds number
|
||||
scalar Res = this->Re(U0, d0, rhos, mus);
|
||||
|
||||
|
||||
@ -291,16 +287,25 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
// Explicit momentum source for particle
|
||||
vector Su = vector::zero;
|
||||
|
||||
// Linearised momentum source coefficient
|
||||
scalar Spu = 0.0;
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
// Explicit enthalpy source for particle
|
||||
scalar Sh = 0.0;
|
||||
|
||||
// Linearised enthalpy source coefficient
|
||||
scalar Sph = 0.0;
|
||||
|
||||
// Sensible enthalpy transfer from the particle to the carrier phase
|
||||
scalar dhsTrans = 0.0;
|
||||
|
||||
|
||||
// 1. Compute models that contribute to mass transfer - U, T held constant
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Phase change
|
||||
// ~~~~~~~~~~~~
|
||||
|
||||
@ -338,96 +343,26 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
Cs
|
||||
);
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, d0, rhos, mus);
|
||||
|
||||
// Update particle component mass and mass fractions
|
||||
// 2. Update the parcel properties due to change in mass
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
scalarField dMass(dMassPC);
|
||||
|
||||
scalar mass1 = updateMassFraction(mass0, dMass, Y_);
|
||||
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T0);
|
||||
|
||||
// Heat transfer
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
// Calculate new particle temperature
|
||||
scalar Sph = 0.0;
|
||||
scalar T1 =
|
||||
this->calcHeatTransfer
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Res,
|
||||
Prs,
|
||||
kappas,
|
||||
d0,
|
||||
rho0,
|
||||
T0,
|
||||
Cp0,
|
||||
NCpW,
|
||||
Sh,
|
||||
dhsTrans,
|
||||
Sph
|
||||
);
|
||||
|
||||
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
scalar Spu = 0.0;
|
||||
vector U1 =
|
||||
this->calcVelocity
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Res,
|
||||
mus,
|
||||
d0,
|
||||
U0,
|
||||
rho0,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (td.cloud().solution().coupled())
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
// Transfer mass lost to carrier mass and enthalpy sources
|
||||
forAll(dMass, i)
|
||||
{
|
||||
scalar dm = np0*dMass[i];
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, T0);
|
||||
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().UTrans()[cellI] += dm*U0;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||
|
||||
// Update momentum transfer coefficient
|
||||
td.cloud().UCoeff()[cellI] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||
|
||||
// Update sensible enthalpy coefficient
|
||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
}
|
||||
|
||||
|
||||
// Remove the particle when mass falls below minimum threshold
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
if (np0*mass1 < td.cloud().constProps().minParticleMass())
|
||||
{
|
||||
td.keepParticle = false;
|
||||
@ -441,36 +376,81 @@ void Foam::ReactingParcel<ParcelType>::calc
|
||||
{
|
||||
scalar dmi = dm*Y_[i];
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, T1);
|
||||
scalar hs = composition.carrier().Hs(gid, T0);
|
||||
|
||||
td.cloud().rhoTrans(gid)[cellI] += dmi;
|
||||
td.cloud().hsTrans()[cellI] += dmi*hs;
|
||||
}
|
||||
td.cloud().UTrans()[cellI] += dm*U1;
|
||||
td.cloud().UTrans()[cellI] += dm*U0;
|
||||
|
||||
td.cloud().addToMassPhaseChange(dm);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Correct surface values due to emitted species
|
||||
correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas);
|
||||
Res = this->Re(U0, this->d_, rhos, mus);
|
||||
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
else
|
||||
// 3. Compute heat- and momentum transfers
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Heat transfer
|
||||
// ~~~~~~~~~~~~~
|
||||
|
||||
// Calculate new particle temperature
|
||||
this->T_ =
|
||||
this->calcHeatTransfer
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Res,
|
||||
Prs,
|
||||
kappas,
|
||||
NCpW,
|
||||
Sh,
|
||||
dhsTrans,
|
||||
Sph
|
||||
);
|
||||
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T0);
|
||||
|
||||
|
||||
// Motion
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
this->U_ =
|
||||
this->calcVelocity(td, dt, cellI, Res, mus, mass1, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// 4. Accumulate carrier phase source terms
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
if (td.cloud().solution().coupled())
|
||||
{
|
||||
this->Cp_ = composition.Cp(0, Y_, pc_, T1);
|
||||
this->T_ = T1;
|
||||
this->U_ = U1;
|
||||
// Transfer mass lost to carrier mass, momentum and enthalpy sources
|
||||
forAll(dMass, i)
|
||||
{
|
||||
scalar dm = np0*dMass[i];
|
||||
label gid = composition.localToGlobalCarrierId(0, i);
|
||||
scalar hs = composition.carrier().Hs(gid, T0);
|
||||
|
||||
// Update particle density or diameter
|
||||
if (td.cloud().constProps().constantVolume())
|
||||
{
|
||||
this->rho_ = mass1/this->volume();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->d_ = cbrt(mass1/this->rho_*6.0/pi);
|
||||
td.cloud().rhoTrans(gid)[cellI] += dm;
|
||||
td.cloud().UTrans()[cellI] += dm*U0;
|
||||
td.cloud().hsTrans()[cellI] += dm*hs;
|
||||
}
|
||||
|
||||
// Update momentum transfer
|
||||
td.cloud().UTrans()[cellI] += np0*dUTrans;
|
||||
td.cloud().UCoeff()[cellI] += np0*Spu;
|
||||
|
||||
// Update sensible enthalpy transfer
|
||||
td.cloud().hsTrans()[cellI] += np0*dhsTrans;
|
||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -172,21 +172,16 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
// Define local properties at beginning of time step
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const scalar np0 = this->nParticle_;
|
||||
const scalar d0 = this->d_;
|
||||
const vector U0 = this->U_;
|
||||
const scalar rho0 = this->rho_;
|
||||
const scalar T0 = this->T_;
|
||||
const scalar Cp0 = this->Cp_;
|
||||
const scalar mass0 = this->mass();
|
||||
|
||||
|
||||
// Calc surface values
|
||||
// ~~~~~~~~~~~~~~~~~~~
|
||||
scalar Ts, rhos, mus, Pr, kappas;
|
||||
calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Pr, kappas);
|
||||
calcSurfaceValues(td, cellI, this->T_, Ts, rhos, mus, Pr, kappas);
|
||||
|
||||
// Reynolds number
|
||||
scalar Re = this->Re(U0, d0, rhos, mus);
|
||||
scalar Re = this->Re(this->U_, this->d_, rhos, mus);
|
||||
|
||||
|
||||
// Sources
|
||||
@ -195,12 +190,18 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
// Explicit momentum source for particle
|
||||
vector Su = vector::zero;
|
||||
|
||||
// Linearised momentum source coefficient
|
||||
scalar Spu = 0.0;
|
||||
|
||||
// Momentum transfer from the particle to the carrier phase
|
||||
vector dUTrans = vector::zero;
|
||||
|
||||
// Explicit enthalpy source for particle
|
||||
scalar Sh = 0.0;
|
||||
|
||||
// Linearised enthalpy source coefficient
|
||||
scalar Sph = 0.0;
|
||||
|
||||
// Sensible enthalpy transfer from the particle to the carrier phase
|
||||
scalar dhsTrans = 0.0;
|
||||
|
||||
@ -212,8 +213,7 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
scalar NCpW = 0.0;
|
||||
|
||||
// Calculate new particle temperature
|
||||
scalar Sph = 0.0;
|
||||
scalar T1 =
|
||||
this->T_ =
|
||||
this->calcHeatTransfer
|
||||
(
|
||||
td,
|
||||
@ -222,10 +222,6 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
Re,
|
||||
Pr,
|
||||
kappas,
|
||||
d0,
|
||||
rho0,
|
||||
T0,
|
||||
Cp0,
|
||||
NCpW,
|
||||
Sh,
|
||||
dhsTrans,
|
||||
@ -237,23 +233,8 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
// ~~~~~~
|
||||
|
||||
// Calculate new particle velocity
|
||||
scalar Spu = 0.0;
|
||||
vector U1 =
|
||||
this->calcVelocity
|
||||
(
|
||||
td,
|
||||
dt,
|
||||
cellI,
|
||||
Re,
|
||||
mus,
|
||||
d0,
|
||||
U0,
|
||||
rho0,
|
||||
mass0,
|
||||
Su,
|
||||
dUTrans,
|
||||
Spu
|
||||
);
|
||||
this->U_ =
|
||||
this->calcVelocity(td, dt, cellI, Re, mus, mass0, Su, dUTrans, Spu);
|
||||
|
||||
|
||||
// Accumulate carrier phase source terms
|
||||
@ -272,11 +253,6 @@ void Foam::ThermoParcel<ParcelType>::calc
|
||||
// Update sensible enthalpy coefficient
|
||||
td.cloud().hsCoeff()[cellI] += np0*Sph;
|
||||
}
|
||||
|
||||
// Set new particle properties
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
this->U_ = U1;
|
||||
T_ = T1;
|
||||
}
|
||||
|
||||
|
||||
@ -290,10 +266,6 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
const scalar Re,
|
||||
const scalar Pr,
|
||||
const scalar kappa,
|
||||
const scalar d,
|
||||
const scalar rho,
|
||||
const scalar T,
|
||||
const scalar Cp,
|
||||
const scalar NCpW,
|
||||
const scalar Sh,
|
||||
scalar& dhsTrans,
|
||||
@ -302,9 +274,12 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
{
|
||||
if (!td.cloud().heatTransfer().active())
|
||||
{
|
||||
return T;
|
||||
return T_;
|
||||
}
|
||||
|
||||
const scalar d = this->d();
|
||||
const scalar rho = this->rho();
|
||||
|
||||
// Calc heat transfer coefficient
|
||||
scalar htc = td.cloud().heatTransfer().htc(d, Re, Pr, kappa, NCpW);
|
||||
|
||||
@ -313,7 +288,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
return
|
||||
max
|
||||
(
|
||||
T + dt*Sh/(this->volume(d)*rho*Cp),
|
||||
T_ + dt*Sh/(this->volume(d)*rho*Cp_),
|
||||
td.cloud().constProps().TMin()
|
||||
);
|
||||
}
|
||||
@ -322,7 +297,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
const scalar As = this->areaS(d);
|
||||
|
||||
scalar ap = Tc_ + Sh/As/htc;
|
||||
scalar bp = 6.0*(Sh/As + htc*(Tc_ - T));
|
||||
scalar bp = 6.0*(Sh/As + htc*(Tc_ - T_));
|
||||
if (td.cloud().radiation())
|
||||
{
|
||||
tetIndices tetIs = this->currentTetIndices();
|
||||
@ -330,20 +305,20 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
|
||||
const scalar sigma = physicoChemical::sigma.value();
|
||||
const scalar epsilon = td.cloud().constProps().epsilon0();
|
||||
|
||||
ap = (ap + epsilon*Gc/(4.0*htc))/(1.0 + epsilon*sigma*pow3(T)/htc);
|
||||
bp += 6.0*(epsilon*(Gc/4.0 - sigma*pow4(T)));
|
||||
ap = (ap + epsilon*Gc/(4.0*htc))/(1.0 + epsilon*sigma*pow3(T_)/htc);
|
||||
bp += 6.0*(epsilon*(Gc/4.0 - sigma*pow4(T_)));
|
||||
}
|
||||
bp /= rho*d*Cp*(ap - T) + ROOTVSMALL;
|
||||
bp /= rho*d*Cp_*(ap - T_) + ROOTVSMALL;
|
||||
|
||||
// Integrate to find the new parcel temperature
|
||||
IntegrationScheme<scalar>::integrationResult Tres =
|
||||
td.cloud().TIntegrator().integrate(T, dt, ap*bp, bp);
|
||||
td.cloud().TIntegrator().integrate(T_, dt, ap*bp, bp);
|
||||
|
||||
scalar Tnew = max(Tres.value(), td.cloud().constProps().TMin());
|
||||
|
||||
Sph = dt*htc*As;
|
||||
|
||||
dhsTrans += Sph*(0.5*(T + Tnew) - Tc_);
|
||||
dhsTrans += Sph*(0.5*(T_ + Tnew) - Tc_);
|
||||
|
||||
return Tnew;
|
||||
}
|
||||
|
||||
@ -236,10 +236,6 @@ protected:
|
||||
const scalar Re, // Reynolds number
|
||||
const scalar Pr, // Prandtl number - surface
|
||||
const scalar kappa, // Thermal conductivity - surface
|
||||
const scalar d, // diameter
|
||||
const scalar rho, // density
|
||||
const scalar T, // temperature
|
||||
const scalar Cp, // specific heat capacity
|
||||
const scalar NCpW, // Sum of N*Cp*W of emission species
|
||||
const scalar Sh, // explicit particle enthalpy source
|
||||
scalar& dhsTrans, // sensible enthalpy transfer to carrier
|
||||
|
||||
@ -25,26 +25,28 @@ License
|
||||
|
||||
#include "basicKinematicCollidingCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeParcelForces.H"
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeParcelInjectionModels.H"
|
||||
#include "makeParcelCollisionModels.H"
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
#include "makeParcelSurfaceFilmModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicKinematicCollidingCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeParcelForces(basicKinematicCollidingCloud);
|
||||
makeParcelDispersionModels(basicKinematicCollidingCloud);
|
||||
makeParcelInjectionModels(basicKinematicCollidingCloud);
|
||||
makeParcelCollisionModels(basicKinematicCollidingCloud);
|
||||
makeParcelPatchInteractionModels(basicKinematicCollidingCloud);
|
||||
makeParcelPostProcessingModels(basicKinematicCollidingCloud);
|
||||
makeParcelSurfaceFilmModels(basicKinematicCollidingCloud);
|
||||
}
|
||||
|
||||
|
||||
@ -25,24 +25,26 @@ License
|
||||
|
||||
#include "basicKinematicCloud.H"
|
||||
|
||||
#include "makeParcelCloudFunctionObjects.H"
|
||||
|
||||
// Kinematic
|
||||
#include "makeParcelForces.H"
|
||||
#include "makeParcelDispersionModels.H"
|
||||
#include "makeParcelInjectionModels.H"
|
||||
#include "makeParcelPatchInteractionModels.H"
|
||||
#include "makeParcelPostProcessingModels.H"
|
||||
#include "makeParcelSurfaceFilmModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeParcelCloudFunctionObjects(basicKinematicCloud);
|
||||
|
||||
// Kinematic sub-models
|
||||
makeParcelForces(basicKinematicCloud);
|
||||
makeParcelDispersionModels(basicKinematicCloud);
|
||||
makeParcelInjectionModels(basicKinematicCloud);
|
||||
makeParcelPatchInteractionModels(basicKinematicCloud);
|
||||
makeParcelPostProcessingModels(basicKinematicCloud);
|
||||
makeParcelSurfaceFilmModels(basicKinematicCloud);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user