mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -24,9 +24,10 @@ Class
|
||||
Foam::combustionModels::PaSR
|
||||
|
||||
Description
|
||||
Simple infinitely fast chemistry combustion model based on the principle
|
||||
mixed is burnt. Additional parameter C is used to distribute the heat
|
||||
release rate.in time
|
||||
Partially stirred reactor combustion model. The model calculates a finite
|
||||
rate, based on both turbulence and chemistry time scales. Depending on
|
||||
mesh resolution, the Cmix parameter can be used to scale the turbulence
|
||||
mixing time scale.
|
||||
|
||||
SourceFiles
|
||||
PaSR.C
|
||||
|
||||
@ -371,6 +371,7 @@ $(porosity)/porosityModel/porosityModelList.C
|
||||
$(porosity)/porosityModel/IOporosityModelList.C
|
||||
$(porosity)/DarcyForchheimer/DarcyForchheimer.C
|
||||
$(porosity)/powerLaw/powerLaw.C
|
||||
$(porosity)/fixedCoeff/fixedCoeff.C
|
||||
|
||||
MRF = $(general)/MRF
|
||||
$(MRF)/MRFZone.C
|
||||
|
||||
@ -68,9 +68,10 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer
|
||||
(
|
||||
"Foam::porosityModels::DarcyForchheimer::DarcyForchheimer"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"const coordinateSystem&, "
|
||||
"const keyType&"
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
coeffs_
|
||||
) << "incorrect dimensions for d: " << d.dimensions()
|
||||
@ -92,9 +93,10 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer
|
||||
(
|
||||
"Foam::porosityModels::DarcyForchheimer::DarcyForchheimer"
|
||||
"("
|
||||
"const dictionary&, "
|
||||
"const coordinateSystem&, "
|
||||
"const keyType&"
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
coeffs_
|
||||
) << "incorrect dimensions for f: " << f.dimensions()
|
||||
|
||||
@ -45,6 +45,7 @@ Description
|
||||
|
||||
SourceFiles
|
||||
DarcyForchheimer.C
|
||||
DarcyForchheimerTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -0,0 +1,243 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "addToRunTimeSelectionTable.H"
|
||||
#include "fixedCoeff.H"
|
||||
#include "fvMatrices.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porosityModels
|
||||
{
|
||||
defineTypeNameAndDebug(fixedCoeff, 0);
|
||||
addToRunTimeSelectionTable(porosityModel, fixedCoeff, mesh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::apply
|
||||
(
|
||||
scalarField& Udiag,
|
||||
vectorField& Usource,
|
||||
const scalarField& V,
|
||||
const vectorField& U,
|
||||
const scalar rho
|
||||
) const
|
||||
{
|
||||
const tensor& alpha = alpha_.value();
|
||||
const tensor& beta = beta_.value();
|
||||
|
||||
forAll(cellZoneIds_, zoneI)
|
||||
{
|
||||
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
const label cellI = cells[i];
|
||||
|
||||
const tensor Cd = rho*(alpha + beta*mag(U[cellI]));
|
||||
|
||||
const scalar isoCd = tr(Cd);
|
||||
|
||||
Udiag[cellI] += V[cellI]*isoCd;
|
||||
Usource[cellI] -= V[cellI]*((Cd - I*isoCd) & U[cellI]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::apply
|
||||
(
|
||||
tensorField& AU,
|
||||
const vectorField& U,
|
||||
const scalar rho
|
||||
) const
|
||||
{
|
||||
const tensor& alpha = alpha_.value();
|
||||
const tensor& beta = beta_.value();
|
||||
|
||||
forAll(cellZoneIds_, zoneI)
|
||||
{
|
||||
const labelList& cells = mesh_.cellZones()[cellZoneIds_[zoneI]];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
const label cellI = cells[i];
|
||||
AU[cellI] += rho*(alpha + beta*mag(U[cellI]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porosityModels::fixedCoeff::fixedCoeff
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
porosityModel(name, modelType, mesh, dict),
|
||||
coordSys_(coeffs_, mesh),
|
||||
alpha_("alpha", dimless/dimTime, tensor::zero),
|
||||
beta_("beta", dimless/dimLength, tensor::zero)
|
||||
{
|
||||
// local-to-global transformation tensor
|
||||
const tensor& E = coordSys_.R();
|
||||
|
||||
dimensionedVector alpha(coeffs_.lookup("alpha"));
|
||||
if (alpha_.dimensions() != alpha.dimensions())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"Foam::porosityModels::fixedCoeff::fixedCoeff"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
coeffs_
|
||||
) << "incorrect dimensions for alpha: " << alpha.dimensions()
|
||||
<< " should be " << alpha_.dimensions()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
adjustNegativeResistance(alpha);
|
||||
|
||||
alpha_.value().xx() = alpha.value().x();
|
||||
alpha_.value().yy() = alpha.value().y();
|
||||
alpha_.value().zz() = alpha.value().z();
|
||||
alpha_.value() = (E & alpha_ & E.T()).value();
|
||||
|
||||
dimensionedVector beta(coeffs_.lookup("beta"));
|
||||
if (beta_.dimensions() != beta.dimensions())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"Foam::porosityModels::fixedCoeff::fixedCoeff"
|
||||
"("
|
||||
"const word&, "
|
||||
"const word&, "
|
||||
"const fvMesh&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
coeffs_
|
||||
) << "incorrect dimensions for beta: " << beta.dimensions()
|
||||
<< " should be " << beta_.dimensions()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
adjustNegativeResistance(beta);
|
||||
|
||||
beta_.value().xx() = beta.value().x();
|
||||
beta_.value().yy() = beta.value().y();
|
||||
beta_.value().zz() = beta.value().z();
|
||||
beta_.value() = (E & beta_ & E.T()).value();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::porosityModels::fixedCoeff::~fixedCoeff()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::correct
|
||||
(
|
||||
fvVectorMatrix& UEqn
|
||||
) const
|
||||
{
|
||||
const vectorField& U = UEqn.psi();
|
||||
const scalarField& V = mesh_.V();
|
||||
scalarField& Udiag = UEqn.diag();
|
||||
vectorField& Usource = UEqn.source();
|
||||
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
}
|
||||
|
||||
apply(Udiag, Usource, V, U, rho);
|
||||
}
|
||||
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::correct
|
||||
(
|
||||
fvVectorMatrix& UEqn,
|
||||
const volScalarField&,
|
||||
const volScalarField&
|
||||
) const
|
||||
{
|
||||
const vectorField& U = UEqn.psi();
|
||||
const scalarField& V = mesh_.V();
|
||||
scalarField& Udiag = UEqn.diag();
|
||||
vectorField& Usource = UEqn.source();
|
||||
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
}
|
||||
|
||||
apply(Udiag, Usource, V, U, rho);
|
||||
}
|
||||
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::correct
|
||||
(
|
||||
const fvVectorMatrix& UEqn,
|
||||
volTensorField& AU
|
||||
) const
|
||||
{
|
||||
const vectorField& U = UEqn.psi();
|
||||
|
||||
scalar rho = 1.0;
|
||||
if (UEqn.dimensions() == dimForce)
|
||||
{
|
||||
coeffs_.lookup("rhoRef") >> rho;
|
||||
}
|
||||
|
||||
apply(AU, U, rho);
|
||||
}
|
||||
|
||||
|
||||
void Foam::porosityModels::fixedCoeff::writeData(Ostream& os) const
|
||||
{
|
||||
os << indent << name_ << endl;
|
||||
dict_.write(os);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,159 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::fixedCoeff
|
||||
|
||||
Description
|
||||
Fixed coefficient form of porosity model
|
||||
|
||||
\f[
|
||||
S = - \rho_ref (\alpha + \beta |U|) U
|
||||
\f]
|
||||
|
||||
In the case of compressible flow, a value for the reference density is
|
||||
required
|
||||
|
||||
SourceFiles
|
||||
fixedCoeff.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedCoeff_H
|
||||
#define fixedCoeff_H
|
||||
|
||||
#include "porosityModel.H"
|
||||
#include "coordinateSystem.H"
|
||||
#include "dimensionedTensor.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace porosityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedCoeff Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedCoeff
|
||||
:
|
||||
public porosityModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Local co-ordinate system
|
||||
coordinateSystem coordSys_;
|
||||
|
||||
//- Model alpha coefficient [1/s]
|
||||
dimensionedTensor alpha_;
|
||||
|
||||
//- Model beta coefficient [1/m]
|
||||
dimensionedTensor beta_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Apply
|
||||
void apply
|
||||
(
|
||||
scalarField& Udiag,
|
||||
vectorField& Usource,
|
||||
const scalarField& V,
|
||||
const vectorField& U,
|
||||
const scalar rho
|
||||
) const;
|
||||
|
||||
//- Apply
|
||||
void apply
|
||||
(
|
||||
tensorField& AU,
|
||||
const vectorField& U,
|
||||
const scalar rho
|
||||
) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
fixedCoeff(const fixedCoeff&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const fixedCoeff&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("fixedCoeff");
|
||||
|
||||
//- Constructor
|
||||
fixedCoeff
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
virtual ~fixedCoeff();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add resistance
|
||||
virtual void correct(fvVectorMatrix& UEqn) const;
|
||||
|
||||
//- Add resistance
|
||||
virtual void correct
|
||||
(
|
||||
fvVectorMatrix& UEqn,
|
||||
const volScalarField& rho,
|
||||
const volScalarField& mu
|
||||
) const;
|
||||
|
||||
//- Add resistance
|
||||
virtual void correct
|
||||
(
|
||||
const fvVectorMatrix& UEqn,
|
||||
volTensorField& AU
|
||||
) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void writeData(Ostream& os) const;
|
||||
};
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace porosityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -33,13 +33,14 @@ Description
|
||||
|
||||
where
|
||||
\vartable
|
||||
C_0 | model coefficient
|
||||
C_1 | model coefficient
|
||||
C_0 | model linear coefficient
|
||||
C_1 | model exponent coefficient
|
||||
\endvartable
|
||||
|
||||
|
||||
SourceFiles
|
||||
powerLaw.C
|
||||
powerLawTemplates.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -0,0 +1 @@
|
||||
../angledDuctImplicit/0
|
||||
@ -0,0 +1 @@
|
||||
../angledDuctImplicit/Allrun
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- 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 MRFZones;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
0
|
||||
()
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- 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 RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,165 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// block definition for a porosity with an angled inlet/outlet
|
||||
// the porosity is not aligned with the main axes
|
||||
//
|
||||
dnl> -----------------------------------------------------------------
|
||||
dnl> <STANDARD DEFINTIONS>
|
||||
dnl>
|
||||
changecom(//)changequote([,]) dnl>
|
||||
define(calc, [esyscmd(perl -e 'print ($1)')]) dnl>
|
||||
define(VCOUNT, 0) dnl>
|
||||
define(vlabel, [[// ]pt VCOUNT ($1) define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) dnl>
|
||||
dnl>
|
||||
define(hex2D, hex ($1b $2b $3b $4b $1f $2f $3f $4f)) dnl>
|
||||
define(quad2D, ($1f $1b $2b $2f)) dnl>
|
||||
define(frontQuad, ($1f $2f $3f $4f)) dnl>
|
||||
define(backQuad, ($4b $3b $2b $1b)) dnl>
|
||||
dnl>
|
||||
dnl> </STANDARD DEFINTIONS>
|
||||
dnl> -----------------------------------------------------------------
|
||||
dnl>
|
||||
define(ncells, 20) dnl>
|
||||
define(ninlet, 15) dnl>
|
||||
define(nporo, 20) dnl>
|
||||
define(noutlet, 20) dnl>
|
||||
dnl>
|
||||
define(x0,0) dnl>
|
||||
define(y0,0) dnl>
|
||||
define(y0,0) dnl>
|
||||
define(Cos,0.7071067812) dnl> == cos(45)
|
||||
define(Sin,0.7071067812) dnl> == sin(45)
|
||||
dnl>
|
||||
define(width,50) dnl>
|
||||
define(zBack,calc(-width/2)) dnl>
|
||||
define(zFront,calc(width/2)) dnl>
|
||||
define(leninlet,150)dnl>
|
||||
define(lenporo,100)dnl>
|
||||
define(lenoutlet,100)dnl>
|
||||
dnl>
|
||||
define(xhyp,calc(Sin*width)) dnl>
|
||||
define(yhyp,calc(Cos*width)) dnl>
|
||||
define(xinlet,leninlet)dnl>
|
||||
define(xporo,calc(Cos*lenporo)) dnl>
|
||||
define(yporo,calc(Sin*lenporo)) dnl>
|
||||
define(xoutlet,calc(xporo + Cos*lenoutlet)) dnl>
|
||||
define(youtlet,calc(yporo + Sin*lenoutlet)) dnl>
|
||||
dnl>
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
// inlet region
|
||||
( -xinlet y0 zBack ) vlabel(in1b)
|
||||
( -xinlet yhyp zBack ) vlabel(in2b)
|
||||
( -xinlet y0 zFront ) vlabel(in1f)
|
||||
( -xinlet yhyp zFront ) vlabel(in2f)
|
||||
|
||||
// join inlet->outlet
|
||||
( x0 y0 zBack ) vlabel(join1b)
|
||||
( -xhyp yhyp zBack ) vlabel(join2b)
|
||||
( x0 y0 zFront ) vlabel(join1f)
|
||||
( -xhyp yhyp zFront ) vlabel(join2f)
|
||||
|
||||
// porosity ends ->outlet
|
||||
( xporo yporo zBack ) vlabel(poro1b)
|
||||
( calc(xporo - xhyp) calc(yporo + yhyp) zBack ) vlabel(poro2b)
|
||||
( xporo yporo zFront ) vlabel(poro1f)
|
||||
( calc(xporo - xhyp) calc(yporo + yhyp) zFront ) vlabel(poro2f)
|
||||
|
||||
// outlet
|
||||
( xoutlet youtlet zBack ) vlabel(out1b)
|
||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zBack ) vlabel(out2b)
|
||||
( xoutlet youtlet zFront ) vlabel(out1f)
|
||||
( calc(xoutlet - xhyp) calc(youtlet + yhyp) zFront ) vlabel(out2f)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// inlet block
|
||||
hex2D(in1, join1, join2, in2)
|
||||
inlet ( ninlet ncells ncells ) simpleGrading (1 1 1)
|
||||
|
||||
// porosity block
|
||||
hex2D(join1, poro1, poro2, join2)
|
||||
porosity ( nporo ncells ncells ) simpleGrading (1 1 1)
|
||||
|
||||
// outlet block
|
||||
hex2D(poro1, out1, out2, poro2)
|
||||
outlet ( noutlet ncells ncells ) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
// is there no way of defining all my 'defaultFaces' to be 'wall'?
|
||||
wall front
|
||||
(
|
||||
// inlet block
|
||||
frontQuad(in1, join1, join2, in2)
|
||||
// outlet block
|
||||
frontQuad(poro1, out1, out2, poro2)
|
||||
)
|
||||
|
||||
wall back
|
||||
(
|
||||
// inlet block
|
||||
backQuad(in1, join1, join2, in2)
|
||||
// outlet block
|
||||
backQuad(poro1, out1, out2, poro2)
|
||||
)
|
||||
|
||||
wall wall
|
||||
(
|
||||
// inlet block
|
||||
quad2D(in1, join1)
|
||||
quad2D(join2, in2)
|
||||
// outlet block
|
||||
quad2D(poro1, out1)
|
||||
quad2D(out2, poro2)
|
||||
)
|
||||
|
||||
wall porosityWall
|
||||
(
|
||||
// porosity block
|
||||
frontQuad(join1, poro1, poro2, join2)
|
||||
// porosity block
|
||||
backQuad(join1, poro1, poro2, join2)
|
||||
// porosity block
|
||||
quad2D(join1, poro1)
|
||||
quad2D(poro2, join2)
|
||||
)
|
||||
|
||||
patch inlet
|
||||
(
|
||||
quad2D(in2, in1)
|
||||
)
|
||||
|
||||
patch outlet
|
||||
(
|
||||
quad2D(out2, out1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- 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
|
||||
(
|
||||
front
|
||||
{
|
||||
type wall;
|
||||
nFaces 700;
|
||||
startFace 63400;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wall;
|
||||
nFaces 700;
|
||||
startFace 64100;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type wall;
|
||||
nFaces 1400;
|
||||
startFace 64800;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 1600;
|
||||
startFace 66200;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 400;
|
||||
startFace 67800;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 400;
|
||||
startFace 68200;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- 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 porosityProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
porosity1
|
||||
{
|
||||
type fixedCoeff;
|
||||
active yes;
|
||||
cellZone porosity;
|
||||
|
||||
fixedCoeffCoeffs
|
||||
{
|
||||
alpha alpha [0 0 -1 0 0 0 0] (500 -1000 -1000);
|
||||
beta beta [0 -1 0 0 0 0 0] (0 0 0);
|
||||
rhoRef 1;
|
||||
|
||||
coordinateSystem
|
||||
{
|
||||
e1 (0.70710678 0.70710678 0);
|
||||
e2 (0 0 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- 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 sourcesProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
source1
|
||||
{
|
||||
type fixedTemperatureSource;
|
||||
active true;
|
||||
timeStart 0;
|
||||
duration 1000000;
|
||||
selectionMode cellZone;
|
||||
cellZone porosity;
|
||||
|
||||
fixedTemperatureSourceCoeffs
|
||||
{
|
||||
temperature 350;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport sutherland;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1005;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.4792e-06;
|
||||
Ts 116;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- 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 controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousMRFSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 100;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- 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 steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
div(phi,U) bounded Gauss upwind;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
div(phi,e) bounded Gauss upwind;
|
||||
div(phi,epsilon) bounded Gauss upwind;
|
||||
div(phi,k) bounded Gauss upwind;
|
||||
div(phi,Ekp) bounded Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
laplacian(muEff,U) Gauss linear corrected;
|
||||
laplacian(alphaEff,e) Gauss linear corrected;
|
||||
laplacian((rho*rAU),p) Gauss linear corrected;
|
||||
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
|
||||
laplacian(DkEff,k) Gauss linear corrected;
|
||||
laplacian(1,p) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,90 @@
|
||||
/*--------------------------------*- 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 fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0.05;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration off;
|
||||
nCellsInCoarsestLevel 20;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
nSweeps 2;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
e
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(k|epsilon)"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-07;
|
||||
relTol 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
|
||||
rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
|
||||
|
||||
residualControl
|
||||
{
|
||||
p 1e-2;
|
||||
U 1e-4;
|
||||
T 1e-3;
|
||||
|
||||
// possibly check turbulence fields
|
||||
"(k|epsilon|omega)" 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
p 0.3;
|
||||
rho 0.05;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.7;
|
||||
"(k|epsilon)" 0.7;
|
||||
e 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user