Merge branch 'master' into cvm
Conflicts: applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C
This commit is contained in:
commit
e09a140a28
@ -6,7 +6,7 @@ autoPtr<psiChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -50,7 +50,7 @@ volVectorField U
|
|||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -92,4 +92,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
Application
|
||||||
dieselFoam
|
dieselEngineFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for diesel engine spray and combustion.
|
Solver for diesel engine spray and combustion.
|
||||||
@ -103,13 +103,15 @@ int main(int argc, char *argv[])
|
|||||||
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|
||||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||||
{
|
{
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ dieselSpray.heatTransferSource()
|
|
||||||
);
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
}
|
|
14
applications/solvers/combustion/dieselEngineFoam/hsEqn.H
Normal file
14
applications/solvers/combustion/dieselEngineFoam/hsEqn.H
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ dieselSpray.heatTransferSource()().dimensionedInternalField()
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
}
|
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
|
||||||
{
|
{
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
8
applications/solvers/combustion/fireFoam/Allwclean
Executable file
8
applications/solvers/combustion/fireFoam/Allwclean
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wclean libso combustionModels
|
||||||
|
wclean
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
8
applications/solvers/combustion/fireFoam/Allwmake
Executable file
8
applications/solvers/combustion/fireFoam/Allwmake
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake libso combustionModels
|
||||||
|
wmake
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
4
applications/solvers/combustion/fireFoam/Make/files
Normal file
4
applications/solvers/combustion/fireFoam/Make/files
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fireFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/fireFoam
|
||||||
|
|
19
applications/solvers/combustion/fireFoam/Make/options
Normal file
19
applications/solvers/combustion/fireFoam/Make/options
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I./combustionModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude
|
||||||
|
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lcombustionModels \
|
||||||
|
-lspecie \
|
||||||
|
-lreactionThermophysicalModels \
|
||||||
|
-lbasicThermophysicalModels \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lcompressibleLESModels \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lradiation
|
36
applications/solvers/combustion/fireFoam/UEqn.H
Normal file
36
applications/solvers/combustion/fireFoam/UEqn.H
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (oCorr == nOuterCorr - 1)
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
UEqn
|
||||||
|
==
|
||||||
|
fvc::reconstruct
|
||||||
|
(
|
||||||
|
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
|
- fvc::snGrad(p)*mesh.magSf()
|
||||||
|
),
|
||||||
|
mesh.solver("UFinal")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
UEqn
|
||||||
|
==
|
||||||
|
fvc::reconstruct
|
||||||
|
(
|
||||||
|
fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
|
- fvc::snGrad(p)*mesh.magSf()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
combustionModel/combustionModel.C
|
||||||
|
combustionModel/newCombustionModel.C
|
||||||
|
|
||||||
|
infinitelyFastChemistry/infinitelyFastChemistry.C
|
||||||
|
|
||||||
|
noCombustion/noCombustion.C
|
||||||
|
|
||||||
|
LIB = $(FOAM_LIBBIN)/libcombustionModels
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I../sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \
|
||||||
|
-I../sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(FOAM_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
|
-I$(FOAM_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
|
LIB_LIBS = \
|
||||||
|
-lfiniteVolume
|
@ -0,0 +1,109 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "combustionModel.H"
|
||||||
|
#include "fvm.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(combustionModel, 0);
|
||||||
|
defineRunTimeSelectionTable(combustionModel, dictionary);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModel::combustionModel
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
)
|
||||||
|
:
|
||||||
|
combustionModelCoeffs_
|
||||||
|
(
|
||||||
|
combustionProperties.subDict
|
||||||
|
(
|
||||||
|
word(combustionProperties.lookup("combustionModel")) + "Coeffs"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
thermo_(thermo),
|
||||||
|
turbulence_(turbulence),
|
||||||
|
mesh_(phi.mesh()),
|
||||||
|
phi_(phi),
|
||||||
|
rho_(rho),
|
||||||
|
stoicRatio_(thermo.lookup("stoichiometricAirFuelMassRatio")),
|
||||||
|
s_(thermo.lookup("stoichiometricOxygenFuelMassRatio")),
|
||||||
|
qFuel_(thermo_.lookup("qFuel")),
|
||||||
|
composition_(thermo.composition())
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModel::~combustionModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
|
Foam::combustionModel::combustionModel::R(volScalarField& fu) const
|
||||||
|
{
|
||||||
|
const basicMultiComponentMixture& composition = thermo_.composition();
|
||||||
|
const volScalarField& ft = composition.Y("ft");
|
||||||
|
volScalarField fres = composition.fres(ft, stoicRatio_.value());
|
||||||
|
volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres);
|
||||||
|
|
||||||
|
return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField> Foam::combustionModel::combustionModel::dQ
|
||||||
|
(
|
||||||
|
const fvScalarMatrix& Rfu
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const basicMultiComponentMixture& composition = thermo_.composition();
|
||||||
|
const volScalarField& fu = composition.Y("fu");
|
||||||
|
|
||||||
|
return (-qFuel_)*(Rfu & fu);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::combustionModel::read(const dictionary& combustionProperties)
|
||||||
|
{
|
||||||
|
combustionModelCoeffs_ = combustionProperties.subDict(type() + "Coeffs");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,210 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::combustionModel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Base class for all non-premixed combustion models.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
combustionModel.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef combustionModel_H
|
||||||
|
#define combustionModel_H
|
||||||
|
|
||||||
|
#include "IOdictionary.H"
|
||||||
|
#include "hsCombustionThermo.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
|
#include "multivariateSurfaceInterpolationScheme.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class combustionModel Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class combustionModel
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
//- Dictionary of coefficients for the particular model
|
||||||
|
dictionary combustionModelCoeffs_;
|
||||||
|
|
||||||
|
//- Reference to the thermodynamic
|
||||||
|
const hsCombustionThermo& thermo_;
|
||||||
|
|
||||||
|
//- Reference to the turbulence model
|
||||||
|
const compressible::turbulenceModel& turbulence_;
|
||||||
|
|
||||||
|
//- Reference to the mesh database
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
//- Reference to mass-flux field
|
||||||
|
const surfaceScalarField& phi_;
|
||||||
|
|
||||||
|
//- Reference to the density field
|
||||||
|
const volScalarField& rho_;
|
||||||
|
|
||||||
|
//- Stoichiometric air-fuel mass ratio
|
||||||
|
dimensionedScalar stoicRatio_;
|
||||||
|
|
||||||
|
//- Stoichiometric oxygen-fuel mass ratio
|
||||||
|
dimensionedScalar s_;
|
||||||
|
|
||||||
|
//- Heat of combustion (J/Kg)
|
||||||
|
dimensionedScalar qFuel_;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
combustionModel(const combustionModel&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const combustionModel&);
|
||||||
|
|
||||||
|
const basicMultiComponentMixture& composition_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("combustionModel");
|
||||||
|
|
||||||
|
|
||||||
|
// Declare run-time constructor selection table
|
||||||
|
|
||||||
|
declareRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
autoPtr,
|
||||||
|
combustionModel,
|
||||||
|
dictionary,
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
),
|
||||||
|
(
|
||||||
|
combustionProperties,
|
||||||
|
thermo,
|
||||||
|
turbulence,
|
||||||
|
phi,
|
||||||
|
rho
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Selectors
|
||||||
|
|
||||||
|
//- Return a reference to the selected combustion model
|
||||||
|
static autoPtr<combustionModel> New
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
combustionModel
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~combustionModel();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
// Access functions
|
||||||
|
|
||||||
|
//- Access composition
|
||||||
|
const basicMultiComponentMixture& composition() const
|
||||||
|
{
|
||||||
|
return composition_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Access combustion dictionary
|
||||||
|
const dictionary combustionModelCoeffs() const
|
||||||
|
{
|
||||||
|
return combustionModelCoeffs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Access heat of combustion
|
||||||
|
const dimensionedScalar qFuel() const
|
||||||
|
{
|
||||||
|
return qFuel_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return normalised consumption rate of (fu - fres)
|
||||||
|
virtual tmp<volScalarField> wFuelNorm() const = 0;
|
||||||
|
|
||||||
|
//- Fuel consumption rate matrix i.e. source-term for the fuel equation
|
||||||
|
virtual tmp<fvScalarMatrix> R(volScalarField& fu) const;
|
||||||
|
|
||||||
|
//- Heat-release rate calculated from the given
|
||||||
|
// fuel consumption rate matrix
|
||||||
|
virtual tmp<volScalarField> dQ(const fvScalarMatrix& Rfu) const;
|
||||||
|
|
||||||
|
//- Correct combustion rate
|
||||||
|
virtual void correct() = 0;
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& combustionProperties) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,67 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "combustionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
)
|
||||||
|
{
|
||||||
|
word combustionModelTypeName = combustionProperties.lookup
|
||||||
|
(
|
||||||
|
"combustionModel"
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Selecting combustion model " << combustionModelTypeName << endl;
|
||||||
|
|
||||||
|
dictionaryConstructorTable::iterator cstrIter =
|
||||||
|
dictionaryConstructorTablePtr_->find(combustionModelTypeName);
|
||||||
|
|
||||||
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"combustionModel::New"
|
||||||
|
) << "Unknown combustionModel type "
|
||||||
|
<< combustionModelTypeName << endl << endl
|
||||||
|
<< "Valid combustionModels are : " << endl
|
||||||
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoPtr<combustionModel>
|
||||||
|
(cstrIter()(combustionProperties, thermo, turbulence, phi, rho));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,94 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "infinitelyFastChemistry.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(infinitelyFastChemistry, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
combustionModel,
|
||||||
|
infinitelyFastChemistry,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModels::infinitelyFastChemistry::infinitelyFastChemistry
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
)
|
||||||
|
:
|
||||||
|
combustionModel(combustionProperties, thermo, turbulence, phi, rho),
|
||||||
|
C_(readScalar(combustionModelCoeffs_.lookup("C")))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModels::infinitelyFastChemistry::~infinitelyFastChemistry()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::combustionModels::infinitelyFastChemistry::correct()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::combustionModels::infinitelyFastChemistry::wFuelNorm() const
|
||||||
|
{
|
||||||
|
return rho_/(mesh_.time().deltaT()*C_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::combustionModels::infinitelyFastChemistry::read
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties
|
||||||
|
)
|
||||||
|
{
|
||||||
|
combustionModel::read(combustionProperties);
|
||||||
|
combustionModelCoeffs_.lookup("C") >> C_ ;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,119 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::combustionModels::infinitelyFastChemistry
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
infinitelyFastChemistry.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef infinitelyFastChemistry_H
|
||||||
|
#define infinitelyFastChemistry_H
|
||||||
|
|
||||||
|
#include "fvc.H"
|
||||||
|
#include "combustionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class infinitelyFastChemistry Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class infinitelyFastChemistry
|
||||||
|
:
|
||||||
|
public combustionModel
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Model constant
|
||||||
|
scalar C_;
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
infinitelyFastChemistry(const infinitelyFastChemistry&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const infinitelyFastChemistry&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("infinitelyFastChemistry");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
infinitelyFastChemistry
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~infinitelyFastChemistry();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& combustionProperties);
|
||||||
|
|
||||||
|
//- Correct combustion rate
|
||||||
|
virtual void correct();
|
||||||
|
|
||||||
|
//- Return normalised consumption rate of (fu - fres)
|
||||||
|
virtual tmp<volScalarField> wFuelNorm() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace combustionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,103 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "noCombustion.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(noCombustion, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
combustionModel,
|
||||||
|
noCombustion,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModels::noCombustion::noCombustion
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
)
|
||||||
|
:
|
||||||
|
combustionModel(combustionProperties, thermo, turbulence, phi, rho)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::combustionModels::noCombustion::~noCombustion()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::combustionModels::noCombustion::correct()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::combustionModels::noCombustion::wFuelNorm() const
|
||||||
|
{
|
||||||
|
return tmp<Foam::volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"wFuelNorm",
|
||||||
|
mesh_.time().timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar("wFuelNorm", dimMass/dimTime/pow3(dimLength), 0.0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::combustionModels::noCombustion::read
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return combustionModel::read(combustionProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,113 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::combustionModel::noCombustion
|
||||||
|
|
||||||
|
Description
|
||||||
|
No combustion
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
noCombustion.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef noCombustion_H
|
||||||
|
#define noCombustion_H
|
||||||
|
|
||||||
|
#include "combustionModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace combustionModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class noCombustion Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class noCombustion
|
||||||
|
:
|
||||||
|
public combustionModel
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow copy construct
|
||||||
|
noCombustion(const noCombustion&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const noCombustion&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("noCombustion");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
noCombustion
|
||||||
|
(
|
||||||
|
const dictionary& combustionProperties,
|
||||||
|
const hsCombustionThermo& thermo,
|
||||||
|
const compressible::turbulenceModel& turbulence,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
const volScalarField& rho
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~noCombustion();
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Update properties from given dictionary
|
||||||
|
virtual bool read(const dictionary& combustionProperties);
|
||||||
|
|
||||||
|
//- Correct combustion rate
|
||||||
|
virtual void correct();
|
||||||
|
|
||||||
|
//- Return normalised consumption rate of (fu - fres)
|
||||||
|
virtual tmp<volScalarField> wFuelNorm() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace combustionModels
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
130
applications/solvers/combustion/fireFoam/createFields.H
Normal file
130
applications/solvers/combustion/fireFoam/createFields.H
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
|
autoPtr<hsCombustionThermo> pThermo
|
||||||
|
(
|
||||||
|
hsCombustionThermo::New(mesh)
|
||||||
|
);
|
||||||
|
|
||||||
|
hsCombustionThermo& thermo = pThermo();
|
||||||
|
|
||||||
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
|
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar stoicRatio
|
||||||
|
(
|
||||||
|
thermo.lookup("stoichiometricAirFuelMassRatio")
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
volScalarField& hs = thermo.hs();
|
||||||
|
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
volScalarField& ft = composition.Y("ft");
|
||||||
|
volScalarField& fu = composition.Y("fu");
|
||||||
|
|
||||||
|
Info<< "Reading field U\n" << endl;
|
||||||
|
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::turbulenceModel::New(rho, U, phi, thermo)
|
||||||
|
);
|
||||||
|
|
||||||
|
IOdictionary combustionProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"combustionProperties",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating combustion model\n" << endl;
|
||||||
|
autoPtr<combustionModel::combustionModel> combustion
|
||||||
|
(
|
||||||
|
combustionModel::combustionModel::New
|
||||||
|
(
|
||||||
|
combustionProperties,
|
||||||
|
thermo,
|
||||||
|
turbulence(),
|
||||||
|
phi,
|
||||||
|
rho
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField dQ
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"dQ",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("dQ", dimMass/pow3(dimTime)/dimLength, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Creating field DpDt\n" << endl;
|
||||||
|
volScalarField DpDt =
|
||||||
|
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Calculating field g.h\n" << endl;
|
||||||
|
volScalarField gh("gh", g & mesh.C());
|
||||||
|
|
||||||
|
surfaceScalarField ghf("gh", g & mesh.Cf());
|
||||||
|
|
||||||
|
p += rho*gh;
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
|
|
||||||
|
|
||||||
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
|
if (composition.contains("ft"))
|
||||||
|
{
|
||||||
|
fields.add(composition.Y("ft"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (composition.contains("fu"))
|
||||||
|
{
|
||||||
|
fields.add(composition.Y("fu"));
|
||||||
|
}
|
||||||
|
|
||||||
|
fields.add(hs);
|
103
applications/solvers/combustion/fireFoam/fireFoam.C
Normal file
103
applications/solvers/combustion/fireFoam/fireFoam.C
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Application
|
||||||
|
fireFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient Solver for Fires and turbulent diffusion flames
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "hsCombustionThermo.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
|
#include "combustionModel.H"
|
||||||
|
|
||||||
|
#include "radiationModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "createRadiationModel.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (runTime.run())
|
||||||
|
{
|
||||||
|
#include "readPISOControls.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
|
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
|
||||||
|
#include "ftEqn.H"
|
||||||
|
#include "fuhsEqn.H"
|
||||||
|
|
||||||
|
// --- PISO loop
|
||||||
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
|
{
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
25
applications/solvers/combustion/fireFoam/ftEqn.H
Normal file
25
applications/solvers/combustion/fireFoam/ftEqn.H
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
tmp<fv::convectionScheme<scalar> > mvConvection
|
||||||
|
(
|
||||||
|
fv::convectionScheme<scalar>::New
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
fields,
|
||||||
|
phi,
|
||||||
|
mesh.divScheme("div(phi,ft_b_h)")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
fvScalarMatrix ftEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, ft)
|
||||||
|
+ mvConvection->fvmDiv(phi, ft)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), ft)
|
||||||
|
);
|
||||||
|
|
||||||
|
ftEqn.relax();
|
||||||
|
ftEqn.solve();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "max(ft) = " << max(ft).value() << endl;
|
||||||
|
Info<< "min(ft) = " << min(ft).value() << endl;
|
47
applications/solvers/combustion/fireFoam/fuhsEqn.H
Normal file
47
applications/solvers/combustion/fireFoam/fuhsEqn.H
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
// Solve fuel equation
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~
|
||||||
|
fvScalarMatrix R = combustion->R(fu);
|
||||||
|
|
||||||
|
{
|
||||||
|
fvScalarMatrix fuEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, fu)
|
||||||
|
+ mvConvection->fvmDiv(phi, fu)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), fu)
|
||||||
|
==
|
||||||
|
R
|
||||||
|
);
|
||||||
|
|
||||||
|
fuEqn.relax();
|
||||||
|
fuEqn.solve();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "max(fu) = " << max(fu).value() << endl;
|
||||||
|
Info<< "min(fu) = " << min(fu).value() << endl;
|
||||||
|
|
||||||
|
|
||||||
|
// Solve sensible enthalpy equation
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
radiation->correct();
|
||||||
|
dQ = combustion->dQ(R);
|
||||||
|
|
||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi,hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ dQ
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
hsEqn.solve();
|
||||||
|
}
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
combustion->correct();
|
||||||
|
}
|
64
applications/solvers/combustion/fireFoam/pEqn.H
Normal file
64
applications/solvers/combustion/fireFoam/pEqn.H
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
bool closedVolume = false;
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
|
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
|
||||||
|
U = rUA*UEqn.H();
|
||||||
|
|
||||||
|
surfaceScalarField phiU
|
||||||
|
(
|
||||||
|
fvc::interpolate(rho)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA);
|
||||||
|
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi,p)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
- fvm::laplacian(rhorUAf, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
closedVolume = p.needReference();
|
||||||
|
|
||||||
|
if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
pEqn.solve(mesh.solver(p.name() + "Final"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pEqn.solve(mesh.solver(p.name()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi += pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
|
// to obey overall mass continuity
|
||||||
|
if (closedVolume)
|
||||||
|
{
|
||||||
|
p +=
|
||||||
|
(initialMass - fvc::domainIntegrate(thermo.psi()*p))
|
||||||
|
/fvc::domainIntegrate(thermo.psi());
|
||||||
|
rho = thermo.rho();
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../XiFoam \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
15
applications/solvers/combustion/reactingFoam/UEqn.H
Normal file
15
applications/solvers/combustion/reactingFoam/UEqn.H
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
rho*g
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (momentumPredictor)
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
}
|
@ -21,4 +21,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ autoPtr<psiChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -40,8 +40,8 @@ volVectorField U
|
|||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
@ -81,5 +81,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
20
applications/solvers/combustion/reactingFoam/hsEqn.H
Normal file
20
applications/solvers/combustion/reactingFoam/hsEqn.H
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
// - fvm::laplacian(turbulence->muEff(), hs) // unit lewis no.
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
68
applications/solvers/combustion/reactingFoam/pEqn.H
Normal file
68
applications/solvers/combustion/reactingFoam/pEqn.H
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
volScalarField rUA = 1.0/UEqn.A();
|
||||||
|
U = rUA*UEqn.H();
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvm::div(phid, p)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi == pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
phi =
|
||||||
|
fvc::interpolate(rho)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phi)
|
||||||
|
- fvm::laplacian(rho*rUA, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi += pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "rhoEqn.H"
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
U -= rUA*fvc::grad(p);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
@ -73,9 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
|
#include "hsEqn.H"
|
||||||
#define Db turbulence->alphaEff()
|
|
||||||
#include "hEqn.H"
|
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../XiFoam \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
15
applications/solvers/combustion/rhoReactingFoam/UEqn.H
Normal file
15
applications/solvers/combustion/rhoReactingFoam/UEqn.H
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
fvVectorMatrix UEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, U)
|
||||||
|
+ fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
rho*g
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn.relax();
|
||||||
|
|
||||||
|
if (momentumPredictor)
|
||||||
|
{
|
||||||
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
}
|
@ -21,4 +21,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ autoPtr<rhoChemistryModel> pChemistry
|
|||||||
);
|
);
|
||||||
rhoChemistryModel& chemistry = pChemistry();
|
rhoChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hReactionThermo& thermo = chemistry.thermo();
|
hsReactionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -40,7 +40,8 @@ volVectorField U
|
|||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
|
const volScalarField& T = thermo.T();
|
||||||
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
@ -81,5 +82,18 @@ forAll(Y, i)
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
19
applications/solvers/combustion/rhoReactingFoam/hsEqn.H
Normal file
19
applications/solvers/combustion/rhoReactingFoam/hsEqn.H
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
@ -74,7 +74,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
|
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
@ -84,16 +84,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
coalParcels.evolve();
|
coalParcels.evolve();
|
||||||
|
|
||||||
coalParcels.info();
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
limestoneParcels.evolve();
|
limestoneParcels.evolve();
|
||||||
|
|
||||||
limestoneParcels.info();
|
|
||||||
|
|
||||||
Info<< endl;
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
@ -102,16 +94,13 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
|
||||||
<< max(T).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
@ -133,5 +133,19 @@
|
|||||||
"energy",
|
"energy",
|
||||||
mesh,
|
mesh,
|
||||||
dimEnergy/dimTime/dimVolume,
|
dimEnergy/dimTime/dimVolume,
|
||||||
"h"
|
"hs"
|
||||||
|
);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
);
|
);
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
fvScalarMatrix hEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ coalParcels.Sh()
|
|
||||||
+ limestoneParcels.Sh()
|
|
||||||
+ enthalpySource.Su()
|
|
||||||
+ radiation->Sh(thermo)
|
|
||||||
);
|
|
||||||
|
|
||||||
hEqn.relax();
|
|
||||||
|
|
||||||
hEqn.solve();
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
|
|
||||||
radiation->correct();
|
|
||||||
}
|
|
26
applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H
Normal file
26
applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hsEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ coalParcels.Sh()
|
||||||
|
+ limestoneParcels.Sh()
|
||||||
|
+ enthalpySource.Su()
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hsEqn.relax();
|
||||||
|
|
||||||
|
hsEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
rhoChemistryModel& chemistry = pChemistry();
|
rhoChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hReactionThermo& thermo = chemistry.thermo();
|
hsReactionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -88,4 +88,18 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
@ -32,14 +32,15 @@
|
|||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, h)
|
fvm::ddt(rho, hs)
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
==
|
==
|
||||||
pWork()
|
pWork()
|
||||||
+ parcels.Sh()
|
+ parcels.Sh()
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Shs(thermo)
|
||||||
+ energySource.Su()
|
+ energySource.Su()
|
||||||
|
+ chemistrySh
|
||||||
);
|
);
|
||||||
|
|
||||||
thermo.correct();
|
thermo.correct();
|
@ -33,7 +33,7 @@ Description
|
|||||||
The solver includes:
|
The solver includes:
|
||||||
- reacting multiphase parcel cloud
|
- reacting multiphase parcel cloud
|
||||||
- porous media
|
- porous media
|
||||||
- point mass sources
|
- mass, momentum and energy sources
|
||||||
- polynomial based, incompressible thermodynamics (f(T))
|
- polynomial based, incompressible thermodynamics (f(T))
|
||||||
|
|
||||||
Note: ddtPhiCorr not used here when porous zones are active
|
Note: ddtPhiCorr not used here when porous zones are active
|
||||||
@ -89,13 +89,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
|
|
||||||
parcels.info();
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "YEqn.H"
|
#include "YEqn.H"
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
|
|
||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
|
@ -22,4 +22,6 @@
|
|||||||
{
|
{
|
||||||
kappa = 1.0;
|
kappa = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chemistrySh = kappa*chemistry.Sh()();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
);
|
);
|
||||||
psiChemistryModel& chemistry = pChemistry();
|
psiChemistryModel& chemistry = pChemistry();
|
||||||
|
|
||||||
hCombustionThermo& thermo = chemistry.thermo();
|
hsCombustionThermo& thermo = chemistry.thermo();
|
||||||
|
|
||||||
basicMultiComponentMixture& composition = thermo.composition();
|
basicMultiComponentMixture& composition = thermo.composition();
|
||||||
PtrList<volScalarField>& Y = composition.Y();
|
PtrList<volScalarField>& Y = composition.Y();
|
||||||
@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
volScalarField& h = thermo.h();
|
volScalarField& hs = thermo.hs();
|
||||||
const volScalarField& T = thermo.T();
|
const volScalarField& T = thermo.T();
|
||||||
const volScalarField& psi = thermo.psi();
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
@ -94,4 +94,18 @@
|
|||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
fields.add(h);
|
fields.add(hs);
|
||||||
|
|
||||||
|
DimensionedField<scalar, volMesh> chemistrySh
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"chemistry::Sh",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("chemistry::Sh", dimEnergy/dimTime/dimVolume, 0.0)
|
||||||
|
);
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
fvScalarMatrix hEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, h)
|
|
||||||
+ mvConvection->fvmDiv(phi, h)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
||||||
==
|
|
||||||
DpDt
|
|
||||||
+ parcels.Sh()
|
|
||||||
+ radiation->Sh(thermo)
|
|
||||||
);
|
|
||||||
|
|
||||||
hEqn.relax();
|
|
||||||
|
|
||||||
hEqn.solve();
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
|
|
||||||
radiation->correct();
|
|
||||||
}
|
|
24
applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H
Normal file
24
applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(rho, hs)
|
||||||
|
+ mvConvection->fvmDiv(phi, hs)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||||
|
==
|
||||||
|
DpDt
|
||||||
|
+ parcels.Sh()
|
||||||
|
+ radiation->Shs(thermo)
|
||||||
|
+ chemistrySh
|
||||||
|
);
|
||||||
|
|
||||||
|
hEqn.relax();
|
||||||
|
|
||||||
|
hEqn.solve();
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
radiation->correct();
|
||||||
|
|
||||||
|
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||||
|
<< max(T).value() << endl;
|
||||||
|
}
|
@ -74,8 +74,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
|
|
||||||
parcels.info();
|
|
||||||
|
|
||||||
#include "chemistry.H"
|
#include "chemistry.H"
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
@ -88,12 +86,9 @@ int main(int argc, char *argv[])
|
|||||||
// --- PISO loop
|
// --- PISO loop
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
for (int corr=1; corr<=nCorr; corr++)
|
||||||
{
|
{
|
||||||
#include "hEqn.H"
|
#include "hsEqn.H"
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
|
||||||
<< max(T).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
@ -61,7 +61,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Evolving " << kinematicCloud.name() << endl;
|
Info<< "Evolving " << kinematicCloud.name() << endl;
|
||||||
kinematicCloud.evolve();
|
kinematicCloud.evolve();
|
||||||
kinematicCloud.info();
|
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.optionFound("flag"))
|
if (args.optionFound("flag"))
|
||||||
{
|
{
|
||||||
Info<<"-flag:" << args.option("flag") << endl;
|
Info<<"-flag:" << args["flag"] << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.optionReadIfPresent<scalar>("float", xxx))
|
if (args.optionReadIfPresent<scalar>("float", xxx))
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,10 +109,8 @@ int main(int argc, char *argv[])
|
|||||||
argList::validArgs.append("ODESolver");
|
argList::validArgs.append("ODESolver");
|
||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
word ODESolverName(args.additionalArgs()[0]);
|
|
||||||
|
|
||||||
testODE ode;
|
testODE ode;
|
||||||
autoPtr<ODESolver> odeSolver = ODESolver::New(ODESolverName, ode);
|
autoPtr<ODESolver> odeSolver = ODESolver::New(args[1], ode);
|
||||||
|
|
||||||
scalar xStart = 1.0;
|
scalar xStart = 1.0;
|
||||||
scalarField yStart(ode.nEqns());
|
scalarField yStart(ode.nEqns());
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -130,15 +130,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (args.additionalArgs().empty())
|
else if (args.size() <= 1)
|
||||||
{
|
{
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& srcFile = args.additionalArgs()[argI];
|
const string& srcFile = args[argI];
|
||||||
Info<< nl << "reading " << srcFile << nl;
|
Info<< nl << "reading " << srcFile << nl;
|
||||||
|
|
||||||
IFstream ifs(srcFile);
|
IFstream ifs(srcFile);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
<< "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
if (args.additionalArgs().empty())
|
if (args.size() <= 1)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
dictionary dict1(IFstream("testDict")());
|
dictionary dict1(IFstream("testDict")());
|
||||||
@ -114,9 +114,9 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOobject::writeDivider(Info);
|
IOobject::writeDivider(Info);
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& dictFile = args.additionalArgs()[argI];
|
const string& dictFile = args[argI];
|
||||||
IFstream is(dictFile);
|
IFstream is(dictFile);
|
||||||
|
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
if (args.additionalArgs().empty() && args.options().empty())
|
if (args.size() <= 1 && args.options().empty())
|
||||||
{
|
{
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
}
|
}
|
||||||
@ -90,9 +90,9 @@ int main(int argc, char *argv[])
|
|||||||
printCleaning(pathName);
|
printCleaning(pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
pathName = args.additionalArgs()[argI];
|
pathName = args[argI];
|
||||||
printCleaning(pathName);
|
printCleaning(pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
point sample(IStringStream(args.additionalArgs()[0])());
|
const point sample = args.argRead<point>(1);
|
||||||
|
|
||||||
treeBoundBox meshBb(mesh.points());
|
treeBoundBox meshBb(mesh.points());
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Point:" << sample << " is in shape "
|
Info<< "Point:" << sample << " is in shape "
|
||||||
<< oc.find(sample) << endl;
|
<< oc.find(sample) << nl
|
||||||
Info<< "Point:" << sample << " is in cell "
|
<< "Point:" << sample << " is in cell "
|
||||||
<< mesh.findCell(sample) << endl;
|
<< mesh.findCell(sample) << endl;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,20 +45,20 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
if (args.additionalArgs().empty())
|
if (args.size() <= 1)
|
||||||
{
|
{
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
label ok = 0;
|
label ok = 0;
|
||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& srcFile = args.additionalArgs()[argI];
|
const string& srcFile = args[argI];
|
||||||
|
|
||||||
if (args.optionFound("ext"))
|
if (args.optionFound("ext"))
|
||||||
{
|
{
|
||||||
if (mvBak(srcFile, args.option("ext")))
|
if (mvBak(srcFile, args["ext"]))
|
||||||
{
|
{
|
||||||
ok++;
|
ok++;
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "mvBak called for " << args.additionalArgs().size()
|
Info<< "mvBak called for " << args.size()-1
|
||||||
<< " files (moved " << ok << ")\n" << endl;
|
<< " files (moved " << ok << ")\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
|
||||||
const word cloudName(args.additionalArgs()[0]);
|
const word cloudName = args[1];
|
||||||
|
|
||||||
{
|
{
|
||||||
// Start with empty cloud
|
// Start with empty cloud
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -221,7 +221,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
|
|
||||||
word patchName(args.additionalArgs()[0]);
|
const word patchName = args[1];
|
||||||
|
|
||||||
label patchI = mesh.boundaryMesh().findPatchID(patchName);
|
label patchI = mesh.boundaryMesh().findPatchID(patchName);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,20 +42,15 @@ int main(int argc, char *argv[])
|
|||||||
argList args(argc, argv);
|
argList args(argc, argv);
|
||||||
|
|
||||||
fileName thermoFileName = fileName::null;
|
fileName thermoFileName = fileName::null;
|
||||||
if (args.options().found("thermo"))
|
args.optionReadIfPresent("thermo", thermoFileName);
|
||||||
{
|
|
||||||
thermoFileName = args.options()["thermo"];
|
|
||||||
}
|
|
||||||
|
|
||||||
fileName CHEMKINFileName(args.additionalArgs()[0]);
|
chemkinReader ck(args[1], thermoFileName);
|
||||||
|
|
||||||
chemkinReader ck(CHEMKINFileName, thermoFileName);
|
//Info<< ck.isotopeAtomicWts() << nl
|
||||||
|
// << ck.specieNames() << nl
|
||||||
//Info<< ck.isotopeAtomicWts() << endl;
|
// << ck.speciePhase() << nl
|
||||||
//Info<< ck.specieNames() << endl;
|
// << ck.specieThermo() << nl
|
||||||
//Info<< ck.speciePhase() << endl;
|
// << ck.reactions() << endl;
|
||||||
//Info<< ck.specieThermo() << endl;
|
|
||||||
//Info<< ck.reactions() << endl;
|
|
||||||
|
|
||||||
const SLPtrList<gasReaction>& reactions = ck.reactions();
|
const SLPtrList<gasReaction>& reactions = ck.reactions();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
if (args.additionalArgs().empty())
|
if (args.size() <= 1)
|
||||||
{
|
{
|
||||||
args.printUsage();
|
args.printUsage();
|
||||||
}
|
}
|
||||||
@ -73,9 +73,9 @@ int main(int argc, char *argv[])
|
|||||||
useCatmullRom = true;
|
useCatmullRom = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& srcFile = args.additionalArgs()[argI];
|
const string& srcFile = args[argI];
|
||||||
Info<< nl << "reading " << srcFile << nl;
|
Info<< nl << "reading " << srcFile << nl;
|
||||||
IFstream ifs(srcFile);
|
IFstream ifs(srcFile);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
|
|||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
// Get name of patch
|
// Get name of patch
|
||||||
word patchName(args.additionalArgs()[0]);
|
const word patchName = args[1];
|
||||||
|
|
||||||
// Find the label in patches by name.
|
// Find the label in patches by name.
|
||||||
label patchI = patches.findPatchID(patchName);
|
label patchI = patches.findPatchID(patchName);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,9 +54,9 @@ int main(int argc, char *argv[])
|
|||||||
cpuTime timer;
|
cpuTime timer;
|
||||||
for (label count = 0; count < repeat; ++count)
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
forAll(args.additionalArgs(), argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& rawArg = args.additionalArgs()[argI];
|
const string& rawArg = args[argI];
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
Info<< "input string: " << rawArg << nl;
|
Info<< "input string: " << rawArg << nl;
|
||||||
@ -94,11 +94,11 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
for (label count = 0; count < repeat; ++count)
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
IFstream is(args.option("file"));
|
IFstream is(args["file"]);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
Info<< "tokenizing file: " << args.option("file") << nl;
|
Info<< "tokenizing file: " << args["file"] << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (is.good())
|
while (is.good())
|
||||||
|
@ -17,7 +17,7 @@ FoamFile
|
|||||||
|
|
||||||
|
|
||||||
// Surface to keep to
|
// Surface to keep to
|
||||||
surface "plexi.ftr";
|
surface "plexi.obj";
|
||||||
|
|
||||||
// What is outside. These points have to be inside a cell (so not on a face!)
|
// What is outside. These points have to be inside a cell (so not on a face!)
|
||||||
outsidePoints ((-0.99001 -0.99001 -0.99001));
|
outsidePoints ((-0.99001 -0.99001 -0.99001));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -453,8 +453,8 @@ label simplifyFaces
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addBoolOption("overwrite");
|
|
||||||
argList::validArgs.append("edge length [m]");
|
argList::validArgs.append("edge length [m]");
|
||||||
argList::validArgs.append("merge angle (degrees)");
|
argList::validArgs.append("merge angle (degrees)");
|
||||||
|
|
||||||
@ -464,9 +464,9 @@ int main(int argc, char *argv[])
|
|||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
scalar minLen(readScalar(IStringStream(args.additionalArgs()[0])()));
|
const scalar minLen = args.argRead<scalar>(1);
|
||||||
scalar angle(readScalar(IStringStream(args.additionalArgs()[1])()));
|
const scalar angle = args.argRead<scalar>(2);
|
||||||
bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
scalar maxCos = Foam::cos(degToRad(angle));
|
scalar maxCos = Foam::cos(degToRad(angle));
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -428,10 +428,17 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
|
|
||||||
argList::validArgs.append("feature angle [0..180]");
|
argList::validArgs.append("feature angle [0..180]");
|
||||||
argList::addOption("concaveAngle", "[0..180]");
|
argList::addOption
|
||||||
|
(
|
||||||
|
"concaveAngle",
|
||||||
|
"[0..180]",
|
||||||
|
"specify concave angle [0..180] degrees (default: 30.0 degrees)"
|
||||||
|
);
|
||||||
|
|
||||||
argList::addBoolOption("snapMesh");
|
argList::addBoolOption("snapMesh");
|
||||||
argList::addBoolOption("overwrite");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -439,18 +446,16 @@ int main(int argc, char *argv[])
|
|||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
const scalar featureAngle = args.argRead<scalar>(1);
|
||||||
|
const scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
|
||||||
|
|
||||||
// Sin of angle between two consecutive edges on a face.
|
// Sin of angle between two consecutive edges on a face.
|
||||||
// If sin(angle) larger than this the face will be considered concave.
|
// If sin(angle) larger than this the face will be considered concave.
|
||||||
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
|
scalar concaveAngle = args.optionLookupOrDefault("concaveAngle", 30.0);
|
||||||
|
|
||||||
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
scalar concaveSin = Foam::sin(degToRad(concaveAngle));
|
||||||
|
|
||||||
bool snapMeshDict = args.optionFound("snapMesh");
|
const bool snapMeshDict = args.optionFound("snapMesh");
|
||||||
bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
Info<< "Merging all faces of a cell" << nl
|
Info<< "Merging all faces of a cell" << nl
|
||||||
<< " - which are on the same patch" << nl
|
<< " - which are on the same patch" << nl
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -328,7 +328,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("overwrite");
|
# include "addOverwriteOption.H"
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -336,7 +336,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
Info<< "Reading modifyMeshDict\n" << endl;
|
Info<< "Reading modifyMeshDict\n" << endl;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -52,8 +52,9 @@ using namespace Foam;
|
|||||||
// Main program:
|
// Main program:
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("overwrite");
|
# include "addOverwriteOption.H"
|
||||||
argList::validArgs.append("cellSet");
|
argList::validArgs.append("cellSet");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
@ -63,7 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
pointMesh pMesh(mesh);
|
pointMesh pMesh(mesh);
|
||||||
|
|
||||||
word cellSetName(args.args()[1]);
|
word cellSetName(args.args()[1]);
|
||||||
bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
Info<< "Reading cells to refine from cellSet " << cellSetName
|
Info<< "Reading cells to refine from cellSet " << cellSetName
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,12 +47,12 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.append("patchName");
|
argList::validArgs.append("patchName");
|
||||||
argList::validArgs.append("edgeWeight");
|
argList::validArgs.append("edgeWeight");
|
||||||
|
|
||||||
argList::addOption("useSet", "cellSet");
|
argList::addOption("useSet", "cellSet");
|
||||||
argList::addBoolOption("overwrite");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -60,11 +60,9 @@ int main(int argc, char *argv[])
|
|||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
word patchName(args.additionalArgs()[0]);
|
const word patchName = args[1];
|
||||||
|
const scalar weight = args.argRead<scalar>(2);
|
||||||
scalar weight(readScalar(IStringStream(args.additionalArgs()[1])()));
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
bool overwrite = args.optionFound("overwrite");
|
|
||||||
|
|
||||||
|
|
||||||
label patchID = mesh.boundaryMesh().findPatchID(patchName);
|
label patchID = mesh.boundaryMesh().findPatchID(patchName);
|
||||||
|
|
||||||
@ -103,20 +101,17 @@ int main(int argc, char *argv[])
|
|||||||
// List of cells to refine
|
// List of cells to refine
|
||||||
//
|
//
|
||||||
|
|
||||||
bool useSet = args.optionFound("useSet");
|
word setName;
|
||||||
|
if (args.optionReadIfPresent("useSet", setName))
|
||||||
if (useSet)
|
|
||||||
{
|
{
|
||||||
word setName(args.option("useSet"));
|
Info<< "Subsetting cells to cut based on cellSet"
|
||||||
|
<< setName << nl << endl;
|
||||||
Info<< "Subsetting cells to cut based on cellSet" << setName << endl
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
cellSet cells(mesh, setName);
|
cellSet cells(mesh, setName);
|
||||||
|
|
||||||
Info<< "Read " << cells.size() << " cells from cellSet "
|
Info<< "Read " << cells.size() << " cells from cellSet "
|
||||||
<< cells.instance()/cells.local()/cells.name()
|
<< cells.instance()/cells.local()/cells.name()
|
||||||
<< endl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -127,8 +122,8 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
cutCells.erase(iter.key());
|
cutCells.erase(iter.key());
|
||||||
}
|
}
|
||||||
Info<< "Removed from cells to cut all the ones not in set " << setName
|
Info<< "Removed from cells to cut all the ones not in set "
|
||||||
<< endl << endl;
|
<< setName << nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark all meshpoints on patch
|
// Mark all meshpoints on patch
|
||||||
@ -182,9 +177,9 @@ int main(int argc, char *argv[])
|
|||||||
allCutEdges.shrink();
|
allCutEdges.shrink();
|
||||||
allCutEdgeWeights.shrink();
|
allCutEdgeWeights.shrink();
|
||||||
|
|
||||||
Info<< "Cutting:" << endl
|
Info<< "Cutting:" << nl
|
||||||
<< " cells:" << cutCells.size() << endl
|
<< " cells:" << cutCells.size() << nl
|
||||||
<< " edges:" << allCutEdges.size() << endl
|
<< " edges:" << allCutEdges.size() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
// Transfer DynamicLists to straight ones.
|
// Transfer DynamicLists to straight ones.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::addBoolOption("overwrite");
|
# include "addOverwriteOption.H"
|
||||||
argList::validArgs.append("faceSet");
|
argList::validArgs.append("faceSet");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
@ -57,9 +57,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
bool overwrite = args.optionFound("overwrite");
|
const word setName = args[1];
|
||||||
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
word setName(args.additionalArgs()[0]);
|
|
||||||
|
|
||||||
// Read faces
|
// Read faces
|
||||||
faceSet candidateSet(mesh, setName);
|
faceSet candidateSet(mesh, setName);
|
||||||
|
@ -21,7 +21,7 @@ FoamFile
|
|||||||
useSurface false;
|
useSurface false;
|
||||||
|
|
||||||
// Surface to keep to
|
// Surface to keep to
|
||||||
surface "plexi.ftr";
|
surface "plexi.obj";
|
||||||
|
|
||||||
// What is outside
|
// What is outside
|
||||||
outsidePoints ((-1 -1 -1));
|
outsidePoints ((-1 -1 -1));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -524,11 +524,11 @@ void collectCuts
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::addOption("set", "cellSet name");
|
argList::addOption("set", "cellSet name");
|
||||||
argList::addBoolOption("geometry");
|
argList::addBoolOption("geometry");
|
||||||
argList::addOption("tol", "edge snap tolerance");
|
argList::addOption("tol", "edge snap tolerance");
|
||||||
argList::addBoolOption("overwrite");
|
|
||||||
argList::validArgs.append("edge angle [0..360]");
|
argList::validArgs.append("edge angle [0..360]");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
@ -537,14 +537,13 @@ int main(int argc, char *argv[])
|
|||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
const scalar featureAngle = args.argRead<scalar>(1);
|
||||||
|
const scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||||
|
const scalar minSin = Foam::sin(degToRad(featureAngle));
|
||||||
|
|
||||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
const bool readSet = args.optionFound("set");
|
||||||
scalar minSin = Foam::sin(degToRad(featureAngle));
|
const bool geometry = args.optionFound("geometry");
|
||||||
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
bool readSet = args.optionFound("set");
|
|
||||||
bool geometry = args.optionFound("geometry");
|
|
||||||
bool overwrite = args.optionFound("overwrite");
|
|
||||||
|
|
||||||
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||||
|
|
||||||
@ -553,7 +552,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "edge snapping tol : " << edgeTol << nl;
|
<< "edge snapping tol : " << edgeTol << nl;
|
||||||
if (readSet)
|
if (readSet)
|
||||||
{
|
{
|
||||||
Info<< "candidate cells : cellSet " << args.option("set") << nl;
|
Info<< "candidate cells : cellSet " << args["set"] << nl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -581,7 +580,7 @@ int main(int argc, char *argv[])
|
|||||||
if (readSet)
|
if (readSet)
|
||||||
{
|
{
|
||||||
// Read cells to cut from cellSet
|
// Read cells to cut from cellSet
|
||||||
cellSet cells(mesh, args.option("set"));
|
cellSet cells(mesh, args["set"]);
|
||||||
|
|
||||||
cellsToCut = cells;
|
cellsToCut = cells;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -615,7 +615,7 @@ int main(int argc, char *argv[])
|
|||||||
wordList foamPatchNames;
|
wordList foamPatchNames;
|
||||||
|
|
||||||
{
|
{
|
||||||
fileName ccmFile(args.additionalArgs()[0]);
|
const fileName ccmFile = args[1];
|
||||||
|
|
||||||
if (!isFile(ccmFile))
|
if (!isFile(ccmFile))
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,8 @@ Application
|
|||||||
ansysToFoam
|
ansysToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts an ANSYS input mesh file, exported from I-DEAS, to FOAM format.
|
Converts an ANSYS input mesh file, exported from I-DEAS,
|
||||||
|
to OpenFOAM format.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -252,7 +253,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName ansysFile(args.additionalArgs()[0]);
|
const fileName ansysFile = args[1];
|
||||||
ifstream ansysStream(ansysFile.c_str());
|
ifstream ansysStream(ansysFile.c_str());
|
||||||
|
|
||||||
if (!ansysStream)
|
if (!ansysStream)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ Application
|
|||||||
cfx4ToFoam
|
cfx4ToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts a CFX 4 mesh to FOAM format
|
Converts a CFX 4 mesh to OpenFOAM format
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
IFstream cfxFile(args.additionalArgs()[0]);
|
IFstream cfxFile(args[1]);
|
||||||
|
|
||||||
// Read the cfx information using a fixed format reader.
|
// Read the cfx information using a fixed format reader.
|
||||||
// Comments in the file are in C++ style, so the stream parser will remove
|
// Comments in the file are in C++ style, so the stream parser will remove
|
||||||
@ -603,7 +603,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "CFX patch " << patchI
|
Info<< "CFX patch " << patchI
|
||||||
<< ", of type " << cfxPatchTypes[patchI]
|
<< ", of type " << cfxPatchTypes[patchI]
|
||||||
<< ", name " << cfxPatchNames[patchI]
|
<< ", name " << cfxPatchNames[patchI]
|
||||||
<< " already exists as FOAM patch " << existingPatch
|
<< " already exists as OpenFOAM patch " << existingPatch
|
||||||
<< ". Adding faces." << endl;
|
<< ". Adding faces." << endl;
|
||||||
|
|
||||||
faceList& renumberedPatch = boundary[existingPatch];
|
faceList& renumberedPatch = boundary[existingPatch];
|
||||||
@ -655,7 +655,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "CFX patch " << patchI
|
Info<< "CFX patch " << patchI
|
||||||
<< ", of type " << cfxPatchTypes[patchI]
|
<< ", of type " << cfxPatchTypes[patchI]
|
||||||
<< ", name " << cfxPatchNames[patchI]
|
<< ", name " << cfxPatchNames[patchI]
|
||||||
<< " converted into FOAM patch " << nCreatedPatches
|
<< " converted into OpenFOAM patch " << nCreatedPatches
|
||||||
<< " type ";
|
<< " type ";
|
||||||
|
|
||||||
if (cfxPatchTypes[patchI] == "WALL")
|
if (cfxPatchTypes[patchI] == "WALL")
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -795,7 +795,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName fluentFile(args.additionalArgs()[0]);
|
const fileName fluentFile = args[1];
|
||||||
IFstream fluentStream(fluentFile);
|
IFstream fluentStream(fluentFile);
|
||||||
|
|
||||||
if (!fluentStream)
|
if (!fluentStream)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ Application
|
|||||||
fluentMeshToFoam
|
fluentMeshToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts a Fluent mesh to FOAM format
|
Converts a Fluent mesh to OpenFOAM format
|
||||||
including multiple region and region boundary handling.
|
including multiple region and region boundary handling.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -881,12 +881,12 @@ int main(int argc, char *argv[])
|
|||||||
scalar scaleFactor = 1.0;
|
scalar scaleFactor = 1.0;
|
||||||
args.optionReadIfPresent("scale", scaleFactor);
|
args.optionReadIfPresent("scale", scaleFactor);
|
||||||
|
|
||||||
bool writeSets = args.optionFound("writeSets");
|
const bool writeSets = args.optionFound("writeSets");
|
||||||
bool writeZones = args.optionFound("writeZones");
|
const bool writeZones = args.optionFound("writeZones");
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName fluentFile(args.additionalArgs()[0]);
|
const fileName fluentFile = args[1];
|
||||||
std::ifstream fluentStream(fluentFile.c_str());
|
std::ifstream fluentStream(fluentFile.c_str());
|
||||||
|
|
||||||
if (!fluentStream)
|
if (!fluentStream)
|
||||||
|
@ -199,7 +199,8 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
fluentMeshFile << l.size() << " ";
|
fluentMeshFile << l.size() << " ";
|
||||||
|
|
||||||
// Note: In Fluent, all boundary faces point inwards, which is
|
// Note: In Fluent, all boundary faces point inwards, which is
|
||||||
// opposite from the FOAM convention. Turn them round on printout
|
// opposite from the OpenFOAM convention.
|
||||||
|
// Turn them around on printout
|
||||||
forAllReverse (l, lI)
|
forAllReverse (l, lI)
|
||||||
{
|
{
|
||||||
fluentMeshFile << l[lI] + 1 << " ";
|
fluentMeshFile << l[lI] + 1 << " ";
|
||||||
|
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Writes out the FOAM mesh in Fluent mesh format.
|
Writes out the OpenFOAM mesh in Fluent mesh format.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,16 +39,6 @@ Usage
|
|||||||
Specify an alternative geometry scaling factor.
|
Specify an alternative geometry scaling factor.
|
||||||
The default is @b 1000 (scale @em [m] to @em [mm]).
|
The default is @b 1000 (scale @em [m] to @em [mm]).
|
||||||
|
|
||||||
@param -surface \n
|
|
||||||
Extract the surface of the volume mesh only.
|
|
||||||
This can be useful, for example, for surface morphing in an external
|
|
||||||
package.
|
|
||||||
|
|
||||||
@param -tri \n
|
|
||||||
Extract a triangulated surface.
|
|
||||||
The @b -surface options is implicitly selected.
|
|
||||||
|
|
||||||
|
|
||||||
Note
|
Note
|
||||||
The cellTable information available in the files
|
The cellTable information available in the files
|
||||||
@c constant/cellTable and @c constant/polyMesh/cellTableId
|
@c constant/cellTable and @c constant/polyMesh/cellTableId
|
||||||
@ -87,34 +77,13 @@ int main(int argc, char *argv[])
|
|||||||
"noBnd",
|
"noBnd",
|
||||||
"suppress writing the .bnd file"
|
"suppress writing the .bnd file"
|
||||||
);
|
);
|
||||||
argList::addBoolOption
|
|
||||||
(
|
|
||||||
"tri",
|
|
||||||
"Extract a triangulated surface. Implies -surface"
|
|
||||||
);
|
|
||||||
argList::addBoolOption
|
|
||||||
(
|
|
||||||
"surface",
|
|
||||||
"extract the surface of the volume mesh only"
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
bool surfaceOnly = false;
|
|
||||||
if (args.optionFound("surface") || args.optionFound("tri"))
|
|
||||||
{
|
|
||||||
surfaceOnly = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
fileName exportName = meshWriter::defaultMeshName;
|
fileName exportName = meshWriter::defaultMeshName;
|
||||||
if (surfaceOnly)
|
|
||||||
{
|
|
||||||
exportName = meshWriter::defaultSurfaceName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.optionFound("case"))
|
if (args.optionFound("case"))
|
||||||
{
|
{
|
||||||
exportName += '-' + args.globalCaseName();
|
exportName += '-' + args.globalCaseName();
|
||||||
@ -132,7 +101,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createPolyMesh.H"
|
||||||
|
|
||||||
|
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
@ -156,21 +124,7 @@ int main(int argc, char *argv[])
|
|||||||
meshName += '_' + runTime.timeName();
|
meshName += '_' + runTime.timeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surfaceOnly)
|
writer.write(meshName);
|
||||||
{
|
|
||||||
if (args.optionFound("tri"))
|
|
||||||
{
|
|
||||||
writer.writeSurface(meshName, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.writeSurface(meshName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writer.write(meshName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< nl << endl;
|
Info<< nl << endl;
|
||||||
|
@ -36,6 +36,9 @@ Usage
|
|||||||
Specify an alternative geometry scaling factor.
|
Specify an alternative geometry scaling factor.
|
||||||
Eg, use @b 1000 to scale @em [m] to @em [mm].
|
Eg, use @b 1000 to scale @em [m] to @em [mm].
|
||||||
|
|
||||||
|
@param -tri \n
|
||||||
|
Triangulate surface.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
@ -62,15 +65,19 @@ int main(int argc, char *argv[])
|
|||||||
"scale",
|
"scale",
|
||||||
"specify geometry scaling factor"
|
"specify geometry scaling factor"
|
||||||
);
|
);
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"tri",
|
||||||
|
"triangulate surface"
|
||||||
|
);
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
const stringList& params = args.additionalArgs();
|
fileName exportName = args[1];
|
||||||
|
|
||||||
scalar scaleFactor = 0;
|
scalar scaleFactor = 0;
|
||||||
args.optionReadIfPresent<scalar>("scale", scaleFactor);
|
args.optionReadIfPresent<scalar>("scale", scaleFactor);
|
||||||
|
const bool doTriangulate = args.optionFound("tri");
|
||||||
fileName exportName(params[0]);
|
|
||||||
|
|
||||||
fileName exportBase = exportName.lessExt();
|
fileName exportBase = exportName.lessExt();
|
||||||
word exportExt = exportName.ext();
|
word exportExt = exportName.ext();
|
||||||
@ -107,6 +114,12 @@ int main(int argc, char *argv[])
|
|||||||
surf.scalePoints(scaleFactor);
|
surf.scalePoints(scaleFactor);
|
||||||
|
|
||||||
Info<< "writing " << exportName;
|
Info<< "writing " << exportName;
|
||||||
|
if (doTriangulate)
|
||||||
|
{
|
||||||
|
Info<< " triangulated";
|
||||||
|
surf.triangulate();
|
||||||
|
}
|
||||||
|
|
||||||
if (scaleFactor <= 0)
|
if (scaleFactor <= 0)
|
||||||
{
|
{
|
||||||
Info<< " without scaling" << endl;
|
Info<< " without scaling" << endl;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ Application
|
|||||||
gambitToFoam
|
gambitToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts a GAMBIT mesh to FOAM format.
|
Converts a GAMBIT mesh to OpenFOAM format.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -653,7 +653,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName gambitFile(args.additionalArgs()[0]);
|
const fileName gambitFile = args[1];
|
||||||
ifstream gambitStream(gambitFile.c_str());
|
ifstream gambitStream(gambitFile.c_str());
|
||||||
|
|
||||||
if (!gambitStream)
|
if (!gambitStream)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -722,9 +722,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName mshName(args.additionalArgs()[0]);
|
const bool keepOrientation = args.optionFound("keepOrientation");
|
||||||
|
IFstream inFile(args[1]);
|
||||||
bool keepOrientation = args.optionFound("keepOrientation");
|
|
||||||
|
|
||||||
// Storage for points
|
// Storage for points
|
||||||
pointField points;
|
pointField points;
|
||||||
@ -749,9 +748,6 @@ int main(int argc, char *argv[])
|
|||||||
// Version 1 or 2 format
|
// Version 1 or 2 format
|
||||||
bool version2Format = false;
|
bool version2Format = false;
|
||||||
|
|
||||||
|
|
||||||
IFstream inFile(mshName);
|
|
||||||
|
|
||||||
while (inFile.good())
|
while (inFile.good())
|
||||||
{
|
{
|
||||||
string line;
|
string line;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -595,9 +595,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName ideasName(args.additionalArgs()[0]);
|
const fileName ideasName = args[1];
|
||||||
|
IFstream inFile(ideasName);
|
||||||
IFstream inFile(ideasName.c_str());
|
|
||||||
|
|
||||||
if (!inFile.good())
|
if (!inFile.good())
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ Application
|
|||||||
kivaToFoam
|
kivaToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts a KIVA3v grid to FOAM format
|
Converts a KIVA3v grid to OpenFOAM format
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -68,15 +68,12 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName kivaFileName("otape17");
|
fileName kivaFileName("otape17");
|
||||||
if (args.optionFound("file"))
|
args.optionReadIfPresent("file", kivaFileName);
|
||||||
{
|
|
||||||
kivaFileName = args.option("file");
|
|
||||||
}
|
|
||||||
|
|
||||||
kivaVersions kivaVersion = kiva3v;
|
kivaVersions kivaVersion = kiva3v;
|
||||||
if (args.optionFound("version"))
|
if (args.optionFound("version"))
|
||||||
{
|
{
|
||||||
word kivaVersionName = args.option("version");
|
const word kivaVersionName = args["version"];
|
||||||
|
|
||||||
if (kivaVersionName == "kiva3")
|
if (kivaVersionName == "kiva3")
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,10 +62,8 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
bool readHex = args.optionFound("hex");
|
const bool readHex = args.optionFound("hex");
|
||||||
|
IFstream mshStream(args[1]);
|
||||||
fileName mshFile(args.additionalArgs()[0]);
|
|
||||||
IFstream mshStream(mshFile);
|
|
||||||
|
|
||||||
label nCells;
|
label nCells;
|
||||||
mshStream >> nCells;
|
mshStream >> nCells;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,11 +93,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName neuFile(args.additionalArgs()[0]);
|
IFstream str(args[1]);
|
||||||
|
|
||||||
|
|
||||||
IFstream str(neuFile);
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Read nodes.
|
// Read nodes.
|
||||||
@ -106,7 +102,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "nNodes:" << nNodes << endl;
|
Info<< "nNodes:" << nNodes << endl;
|
||||||
|
|
||||||
|
|
||||||
pointField points(nNodes);
|
pointField points(nNodes);
|
||||||
|
|
||||||
forAll(points, pointI)
|
forAll(points, pointI)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
IFstream plot3dFile(args.additionalArgs()[0]);
|
IFstream plot3dFile(args[1]);
|
||||||
|
|
||||||
// Read the plot3d information using a fixed format reader.
|
// Read the plot3d information using a fixed format reader.
|
||||||
// Comments in the file are in C++ style, so the stream parser will remove
|
// Comments in the file are in C++ style, so the stream parser will remove
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -353,6 +353,7 @@ void dumpFeatures
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addOverwriteOption.H"
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
timeSelector::addOptions(true, false);
|
timeSelector::addOptions(true, false);
|
||||||
|
|
||||||
@ -360,7 +361,6 @@ int main(int argc, char *argv[])
|
|||||||
argList::addBoolOption("splitAllFaces");
|
argList::addBoolOption("splitAllFaces");
|
||||||
argList::addBoolOption("concaveMultiCells");
|
argList::addBoolOption("concaveMultiCells");
|
||||||
argList::addBoolOption("doNotPreserveFaceZones");
|
argList::addBoolOption("doNotPreserveFaceZones");
|
||||||
argList::addBoolOption("overwrite");
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -385,9 +385,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
|
const scalar featureAngle = args.argRead<scalar>(1);
|
||||||
|
const scalar minCos = Foam::cos(degToRad(featureAngle));
|
||||||
scalar minCos = Foam::cos(degToRad(featureAngle));
|
|
||||||
|
|
||||||
Info<< "Feature:" << featureAngle << endl
|
Info<< "Feature:" << featureAngle << endl
|
||||||
<< "minCos :" << minCos << endl
|
<< "minCos :" << minCos << endl
|
||||||
|
@ -30,6 +30,6 @@ Description
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define starMesh sammMesh
|
#define starMesh sammMesh
|
||||||
#include "../starToFoam/readPoints.C"
|
#include "../star3ToFoam/readPoints.C"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
@ -47,7 +47,7 @@ const cellModel* sammMesh::sammTrim4Ptr_ = cellModeller::lookup("sammTrim4");
|
|||||||
const cellModel* sammMesh::sammTrim5Ptr_ = cellModeller::lookup("sammTrim5");
|
const cellModel* sammMesh::sammTrim5Ptr_ = cellModeller::lookup("sammTrim5");
|
||||||
const cellModel* sammMesh::sammTrim8Ptr_ = cellModeller::lookup("hexagonalPrism");
|
const cellModel* sammMesh::sammTrim8Ptr_ = cellModeller::lookup("hexagonalPrism");
|
||||||
|
|
||||||
// lookup table giving FOAM face number when looked up with shape index
|
// lookup table giving OpenFOAM face number when looked up with shape index
|
||||||
// (first index) and STAR face number
|
// (first index) and STAR face number
|
||||||
// - first column is always -1
|
// - first column is always -1
|
||||||
// - last column is -1 for all but hexagonal prism
|
// - last column is -1 for all but hexagonal prism
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ Application
|
|||||||
sammToFoam
|
sammToFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Converts a STAR-CD SAMM mesh to FOAM format
|
Converts a Star-CD (v3) SAMM mesh to OpenFOAM format.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -54,8 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
fileName sammFile(args.additionalArgs()[0]);
|
sammMesh makeMesh(args[1], runTime, scaleFactor);
|
||||||
sammMesh makeMesh(sammFile, runTime, scaleFactor);
|
|
||||||
|
|
||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
@ -14,6 +14,6 @@ createBoundaryFaces.C
|
|||||||
createPolyBoundary.C
|
createPolyBoundary.C
|
||||||
purgeCellShapes.C
|
purgeCellShapes.C
|
||||||
writeMesh.C
|
writeMesh.C
|
||||||
starToFoam.C
|
star3ToFoam.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/starToFoam
|
EXE = $(FOAM_APPBIN)/star3ToFoam
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user