mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: resolve merge conflict
This commit is contained in:
@ -1,18 +1,19 @@
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
bool closedVolume = false;
|
||||
|
||||
if (simple.transonic())
|
||||
{
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
bool closedVolume = false;
|
||||
|
||||
if (simple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
@ -39,9 +40,9 @@ if (simple.transonic())
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
@ -67,32 +68,35 @@ else
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#include "incompressible/continuityErrs.H"
|
||||
#include "incompressible/continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
|
||||
if (!simple.transonic())
|
||||
{
|
||||
if (!simple.transonic())
|
||||
{
|
||||
rho.relax();
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||
Info<< "rho max/min : "
|
||||
<< max(rho).value() << " "
|
||||
<< min(rho).value() << endl;
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<rhoThermo> pThermo
|
||||
(
|
||||
rhoThermo::New(mesh)
|
||||
);
|
||||
rhoThermo& thermo = pThermo();
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& e = thermo.he();
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||
|
||||
dimensionedScalar rhoMax(simple.dict().lookup("rhoMax"));
|
||||
dimensionedScalar rhoMin(simple.dict().lookup("rhoMin"));
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::RASModel> turbulence
|
||||
(
|
||||
compressible::RASModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
// Kinetic + pressure energy
|
||||
volScalarField Ekp("Ekp", 0.5*magSqr(U) + p/rho);
|
||||
|
||||
fvScalarMatrix eEqn
|
||||
@ -10,7 +11,7 @@
|
||||
fvc::div(phi)*Ekp - fvc::div(phi, Ekp)
|
||||
);
|
||||
|
||||
//pZones.addEnergySource(thermo, rho, eEqn);
|
||||
pZones.addEnergySource(thermo, rho, eEqn);
|
||||
|
||||
eEqn.relax();
|
||||
eEqn.solve();
|
||||
|
||||
@ -1,52 +1,24 @@
|
||||
volVectorField HbyA("HbyA", U);
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
HbyA = trTU() & UEqn().H();
|
||||
}
|
||||
else
|
||||
{
|
||||
HbyA = trAU()*UEqn().H();
|
||||
}
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
bool closedVolume = false;
|
||||
|
||||
if (simple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
volVectorField HbyA("HbyA", U);
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trTU(), p));
|
||||
HbyA = trTU() & UEqn().H();
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trAU(), p));
|
||||
HbyA = trAU()*UEqn().H();
|
||||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
UEqn.clear();
|
||||
|
||||
tpEqn().solve();
|
||||
bool closedVolume = false;
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == tpEqn().flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
@ -79,34 +51,37 @@ else
|
||||
phi = phiHbyA - tpEqn().flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "incompressible/continuityErrs.H"
|
||||
#include "incompressible/continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
U = HbyA - (trTU() & fvc::grad(p));
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
U = HbyA - trAU()*fvc::grad(p);
|
||||
}
|
||||
}
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
const volScalarField& psi = thermo.psi();
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : "
|
||||
<< max(rho).value() << " "
|
||||
<< min(rho).value() << endl;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "MRFZones.H"
|
||||
#include "thermalPorousZones.H"
|
||||
|
||||
@ -16,7 +16,6 @@ porousPhi =
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(porousRho*rAUPorous, porousP) == fvc::div(porousPhi)
|
||||
|
||||
3
applications/test/BinSum/Make/files
Normal file
3
applications/test/BinSum/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
Test-BinSum.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-BinSum
|
||||
2
applications/test/BinSum/Make/options
Normal file
2
applications/test/BinSum/Make/options
Normal file
@ -0,0 +1,2 @@
|
||||
/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */
|
||||
/* EXE_LIBS = -lfiniteVolume */
|
||||
74
applications/test/BinSum/Test-BinSum.C
Normal file
74
applications/test/BinSum/Test-BinSum.C
Normal file
@ -0,0 +1,74 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
Test-BinSum
|
||||
|
||||
Description
|
||||
Test BinSum container
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BinSum.H"
|
||||
#include "IOstreams.H"
|
||||
#include "Random.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Random rndGen(0);
|
||||
|
||||
scalarField samples(10000000);
|
||||
forAll(samples, i)
|
||||
{
|
||||
samples[i] = rndGen.scalar01();
|
||||
}
|
||||
|
||||
const scalar min = 0;
|
||||
const scalar max = 1;
|
||||
const scalar delta = 0.1;
|
||||
|
||||
BinSum<scalar, scalarField> count(min, max, delta);
|
||||
BinSum<scalar, scalarField> sum(min, max, delta);
|
||||
|
||||
forAll(samples, i)
|
||||
{
|
||||
count.add(samples[i], 1);
|
||||
sum.add(samples[i], samples[i]);
|
||||
}
|
||||
|
||||
Info<< "sum : " << sum << endl;
|
||||
Info<< "count : " << count << endl;
|
||||
Info<< "average: " << sum/count << endl;
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -67,7 +67,6 @@ SourceFiles
|
||||
#include "transform.H"
|
||||
#include "volFields.H"
|
||||
#include "fvMesh.H"
|
||||
#include "Histogram.H"
|
||||
#include "labelPair.H"
|
||||
#include "HashSet.H"
|
||||
#include "memInfo.H"
|
||||
|
||||
@ -165,8 +165,12 @@ castellatedMeshControls
|
||||
}
|
||||
}
|
||||
|
||||
// Feature angle:
|
||||
// - used if min and max refinement level of a surface differ
|
||||
// - used if feature snapping (see snapControls below) is used
|
||||
resolveFeatureAngle 30;
|
||||
|
||||
|
||||
// Region-wise refinement
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@ -171,6 +171,15 @@ FoamFile
|
||||
// insidePoint (1 2 3); // point inside region to select
|
||||
// }
|
||||
//
|
||||
// // Cells underneath plane such that volume is reached. Can be used
|
||||
// // in setFields.
|
||||
// source targetVolumeToCell;
|
||||
// sourceInfo
|
||||
// {
|
||||
// volume 2e-05;
|
||||
// normal (1 1 1);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// faceSet
|
||||
|
||||
113
src/OpenFOAM/containers/Lists/BinSum/BinSum.C
Normal file
113
src/OpenFOAM/containers/Lists/BinSum/BinSum.C
Normal file
@ -0,0 +1,113 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BinSum.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class IndexType, class List, class CombineOp>
|
||||
Foam::BinSum<IndexType, List, CombineOp>::BinSum
|
||||
(
|
||||
const IndexType min,
|
||||
const IndexType max,
|
||||
const IndexType delta
|
||||
)
|
||||
:
|
||||
List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero),
|
||||
min_(min),
|
||||
max_(max),
|
||||
delta_(delta),
|
||||
lowSum_(pTraits<typename List::value_type>::zero),
|
||||
highSum_(pTraits<typename List::value_type>::zero)
|
||||
{}
|
||||
|
||||
|
||||
template<class IndexType, class List, class CombineOp>
|
||||
Foam::BinSum<IndexType, List, CombineOp>::BinSum
|
||||
(
|
||||
const IndexType min,
|
||||
const IndexType max,
|
||||
const IndexType delta,
|
||||
const UList<IndexType>& indexVals,
|
||||
const List& vals,
|
||||
const CombineOp& cop
|
||||
)
|
||||
:
|
||||
List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero),
|
||||
min_(min),
|
||||
max_(max),
|
||||
delta_(delta),
|
||||
lowSum_(pTraits<typename List::value_type>::zero),
|
||||
highSum_(pTraits<typename List::value_type>::zero)
|
||||
{
|
||||
forAll(indexVals, i)
|
||||
{
|
||||
add(indexVals[i], vals[i], cop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class IndexType, class List, class CombineOp>
|
||||
void Foam::BinSum<IndexType, List, CombineOp>::add
|
||||
(
|
||||
const IndexType& indexVal,
|
||||
const typename List::const_reference val,
|
||||
const CombineOp& cop
|
||||
)
|
||||
{
|
||||
if (indexVal < min_)
|
||||
{
|
||||
cop(lowSum_, val);
|
||||
}
|
||||
else if (indexVal >= max_)
|
||||
{
|
||||
cop(highSum_, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
label index = (indexVal-min_)/delta_;
|
||||
cop(this->operator[](index), val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class IndexType, class List, class CombineOp>
|
||||
void Foam::BinSum<IndexType, List, CombineOp>::add
|
||||
(
|
||||
const UList<IndexType>& indexVals,
|
||||
const List& vals,
|
||||
const CombineOp& cop
|
||||
)
|
||||
{
|
||||
forAll(indexVals, i)
|
||||
{
|
||||
add(indexVals[i], vals[i], cop);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
149
src/OpenFOAM/containers/Lists/BinSum/BinSum.H
Normal file
149
src/OpenFOAM/containers/Lists/BinSum/BinSum.H
Normal file
@ -0,0 +1,149 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::BinSum
|
||||
|
||||
Description
|
||||
Sums into bins
|
||||
|
||||
SourceFiles
|
||||
BinSum.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef BinSum_H
|
||||
#define BinSum_H
|
||||
|
||||
#include "ops.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class BinSum Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template
|
||||
<
|
||||
class IndexType,
|
||||
class List,
|
||||
class CombineOp = plusEqOp<typename List::value_type>
|
||||
>
|
||||
class BinSum
|
||||
:
|
||||
public List
|
||||
{
|
||||
// Private data
|
||||
|
||||
const IndexType min_;
|
||||
|
||||
const IndexType max_;
|
||||
|
||||
const IndexType delta_;
|
||||
|
||||
|
||||
//- Sum < lowest bin
|
||||
typename List::value_type lowSum_;
|
||||
|
||||
//- Sum of >= highest bin
|
||||
typename List::value_type highSum_;
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given min, max, delta
|
||||
BinSum
|
||||
(
|
||||
const IndexType min,
|
||||
const IndexType max,
|
||||
const IndexType delta
|
||||
);
|
||||
|
||||
//- Construct given min, max, delta and data
|
||||
BinSum
|
||||
(
|
||||
const IndexType min,
|
||||
const IndexType max,
|
||||
const IndexType delta,
|
||||
const UList<IndexType>& indexVals,
|
||||
const List& vals,
|
||||
const CombineOp& cop = plusEqOp<typename List::value_type>()
|
||||
);
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the delta
|
||||
inline IndexType delta() const
|
||||
{
|
||||
return delta_;
|
||||
}
|
||||
|
||||
//- Return the sum of all added elements < min
|
||||
inline const IndexType& lowSum() const
|
||||
{
|
||||
return lowSum_;
|
||||
}
|
||||
|
||||
//- Return the sum of all added elements >= max
|
||||
inline const IndexType& highSum() const
|
||||
{
|
||||
return highSum_;
|
||||
}
|
||||
|
||||
void add
|
||||
(
|
||||
const IndexType& indexVal,
|
||||
const typename List::const_reference val,
|
||||
const CombineOp& cop = plusEqOp<typename List::value_type>()
|
||||
);
|
||||
|
||||
void add
|
||||
(
|
||||
const UList<IndexType>& indexVals,
|
||||
const List& vals,
|
||||
const CombineOp& cop = plusEqOp<typename List::value_type>()
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "BinSum.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,33 +58,25 @@ void Foam::wedgePolyPatch::initTransforms()
|
||||
);
|
||||
centreNormal_ /= mag(centreNormal_);
|
||||
|
||||
if
|
||||
(
|
||||
mag(centreNormal_.x() + centreNormal_.y() + centreNormal_.z())
|
||||
< (1 - SMALL)
|
||||
)
|
||||
const scalar cnCmptSum =
|
||||
centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
|
||||
|
||||
if (mag(cnCmptSum) < (1 - SMALL))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"wedgePolyPatch::wedgePolyPatch(const polyPatch&, "
|
||||
"const fvBoundaryMesh&)"
|
||||
) << "wedge " << name()
|
||||
FatalErrorIn("wedgePolyPatch::initTransforms()")
|
||||
<< "wedge " << name()
|
||||
<< " centre plane does not align with a coordinate plane by "
|
||||
<< 1
|
||||
- mag(centreNormal_.x()+centreNormal_.y()+centreNormal_.z())
|
||||
<< 1 - mag(cnCmptSum)
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
axis_ = centreNormal_ ^ patchNormal_;
|
||||
scalar magAxis = mag(axis_);
|
||||
axis_ /= magAxis;
|
||||
|
||||
if (magAxis < SMALL)
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"wedgePolyPatch::initTransforms()"
|
||||
) << "wedge " << name()
|
||||
FatalErrorIn("wedgePolyPatch::initTransforms()")
|
||||
<< "wedge " << name()
|
||||
<< " plane aligns with a coordinate plane." << nl
|
||||
<< " The wedge plane should make a small angle (~2.5deg)"
|
||||
" with the coordinate plane" << nl
|
||||
@ -95,6 +87,8 @@ void Foam::wedgePolyPatch::initTransforms()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
axis_ /= magAxis;
|
||||
|
||||
faceT_ = rotationTensor(centreNormal_, patchNormal_);
|
||||
cellT_ = faceT_ & faceT_;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,6 +51,31 @@ Foam::word Foam::name(const quaternion& q)
|
||||
}
|
||||
|
||||
|
||||
Foam::quaternion Foam::slerp
|
||||
(
|
||||
const quaternion& qa,
|
||||
const quaternion& qb,
|
||||
const scalar t
|
||||
)
|
||||
{
|
||||
// Calculate angle between the quaternions
|
||||
scalar cosHalfTheta = qa & qb;
|
||||
|
||||
if (mag(cosHalfTheta) >= 1)
|
||||
{
|
||||
return qa;
|
||||
}
|
||||
|
||||
scalar halfTheta = acos(cosHalfTheta);
|
||||
scalar sinHalfTheta = sqrt(1.0 - sqr(cosHalfTheta));
|
||||
|
||||
scalar wa = sin((1 - t)*halfTheta)/sinHalfTheta;
|
||||
scalar wb = sin(t*halfTheta)/sinHalfTheta;
|
||||
|
||||
return wa*qa + wb*qb;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, quaternion& q)
|
||||
|
||||
@ -106,6 +106,15 @@ public:
|
||||
// and angle theta
|
||||
inline quaternion(const vector& d, const scalar theta);
|
||||
|
||||
//- Construct a rotation quaternion given the direction d
|
||||
// and cosine angle cosTheta and a if d is normalized
|
||||
inline quaternion
|
||||
(
|
||||
const vector& d,
|
||||
const scalar cosTheta,
|
||||
const bool normalized
|
||||
);
|
||||
|
||||
//- Construct given scalar part, the vector part = vector::zero
|
||||
inline explicit quaternion(const scalar w);
|
||||
|
||||
@ -140,6 +149,8 @@ public:
|
||||
//- The rotation tensor corresponding the quaternion
|
||||
inline tensor R() const;
|
||||
|
||||
inline quaternion normalized() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
@ -207,6 +218,14 @@ inline quaternion inv(const quaternion& q);
|
||||
//- Return a string representation of a quaternion
|
||||
word name(const quaternion&);
|
||||
|
||||
//- Spherical linear interpolation of quaternions
|
||||
quaternion slerp
|
||||
(
|
||||
const quaternion& qa,
|
||||
const quaternion& qb,
|
||||
const scalar t
|
||||
);
|
||||
|
||||
//- Data associated with quaternion type are contiguous
|
||||
template<>
|
||||
inline bool contiguous<quaternion>() {return true;}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -37,9 +37,27 @@ inline Foam::quaternion::quaternion(const scalar w, const vector& v)
|
||||
inline Foam::quaternion::quaternion(const vector& d, const scalar theta)
|
||||
:
|
||||
w_(cos(0.5*theta)),
|
||||
v_((sin(0.5*theta)/magSqr(d))*d)
|
||||
v_((sin(0.5*theta)/mag(d))*d)
|
||||
{}
|
||||
|
||||
inline Foam::quaternion::quaternion
|
||||
(
|
||||
const vector& d,
|
||||
const scalar cosTheta,
|
||||
const bool normalized
|
||||
)
|
||||
{
|
||||
normalize();
|
||||
scalar cosHalfTheta2 = 0.5*(cosTheta + 1);
|
||||
w_ = sqrt(cosHalfTheta2);
|
||||
|
||||
if (normalized)
|
||||
{
|
||||
v_ = sqrt(1 - cosHalfTheta2)*d;
|
||||
}
|
||||
else
|
||||
{
|
||||
v_ = (sqrt(1 - cosHalfTheta2)/mag(d))*d;
|
||||
}
|
||||
}
|
||||
|
||||
inline Foam::quaternion::quaternion(const scalar w)
|
||||
@ -71,7 +89,8 @@ inline Foam::quaternion::quaternion
|
||||
const tensor& rotationTensor
|
||||
)
|
||||
{
|
||||
scalar trace = rotationTensor.xx()
|
||||
scalar trace =
|
||||
rotationTensor.xx()
|
||||
+ rotationTensor.yy()
|
||||
+ rotationTensor.zz();
|
||||
|
||||
@ -168,6 +187,12 @@ inline Foam::vector& Foam::quaternion::v()
|
||||
}
|
||||
|
||||
|
||||
inline Foam::quaternion Foam::quaternion::normalized() const
|
||||
{
|
||||
return *this/mag(*this);
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::quaternion::normalize()
|
||||
{
|
||||
operator/=(mag(*this));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1604,6 +1604,8 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
polyBoundaryMesh& allPatches =
|
||||
const_cast<polyBoundaryMesh&>(mesh0.boundaryMesh());
|
||||
allPatches.setSize(allPatchNames.size());
|
||||
labelList patchSizes(allPatches.size());
|
||||
labelList patchStarts(allPatches.size());
|
||||
|
||||
label startFaceI = nInternalFaces;
|
||||
|
||||
@ -1629,7 +1631,9 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
}
|
||||
else
|
||||
{
|
||||
// Clone.
|
||||
// Clone. Note dummy size and start. Gets overwritten later in
|
||||
// resetPrimitives. This avoids getting temporarily illegal
|
||||
// SubList construction in polyPatch.
|
||||
allPatches.set
|
||||
(
|
||||
allPatchI,
|
||||
@ -1637,10 +1641,12 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
(
|
||||
allPatches,
|
||||
allPatchI,
|
||||
nFaces[patch0],
|
||||
startFaceI
|
||||
0, // dummy size
|
||||
0 // dummy start
|
||||
)
|
||||
);
|
||||
patchSizes[allPatchI] = nFaces[patch0];
|
||||
patchStarts[allPatchI] = startFaceI;
|
||||
|
||||
// Record new index in allPatches
|
||||
from0ToAllPatches[patch0] = allPatchI;
|
||||
@ -1686,10 +1692,12 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
(
|
||||
allPatches,
|
||||
allPatchI,
|
||||
nFaces[uncompactAllPatchI],
|
||||
startFaceI
|
||||
0, // dummy size
|
||||
0 // dummy start
|
||||
)
|
||||
);
|
||||
patchSizes[allPatchI] = nFaces[uncompactAllPatchI];
|
||||
patchStarts[allPatchI] = startFaceI;
|
||||
|
||||
// Record new index in allPatches
|
||||
from1ToAllPatches[patch1] = allPatchI;
|
||||
@ -1702,6 +1710,8 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
}
|
||||
|
||||
allPatches.setSize(allPatchI);
|
||||
patchSizes.setSize(allPatchI);
|
||||
patchStarts.setSize(allPatchI);
|
||||
|
||||
|
||||
// Construct map information before changing mesh0 primitives
|
||||
@ -1740,9 +1750,6 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
||||
// Now we have extracted all information from all meshes.
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
labelList patchSizes(getPatchSizes(allPatches));
|
||||
labelList patchStarts(getPatchStarts(allPatches));
|
||||
|
||||
mesh0.resetMotion(); // delete any oldPoints.
|
||||
mesh0.resetPrimitives
|
||||
(
|
||||
|
||||
@ -216,7 +216,7 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
|
||||
}
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().Hs(idc, p, T);
|
||||
scalar hc = this->owner().composition().carrier().Ha(idc, p, T);
|
||||
scalar hp = liquids_.properties()[idl].h(p, T);
|
||||
|
||||
dh = hc - hp;
|
||||
|
||||
@ -171,8 +171,8 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
forAll(this->owner().thermo().carrier().Y(), i)
|
||||
{
|
||||
scalar Yc = this->owner().thermo().carrier().Y()[i][cellI];
|
||||
Hc += Yc*this->owner().thermo().carrier().Hs(i, pc, Tc);
|
||||
Hsc += Yc*this->owner().thermo().carrier().Hs(i, ps, Ts);
|
||||
Hc += Yc*this->owner().thermo().carrier().Ha(i, pc, Tc);
|
||||
Hsc += Yc*this->owner().thermo().carrier().Ha(i, ps, Ts);
|
||||
Cpc += Yc*this->owner().thermo().carrier().Cp(i, ps, Ts);
|
||||
kappac += Yc*this->owner().thermo().carrier().kappa(i, ps, Ts);
|
||||
}
|
||||
@ -315,7 +315,7 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
|
||||
}
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().Hs(idc, p, TDash);
|
||||
scalar hc = this->owner().composition().carrier().Ha(idc, p, TDash);
|
||||
scalar hp = liquids_.properties()[idl].h(p, TDash);
|
||||
|
||||
dh = hc - hp;
|
||||
|
||||
@ -99,6 +99,7 @@ $(cellSources)/sphereToCell/sphereToCell.C
|
||||
$(cellSources)/cylinderToCell/cylinderToCell.C
|
||||
$(cellSources)/faceZoneToCell/faceZoneToCell.C
|
||||
$(cellSources)/cylinderAnnulusToCell/cylinderAnnulusToCell.C
|
||||
$(cellSources)/targetVolumeToCell/targetVolumeToCell.C
|
||||
|
||||
faceSources = sets/faceSources
|
||||
$(faceSources)/faceToFace/faceToFace.C
|
||||
|
||||
@ -0,0 +1,328 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "targetVolumeToCell.H"
|
||||
#include "polyMesh.H"
|
||||
#include "globalMeshData.H"
|
||||
#include "plane.H"
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(targetVolumeToCell, 0);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, word);
|
||||
|
||||
addToRunTimeSelectionTable(topoSetSource, targetVolumeToCell, istream);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Foam::topoSetSource::addToUsageTable Foam::targetVolumeToCell::usage_
|
||||
(
|
||||
targetVolumeToCell::typeName,
|
||||
"\n Usage: targetVolumeToCell (nx ny nz)\n\n"
|
||||
" Adjust plane until obtained selected volume\n\n"
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::targetVolumeToCell::volumeOfSet
|
||||
(
|
||||
const PackedBoolList& selected
|
||||
) const
|
||||
{
|
||||
scalar sumVol = 0.0;
|
||||
forAll(selected, cellI)
|
||||
{
|
||||
if (selected[cellI])
|
||||
{
|
||||
sumVol += mesh_.cellVolumes()[cellI];
|
||||
}
|
||||
}
|
||||
return returnReduce(sumVol, sumOp<scalar>());
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::targetVolumeToCell::selectCells
|
||||
(
|
||||
const scalar normalComp,
|
||||
PackedBoolList& selected
|
||||
) const
|
||||
{
|
||||
selected.setSize(mesh_.nCells());
|
||||
selected = false;
|
||||
|
||||
label nSelected = 0;
|
||||
|
||||
forAll(mesh_.cellCentres(), cellI)
|
||||
{
|
||||
const point& cc = mesh_.cellCentres()[cellI];
|
||||
|
||||
if ((cc&n_) < normalComp)
|
||||
{
|
||||
selected[cellI] = true;
|
||||
nSelected++;
|
||||
}
|
||||
}
|
||||
return returnReduce(nSelected, sumOp<label>());
|
||||
}
|
||||
|
||||
|
||||
void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
|
||||
{
|
||||
if (vol_ <= 0)
|
||||
{
|
||||
// Select no cells
|
||||
return;
|
||||
}
|
||||
else if (gSum(mesh_.cellVolumes()) < vol_)
|
||||
{
|
||||
// Select all cells
|
||||
forAll(mesh_.cellVolumes(), cellI)
|
||||
{
|
||||
addOrDelete(set, cellI, add);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Get plane for min,max volume.
|
||||
// Planes all have base (0 0 0) and fixed normal so work only on normal
|
||||
// component.
|
||||
|
||||
scalar maxComp = -GREAT;
|
||||
label maxCells = 0;
|
||||
scalar maxVol = 0;
|
||||
scalar minComp = GREAT;
|
||||
{
|
||||
const boundBox& bb = mesh_.bounds();
|
||||
pointField points(bb.points());
|
||||
|
||||
label minPointI = -1;
|
||||
label maxPointI = -1;
|
||||
forAll(points, pointI)
|
||||
{
|
||||
scalar c = (points[pointI]&n_);
|
||||
if (c > maxComp)
|
||||
{
|
||||
maxComp = c;
|
||||
maxPointI = pointI;
|
||||
}
|
||||
else if (c < minComp)
|
||||
{
|
||||
minComp = c;
|
||||
minPointI = pointI;
|
||||
}
|
||||
}
|
||||
|
||||
PackedBoolList maxSelected(mesh_.nCells());
|
||||
maxCells = selectCells(maxComp, maxSelected);
|
||||
maxVol = volumeOfSet(maxSelected);
|
||||
|
||||
// Check that maxPoint indeed selects all cells
|
||||
if (maxCells != mesh_.globalData().nTotalCells())
|
||||
{
|
||||
WarningIn("targetVolumeToCell::combine(topoSet&, const bool) const")
|
||||
<< "Plane " << plane(points[maxPointI], n_)
|
||||
<< " selects " << maxCells
|
||||
<< " cells instead of all " << mesh_.globalData().nTotalCells()
|
||||
<< " cells. Results might be wrong." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Bisection
|
||||
// ~~~~~~~~~
|
||||
|
||||
PackedBoolList selected(mesh_.nCells());
|
||||
label nSelected = -1;
|
||||
scalar selectedVol = 0.0;
|
||||
scalar selectedComp = 0.0;
|
||||
|
||||
|
||||
scalar low = minComp;
|
||||
scalar high = maxComp;
|
||||
|
||||
const scalar tolerance = SMALL*100*(maxComp-minComp);
|
||||
|
||||
while ((high-low) > tolerance)
|
||||
{
|
||||
scalar mid = 0.5*(low + high);
|
||||
|
||||
nSelected = selectCells(mid, selected);
|
||||
selectedVol = volumeOfSet(selected);
|
||||
|
||||
//Pout<< "High:" << high << " low:" << low << " mid:" << mid << nl
|
||||
// << " nSelected:" << nSelected << nl
|
||||
// << " vol :" << selectedVol << nl
|
||||
// << endl;
|
||||
|
||||
if (selectedVol < vol_)
|
||||
{
|
||||
low = mid;
|
||||
|
||||
PackedBoolList highSelected(mesh_.nCells());
|
||||
label nHigh = selectCells(high, selected);
|
||||
if (nSelected == nHigh)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
high = mid;
|
||||
|
||||
PackedBoolList lowSelected(mesh_.nCells());
|
||||
label nLow = selectCells(low, selected);
|
||||
if (nSelected == nLow)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nSelected = selectCells(high, selected);
|
||||
selectedVol = volumeOfSet(selected);
|
||||
|
||||
if (selectedVol < vol_)
|
||||
{
|
||||
selectedComp = high;
|
||||
}
|
||||
else
|
||||
{
|
||||
nSelected = selectCells(low, selected);
|
||||
selectedVol = volumeOfSet(selected);
|
||||
|
||||
if (selectedVol < vol_)
|
||||
{
|
||||
selectedComp = low;
|
||||
}
|
||||
else
|
||||
{
|
||||
WarningIn("targetVolumeToCell::combine(topoSet&, const bool) const")
|
||||
<< "Did not converge onto plane. " << nl
|
||||
<< "high plane:"
|
||||
<< plane(high*n_, n_)
|
||||
<< nl
|
||||
<< "low plane :"
|
||||
<< plane(low*n_, n_)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Info<< " Selected " << nSelected << " with actual volume " << selectedVol
|
||||
<< endl;
|
||||
|
||||
forAll(selected, cellI)
|
||||
{
|
||||
if (selected[cellI])
|
||||
{
|
||||
addOrDelete(set, cellI, add);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
Foam::targetVolumeToCell::targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const scalar vol,
|
||||
const vector& n
|
||||
)
|
||||
:
|
||||
topoSetSource(mesh),
|
||||
vol_(vol),
|
||||
n_(n)
|
||||
{}
|
||||
|
||||
|
||||
// Construct from dictionary
|
||||
Foam::targetVolumeToCell::targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
topoSetSource(mesh),
|
||||
vol_(readScalar(dict.lookup("volume"))),
|
||||
n_(dict.lookup("normal"))
|
||||
{}
|
||||
|
||||
|
||||
// Construct from Istream
|
||||
Foam::targetVolumeToCell::targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
Istream& is
|
||||
)
|
||||
:
|
||||
topoSetSource(mesh),
|
||||
vol_(readScalar(checkIs(is))),
|
||||
n_(checkIs(is))
|
||||
{}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::targetVolumeToCell::~targetVolumeToCell()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::targetVolumeToCell::applyToSet
|
||||
(
|
||||
const topoSetSource::setAction action,
|
||||
topoSet& set
|
||||
) const
|
||||
{
|
||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
|
||||
{
|
||||
Info<< " Adding cells up to target volume " << vol_
|
||||
<< " out of total volume " << gSum(mesh_.cellVolumes()) << endl;
|
||||
|
||||
combine(set, true);
|
||||
}
|
||||
else if (action == topoSetSource::DELETE)
|
||||
{
|
||||
Info<< " Removing cells up to target volume " << vol_
|
||||
<< " out of total volume " << gSum(mesh_.cellVolumes()) << endl;
|
||||
|
||||
combine(set, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,142 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::targetVolumeToCell
|
||||
|
||||
Description
|
||||
A topoSetSource to select cells based on the wanted volume of selected
|
||||
cells. Adapts a plane until it has enough.
|
||||
|
||||
SourceFiles
|
||||
targetVolumeToCell.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef targetVolumeToCell_H
|
||||
#define targetVolumeToCell_H
|
||||
|
||||
#include "topoSetSource.H"
|
||||
//#include "plane.H"
|
||||
#include "PackedBoolList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class targetVolumeToCell Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class targetVolumeToCell
|
||||
:
|
||||
public topoSetSource
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Add usage string
|
||||
static addToUsageTable usage_;
|
||||
|
||||
//- Wanted volume
|
||||
const scalar vol_;
|
||||
|
||||
//- Normal of plane to sweep
|
||||
vector n_;
|
||||
//plane pl_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
scalar volumeOfSet(const PackedBoolList&) const;
|
||||
|
||||
label selectCells
|
||||
(
|
||||
const scalar normalComp,
|
||||
PackedBoolList& selected
|
||||
) const;
|
||||
|
||||
void combine(topoSet& set, const bool add) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("targetVolumeToCell");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const scalar vol,
|
||||
//const plane&
|
||||
const vector&
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
targetVolumeToCell
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
Istream&
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~targetVolumeToCell();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
virtual sourceType setType() const
|
||||
{
|
||||
return CELLSETSOURCE;
|
||||
}
|
||||
|
||||
virtual void applyToSet
|
||||
(
|
||||
const topoSetSource::setAction action,
|
||||
topoSet&
|
||||
) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -61,51 +61,6 @@ namespace Foam
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
eConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
eConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
@ -185,6 +140,87 @@ makeBasicMixture
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makeBasicPolyMixture
|
||||
(
|
||||
pureMixture,
|
||||
3,
|
||||
sensibleInternalEnergy
|
||||
);
|
||||
|
||||
makeBasicPolyMixture
|
||||
(
|
||||
pureMixture,
|
||||
8,
|
||||
sensibleInternalEnergy
|
||||
);
|
||||
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeBasicMixture
|
||||
(
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
janafThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -84,27 +84,27 @@ makeThermo
|
||||
|
||||
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
|
||||
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
eConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
// makeThermo
|
||||
// (
|
||||
// psiThermo,
|
||||
// hePsiThermo,
|
||||
// pureMixture,
|
||||
// constTransport,
|
||||
// sensibleInternalEnergy,
|
||||
// eConstThermo,
|
||||
// perfectGas
|
||||
// );
|
||||
|
||||
makeThermo
|
||||
(
|
||||
psiThermo,
|
||||
hePsiThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
eConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
// makeThermo
|
||||
// (
|
||||
// psiThermo,
|
||||
// hePsiThermo,
|
||||
// pureMixture,
|
||||
// sutherlandTransport,
|
||||
// sensibleInternalEnergy,
|
||||
// eConstThermo,
|
||||
// perfectGas
|
||||
// );
|
||||
|
||||
makeThermo
|
||||
(
|
||||
|
||||
@ -149,6 +149,104 @@ makeThermo
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
janafThermo,
|
||||
perfectGas
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
incompressible
|
||||
);
|
||||
|
||||
makePolyThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
3,
|
||||
sensibleInternalEnergy
|
||||
);
|
||||
|
||||
makePolyThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
8,
|
||||
sensibleInternalEnergy
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
constTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
hConstThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
makeThermo
|
||||
(
|
||||
rhoThermo,
|
||||
heRhoThermo,
|
||||
pureMixture,
|
||||
sutherlandTransport,
|
||||
sensibleInternalEnergy,
|
||||
janafThermo,
|
||||
isobaricPerfectGas
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -128,10 +128,14 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
void Foam::radiation::greyDiffusiveViewFactorFixedValueFvPatchScalarField::
|
||||
updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Do nothing
|
||||
|
||||
if (debug)
|
||||
@ -149,6 +153,7 @@ updateCoeffs()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ Foam::porousMedia::fixedTemperature::~fixedTemperature()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::porousMedia::fixedTemperature::addEnthalpySource
|
||||
void Foam::porousMedia::fixedTemperature::addEnergySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,7 +78,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
@ -100,4 +100,3 @@ public:
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,7 @@ Foam::porousMedia::noThermalModel::~noThermalModel()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::porousMedia::noThermalModel::addEnthalpySource
|
||||
void Foam::porousMedia::noThermalModel::addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField&,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,7 +70,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
@ -92,4 +92,3 @@ public:
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,7 +105,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
virtual void addEnthalpySource
|
||||
virtual void addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
@ -127,4 +127,3 @@ public:
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,7 +44,7 @@ Foam::thermalPorousZone::thermalPorousZone
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::thermalPorousZone::addEnthalpySource
|
||||
void Foam::thermalPorousZone::addEnergySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
@ -53,7 +53,7 @@ void Foam::thermalPorousZone::addEnthalpySource
|
||||
{
|
||||
if (model_.valid())
|
||||
{
|
||||
model_->addEnthalpySource(thermo, rho, hEqn);
|
||||
model_->addEnergySource(thermo, rho, hEqn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,7 +125,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnthalpySource
|
||||
void addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ Foam::thermalPorousZones::thermalPorousZones
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::thermalPorousZones::addEnthalpySource
|
||||
void Foam::thermalPorousZones::addEnergySource
|
||||
(
|
||||
const basicThermo& thermo,
|
||||
const volScalarField& rho,
|
||||
@ -55,7 +55,7 @@ void Foam::thermalPorousZones::addEnthalpySource
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
operator[](i).addEnthalpySource(thermo, rho, hEqn);
|
||||
operator[](i).addEnergySource(thermo, rho, hEqn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,7 +93,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Add the thermal source to the enthalpy equation
|
||||
void addEnthalpySource
|
||||
void addEnergySource
|
||||
(
|
||||
const basicThermo&,
|
||||
const volScalarField& rho,
|
||||
|
||||
@ -28,14 +28,14 @@ Group
|
||||
grpCmpLESTurbulence
|
||||
|
||||
Description
|
||||
One Equation Eddy Viscosity Model for incompressible flows
|
||||
One Equation Eddy Viscosity Model for compressible flows
|
||||
|
||||
Eddy viscosity SGS model using a modeled balance equation to simulate the
|
||||
behaviour of k, hence,
|
||||
\verbatim
|
||||
d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k))
|
||||
=
|
||||
-rho*D:B - ce*rho*k^3/2/delta
|
||||
-rho*D:B - ce*rho*k^(3/2)/delta
|
||||
|
||||
and
|
||||
|
||||
@ -44,10 +44,11 @@ Description
|
||||
where
|
||||
|
||||
D = symm(grad(U));
|
||||
muSgs = ck*rho*sqrt(k)*delta
|
||||
nuSgs = ck*sqrt(k)*delta
|
||||
muSgs = rho*nuSgs
|
||||
muEff = muSgs + mu
|
||||
\endverbatim
|
||||
|
||||
|
||||
SourceFiles
|
||||
oneEqEddy.C
|
||||
|
||||
|
||||
@ -142,6 +142,8 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
htc[faceI] = 0.037*pow(Re, 0.8)*cbrt(Pr[faceI])*kappaw[faceI]/L_;
|
||||
}
|
||||
}
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -353,7 +353,7 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
|
||||
volScalarField L(sqrt(k_)/(pow025(Cmu_)*omega_));
|
||||
volScalarField CDkOmega((2.0*alphaOmega2_)*(gradK & gradOmega)/omega_);
|
||||
volScalarField F1(this->F1(CDkOmega));
|
||||
volScalarField G(nuSgs_*0.5*S2);
|
||||
volScalarField G(nuSgs_*S2);
|
||||
|
||||
// Turbulent kinetic energy equation
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ Description
|
||||
\verbatim
|
||||
d/dt(k) + div(U*k) - div(nuEff*grad(k))
|
||||
=
|
||||
-B*L - ce*k^3/2/delta
|
||||
-D:B - ce*k^(3/2)/delta
|
||||
|
||||
and
|
||||
|
||||
|
||||
@ -71,9 +71,9 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
kappa_(ptf.kappa_),
|
||||
Uref_(ptf.Uref_),
|
||||
Href_(ptf.Href_),
|
||||
z0_(ptf.z0_),
|
||||
zGround_(ptf.zGround_),
|
||||
Ustar_(ptf.Ustar_)
|
||||
z0_(ptf.z0_, mapper),
|
||||
zGround_(ptf.zGround_, mapper),
|
||||
Ustar_(ptf.Ustar_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -116,7 +116,8 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
|
||||
z_ /= mag(z_);
|
||||
|
||||
evaluate();
|
||||
const vectorField& c = patch().Cf();
|
||||
scalarField::operator=(pow3(Ustar_)/(kappa_*((c & z_) - zGround_ + z0_)));
|
||||
}
|
||||
|
||||
|
||||
@ -169,14 +170,6 @@ void atmBoundaryLayerInletEpsilonFvPatchScalarField::rmap
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
const vectorField& c = patch().Cf();
|
||||
tmp<scalarField> coord = (c & z_);
|
||||
scalarField::operator=(pow3(Ustar_)/(kappa_*(coord - zGround_ + z0_)));
|
||||
}
|
||||
|
||||
|
||||
void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
|
||||
@ -207,7 +207,7 @@ public:
|
||||
// Access
|
||||
|
||||
//- Return max value
|
||||
scalarField Ustar() const
|
||||
const scalarField& Ustar() const
|
||||
{
|
||||
return Ustar_;
|
||||
}
|
||||
@ -235,12 +235,6 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update coefficients
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
@ -68,14 +68,14 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(ptf, p, iF, mapper),
|
||||
Ustar_(ptf.Ustar_),
|
||||
Ustar_(ptf.Ustar_, mapper),
|
||||
n_(ptf.n_),
|
||||
z_(ptf.z_),
|
||||
z0_(ptf.z0_),
|
||||
z0_(ptf.z0_, mapper),
|
||||
kappa_(ptf.kappa_),
|
||||
Uref_(ptf.Uref_),
|
||||
Href_(ptf.Href_),
|
||||
zGround_(ptf.zGround_)
|
||||
zGround_(ptf.zGround_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -120,7 +120,25 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
Ustar_[i] = kappa_*Uref_/(log((Href_ + z0_[i])/max(z0_[i] , 0.001)));
|
||||
}
|
||||
|
||||
evaluate();
|
||||
const vectorField& c = patch().Cf();
|
||||
const scalarField coord(c & z_);
|
||||
scalarField Un(coord.size());
|
||||
|
||||
forAll(coord, i)
|
||||
{
|
||||
if ((coord[i] - zGround_[i]) < Href_)
|
||||
{
|
||||
Un[i] =
|
||||
(Ustar_[i]/kappa_)
|
||||
* log((coord[i] - zGround_[i] + z0_[i])/max(z0_[i], 0.001));
|
||||
}
|
||||
else
|
||||
{
|
||||
Un[i] = Uref_;
|
||||
}
|
||||
}
|
||||
|
||||
vectorField::operator=(n_*Un);
|
||||
}
|
||||
|
||||
|
||||
@ -145,29 +163,32 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
const vectorField& c = patch().Cf();
|
||||
const scalarField coord(c & z_);
|
||||
scalarField Un(coord.size());
|
||||
fixedValueFvPatchVectorField::autoMap(m);
|
||||
z0_.autoMap(m);
|
||||
zGround_.autoMap(m);
|
||||
Ustar_.autoMap(m);
|
||||
}
|
||||
|
||||
forAll(coord, i)
|
||||
{
|
||||
if ((coord[i] - zGround_[i]) < Href_)
|
||||
{
|
||||
Un[i] =
|
||||
(Ustar_[i]/kappa_)
|
||||
* log((coord[i] - zGround_[i] + z0_[i])/max(z0_[i], 0.001));
|
||||
}
|
||||
else
|
||||
{
|
||||
Un[i] = Uref_;
|
||||
}
|
||||
}
|
||||
|
||||
vectorField::operator=(n_*Un);
|
||||
void atmBoundaryLayerInletVelocityFvPatchVectorField::rmap
|
||||
(
|
||||
const fvPatchVectorField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchVectorField::rmap(ptf, addr);
|
||||
|
||||
fixedValueFvPatchVectorField::updateCoeffs();
|
||||
const atmBoundaryLayerInletVelocityFvPatchVectorField& blptf =
|
||||
refCast<const atmBoundaryLayerInletVelocityFvPatchVectorField>(ptf);
|
||||
|
||||
z0_.rmap(blptf.z0_, addr);
|
||||
zGround_.rmap(blptf.zGround_, addr);
|
||||
Ustar_.rmap(blptf.Ustar_, addr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -215,26 +215,42 @@ public:
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return Ustar
|
||||
scalarField& Ustar()
|
||||
const scalarField& Ustar() const
|
||||
{
|
||||
return Ustar_;
|
||||
}
|
||||
|
||||
//- Return flow direction
|
||||
vector& n()
|
||||
const vector& n() const
|
||||
{
|
||||
return n_;
|
||||
}
|
||||
|
||||
//- Return z direction
|
||||
vector& z()
|
||||
const vector& z() const
|
||||
{
|
||||
return z_;
|
||||
}
|
||||
|
||||
//- Update coefficients
|
||||
virtual void updateCoeffs();
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchVectorField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 293;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 570;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Tu;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 293;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 570;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object alphaSgs;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type alphatJayatillekeWallFunction;
|
||||
he ha;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type alphatJayatillekeWallFunction;
|
||||
he ha;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 2e-05;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 2e-05;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type waveTransmissive;
|
||||
field p;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
gamma 1.3;
|
||||
fieldInf 1e5;
|
||||
lInf 0.3;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,88 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object LESProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
LESModel oneEqEddy;
|
||||
|
||||
delta cubeRootVol;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
PrandtlCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
vanDriestCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Aplus 26;
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,93 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object combustionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
laminarFlameSpeedCorrelation constant;
|
||||
|
||||
fuel Propane;
|
||||
|
||||
Su Su [0 1 -1 0 0 0 0] 0.135;
|
||||
|
||||
SuModel transport;
|
||||
|
||||
equivalenceRatio equivalenceRatio [0 0 0 0 0 0 0] 0.6;
|
||||
|
||||
sigmaExt sigmaExt [0 0 -1 0 0 0 0] 338;
|
||||
|
||||
XiModel transport;
|
||||
|
||||
XiCoef XiCoef [0 0 0 0 0 0 0] 0.62;
|
||||
|
||||
XiShapeCoef XiShapeCoef [0 0 0 0 0 0 0] 1;
|
||||
|
||||
uPrimeCoef uPrimeCoef [0 0 0 0 0 0 0] 1;
|
||||
|
||||
GuldersCoeffs
|
||||
{
|
||||
Methane
|
||||
{
|
||||
W 0.422;
|
||||
eta 0.15;
|
||||
xi 5.18;
|
||||
alpha 2;
|
||||
beta -0.5;
|
||||
f 2.3;
|
||||
}
|
||||
|
||||
Propane
|
||||
{
|
||||
W 0.446;
|
||||
eta 0.12;
|
||||
xi 4.95;
|
||||
alpha 1.77;
|
||||
beta -0.2;
|
||||
f 2.3;
|
||||
}
|
||||
|
||||
IsoOctane
|
||||
{
|
||||
W 0.4658;
|
||||
eta -0.326;
|
||||
xi 4.48;
|
||||
alpha 1.56;
|
||||
beta -0.22;
|
||||
f 2.3;
|
||||
}
|
||||
}
|
||||
|
||||
ignite yes;
|
||||
|
||||
ignitionSites
|
||||
(
|
||||
{
|
||||
location (0.005 -0.02 0);
|
||||
diameter 0.003;
|
||||
start 0;
|
||||
duration 0.1;
|
||||
strength 100;
|
||||
}
|
||||
);
|
||||
|
||||
ignitionSphereFraction 0;
|
||||
|
||||
ignitionThickness ignitionThickness [0 1 0 0 0 0 0] 0.001;
|
||||
|
||||
ignitionCircleFraction 1;
|
||||
|
||||
ignitionKernelArea ignitionKernelArea [0 2 0 0 0 0 0] 0;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,173 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-20.6 0 0)
|
||||
(-20.6 3 0)
|
||||
(-20.6 12.7 0)
|
||||
(-20.6 25.4 0)
|
||||
(0 -25.4 0)
|
||||
(0 -5 0)
|
||||
(0 0 0)
|
||||
(0 3 0)
|
||||
(0 12.7 0)
|
||||
(0 25.4 0)
|
||||
(206 -25.4 0)
|
||||
(206 -8.5 0)
|
||||
(206 0 0)
|
||||
(206 6.5 0)
|
||||
(206 17 0)
|
||||
(206 25.4 0)
|
||||
(290 -16.6 0)
|
||||
(290 -6.3 0)
|
||||
(290 0 0)
|
||||
(290 4.5 0)
|
||||
(290 11 0)
|
||||
(290 16.6 0)
|
||||
(-20.6 0 38.1)
|
||||
(-20.6 3 38.1)
|
||||
(-20.6 12.7 38.1)
|
||||
(-20.6 25.4 38.1)
|
||||
(0 -25.4 38.1)
|
||||
(0 -5 38.1)
|
||||
(0 0 38.1)
|
||||
(0 3 38.1)
|
||||
(0 12.7 38.1)
|
||||
(0 25.4 38.1)
|
||||
(206 -25.4 38.1)
|
||||
(206 -8.5 38.1)
|
||||
(206 0 38.1)
|
||||
(206 6.5 38.1)
|
||||
(206 17 38.1)
|
||||
(206 25.4 38.1)
|
||||
(290 -16.6 38.1)
|
||||
(290 -6.3 38.1)
|
||||
(290 0 38.1)
|
||||
(290 4.5 38.1)
|
||||
(290 11 38.1)
|
||||
(290 16.6 38.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 6 7 1 22 28 29 23) (18 7 1) simpleGrading (0.5 1.8 1)
|
||||
hex (1 7 8 2 23 29 30 24) (18 10 1) simpleGrading (0.5 4 1)
|
||||
hex (2 8 9 3 24 30 31 25) (18 13 1) simpleGrading (0.5 0.25 1)
|
||||
hex (4 10 11 5 26 32 33 27) (180 18 1) simpleGrading (4 1 1)
|
||||
hex (5 11 12 6 27 33 34 28) (180 9 1) edgeGrading (4 4 4 4 0.5 1 1 0.5 1 1 1 1)
|
||||
hex (6 12 13 7 28 34 35 29) (180 7 1) edgeGrading (4 4 4 4 1.8 1 1 1.8 1 1 1 1)
|
||||
hex (7 13 14 8 29 35 36 30) (180 10 1) edgeGrading (4 4 4 4 4 1 1 4 1 1 1 1)
|
||||
hex (8 14 15 9 30 36 37 31) (180 13 1) simpleGrading (4 0.25 1)
|
||||
hex (10 16 17 11 32 38 39 33) (25 18 1) simpleGrading (2.5 1 1)
|
||||
hex (11 17 18 12 33 39 40 34) (25 9 1) simpleGrading (2.5 1 1)
|
||||
hex (12 18 19 13 34 40 41 35) (25 7 1) simpleGrading (2.5 1 1)
|
||||
hex (13 19 20 14 35 41 42 36) (25 10 1) simpleGrading (2.5 1 1)
|
||||
hex (14 20 21 15 36 42 43 37) (25 13 1) simpleGrading (2.5 0.25 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 22 23 1)
|
||||
(1 23 24 2)
|
||||
(2 24 25 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(16 17 39 38)
|
||||
(17 18 40 39)
|
||||
(18 19 41 40)
|
||||
(19 20 42 41)
|
||||
(20 21 43 42)
|
||||
);
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 25 31 9)
|
||||
(9 31 37 15)
|
||||
(15 37 43 21)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 6 28 22)
|
||||
(6 5 27 28)
|
||||
(5 4 26 27)
|
||||
(4 10 32 26)
|
||||
(10 16 38 32)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(22 28 29 23)
|
||||
(23 29 30 24)
|
||||
(24 30 31 25)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(29 35 36 30)
|
||||
(30 36 37 31)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(35 41 42 36)
|
||||
(36 42 43 37)
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(4 5 11 10)
|
||||
(5 6 12 11)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(10 11 17 16)
|
||||
(11 12 18 17)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,67 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>;
|
||||
|
||||
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675;
|
||||
|
||||
reactants
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 29.2068;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 100;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 3.20495 0.00165359 -5.55661e-07 8.62503e-11 -4.93973e-15 -1347.25 4.81241 );
|
||||
lowCpCoeffs ( 3.52181 -9.21936e-05 1.77427e-06 -6.2049e-10 -1.99209e-13 -1352.32 3.48856 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
products
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.5396;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 100;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 3.10383 0.00156927 -5.22523e-07 8.06527e-11 -4.60363e-15 -6892.54 5.21744 );
|
||||
lowCpCoeffs ( 3.53318 7.81943e-05 5.77097e-07 6.68595e-10 -6.30433e-13 -6964.71 3.15336 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default backward;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,k) Gauss limitedLinear 0.1;
|
||||
div(phiXi,Xi) Gauss limitedLinear01 0.1;
|
||||
div(phiXi,Su) Gauss limitedLinear01 0.1;
|
||||
div(phiSt,b) Gauss limitedLinear01 0.1;
|
||||
div(phi,ft_b_ha_hau) Gauss multivariateSelection
|
||||
{
|
||||
ft limitedLinear01 0.1;
|
||||
b limitedLinear01 0.1;
|
||||
ha limitedLinear 0.1;
|
||||
hau limitedLinear 0.1;
|
||||
};
|
||||
div(U) Gauss linear;
|
||||
div((Su*grad(b))) Gauss linear;
|
||||
div((U+((Su*Xi)*grad(b)))) Gauss linear;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DBEff,B) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
|
||||
laplacian(alphaEff,b) Gauss linear corrected;
|
||||
laplacian(alphaEff,ft) Gauss linear corrected;
|
||||
laplacian(alphaEff,ha) Gauss linear corrected;
|
||||
laplacian(alphaEff,hau) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object Su;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.135;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.135;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.135;
|
||||
value uniform 0.135;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 0 0 1 0 0 0 ];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 293;
|
||||
value uniform 293;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 570;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object Tu;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 0 0 1 0 0 0 ];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 293;
|
||||
value uniform 293;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 293;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 570;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,58 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform ( 0 0 0 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentInlet;
|
||||
referenceField uniform ( 13.3 0 0 );
|
||||
fluctuationScale ( 0.04 0.02 0.02 );
|
||||
alpha 0.1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform ( 0 0 0 );
|
||||
value uniform ( 0 0 0 );
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 0 0 );
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 0 0 );
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object Xi;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphaSgs;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 1 -1 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type alphatJayatillekeWallFunction;
|
||||
he ha;
|
||||
value uniform 0;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type alphatJayatillekeWallFunction;
|
||||
he ha;
|
||||
value uniform 0;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object b;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 2e-05;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 2e-05;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 2e-05;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,59 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type waveTransmissive;
|
||||
field p;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
gamma 1.3;
|
||||
fieldInf 100000;
|
||||
lInf 0.3;
|
||||
value uniform 100000;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,88 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object LESProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
LESModel oneEqEddy;
|
||||
|
||||
delta vanDriest;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
PrandtlCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
vanDriestCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
Aplus 26;
|
||||
Cdelta 0.158;
|
||||
}
|
||||
|
||||
smoothCoeffs
|
||||
{
|
||||
delta cubeRootVol;
|
||||
cubeRootVolCoeffs
|
||||
{
|
||||
deltaCoeff 1;
|
||||
}
|
||||
|
||||
maxDeltaRatio 1.1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,93 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object combustionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
laminarFlameSpeedCorrelation Gulders;
|
||||
|
||||
fuel Propane;
|
||||
|
||||
Su Su [0 1 -1 0 0 0 0] 0.135;
|
||||
|
||||
SuModel transport;
|
||||
|
||||
equivalenceRatio equivalenceRatio [0 0 0 0 0 0 0] 0.6;
|
||||
|
||||
sigmaExt sigmaExt [0 0 -1 0 0 0 0] 338;
|
||||
|
||||
XiModel transport;
|
||||
|
||||
XiCoef XiCoef [0 0 0 0 0 0 0] 0.62;
|
||||
|
||||
XiShapeCoef XiShapeCoef [0 0 0 0 0 0 0] 1;
|
||||
|
||||
uPrimeCoef uPrimeCoef [0 0 0 0 0 0 0] 1;
|
||||
|
||||
GuldersCoeffs
|
||||
{
|
||||
Methane
|
||||
{
|
||||
W 0.422;
|
||||
eta 0.15;
|
||||
xi 5.18;
|
||||
alpha 2;
|
||||
beta -0.5;
|
||||
f 2.3;
|
||||
}
|
||||
|
||||
Propane
|
||||
{
|
||||
W 0.446;
|
||||
eta 0.12;
|
||||
xi 4.95;
|
||||
alpha 1.77;
|
||||
beta -0.2;
|
||||
f 2.3;
|
||||
}
|
||||
|
||||
IsoOctane
|
||||
{
|
||||
W 0.4658;
|
||||
eta -0.326;
|
||||
xi 4.48;
|
||||
alpha 1.56;
|
||||
beta -0.22;
|
||||
f 2.3;
|
||||
}
|
||||
}
|
||||
|
||||
ignite yes;
|
||||
|
||||
ignitionSites
|
||||
(
|
||||
{
|
||||
location (0.005 -0.02 0.01905);
|
||||
diameter 0.003;
|
||||
start 0;
|
||||
duration 0.1;
|
||||
strength 200;
|
||||
}
|
||||
);
|
||||
|
||||
ignitionSphereFraction 1;
|
||||
|
||||
ignitionThickness ignitionThickness [0 1 0 0 0 0 0] 0;
|
||||
|
||||
ignitionCircleFraction 0;
|
||||
|
||||
ignitionKernelArea ignitionKernelArea [0 2 0 0 0 0 0] 0;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,182 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-20.6 0 0)
|
||||
(-20.6 2 0)
|
||||
(-20.6 12.7 0)
|
||||
(-20.6 25.4 0)
|
||||
(0 -25.4 0)
|
||||
(0 -4 0)
|
||||
(0 0 0)
|
||||
(0 2 0)
|
||||
(0 12.7 0)
|
||||
(0 25.4 0)
|
||||
(206 -25.4 0)
|
||||
(206 -8.5 0)
|
||||
(206 0 0)
|
||||
(206 8.5 0)
|
||||
(206 17 0)
|
||||
(206 25.4 0)
|
||||
(290 -16.6 0)
|
||||
(290 -8.3 0)
|
||||
(290 0 0)
|
||||
(290 5.5 0)
|
||||
(290 11 0)
|
||||
(290 16.6 0)
|
||||
(-20.6 0 38.1)
|
||||
(-20.6 2 38.1)
|
||||
(-20.6 12.7 38.1)
|
||||
(-20.6 25.4 38.1)
|
||||
(0 -25.4 38.1)
|
||||
(0 -4 38.1)
|
||||
(0 0 38.1)
|
||||
(0 2 38.1)
|
||||
(0 12.7 38.1)
|
||||
(0 25.4 38.1)
|
||||
(206 -25.4 38.1)
|
||||
(206 -8.5 38.1)
|
||||
(206 0 38.1)
|
||||
(206 8.5 38.1)
|
||||
(206 17 38.1)
|
||||
(206 25.4 38.1)
|
||||
(290 -16.6 38.1)
|
||||
(290 -8.3 38.1)
|
||||
(290 0 38.1)
|
||||
(290 5.5 38.1)
|
||||
(290 11 38.1)
|
||||
(290 16.6 38.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 6 7 1 22 28 29 23) (18 7 20) simpleGrading (1 1 1)
|
||||
hex (1 7 8 2 23 29 30 24) (18 10 20) simpleGrading (1 4 1)
|
||||
hex (2 8 9 3 24 30 31 25) (18 13 20) simpleGrading (1 0.25 1)
|
||||
hex (4 10 11 5 26 32 33 27) (180 18 20) simpleGrading (2 1 1)
|
||||
hex (5 11 12 6 27 33 34 28) (180 9 20) simpleGrading (2 1 1)
|
||||
hex (6 12 13 7 28 34 35 29) (180 7 20) simpleGrading (2 1 1)
|
||||
hex (7 13 14 8 29 35 36 30) (180 10 20) simpleGrading (2 4 1)
|
||||
hex (8 14 15 9 30 36 37 31) (180 13 20) simpleGrading (2 0.25 1)
|
||||
hex (10 16 17 11 32 38 39 33) (25 18 20) simpleGrading (1 1 1)
|
||||
hex (11 17 18 12 33 39 40 34) (25 9 20) simpleGrading (1 1 1)
|
||||
hex (12 18 19 13 34 40 41 35) (25 7 20) simpleGrading (1 1 1)
|
||||
hex (13 19 20 14 35 41 42 36) (25 10 20) simpleGrading (1 4 1)
|
||||
hex (14 20 21 15 36 42 43 37) (25 13 20) simpleGrading (1 0.25 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 22 23 1)
|
||||
(1 23 24 2)
|
||||
(2 24 25 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(16 17 39 38)
|
||||
(17 18 40 39)
|
||||
(18 19 41 40)
|
||||
(19 20 42 41)
|
||||
(20 21 43 42)
|
||||
);
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 25 31 9)
|
||||
(9 31 37 15)
|
||||
(15 37 43 21)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 6 28 22)
|
||||
(6 5 27 28)
|
||||
(5 4 26 27)
|
||||
(4 10 32 26)
|
||||
(10 16 38 32)
|
||||
);
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch back;
|
||||
faces
|
||||
(
|
||||
(22 28 29 23)
|
||||
(23 29 30 24)
|
||||
(24 30 31 25)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(29 35 36 30)
|
||||
(30 36 37 31)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(35 41 42 36)
|
||||
(36 42 43 37)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch front;
|
||||
faces
|
||||
(
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(4 5 11 10)
|
||||
(5 6 12 11)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(10 11 17 16)
|
||||
(11 12 18 17)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,62 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 600;
|
||||
startFace 715675;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 1140;
|
||||
startFace 716275;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 4460;
|
||||
startFace 717415;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 5000;
|
||||
startFace 721875;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
nFaces 12225;
|
||||
startFace 726875;
|
||||
matchTolerance 0.0001;
|
||||
neighbourPatch back;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
nFaces 12225;
|
||||
startFace 739100;
|
||||
matchTolerance 0.0001;
|
||||
neighbourPatch front;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,67 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>,absoluteEnthalpy>>>>;
|
||||
|
||||
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675;
|
||||
|
||||
reactants
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 29.2068;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 100;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 3.20495 0.00165359 -5.55661e-07 8.62503e-11 -4.93973e-15 -1347.25 4.81241 );
|
||||
lowCpCoeffs ( 3.52181 -9.21936e-05 1.77427e-06 -6.2049e-10 -1.99209e-13 -1352.32 3.48856 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
products
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.5396;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Tlow 100;
|
||||
Thigh 5000;
|
||||
Tcommon 1000;
|
||||
highCpCoeffs ( 3.10383 0.00156927 -5.22523e-07 8.06527e-11 -4.60363e-15 -6892.54 5.21744 );
|
||||
lowCpCoeffs ( 3.53318 7.81943e-05 5.77097e-07 6.68595e-10 -6.30433e-13 -6964.71 3.15336 );
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.67212e-06;
|
||||
Ts 170.672;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,80 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default backward;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,k) Gauss limitedLinear 0.1;
|
||||
div(phiXi,Xi) Gauss limitedLinear01 0.1;
|
||||
div(phiXi,Su) Gauss limitedLinear01 0.1;
|
||||
div(phiSt,b) Gauss limitedLinear01 0.1;
|
||||
div(phi,ft_b_ha_hau) Gauss multivariateSelection
|
||||
{
|
||||
ft limitedLinear01 0.1;
|
||||
b limitedLinear01 0.1;
|
||||
ha limitedLinear 0.1;
|
||||
hau limitedLinear 0.1;
|
||||
};
|
||||
div(U) Gauss linear;
|
||||
div((Su*grad(b))) Gauss linear;
|
||||
div((U+((Su*Xi)*grad(b)))) Gauss linear;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(DBEff,B) Gauss linear corrected;
|
||||
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
|
||||
laplacian(alphaEff,b) Gauss linear corrected;
|
||||
laplacian(alphaEff,ft) Gauss linear corrected;
|
||||
laplacian(alphaEff,ha) Gauss linear corrected;
|
||||
laplacian(alphaEff,hau) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -24,6 +24,7 @@ boundaryField
|
||||
ground
|
||||
{
|
||||
type alphatWallFunction;
|
||||
mut muSgs;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
@ -45,6 +46,7 @@ boundaryField
|
||||
"(region0_to.*)"
|
||||
{
|
||||
type alphatWallFunction;
|
||||
mut muSgs;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>;
|
||||
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>;
|
||||
|
||||
active true;
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"rho|rhot"
|
||||
rhoThermo
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
@ -15,9 +15,9 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//combustionModel noCombustion<psiCombustionModel>;
|
||||
combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>;
|
||||
//combustionModel FSD<psiCombustionModel,gasThermoPhysics>;
|
||||
//combustionModel noCombustion<psiThermoCombustion>;
|
||||
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>;
|
||||
//combustionModel FSD<psiThermoCombustion,gasThermoPhysics>;
|
||||
|
||||
active true;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel infinitelyFastChemistry<psiCombustionModel,gasThermoPhysics>;
|
||||
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>;
|
||||
|
||||
active on;
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ timePrecision 6;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.4;
|
||||
maxCo 0.3;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
thermoType heRhoThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
@ -26,7 +26,7 @@ mixture
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 719.3;
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
thermoType hePsiThermo<pureMixture<sutherlandTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
@ -26,7 +26,7 @@ mixture
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 719.3;
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
@ -26,7 +26,7 @@ mixture
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 717.5;
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
@ -26,7 +26,7 @@ mixture
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 717.5;
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
thermoType hePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>,sensibleInternalEnergy>>>>;
|
||||
|
||||
mixture
|
||||
{
|
||||
@ -26,7 +26,7 @@ mixture
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cv 717.5;
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
|
||||
@ -22,14 +22,12 @@ ddtSchemes
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind grad(U);
|
||||
div(phi,U) Gauss upwind;
|
||||
div((nuEff*dev(T(grad(U))))) Gauss linear;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
|
||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
keepCases="damBreak damBreakPorousBaffle weirOverflow"
|
||||
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel"
|
||||
loseCases="damBreakFine"
|
||||
|
||||
for case in $keepCases
|
||||
|
||||
@ -52,4 +52,7 @@ cloneCase damBreak damBreakFine
|
||||
# Do weirOverflow
|
||||
(cd weirOverflow && foamRunTutorials)
|
||||
|
||||
# Do waterChannel
|
||||
(cd waterChannel && foamRunTutorials)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -16,40 +16,36 @@ FoamFile
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
internalField uniform (2 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type turbulentInlet;
|
||||
referenceField uniform (13.3 0 0);
|
||||
fluctuationScale (0.04 0.02 0.02);
|
||||
type flowRateInletVelocity;
|
||||
flowRate constant 50;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type pressureInletOutletVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,13 +10,13 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object b;
|
||||
object alpha;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -26,26 +26,22 @@ boundaryField
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,42 +10,34 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Xi;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
internalField uniform 0.0001;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
intensity 0.05;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
walls
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 1;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
inletValue $internalField;
|
||||
value $internalField ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,42 +10,29 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object muSgs;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type mutUSpaldingWallFunction;
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
".*"
|
||||
{
|
||||
type mutUSpaldingWallFunction;
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,42 +10,33 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Su;
|
||||
object omega;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0.135;
|
||||
internalField uniform 0.003;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.135;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
walls
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.135;
|
||||
value uniform 0.135;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,44 +10,33 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object muSgs;
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 1 -1 -1 0 0 0 0 ];
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
atmosphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type mutUSpaldingWallFunction;
|
||||
type totalPressure;
|
||||
p0 uniform 0;
|
||||
U U;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi none;
|
||||
gamma 1;
|
||||
value uniform 0;
|
||||
}
|
||||
lowerWall
|
||||
|
||||
".*"
|
||||
{
|
||||
type mutUSpaldingWallFunction;
|
||||
type buoyantPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
front
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
back
|
||||
{
|
||||
type cyclic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
10
tutorials/multiphase/interFoam/ras/waterChannel/Allclean
Executable file
10
tutorials/multiphase/interFoam/ras/waterChannel/Allclean
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm 0/alpha1.gz 0/alpha1 2>/dev/null
|
||||
rm -rf *Flux
|
||||
|
||||
cleanCase
|
||||
25
tutorials/multiphase/interFoam/ras/waterChannel/Allrun
Executable file
25
tutorials/multiphase/interFoam/ras/waterChannel/Allrun
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
echo "Creating channel"
|
||||
i=1
|
||||
while [ "$i" -lt 3 ] ; do
|
||||
cp system/extrudeMeshDict.${i} system/extrudeMeshDict
|
||||
echo "Running extrudeMesh, instance" ${i}
|
||||
extrudeMesh > log.extrudeMesh.${i}
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application XiFoam;
|
||||
application LTSInterFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
@ -23,13 +23,13 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 3.0;//0.5;
|
||||
endTime 5000;
|
||||
|
||||
deltaT 5e-06;
|
||||
deltaT 1;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 0.1;
|
||||
writeInterval 200;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
@ -37,43 +37,49 @@ writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
writeCompression compressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.5;
|
||||
maxAlphaCo 0.5;
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
{
|
||||
fieldAverage1
|
||||
inletFlux
|
||||
{
|
||||
type fieldAverage;
|
||||
functionObjectLibs ( "libfieldFunctionObjects.so" );
|
||||
enabled true;
|
||||
outputControl outputTime;
|
||||
type faceSource;
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
outputControl timeStep;
|
||||
log true;
|
||||
// Output field values as well
|
||||
valueOutput false;
|
||||
source patch;
|
||||
sourceName inlet;
|
||||
operation sum;
|
||||
|
||||
fields
|
||||
(
|
||||
U
|
||||
{
|
||||
mean on;
|
||||
prime2Mean on;
|
||||
base time;
|
||||
rho*phi
|
||||
);
|
||||
}
|
||||
|
||||
p
|
||||
outletFlux
|
||||
{
|
||||
mean on;
|
||||
prime2Mean on;
|
||||
base time;
|
||||
$inletFlux;
|
||||
sourceName outlet;
|
||||
}
|
||||
);
|
||||
|
||||
atmosphereFlux
|
||||
{
|
||||
$inletFlux;
|
||||
sourceName atmosphere;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default localEuler rDeltaT;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(rho*phi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss interfaceCompression;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,omega) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh;
|
||||
pcorr;
|
||||
alpha1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -17,43 +17,79 @@ FoamFile
|
||||
|
||||
solvers
|
||||
{
|
||||
"(p|rho)"
|
||||
pcorr
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner
|
||||
{
|
||||
preconditioner GAMG;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
smoother DICGaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
nFinestSweeps 2;
|
||||
cacheAgglomeration false;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
/* pcorr
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(p|rho)Final"
|
||||
tolerance 1e-10;
|
||||
relTol 0;
|
||||
};
|
||||
*/
|
||||
p_rgh
|
||||
{
|
||||
$p;
|
||||
tolerance 1e-06;
|
||||
$pcorr;
|
||||
tolerance 1e-6;
|
||||
relTol 0.01;
|
||||
};
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|b|Su|Xi|ha|hau|k)"
|
||||
"(U|k|omega).*"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0.1;
|
||||
}
|
||||
solver smoothSolver;
|
||||
|
||||
"(U|b|Su|Xi|ha|hau|k)Final"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
smoother GaussSeidel;
|
||||
nSweeps 1;
|
||||
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
};
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 1;
|
||||
momentumPredictor no;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 3;
|
||||
cAlpha 1;
|
||||
|
||||
maxCo 0.5;
|
||||
maxAlphaCo 0.2;
|
||||
nAlphaSweepIter 1;
|
||||
|
||||
rDeltaTSmoothingCoeff 0.1;
|
||||
rDeltaTDampingCoeff 1;
|
||||
maxDeltaT 100;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
@ -63,7 +99,6 @@ relaxationFactors
|
||||
}
|
||||
equations
|
||||
{
|
||||
"(Xi|Su)" 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 0
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (50 130 27);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 1
|
||||
);
|
||||
}
|
||||
|
||||
boxToFace
|
||||
{
|
||||
box (0 0 0) (50 10.0001 24);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha1 1
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
6
tutorials/multiphase/interFoam/ras/waterChannel/README
Normal file
6
tutorials/multiphase/interFoam/ras/waterChannel/README
Normal file
@ -0,0 +1,6 @@
|
||||
- This case uses blockMesh and extrudeMesh to create a channel geometry.
|
||||
- See Allrun script to generate geometry.
|
||||
- The case is set up to run with interFoam.
|
||||
- For running with LTSInterFoam, an alternative set of main files from
|
||||
system directory (controlDict, etc) are included in LTSInterFoam
|
||||
subdirectory to replace the existing files set up for interFoam.
|
||||
@ -11,11 +11,15 @@ FoamFile
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType LESModel;
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -16,6 +16,6 @@ FoamFile
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 0 0);
|
||||
value (0 0 -9.81);
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user