mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
Conflicts: applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
This commit is contained in:
17
README
17
README
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
#+TITLE: OpenFOAM README for version 1.6
|
#+TITLE: OpenFOAM README for version 1.6
|
||||||
#+AUTHOR: OpenCFD Ltd.
|
#+AUTHOR: OpenCFD Ltd.
|
||||||
#+DATE: July 2009
|
#+DATE: November 2009
|
||||||
#+LINK: http://www.opencfd.co.uk
|
#+LINK: http://www.opencfd.co.uk
|
||||||
#+OPTIONS: author:nil ^:{}
|
#+OPTIONS: author:nil ^:{}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@
|
|||||||
and a csh/tcsh example:
|
and a csh/tcsh example:
|
||||||
|
|
||||||
+ setenv FOAM_INST_DIR /data/app/OpenFOAM
|
+ setenv FOAM_INST_DIR /data/app/OpenFOAM
|
||||||
+ foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc
|
+ foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/cshrc
|
||||||
+ if ( -f $foamDotFile ) source $foamDotFile
|
+ if ( -f $foamDotFile ) source $foamDotFile
|
||||||
|
|
||||||
The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts
|
The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts
|
||||||
@ -168,9 +168,9 @@
|
|||||||
+ rm -rf paraview-3.6.1/platforms
|
+ rm -rf paraview-3.6.1/platforms
|
||||||
+ ./makeParaView
|
+ ./makeParaView
|
||||||
|
|
||||||
The PV3FoamReader module is an OpenFOAM utility that can be compiled in the
|
The PV3blockMeshReader and the PV3FoamReader ParaView plugins are compiled
|
||||||
usual manner as follows:
|
as usual for OpenFOAM utilities:
|
||||||
+ cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader
|
+ cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers/
|
||||||
+ ./Allwclean
|
+ ./Allwclean
|
||||||
+ ./Allwmake
|
+ ./Allwmake
|
||||||
|
|
||||||
@ -180,14 +180,15 @@
|
|||||||
downloads a supported version of Qt /e.g./ 4.3.5 as described in the section
|
downloads a supported version of Qt /e.g./ 4.3.5 as described in the section
|
||||||
on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR.
|
on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR.
|
||||||
Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR:
|
Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR:
|
||||||
+ makeQt
|
+ ./makeQt
|
||||||
|
|
||||||
The user should then compile ParaView using the local version of Qt by
|
The user should then compile ParaView using the local version of Qt by
|
||||||
executing makeParaView with the -qmake option, giving the full path of the
|
executing makeParaView with the -qmake option, giving the full path of the
|
||||||
newly built qmake as an argument:
|
newly built qmake as an argument:
|
||||||
+ makeParaView -qmake <path_to_qmake>
|
+ ./makeParaView -qmake <path_to_qmake>
|
||||||
|
|
||||||
The user must then recompile the PV3FoamReader module as normal (see above).
|
The user must then recompile the PV3blockMeshReader and the
|
||||||
|
PV3FoamReader plugins as usual (see above).
|
||||||
|
|
||||||
* Documentation
|
* Documentation
|
||||||
http://www.OpenFOAM.org/doc
|
http://www.OpenFOAM.org/doc
|
||||||
|
|||||||
@ -64,7 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
dieselSpray.evolve();
|
dieselSpray.evolve();
|
||||||
|
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -61,7 +61,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
@ -72,11 +72,11 @@ int main(int argc, char *argv[])
|
|||||||
runTime++;
|
runTime++;
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
Info << "Evolving Spray" << endl;
|
Info<< "Evolving Spray" << endl;
|
||||||
|
|
||||||
dieselSpray.evolve();
|
dieselSpray.evolve();
|
||||||
|
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -155,7 +155,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
|||||||
|
|
||||||
refValue() = Uwall_;
|
refValue() = Uwall_;
|
||||||
|
|
||||||
if(thermalCreep_)
|
if (thermalCreep_)
|
||||||
{
|
{
|
||||||
const volScalarField& vsfT =
|
const volScalarField& vsfT =
|
||||||
this->db().objectRegistry::lookupObject<volScalarField>("T");
|
this->db().objectRegistry::lookupObject<volScalarField>("T");
|
||||||
@ -167,7 +167,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
|||||||
refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT);
|
refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curvature_)
|
if (curvature_)
|
||||||
{
|
{
|
||||||
const fvPatchTensorField& ptauMC =
|
const fvPatchTensorField& ptauMC =
|
||||||
patch().lookupPatchField<volTensorField, tensor>("tauMC");
|
patch().lookupPatchField<volTensorField, tensor>("tauMC");
|
||||||
|
|||||||
@ -27,7 +27,7 @@ if (transonic)
|
|||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
// retain the residual from the first iteration
|
// Retain the residual from the first iteration
|
||||||
if (nonOrth == 0)
|
if (nonOrth == 0)
|
||||||
{
|
{
|
||||||
eqnResidual = pEqn.solve().initialResidual();
|
eqnResidual = pEqn.solve().initialResidual();
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
rhoSimplecFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/rhoSimplecFoam
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I../rhoSimpleFoam \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lbasicThermophysicalModels \
|
||||||
|
-lspecie \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools
|
||||||
17
applications/solvers/compressible/rhoSimplecFoam/UEqn.H
Normal file
17
applications/solvers/compressible/rhoSimplecFoam/UEqn.H
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Solve the Momentum equation
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> UEqn
|
||||||
|
(
|
||||||
|
fvm::div(phi, U)
|
||||||
|
- fvm::Sp(fvc::div(phi), U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn().relax();
|
||||||
|
|
||||||
|
eqnResidual = solve
|
||||||
|
(
|
||||||
|
UEqn() == -fvc::grad(p)
|
||||||
|
).initialResidual();
|
||||||
|
|
||||||
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
|
autoPtr<basicPsiThermo> pThermo
|
||||||
|
(
|
||||||
|
basicPsiThermo::New(mesh)
|
||||||
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
volScalarField& h = thermo.h();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
Info<< "Reading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
label pRefCell = 0;
|
||||||
|
scalar pRefValue = 0.0;
|
||||||
|
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||||
|
|
||||||
|
dimensionedScalar pMin
|
||||||
|
(
|
||||||
|
mesh.solutionDict().subDict("SIMPLE").lookup("pMin")
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::RASModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::RASModel::New
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
29
applications/solvers/compressible/rhoSimplecFoam/hEqn.H
Normal file
29
applications/solvers/compressible/rhoSimplecFoam/hEqn.H
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
|
fvm::div(phi, h)
|
||||||
|
- fvm::Sp(fvc::div(phi), h)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
|
==
|
||||||
|
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
|
||||||
|
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||||
|
);
|
||||||
|
|
||||||
|
hEqn.relax();
|
||||||
|
|
||||||
|
eqnResidual = hEqn.solve().initialResidual();
|
||||||
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
|
||||||
|
thermo.correct();
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!transonic)
|
||||||
|
{
|
||||||
|
rho.relax();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "rho max/min : "
|
||||||
|
<< max(rho).value() << " "
|
||||||
|
<< min(rho).value() << endl;
|
||||||
|
}
|
||||||
123
applications/solvers/compressible/rhoSimplecFoam/pEqn.H
Normal file
123
applications/solvers/compressible/rhoSimplecFoam/pEqn.H
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
volScalarField p0 = p;
|
||||||
|
|
||||||
|
volScalarField AU = UEqn().A();
|
||||||
|
volScalarField AtU = AU - UEqn().H1();
|
||||||
|
U = UEqn().H()/AU;
|
||||||
|
UEqn.clear();
|
||||||
|
|
||||||
|
bool closedVolume = false;
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi*U) & mesh.Sf()
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceScalarField phic
|
||||||
|
(
|
||||||
|
"phic",
|
||||||
|
fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf()
|
||||||
|
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
|
||||||
|
);
|
||||||
|
|
||||||
|
refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
|
||||||
|
= p.boundaryField()[1];
|
||||||
|
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::div(phid, p)
|
||||||
|
+ fvc::div(phic)
|
||||||
|
- fvm::Sp(fvc::div(phid), p)
|
||||||
|
+ fvc::div(phid)*p
|
||||||
|
- fvm::laplacian(rho/AtU, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
// Retain the residual from the first iteration
|
||||||
|
if (nonOrth == 0)
|
||||||
|
{
|
||||||
|
eqnResidual = pEqn.solve().initialResidual();
|
||||||
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pEqn.solve();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi == phic + pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
||||||
|
closedVolume = adjustPhi(phi, U, p);
|
||||||
|
phi += fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf();
|
||||||
|
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvc::div(phi)
|
||||||
|
//- fvm::laplacian(rho/AU, p)
|
||||||
|
- fvm::laplacian(rho/AtU, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
// Retain the residual from the first iteration
|
||||||
|
if (nonOrth == 0)
|
||||||
|
{
|
||||||
|
eqnResidual = pEqn.solve().initialResidual();
|
||||||
|
maxResidual = max(eqnResidual, maxResidual);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pEqn.solve();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi += pEqn.flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The incompressibe for of the continuity error check is appropriate for
|
||||||
|
// steady-state compressible also.
|
||||||
|
#include "incompressible/continuityErrs.H"
|
||||||
|
|
||||||
|
// Explicitly relax pressure for momentum corrector
|
||||||
|
p.relax();
|
||||||
|
|
||||||
|
U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU);
|
||||||
|
//U -= fvc::grad(p)/AU;
|
||||||
|
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
bound(p, pMin);
|
||||||
|
|
||||||
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
|
// to obey overall mass continuity
|
||||||
|
if (closedVolume)
|
||||||
|
{
|
||||||
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
|
/fvc::domainIntegrate(psi);
|
||||||
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!transonic)
|
||||||
|
{
|
||||||
|
rho.relax();
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / 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
|
||||||
|
rhoSimplecFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Steady-state SIMPLEC solver for laminar or turbulent RANS flow of
|
||||||
|
compressible fluids.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "basicPsiThermo.H"
|
||||||
|
#include "RASModel.H"
|
||||||
|
#include "mixedFvPatchFields.H"
|
||||||
|
#include "bound.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
for (runTime++; !runTime.end(); runTime++)
|
||||||
|
{
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
#include "readSIMPLEControls.H"
|
||||||
|
#include "initConvergenceCheck.H"
|
||||||
|
|
||||||
|
p.storePrevIter();
|
||||||
|
|
||||||
|
if (!transonic)
|
||||||
|
{
|
||||||
|
rho.storePrevIter();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Velocity-pressure-enthalpy SIMPLEC corrector
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
#include "pEqn.H"
|
||||||
|
#include "hEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
|
||||||
|
#include "convergenceCheck.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -50,14 +50,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label nAveragingSteps = 0;
|
label nAveragingSteps = 0;
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
|
|
||||||
nAveragingSteps++;
|
nAveragingSteps++;
|
||||||
|
|
||||||
Info << "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
molecules.evolve();
|
molecules.evolve();
|
||||||
|
|
||||||
@ -74,12 +74,12 @@ int main(int argc, char *argv[])
|
|||||||
nAveragingSteps = 0;
|
nAveragingSteps = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,14 +48,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label nAveragingSteps = 0;
|
label nAveragingSteps = 0;
|
||||||
|
|
||||||
Info << "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.loop())
|
while (runTime.loop())
|
||||||
{
|
{
|
||||||
|
|
||||||
nAveragingSteps++;
|
nAveragingSteps++;
|
||||||
|
|
||||||
Info << "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|
||||||
molecules.evolve();
|
molecules.evolve();
|
||||||
|
|
||||||
@ -70,12 +70,12 @@ int main(int argc, char *argv[])
|
|||||||
nAveragingSteps = 0;
|
nAveragingSteps = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
||||||
);
|
);
|
||||||
|
|
||||||
if(gradPFile.good())
|
if (gradPFile.good())
|
||||||
{
|
{
|
||||||
gradPFile >> gradP;
|
gradPFile >> gradP;
|
||||||
Info<< "Reading average pressure gradient" <<endl
|
Info<< "Reading average pressure gradient" <<endl
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
||||||
);
|
);
|
||||||
|
|
||||||
if(gradPFile.good())
|
if (gradPFile.good())
|
||||||
{
|
{
|
||||||
gradPFile << gradP << endl;
|
gradPFile << gradP << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
for (label i=0; i<p.boundaryField().size(); i++)
|
for (label i=0; i<p.boundaryField().size(); i++)
|
||||||
{
|
{
|
||||||
if(p.boundaryField()[i].fixesValue())
|
if (p.boundaryField()[i].fixesValue())
|
||||||
{
|
{
|
||||||
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@
|
|||||||
pcorrTypes
|
pcorrTypes
|
||||||
);
|
);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Info << "Reading field p\n" << endl;
|
Info<< "Reading field p\n" << endl;
|
||||||
volScalarField p
|
volScalarField p
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -12,7 +12,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Info << "Reading field p\n" << endl;
|
Info<< "Reading field p\n" << endl;
|
||||||
volScalarField p
|
volScalarField p
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -12,7 +12,7 @@
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
Info << "Solving chemistry" << endl;
|
Info<< "Solving chemistry" << endl;
|
||||||
|
|
||||||
chemistry.solve
|
chemistry.solve
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
if(turbulence)
|
if (turbulence)
|
||||||
{
|
{
|
||||||
if (mesh.changing())
|
if (mesh.changing())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
adjustPhi(phi, U, pcorr);
|
adjustPhi(phi, U, pcorr);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
)*rUAf;
|
)*rUAf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqnIncomp
|
fvScalarMatrix pEqnIncomp
|
||||||
(
|
(
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
adjustPhi(phi, U, pcorr);
|
adjustPhi(phi, U, pcorr);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
)*rAUf;
|
)*rAUf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
adjustPhi(phi, U, pcorr);
|
adjustPhi(phi, U, pcorr);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
)*rUAf;
|
)*rUAf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
adjustPhi(phi, U, pcorr);
|
adjustPhi(phi, U, pcorr);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pcorrEqn
|
fvScalarMatrix pcorrEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
const volScalarField& vDotcP = vDotP[0]();
|
const volScalarField& vDotcP = vDotP[0]();
|
||||||
const volScalarField& vDotvP = vDotP[1]();
|
const volScalarField& vDotvP = vDotP[1]();
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::rho() const
|
|||||||
|
|
||||||
tmp<volScalarField> trho = iter()*iter().rho();
|
tmp<volScalarField> trho = iter()*iter().rho();
|
||||||
|
|
||||||
for(++iter; iter != phases_.end(); ++iter)
|
for (++iter; iter != phases_.end(); ++iter)
|
||||||
{
|
{
|
||||||
trho() += iter()*iter().rho();
|
trho() += iter()*iter().rho();
|
||||||
}
|
}
|
||||||
@ -140,7 +140,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::mu() const
|
|||||||
|
|
||||||
tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
|
tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
|
||||||
|
|
||||||
for(++iter; iter != phases_.end(); ++iter)
|
for (++iter; iter != phases_.end(); ++iter)
|
||||||
{
|
{
|
||||||
tmu() += iter()*iter().rho()*iter().nu();
|
tmu() += iter()*iter().rho()*iter().nu();
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::muf() const
|
|||||||
tmp<surfaceScalarField> tmuf =
|
tmp<surfaceScalarField> tmuf =
|
||||||
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
||||||
|
|
||||||
for(++iter; iter != phases_.end(); ++iter)
|
for (++iter; iter != phases_.end(); ++iter)
|
||||||
{
|
{
|
||||||
tmuf() +=
|
tmuf() +=
|
||||||
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
||||||
@ -210,7 +210,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
|
|||||||
PtrDictionary<phase>::const_iterator iter2 = iter1;
|
PtrDictionary<phase>::const_iterator iter2 = iter1;
|
||||||
++iter2;
|
++iter2;
|
||||||
|
|
||||||
for(; iter2 != phases_.end(); ++iter2)
|
for (; iter2 != phases_.end(); ++iter2)
|
||||||
{
|
{
|
||||||
const phase& alpha2 = iter2();
|
const phase& alpha2 = iter2();
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ void Foam::multiphaseMixture::solveAlphas
|
|||||||
if (cycleAlpha)
|
if (cycleAlpha)
|
||||||
{
|
{
|
||||||
PtrDictionary<phase>::iterator refPhaseIter = phases_.begin();
|
PtrDictionary<phase>::iterator refPhaseIter = phases_.begin();
|
||||||
for(label i=0; i<nSolves%phases_.size(); i++)
|
for (label i=0; i<nSolves%phases_.size(); i++)
|
||||||
{
|
{
|
||||||
++refPhaseIter;
|
++refPhaseIter;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||||
)*rUAf;
|
)*rUAf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -17,7 +17,7 @@ phi =
|
|||||||
surfaceScalarField phiU("phiU", phi);
|
surfaceScalarField phiU("phiU", phi);
|
||||||
phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -190,7 +190,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "dragPhase is " << dragPhase << endl;
|
Info<< "dragPhase is " << dragPhase << endl;
|
||||||
kineticTheoryModel kineticTheory
|
kineticTheoryModel kineticTheory
|
||||||
(
|
(
|
||||||
phasea,
|
phasea,
|
||||||
|
|||||||
@ -78,12 +78,12 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
|||||||
|
|
||||||
forAll(Re, celli)
|
forAll(Re, celli)
|
||||||
{
|
{
|
||||||
if(Re[celli] > 1000.0)
|
if (Re[celli] > 1000.0)
|
||||||
{
|
{
|
||||||
Cds[celli] = 0.44;
|
Cds[celli] = 0.44;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wen and Yu (1966)
|
// Wen and Yu (1966)
|
||||||
tmp<volScalarField> tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d();
|
tmp<volScalarField> tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d();
|
||||||
volScalarField& KWenYu = tKWenYu();
|
volScalarField& KWenYu = tKWenYu();
|
||||||
|
|||||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
|
|||||||
|
|
||||||
forAll(Re, celli)
|
forAll(Re, celli)
|
||||||
{
|
{
|
||||||
if(Re[celli] > 1000.0)
|
if (Re[celli] > 1000.0)
|
||||||
{
|
{
|
||||||
Cds[celli] = 0.44;
|
Cds[celli] = 0.44;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchillerNaumann::K
|
|||||||
|
|
||||||
forAll(Re, celli)
|
forAll(Re, celli)
|
||||||
{
|
{
|
||||||
if(Re[celli] > 1000.0)
|
if (Re[celli] > 1000.0)
|
||||||
{
|
{
|
||||||
Cds[celli] = 0.44;
|
Cds[celli] = 0.44;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::WenYu::K
|
|||||||
|
|
||||||
forAll(Re, celli)
|
forAll(Re, celli)
|
||||||
{
|
{
|
||||||
if(Re[celli] > 1000.0)
|
if (Re[celli] > 1000.0)
|
||||||
{
|
{
|
||||||
Cds[celli] = 0.44;
|
Cds[celli] = 0.44;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
interfaceDict.lookup("dragModel" + phasea.name())
|
interfaceDict.lookup("dragModel" + phasea.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Selecting dragModel for phase "
|
Info<< "Selecting dragModel for phase "
|
||||||
<< phasea.name()
|
<< phasea.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< dragModelType << endl;
|
<< dragModelType << endl;
|
||||||
@ -57,7 +57,7 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
<< dragModelType
|
<< dragModelType
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< ", constructor not in hash table" << endl << endl
|
||||||
<< " Valid dragModel types are : " << endl;
|
<< " Valid dragModel types are : " << endl;
|
||||||
Info << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstrIter()(interfaceDict, alpha, phasea, phaseb);
|
return cstrIter()(interfaceDict, alpha, phasea, phaseb);
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||||
|
|
||||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public:
|
|||||||
|
|
||||||
~Scalar()
|
~Scalar()
|
||||||
{
|
{
|
||||||
Info <<"delete Scalar: " << data_ << endl;
|
Info<<"delete Scalar: " << data_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend Ostream& operator<<(Ostream& os, const Scalar& val)
|
friend Ostream& operator<<(Ostream& os, const Scalar& val)
|
||||||
@ -169,7 +169,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< " = " << iter() << endl;
|
Info<< " = " << iter() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PtrDictionary<Scalar> scalarDict2;
|
PtrDictionary<Scalar> scalarDict2;
|
||||||
for (int i = 8; i<15; i++)
|
for (int i = 8; i<15; i++)
|
||||||
{
|
{
|
||||||
@ -186,22 +186,22 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "elem = " << *iter << endl;
|
Info<< "elem = " << *iter << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarDict.transfer(scalarDict2);
|
scalarDict.transfer(scalarDict2);
|
||||||
|
|
||||||
|
|
||||||
Scalar* p = scalarDict.lookupPtr("ent8");
|
Scalar* p = scalarDict.lookupPtr("ent8");
|
||||||
|
|
||||||
// This does not (yet) work
|
// This does not (yet) work
|
||||||
// Scalar* q = scalarDict.remove("ent10");
|
// Scalar* q = scalarDict.remove("ent10");
|
||||||
|
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
Info << "found: " << *p << endl;
|
Info<< "found: " << *p << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info << "no p: " << endl;
|
Info<< "no p: " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarDict.clear();
|
scalarDict.clear();
|
||||||
|
|||||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "list: " << idl() << nl
|
<< "list: " << idl() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< psi << endl;
|
Info<< psi << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< psi << endl;
|
Info<< psi << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,15 +53,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (bananaIter == banana.end())
|
if (bananaIter == banana.end())
|
||||||
{
|
{
|
||||||
Info << "not found" << endl;
|
Info<< "not found" << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info << "5 is " << bananaIter() << endl;
|
Info<< "5 is " << bananaIter() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same with STL
|
// Same with STL
|
||||||
Info << "Same with STL" << endl;
|
Info<< "Same with STL" << endl;
|
||||||
|
|
||||||
std::map<label, bool> STLbanana;
|
std::map<label, bool> STLbanana;
|
||||||
STLbanana[5] = true;
|
STLbanana[5] = true;
|
||||||
@ -69,11 +69,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (STLbananaIter == STLbanana.end())
|
if (STLbananaIter == STLbanana.end())
|
||||||
{
|
{
|
||||||
Info << "not found" << endl;
|
Info<< "not found" << endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info << "5 is " << STLbananaIter->second << endl;
|
Info<< "5 is " << STLbananaIter->second << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
hmm4 = hmm5;
|
hmm4 = hmm5;
|
||||||
Info<< hmm5 << endl;
|
Info<< hmm5 << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
namedEnumTest::options hmm(namedEnumTest::namedEnum.read(Sin));
|
namedEnumTest::options hmm(namedEnumTest::namedEnum.read(Sin));
|
||||||
Info<< namedEnumTest::namedEnum[hmm] << endl;
|
Info<< namedEnumTest::namedEnum[hmm] << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,7 +167,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< nl << "Analytical: y(2.0) = " << yEnd << endl;
|
Info<< nl << "Analytical: y(2.0) = " << yEnd << endl;
|
||||||
Info << "Numerical: y(2.0) = " << y << ", hEst = " << hEst << endl;
|
Info << "Numerical: y(2.0) = " << y << ", hEst = " << hEst << endl;
|
||||||
|
|
||||||
Info << "\nEnd\n" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
rmDir("hmm");
|
rmDir("hmm");
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
|||||||
sum = 0;
|
sum = 0;
|
||||||
for (label iter = 0; iter < nIters; ++iter)
|
for (label iter = 0; iter < nIters; ++iter)
|
||||||
{
|
{
|
||||||
for(unsigned int i = 0; i < stlVector.size(); i++)
|
for (unsigned int i = 0; i < stlVector.size(); i++)
|
||||||
{
|
{
|
||||||
sum += stlVector[i];
|
sum += stlVector[i];
|
||||||
}
|
}
|
||||||
@ -386,7 +386,7 @@ int main(int argc, char *argv[])
|
|||||||
<< " s" << endl;
|
<< " s" << endl;
|
||||||
|
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
~Scalar()
|
~Scalar()
|
||||||
{
|
{
|
||||||
Info <<"delete Scalar: " << data_ << endl;
|
Info<<"delete Scalar: " << data_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
autoPtr<Scalar> clone() const;
|
autoPtr<Scalar> clone() const;
|
||||||
|
|||||||
@ -44,7 +44,7 @@ int main()
|
|||||||
|
|
||||||
Info<< t2 << " " << t2.first() << " " << t2.second() << endl;
|
Info<< t2 << " " << t2.first() << " " << t2.second() << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
dynList.append(UIndirectList<double>(completeList, addresses));
|
dynList.append(UIndirectList<double>(completeList, addresses));
|
||||||
Info<< "DynamicList::append(UIndirectList): " << dynList << endl;
|
Info<< "DynamicList::append(UIndirectList): " << dynList << endl;
|
||||||
|
|
||||||
Info << "\nEnd\n" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
cbr.testCallbackFunction();
|
cbr.testCallbackFunction();
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< ds*dt << " " << dt*ds << endl;
|
Info<< ds*dt << " " << dt*ds << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -188,11 +188,11 @@ int main(int argc, char *argv[])
|
|||||||
// (
|
// (
|
||||||
// mesh
|
// mesh
|
||||||
// );
|
// );
|
||||||
//
|
//
|
||||||
// Info<< "cellFaceCell:" << endl;
|
// Info<< "cellFaceCell:" << endl;
|
||||||
// writeStencilStats(addressing.stencil());
|
// writeStencilStats(addressing.stencil());
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// //// Do some interpolation.
|
// //// Do some interpolation.
|
||||||
// //{
|
// //{
|
||||||
// // const labelListList& stencil = addressing.stencil();
|
// // const labelListList& stencil = addressing.stencil();
|
||||||
@ -226,7 +226,7 @@ int main(int argc, char *argv[])
|
|||||||
// mesh.C(),
|
// mesh.C(),
|
||||||
// stencilPoints
|
// stencilPoints
|
||||||
// );
|
// );
|
||||||
//
|
//
|
||||||
// forAll(stencilPoints, faceI)
|
// forAll(stencilPoints, faceI)
|
||||||
// {
|
// {
|
||||||
// if (stencilPoints[faceI].size() >= 15)
|
// if (stencilPoints[faceI].size() >= 15)
|
||||||
@ -443,10 +443,10 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "cellFaceCell:" << endl;
|
Info<< "cellFaceCell:" << endl;
|
||||||
writeStencilStats(addressing.stencil());
|
writeStencilStats(addressing.stencil());
|
||||||
|
|
||||||
// Collect stencil face centres
|
// Collect stencil face centres
|
||||||
List<List<point> > stencilPoints(mesh.nCells());
|
List<List<point> > stencilPoints(mesh.nCells());
|
||||||
addressing.collectData
|
addressing.collectData
|
||||||
@ -454,7 +454,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.Cf(),
|
mesh.Cf(),
|
||||||
stencilPoints
|
stencilPoints
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll(stencilPoints, cellI)
|
forAll(stencilPoints, cellI)
|
||||||
{
|
{
|
||||||
writeStencilOBJ
|
writeStencilOBJ
|
||||||
@ -477,7 +477,7 @@ int main(int argc, char *argv[])
|
|||||||
// vf,
|
// vf,
|
||||||
// stencilData
|
// stencilData
|
||||||
// );
|
// );
|
||||||
// for(label faci = 0; faci < mesh.nInternalFaces(); faci++)
|
// for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
|
||||||
// {
|
// {
|
||||||
// const scalarList& stData = stencilData[faceI];
|
// const scalarList& stData = stencilData[faceI];
|
||||||
// const scalarList& stWeight = fit[faceI];
|
// const scalarList& stWeight = fit[faceI];
|
||||||
|
|||||||
@ -108,8 +108,7 @@ int main()
|
|||||||
Info<< " badName(die) => " << findEtcFile("badName", true) << nl
|
Info<< " badName(die) => " << findEtcFile("badName", true) << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Info<< "\nEnd" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -95,8 +95,7 @@ int main(int argc, char *argv[])
|
|||||||
printCleaning(pathName);
|
printCleaning(pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "\nEnd" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ int main()
|
|||||||
Info<< fuel.rho(1e5, 300) << endl;
|
Info<< fuel.rho(1e5, 300) << endl;
|
||||||
Info<< fuel << endl;
|
Info<< fuel << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< Cf << endl;
|
Info<< Cf << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ int main()
|
|||||||
{
|
{
|
||||||
Info<< pTraits<scalar>::typeName << endl;
|
Info<< pTraits<scalar>::typeName << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -137,7 +137,7 @@ void writeFaceEdges
|
|||||||
const labelList& myEdges = faceEdges[faceI];
|
const labelList& myEdges = faceEdges[faceI];
|
||||||
|
|
||||||
forAll(myEdges, i)
|
forAll(myEdges, i)
|
||||||
{
|
{
|
||||||
const edge& e = edges[myEdges[i]];
|
const edge& e = edges[myEdges[i]];
|
||||||
|
|
||||||
feStream<< "l " << e.start()+1 << ' ' << e.end()+1 << endl;
|
feStream<< "l " << e.start()+1 << ' ' << e.end()+1 << endl;
|
||||||
@ -172,7 +172,7 @@ void writeEdgeFaces
|
|||||||
const labelList& myFaces = edgeFaces[edgeI];
|
const labelList& myFaces = edgeFaces[edgeI];
|
||||||
|
|
||||||
forAll(myFaces, i)
|
forAll(myFaces, i)
|
||||||
{
|
{
|
||||||
efStream<< "l " << myFaces[0]+1 << ' ' << myFaces[i]+1 << endl;
|
efStream<< "l " << myFaces[0]+1 << ' ' << myFaces[i]+1 << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
writeFaceFaces(localPoints, localFaces, faceFaces);
|
writeFaceFaces(localPoints, localFaces, faceFaces);
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< testReactions << endl;
|
Info<< testReactions << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
|||||||
{
|
{
|
||||||
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
||||||
|
|
||||||
const processorPolyPatch& procPatch =
|
const processorPolyPatch& procPatch =
|
||||||
refCast<const processorPolyPatch>(patch);
|
refCast<const processorPolyPatch>(patch);
|
||||||
|
|
||||||
label procId = procPatch.neighbProcNo() - Pstream::firstSlave() + 1;
|
label procId = procPatch.neighbProcNo() - Pstream::firstSlave() + 1;
|
||||||
@ -96,7 +96,7 @@ point meshCentre(const polyMesh& mesh)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createMesh.H"
|
# include "createMesh.H"
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ int main(int argc, char *argv[])
|
|||||||
// Dump route as lines.
|
// Dump route as lines.
|
||||||
labelList route(cellRouter.getRoute(-(pathI + 1)));
|
labelList route(cellRouter.getRoute(-(pathI + 1)));
|
||||||
|
|
||||||
for(label elemI = 1; elemI < route.size(); elemI++)
|
for (label elemI = 1; elemI < route.size(); elemI++)
|
||||||
{
|
{
|
||||||
objFile
|
objFile
|
||||||
<< "l " << route[elemI-1]+1 << ' '
|
<< "l " << route[elemI-1]+1 << ' '
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Foam::label Foam::router::count(const label weight) const
|
|||||||
{
|
{
|
||||||
cnt += weights_[nodeI];
|
cnt += weights_[nodeI];
|
||||||
}
|
}
|
||||||
|
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
|||||||
setWeights(0, path[0]);
|
setWeights(0, path[0]);
|
||||||
|
|
||||||
// Check if all endPoints can be reached
|
// Check if all endPoints can be reached
|
||||||
for(label leafI = 1; leafI < path.size(); leafI++)
|
for (label leafI = 1; leafI < path.size(); leafI++)
|
||||||
{
|
{
|
||||||
if (weights_[path[leafI]] == labelMax)
|
if (weights_[path[leafI]] == labelMax)
|
||||||
{
|
{
|
||||||
@ -329,7 +329,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search back from all endpoints to start and fix weights
|
// Search back from all endpoints to start and fix weights
|
||||||
for(label leafI = 1; leafI < path.size(); leafI++)
|
for (label leafI = 1; leafI < path.size(); leafI++)
|
||||||
{
|
{
|
||||||
fixWeights
|
fixWeights
|
||||||
(
|
(
|
||||||
@ -370,7 +370,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
|||||||
{
|
{
|
||||||
weights_[nodeI] = 0;
|
weights_[nodeI] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< hmm.LUsolve() << endl;
|
Info<< hmm.LUsolve() << endl;
|
||||||
Info<< hmm << endl;
|
Info<< hmm << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -102,8 +102,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Ostream<< >" << s2 << "<\n";
|
Info<< "Ostream<< >" << s2 << "<\n";
|
||||||
Info<< "hash:" << hex << string::hash()(s2) << endl;
|
Info<< "hash:" << hex << string::hash()(s2) << endl;
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Get name of patch
|
// Get name of patch
|
||||||
word patchName(args.additionalArgs()[0]);
|
word patchName(args.additionalArgs()[0]);
|
||||||
|
|
||||||
// Find the label in patches by name.
|
// Find the label in patches by name.
|
||||||
label patchI = patches.findPatchID(patchName);
|
label patchI = patches.findPatchID(patchName);
|
||||||
|
|
||||||
@ -131,8 +131,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
psf.write();
|
psf.write();
|
||||||
|
|
||||||
Info << nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -98,10 +98,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (THeader.headerOk() && Uheader.headerOk())
|
if (THeader.headerOk() && Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info << "Reading T" << endl;
|
Info<< "Reading T" << endl;
|
||||||
volScalarField T(THeader, mesh);
|
volScalarField T(THeader, mesh);
|
||||||
|
|
||||||
Info << "Reading U" << endl;
|
Info<< "Reading U" << endl;
|
||||||
volVectorField U(Uheader, mesh);
|
volVectorField U(Uheader, mesh);
|
||||||
|
|
||||||
# include "createPhi.H"
|
# include "createPhi.H"
|
||||||
|
|||||||
@ -93,10 +93,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (pHeader.headerOk() && Uheader.headerOk())
|
if (pHeader.headerOk() && Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info << "Reading p" << endl;
|
Info<< "Reading p" << endl;
|
||||||
volScalarField p(pHeader, mesh);
|
volScalarField p(pHeader, mesh);
|
||||||
|
|
||||||
Info << "Reading U" << endl;
|
Info<< "Reading U" << endl;
|
||||||
volVectorField U(Uheader, mesh);
|
volVectorField U(Uheader, mesh);
|
||||||
|
|
||||||
# include "createPhi.H"
|
# include "createPhi.H"
|
||||||
|
|||||||
@ -94,10 +94,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (pHeader.headerOk() && Uheader.headerOk())
|
if (pHeader.headerOk() && Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info << "Reading p" << endl;
|
Info<< "Reading p" << endl;
|
||||||
volScalarField p(pHeader, mesh);
|
volScalarField p(pHeader, mesh);
|
||||||
|
|
||||||
Info << "Reading U" << endl;
|
Info<< "Reading U" << endl;
|
||||||
volVectorField U(Uheader, mesh);
|
volVectorField U(Uheader, mesh);
|
||||||
|
|
||||||
# include "createPhi.H"
|
# include "createPhi.H"
|
||||||
|
|||||||
@ -99,10 +99,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (THeader.headerOk() && Uheader.headerOk())
|
if (THeader.headerOk() && Uheader.headerOk())
|
||||||
{
|
{
|
||||||
Info << "Reading T" << endl;
|
Info<< "Reading T" << endl;
|
||||||
volScalarField T(THeader, mesh);
|
volScalarField T(THeader, mesh);
|
||||||
|
|
||||||
Info << "Reading U" << endl;
|
Info<< "Reading U" << endl;
|
||||||
volVectorField U(Uheader, mesh);
|
volVectorField U(Uheader, mesh);
|
||||||
|
|
||||||
# include "createPhi.H"
|
# include "createPhi.H"
|
||||||
|
|||||||
@ -1015,7 +1015,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -596,7 +596,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.write();
|
mesh.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -510,7 +510,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Mesh unchanged." << endl;
|
Info<< "Mesh unchanged." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,215 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::Tuple
|
|
||||||
|
|
||||||
Description
|
|
||||||
A 2 Tuple. Differs from Tuple in that the two elements can be different
|
|
||||||
type.
|
|
||||||
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef Tuple_H
|
|
||||||
#define Tuple_H
|
|
||||||
|
|
||||||
#include "Istream.H"
|
|
||||||
#include "Ostream.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
class Tuple;
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
Istream& operator>>(Istream&, Tuple<Type1, Type2>&);
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
Ostream& operator<<(Ostream&, const Tuple<Type1, Type2>&);
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class Tuple Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
class Tuple
|
|
||||||
{
|
|
||||||
// Private data
|
|
||||||
|
|
||||||
Type1 first_;
|
|
||||||
Type2 second_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Null constructor for lists
|
|
||||||
inline Tuple()
|
|
||||||
{}
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
inline Tuple(const Type1& first, const Type2& second)
|
|
||||||
:
|
|
||||||
first_(first),
|
|
||||||
second_(second)
|
|
||||||
{}
|
|
||||||
|
|
||||||
//- Construct from Istream
|
|
||||||
inline Tuple(Istream& is)
|
|
||||||
{
|
|
||||||
// Read beginning of pair
|
|
||||||
is.readBegin("pair");
|
|
||||||
|
|
||||||
is >> first_ >> second_;
|
|
||||||
|
|
||||||
// Read end of pair
|
|
||||||
is.readEnd("pair");
|
|
||||||
|
|
||||||
// Check state of Istream
|
|
||||||
is.check("Tuple::Tuple(Istream&)");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Return first
|
|
||||||
inline Type1 first() const
|
|
||||||
{
|
|
||||||
return first_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return first
|
|
||||||
inline Type1& first()
|
|
||||||
{
|
|
||||||
return first_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return second
|
|
||||||
inline Type2 second() const
|
|
||||||
{
|
|
||||||
return second_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return second
|
|
||||||
inline Type2& second()
|
|
||||||
{
|
|
||||||
return second_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return reverse pair
|
|
||||||
inline Tuple<Type1, Type2> reverseTuple() const
|
|
||||||
{
|
|
||||||
return Tuple<Type1, Type2>(second_, first_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Friend Operators
|
|
||||||
|
|
||||||
inline friend bool operator==
|
|
||||||
(
|
|
||||||
const Tuple<Type1, Type2>& a,
|
|
||||||
const Tuple<Type1, Type2>& b
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return
|
|
||||||
(
|
|
||||||
(a.first_ == b.first_) && (a.second_ == b.second_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline friend bool operator!=
|
|
||||||
(
|
|
||||||
const Tuple<Type1, Type2>& a,
|
|
||||||
const Tuple<Type1, Type2>& b
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return (!(a == b));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
|
||||||
|
|
||||||
friend Istream& operator>> <Type1, Type2>
|
|
||||||
(
|
|
||||||
Istream& is,
|
|
||||||
Tuple<Type1, Type2>& p
|
|
||||||
);
|
|
||||||
friend Ostream& operator<< <Type1, Type2>
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const Tuple<Type1, Type2>& p
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
Istream& operator>>(Istream& is, Tuple<Type1, Type2>& p)
|
|
||||||
{
|
|
||||||
// Read beginning of Tuple<Type, Type>
|
|
||||||
is.readBegin("Tuple<Type, Type>");
|
|
||||||
|
|
||||||
is >> p.first_ >> p.second_;
|
|
||||||
|
|
||||||
// Read end of Tuple<Type, Type>
|
|
||||||
is.readEnd("Tuple<Type, Type>");
|
|
||||||
|
|
||||||
// Check state of Ostream
|
|
||||||
is.check("Istream& operator>>(Istream&, Tuple<Type, Type>&)");
|
|
||||||
|
|
||||||
return is;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class Type1, class Type2>
|
|
||||||
Ostream& operator<<(Ostream& os, const Tuple<Type1, Type2>& p)
|
|
||||||
{
|
|
||||||
os << token::BEGIN_LIST
|
|
||||||
<< p.first_ << token::SPACE
|
|
||||||
<< p.second_
|
|
||||||
<< token::END_LIST;
|
|
||||||
|
|
||||||
// Check state of Ostream
|
|
||||||
os.check("Ostream& operator<<(Ostream&, const Tuple<Type, Type>&)");
|
|
||||||
|
|
||||||
return os;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -375,8 +375,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bool cellsToSplit = cellsToPyramidise.size();
|
bool cellsToSplit = cellsToPyramidise.size();
|
||||||
|
|
||||||
//List<Tuple<pointField,point> >
|
// List<Tuple2<pointField,point> >
|
||||||
// cellsToCreate(dict.lookup("cellsToCreate"));
|
// cellsToCreate(dict.lookup("cellsToCreate"));
|
||||||
|
|
||||||
Info<< "Read from " << dict.name() << nl
|
Info<< "Read from " << dict.name() << nl
|
||||||
<< " Boundary cutting module:" << nl
|
<< " Boundary cutting module:" << nl
|
||||||
@ -560,7 +560,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info << "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
}
|
}
|
||||||
else if (edgeToPos.size())
|
else if (edgeToPos.size())
|
||||||
@ -613,7 +613,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info << "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -656,13 +656,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info << "Writing modified mesh to time " << runTime.timeName() << endl;
|
Info<< "Writing modified mesh to time " << runTime.timeName() << endl;
|
||||||
mesh.write();
|
mesh.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Info << nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -234,11 +234,11 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write resulting mesh
|
// Write resulting mesh
|
||||||
Info << "Writing refined morphMesh to time " << runTime.timeName() << endl;
|
Info<< "Writing refined morphMesh to time " << runTime.timeName() << endl;
|
||||||
|
|
||||||
mesh.write();
|
mesh.write();
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,41 +126,41 @@ int main(int argc, char *argv[])
|
|||||||
// Create bin0. Have upperlimit as factor times lowerlimit.
|
// Create bin0. Have upperlimit as factor times lowerlimit.
|
||||||
bins.append(DynamicList<label>());
|
bins.append(DynamicList<label>());
|
||||||
lowerLimits.append(sortedVols[0]);
|
lowerLimits.append(sortedVols[0]);
|
||||||
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
upperLimits.append(1.1 * lowerLimits.last());
|
||||||
|
|
||||||
forAll(sortedVols, i)
|
forAll(sortedVols, i)
|
||||||
{
|
{
|
||||||
if (sortedVols[i] > upperLimits[upperLimits.size()-1])
|
if (sortedVols[i] > upperLimits.last())
|
||||||
{
|
{
|
||||||
// New value outside of current bin
|
// New value outside of current bin
|
||||||
|
|
||||||
// Shrink old bin.
|
// Shrink old bin.
|
||||||
DynamicList<label>& bin = bins[bins.size()-1];
|
DynamicList<label>& bin = bins.last();
|
||||||
|
|
||||||
bin.shrink();
|
bin.shrink();
|
||||||
|
|
||||||
Info<< "Collected " << bin.size() << " elements in bin "
|
Info<< "Collected " << bin.size() << " elements in bin "
|
||||||
<< lowerLimits[lowerLimits.size()-1] << " .. "
|
<< lowerLimits.last() << " .. "
|
||||||
<< upperLimits[upperLimits.size()-1] << endl;
|
<< upperLimits.last() << endl;
|
||||||
|
|
||||||
// Create new bin.
|
// Create new bin.
|
||||||
bins.append(DynamicList<label>());
|
bins.append(DynamicList<label>());
|
||||||
lowerLimits.append(sortedVols[i]);
|
lowerLimits.append(sortedVols[i]);
|
||||||
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
upperLimits.append(1.1 * lowerLimits.last());
|
||||||
|
|
||||||
Info<< "Creating new bin " << lowerLimits[lowerLimits.size()-1]
|
Info<< "Creating new bin " << lowerLimits.last()
|
||||||
<< " .. " << upperLimits[upperLimits.size()-1]
|
<< " .. " << upperLimits.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append to current bin.
|
// Append to current bin.
|
||||||
DynamicList<label>& bin = bins[bins.size()-1];
|
DynamicList<label>& bin = bins.last();
|
||||||
|
|
||||||
bin.append(sortedVols.indices()[i]);
|
bin.append(sortedVols.indices()[i]);
|
||||||
}
|
}
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
|
|
||||||
bins[bins.size()-1].shrink();
|
bins.last().shrink();
|
||||||
bins.shrink();
|
bins.shrink();
|
||||||
lowerLimits.shrink();
|
lowerLimits.shrink();
|
||||||
upperLimits.shrink();
|
upperLimits.shrink();
|
||||||
@ -355,8 +355,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -469,7 +469,7 @@ int main(int argc, char *argv[])
|
|||||||
MESH, // meshType
|
MESH, // meshType
|
||||||
NONMESH, // fill type
|
NONMESH, // fill type
|
||||||
mesh.nCells()
|
mesh.nCells()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Info<< "Removing points connecting cells unconnected by faces ..."
|
Info<< "Removing points connecting cells unconnected by faces ..."
|
||||||
@ -510,7 +510,7 @@ int main(int argc, char *argv[])
|
|||||||
writeSet(selectedCells, "cells selected for meshing");
|
writeSet(selectedCells, "cells selected for meshing");
|
||||||
|
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -701,7 +701,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.write();
|
mesh.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -264,10 +264,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&ansysStream);
|
yyFlexLexer lexer(&ansysStream);
|
||||||
while(lexer.yylex() != 0)
|
while (lexer.yylex() != 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Info << "Creating points" << endl;
|
Info<< "Creating points" << endl;
|
||||||
|
|
||||||
pointField points(slPoints.size());
|
pointField points(slPoints.size());
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ int main(int argc, char *argv[])
|
|||||||
pointMap[pointMapIter()] = i++;
|
pointMap[pointMapIter()] = i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Creating cells" << endl;
|
Info<< "Creating cells" << endl;
|
||||||
|
|
||||||
labelList cellMap(maxCelli+1);
|
labelList cellMap(maxCelli+1);
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ int main(int argc, char *argv[])
|
|||||||
{ 4, 2, 1, 3, 0, 5}, // hex
|
{ 4, 2, 1, 3, 0, 5}, // hex
|
||||||
};
|
};
|
||||||
|
|
||||||
Info << "Creating boundary patches" << endl;
|
Info<< "Creating boundary patches" << endl;
|
||||||
|
|
||||||
faceListList boundary(slPatchCells.size());
|
faceListList boundary(slPatchCells.size());
|
||||||
wordList patchNames(slPatchCells.size());
|
wordList patchNames(slPatchCells.size());
|
||||||
@ -442,11 +442,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
boundary[patchI] = patchFaces;
|
boundary[patchI] = patchFaces;
|
||||||
patchNames[patchI] = word("patch") + name(patchI + 1);
|
patchNames[patchI] = word("patch") + name(patchI + 1);
|
||||||
Info << "Patch " << patchI << " named " << patchNames[patchI]
|
Info<< "Patch " << patchI << " named " << patchNames[patchI]
|
||||||
<< ": " << boundary[patchI].size() << " faces" << endl;
|
<< ": " << boundary[patchI].size() << " faces" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "ansysToFoam: " << endl
|
Info<< "ansysToFoam: " << endl
|
||||||
<< "Ansys file format does not provide information about the type of "
|
<< "Ansys file format does not provide information about the type of "
|
||||||
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
|
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
|
||||||
<< "All the patches have been created "
|
<< "All the patches have been created "
|
||||||
@ -491,7 +491,7 @@ int main(int argc, char *argv[])
|
|||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
|
||||||
Info << "Writing polyMesh" << endl;
|
Info<< "Writing polyMesh" << endl;
|
||||||
pShapeMesh.write();
|
pShapeMesh.write();
|
||||||
|
|
||||||
Info<< nl << "end" << endl;
|
Info<< nl << "end" << endl;
|
||||||
|
|||||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
cfxFile >> nblock >> npatch >> nglue >> nelem >> npoint;
|
cfxFile >> nblock >> npatch >> nglue >> nelem >> npoint;
|
||||||
|
|
||||||
Info << "Reading blocks" << endl;
|
Info<< "Reading blocks" << endl;
|
||||||
|
|
||||||
PtrList<hexBlock> blocks(nblock);
|
PtrList<hexBlock> blocks(nblock);
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Reading patch definitions" << endl;
|
Info<< "Reading patch definitions" << endl;
|
||||||
|
|
||||||
wordList cfxPatchTypes(npatch);
|
wordList cfxPatchTypes(npatch);
|
||||||
wordList cfxPatchNames(npatch);
|
wordList cfxPatchNames(npatch);
|
||||||
@ -126,7 +126,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Reading block glueing information" << endl;
|
Info<< "Reading block glueing information" << endl;
|
||||||
|
|
||||||
labelList glueMasterPatches(nglue, -1);
|
labelList glueMasterPatches(nglue, -1);
|
||||||
labelList glueSlavePatches(nglue, -1);
|
labelList glueSlavePatches(nglue, -1);
|
||||||
@ -145,15 +145,15 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Reading block points" << endl;
|
Info<< "Reading block points" << endl;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll (blocks, blockI)
|
||||||
{
|
{
|
||||||
Info << "block " << blockI << " is a ";
|
Info<< "block " << blockI << " is a ";
|
||||||
blocks[blockI].readPoints(cfxFile);
|
blocks[blockI].readPoints(cfxFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Calculating block offsets" << endl;
|
Info<< "Calculating block offsets" << endl;
|
||||||
|
|
||||||
labelList blockOffsets(nblock, -1);
|
labelList blockOffsets(nblock, -1);
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
|
|||||||
+ blocks[blockI - 1].nBlockPoints();
|
+ blocks[blockI - 1].nBlockPoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Assembling patches" << endl;
|
Info<< "Assembling patches" << endl;
|
||||||
|
|
||||||
faceListList rawPatches(npatch);
|
faceListList rawPatches(npatch);
|
||||||
|
|
||||||
@ -203,13 +203,13 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Merging points ";
|
Info<< "Merging points ";
|
||||||
|
|
||||||
labelList pointMergeList(nMeshPoints, -1);
|
labelList pointMergeList(nMeshPoints, -1);
|
||||||
|
|
||||||
// In order to ensure robust merging, it is necessary to traverse
|
// In order to ensure robust merging, it is necessary to traverse
|
||||||
// the patch glueing list until the pointMergeList stops changing.
|
// the patch glueing list until the pointMergeList stops changing.
|
||||||
//
|
//
|
||||||
|
|
||||||
// For efficiency, create merge pairs in the first pass
|
// For efficiency, create merge pairs in the first pass
|
||||||
labelListListList glueMergePairs(glueMasterPatches.size());
|
labelListListList glueMergePairs(glueMasterPatches.size());
|
||||||
@ -396,7 +396,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
changedPointMerge = true;
|
changedPointMerge = true;
|
||||||
|
|
||||||
pointMergeList[PpointLabel]
|
pointMergeList[PpointLabel]
|
||||||
= pointMergeList[NpointLabel]
|
= pointMergeList[NpointLabel]
|
||||||
= min
|
= min
|
||||||
@ -408,10 +408,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Info << "." << flush;
|
Info<< "." << flush;
|
||||||
}
|
}
|
||||||
while (changedPointMerge && nPasses < 8);
|
while (changedPointMerge && nPasses < 8);
|
||||||
Info << endl;
|
Info<< endl;
|
||||||
|
|
||||||
if (changedPointMerge == true)
|
if (changedPointMerge == true)
|
||||||
{
|
{
|
||||||
@ -509,7 +509,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
nMeshPoints = nNewPoints;
|
nMeshPoints = nNewPoints;
|
||||||
|
|
||||||
Info << "Creating points" << endl;
|
Info<< "Creating points" << endl;
|
||||||
|
|
||||||
pointField points(nMeshPoints);
|
pointField points(nMeshPoints);
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ int main(int argc, char *argv[])
|
|||||||
points *= scaleFactor;
|
points *= scaleFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Creating cells" << endl;
|
Info<< "Creating cells" << endl;
|
||||||
|
|
||||||
cellShapeList cellShapes(nMeshCells);
|
cellShapeList cellShapes(nMeshCells);
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "Creating boundary patches" << endl;
|
Info<< "Creating boundary patches" << endl;
|
||||||
|
|
||||||
faceListList boundary(npatch);
|
faceListList boundary(npatch);
|
||||||
wordList patchNames(npatch);
|
wordList patchNames(npatch);
|
||||||
@ -600,7 +600,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (existingPatch >= 0)
|
if (existingPatch >= 0)
|
||||||
{
|
{
|
||||||
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 FOAM patch " << existingPatch
|
||||||
@ -652,7 +652,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 FOAM patch " << nCreatedPatches
|
||||||
@ -660,7 +660,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (cfxPatchTypes[patchI] == "WALL")
|
if (cfxPatchTypes[patchI] == "WALL")
|
||||||
{
|
{
|
||||||
Info << "wall." << endl;
|
Info<< "wall." << endl;
|
||||||
|
|
||||||
patchTypes[nCreatedPatches] = wallPolyPatch::typeName;
|
patchTypes[nCreatedPatches] = wallPolyPatch::typeName;
|
||||||
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
||||||
@ -668,7 +668,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (cfxPatchTypes[patchI] == "SYMMET")
|
else if (cfxPatchTypes[patchI] == "SYMMET")
|
||||||
{
|
{
|
||||||
Info << "symmetryPlane." << endl;
|
Info<< "symmetryPlane." << endl;
|
||||||
|
|
||||||
patchTypes[nCreatedPatches] = symmetryPolyPatch::typeName;
|
patchTypes[nCreatedPatches] = symmetryPolyPatch::typeName;
|
||||||
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
||||||
@ -683,7 +683,7 @@ int main(int argc, char *argv[])
|
|||||||
|| cfxPatchTypes[patchI] == "USER2D"
|
|| cfxPatchTypes[patchI] == "USER2D"
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info << "generic." << endl;
|
Info<< "generic." << endl;
|
||||||
|
|
||||||
patchTypes[nCreatedPatches] = polyPatch::typeName;
|
patchTypes[nCreatedPatches] = polyPatch::typeName;
|
||||||
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
|
||||||
@ -737,10 +737,10 @@ int main(int argc, char *argv[])
|
|||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
|
||||||
Info << "Writing polyMesh" << endl;
|
Info<< "Writing polyMesh" << endl;
|
||||||
pShapeMesh.write();
|
pShapeMesh.write();
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,12 +70,12 @@ void hexBlock::readPoints(Istream& is)
|
|||||||
|
|
||||||
if (((i ^ j) & k) > 0)
|
if (((i ^ j) & k) > 0)
|
||||||
{
|
{
|
||||||
Info << "right-handed block" << endl;
|
Info<< "right-handed block" << endl;
|
||||||
blockHandedness_ = right;
|
blockHandedness_ = right;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info << "left-handed block" << endl;
|
Info<< "left-handed block" << endl;
|
||||||
blockHandedness_ = left;
|
blockHandedness_ = left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -324,7 +324,7 @@ endOfSection {space}")"{space}
|
|||||||
// point group type skipped
|
// point group type skipped
|
||||||
strtol(endPtr, &endPtr, 16);
|
strtol(endPtr, &endPtr, 16);
|
||||||
|
|
||||||
pointi = pointGroupStartIndex[pointGroupStartIndex.size()-1];
|
pointi = pointGroupStartIndex.last();
|
||||||
|
|
||||||
// reset number of components to default
|
// reset number of components to default
|
||||||
pointGroupNumberOfComponents = 3;
|
pointGroupNumberOfComponents = 3;
|
||||||
@ -336,11 +336,11 @@ endOfSection {space}")"{space}
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "PointGroup: "
|
Info<< "PointGroup: "
|
||||||
<< pointGroupZoneID[pointGroupZoneID.size()-1]
|
<< pointGroupZoneID.last()
|
||||||
<< " start: "
|
<< " start: "
|
||||||
<< pointGroupStartIndex[pointGroupStartIndex.size()-1]
|
<< pointGroupStartIndex.last()
|
||||||
<< " end: "
|
<< " end: "
|
||||||
<< pointGroupEndIndex[pointGroupEndIndex.size()-1] << flush;
|
<< pointGroupEndIndex.last() << flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
<readNumberOfPoints,readPointGroupData>{endOfSection} {
|
<readNumberOfPoints,readPointGroupData>{endOfSection} {
|
||||||
@ -387,14 +387,14 @@ endOfSection {space}")"{space}
|
|||||||
Info<< "done." << endl;
|
Info<< "done." << endl;
|
||||||
|
|
||||||
// check read of points
|
// check read of points
|
||||||
if (pointi != pointGroupEndIndex[pointGroupEndIndex.size()-1]+1)
|
if (pointi != pointGroupEndIndex.last()+1)
|
||||||
{
|
{
|
||||||
Warning
|
Warning
|
||||||
<< "Problem with reading points: " << nl
|
<< "Problem with reading points: " << nl
|
||||||
<< " start index: "
|
<< " start index: "
|
||||||
<< pointGroupStartIndex[pointGroupStartIndex.size()-1]
|
<< pointGroupStartIndex.last()
|
||||||
<< " end index: "
|
<< " end index: "
|
||||||
<< pointGroupEndIndex[pointGroupEndIndex.size()-1]
|
<< pointGroupEndIndex.last()
|
||||||
<< " last points read: " << pointi << nl
|
<< " last points read: " << pointi << nl
|
||||||
<< " on line " << lineNo << endl;
|
<< " on line " << lineNo << endl;
|
||||||
}
|
}
|
||||||
@ -440,14 +440,14 @@ endOfSection {space}")"{space}
|
|||||||
|
|
||||||
faceGroupElementType = strtol(endPtr, &endPtr, 16);
|
faceGroupElementType = strtol(endPtr, &endPtr, 16);
|
||||||
|
|
||||||
facei = faceGroupStartIndex[faceGroupStartIndex.size()-1];
|
facei = faceGroupStartIndex.last();
|
||||||
|
|
||||||
Info<< "FaceGroup: "
|
Info<< "FaceGroup: "
|
||||||
<< faceGroupZoneID[faceGroupZoneID.size()-1]
|
<< faceGroupZoneID.last()
|
||||||
<< " start: "
|
<< " start: "
|
||||||
<< faceGroupStartIndex[faceGroupStartIndex.size()-1]
|
<< faceGroupStartIndex.last()
|
||||||
<< " end: "
|
<< " end: "
|
||||||
<< faceGroupEndIndex[faceGroupEndIndex.size()-1] << flush;
|
<< faceGroupEndIndex.last() << flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
<readNumberOfFaces,readFaceGroupData>{space}{endOfSection} {
|
<readNumberOfFaces,readFaceGroupData>{space}{endOfSection} {
|
||||||
@ -507,14 +507,14 @@ endOfSection {space}")"{space}
|
|||||||
Info<< "done." << endl;
|
Info<< "done." << endl;
|
||||||
|
|
||||||
// check read of fluentFaces
|
// check read of fluentFaces
|
||||||
if (facei != faceGroupEndIndex[faceGroupEndIndex.size()-1]+1)
|
if (facei != faceGroupEndIndex.last()+1)
|
||||||
{
|
{
|
||||||
Warning
|
Warning
|
||||||
<< "Problem with reading fluentFaces: " << nl
|
<< "Problem with reading fluentFaces: " << nl
|
||||||
<< " start index: "
|
<< " start index: "
|
||||||
<< faceGroupStartIndex[faceGroupStartIndex.size()-1]
|
<< faceGroupStartIndex.last()
|
||||||
<< " end index: "
|
<< " end index: "
|
||||||
<< faceGroupEndIndex[faceGroupEndIndex.size()-1]
|
<< faceGroupEndIndex.last()
|
||||||
<< " last fluentFaces read: " << facei << nl
|
<< " last fluentFaces read: " << facei << nl
|
||||||
<< " on line " << lineNo << endl;
|
<< " on line " << lineNo << endl;
|
||||||
}
|
}
|
||||||
@ -560,13 +560,13 @@ endOfSection {space}")"{space}
|
|||||||
cellGroupType.append(strtol(endPtr, &endPtr, 16));
|
cellGroupType.append(strtol(endPtr, &endPtr, 16));
|
||||||
|
|
||||||
Info<< "CellGroup: "
|
Info<< "CellGroup: "
|
||||||
<< cellGroupZoneID[cellGroupZoneID.size()-1]
|
<< cellGroupZoneID.last()
|
||||||
<< " start: "
|
<< " start: "
|
||||||
<< cellGroupStartIndex[cellGroupStartIndex.size()-1]
|
<< cellGroupStartIndex.last()
|
||||||
<< " end: "
|
<< " end: "
|
||||||
<< cellGroupEndIndex[cellGroupEndIndex.size()-1]
|
<< cellGroupEndIndex.last()
|
||||||
<< " type: "
|
<< " type: "
|
||||||
<< cellGroupType[cellGroupType.size()-1]
|
<< cellGroupType.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -587,13 +587,13 @@ endOfSection {space}")"{space}
|
|||||||
strtol(endPtr, &endPtr, 16);
|
strtol(endPtr, &endPtr, 16);
|
||||||
|
|
||||||
Info<< "CellGroup: "
|
Info<< "CellGroup: "
|
||||||
<< cellGroupZoneID[cellGroupZoneID.size()-1]
|
<< cellGroupZoneID.last()
|
||||||
<< " start: "
|
<< " start: "
|
||||||
<< cellGroupStartIndex[cellGroupStartIndex.size()-1]
|
<< cellGroupStartIndex.last()
|
||||||
<< " end: "
|
<< " end: "
|
||||||
<< cellGroupEndIndex[cellGroupEndIndex.size()-1]
|
<< cellGroupEndIndex.last()
|
||||||
<< " type: "
|
<< " type: "
|
||||||
<< cellGroupType[cellGroupType.size()-1]
|
<< cellGroupType.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
yyFlexLexer lexer(&fluentStream.stdStream());
|
yyFlexLexer lexer(&fluentStream.stdStream());
|
||||||
|
|
||||||
while(lexer.yylex() != 0)
|
while (lexer.yylex() != 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Info<< "\nFINISHED LEXING\n\n";
|
Info<< "\nFINISHED LEXING\n\n";
|
||||||
@ -973,7 +973,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Set the owner of these faces to -1 so that they do not get
|
// Set the owner of these faces to -1 so that they do not get
|
||||||
// added to the mesh
|
// added to the mesh
|
||||||
for(label facei = start; facei <= end; facei++)
|
for (label facei = start; facei <= end; facei++)
|
||||||
{
|
{
|
||||||
owner[facei] = -1;
|
owner[facei] = -1;
|
||||||
}
|
}
|
||||||
@ -1356,7 +1356,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh.write();
|
mesh.write();
|
||||||
|
|
||||||
|
|
||||||
Info<< nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -898,7 +898,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&fluentStream);
|
yyFlexLexer lexer(&fluentStream);
|
||||||
while(lexer.yylex() != 0)
|
while (lexer.yylex() != 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Info<< "\n\nFINISHED LEXING\n\n\n";
|
Info<< "\n\nFINISHED LEXING\n\n\n";
|
||||||
@ -1388,7 +1388,7 @@ int main(int argc, char *argv[])
|
|||||||
meshFaces[j] = cMeshFace;
|
meshFaces[j] = cMeshFace;
|
||||||
pFaceSet.insert(cMeshFace);
|
pFaceSet.insert(cMeshFace);
|
||||||
}
|
}
|
||||||
if(writeSets)
|
if (writeSets)
|
||||||
{
|
{
|
||||||
Info<< "Writing patch " << patchNames[patchI]
|
Info<< "Writing patch " << patchNames[patchI]
|
||||||
<< " of size " << sz << " to faceSet." << endl;
|
<< " of size " << sz << " to faceSet." << endl;
|
||||||
@ -1404,7 +1404,11 @@ int main(int argc, char *argv[])
|
|||||||
//it will be put in a default wall boundary
|
//it will be put in a default wall boundary
|
||||||
//internal boundaries are simply ignored
|
//internal boundaries are simply ignored
|
||||||
|
|
||||||
if(patchTypes[patchI] != "internal" && !pShapeMesh.isInternalFace(meshFaces[0]))
|
if
|
||||||
|
(
|
||||||
|
patchTypes[patchI] != "internal"
|
||||||
|
&& !pShapeMesh.isInternalFace(meshFaces[0])
|
||||||
|
)
|
||||||
{
|
{
|
||||||
//first face is external and has valid non-internal type
|
//first face is external and has valid non-internal type
|
||||||
|
|
||||||
@ -1423,7 +1427,7 @@ int main(int argc, char *argv[])
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
|
if (facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "Face " << faceI << " on new patch "
|
<< "Face " << faceI << " on new patch "
|
||||||
@ -1475,7 +1479,7 @@ int main(int argc, char *argv[])
|
|||||||
DynamicList<label> defaultBoundaryFaces(facePatchID.size());
|
DynamicList<label> defaultBoundaryFaces(facePatchID.size());
|
||||||
forAll(facePatchID, idI)
|
forAll(facePatchID, idI)
|
||||||
{
|
{
|
||||||
if(facePatchID[idI] == -1)
|
if (facePatchID[idI] == -1)
|
||||||
{
|
{
|
||||||
defaultBoundaryFaces.append(idI);
|
defaultBoundaryFaces.append(idI);
|
||||||
facePatchID[idI] = nBoundaries;
|
facePatchID[idI] = nBoundaries;
|
||||||
@ -1575,50 +1579,50 @@ int main(int argc, char *argv[])
|
|||||||
boundaryZones[pI].append(bPatches[pI].name());
|
boundaryZones[pI].append(bPatches[pI].name());
|
||||||
}
|
}
|
||||||
|
|
||||||
label cnt=0;
|
label cnt=0;
|
||||||
SLList<label>::iterator cg = cellGroupZoneID.begin();
|
SLList<label>::iterator cg = cellGroupZoneID.begin();
|
||||||
SLList<label>::iterator start = cellGroupStartIndex.begin();
|
SLList<label>::iterator start = cellGroupStartIndex.begin();
|
||||||
SLList<label>::iterator end = cellGroupEndIndex.begin();
|
SLList<label>::iterator end = cellGroupEndIndex.begin();
|
||||||
|
|
||||||
for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
|
for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
|
||||||
{
|
{
|
||||||
const word& name = patchNameIDs[cg()];
|
const word& name = patchNameIDs[cg()];
|
||||||
const word& type = patchTypeIDs[cg()];
|
const word& type = patchTypeIDs[cg()];
|
||||||
|
|
||||||
Info<< "Writing cell zone: " << name
|
Info<< "Writing cell zone: " << name
|
||||||
<< " of type " << type << " starting at " << start() - 1
|
<< " of type " << type << " starting at " << start() - 1
|
||||||
<< " ending at " << end() - 1 << " to cellSet." << endl;
|
<< " ending at " << end() - 1 << " to cellSet." << endl;
|
||||||
|
|
||||||
labelList cls(end() - start() + 1);
|
labelList cls(end() - start() + 1);
|
||||||
|
|
||||||
// Mark zone cells, used for finding faces
|
// Mark zone cells, used for finding faces
|
||||||
boolList zoneCell(pShapeMesh.nCells(), false);
|
boolList zoneCell(pShapeMesh.nCells(), false);
|
||||||
|
|
||||||
// shift cell indizes by 1
|
// shift cell indizes by 1
|
||||||
label nr=0;
|
label nr=0;
|
||||||
for (label celli = (start() - 1); celli < end(); celli++)
|
for (label celli = (start() - 1); celli < end(); celli++)
|
||||||
{
|
{
|
||||||
cls[nr]=celli;
|
cls[nr]=celli;
|
||||||
zoneCell[celli] = true;
|
zoneCell[celli] = true;
|
||||||
nr++;
|
nr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
cz[cnt] = new cellZone
|
cz[cnt] = new cellZone
|
||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
cls,
|
cls,
|
||||||
cnt,
|
cnt,
|
||||||
pShapeMesh.cellZones()
|
pShapeMesh.cellZones()
|
||||||
);
|
);
|
||||||
|
|
||||||
DynamicList<label> zoneFaces(pShapeMesh.nFaces());
|
DynamicList<label> zoneFaces(pShapeMesh.nFaces());
|
||||||
forAll(pShapeMesh.faceNeighbour(), faceI)
|
forAll(pShapeMesh.faceNeighbour(), faceI)
|
||||||
{
|
{
|
||||||
label nei = pShapeMesh.faceNeighbour()[faceI];
|
label nei = pShapeMesh.faceNeighbour()[faceI];
|
||||||
label own = pShapeMesh.faceOwner()[faceI];
|
label own = pShapeMesh.faceOwner()[faceI];
|
||||||
if(nei != -1)
|
if (nei != -1)
|
||||||
{
|
{
|
||||||
if(zoneCell[nei] && zoneCell[own])
|
if (zoneCell[nei] && zoneCell[own])
|
||||||
{
|
{
|
||||||
zoneFaces.append(faceI);
|
zoneFaces.append(faceI);
|
||||||
}
|
}
|
||||||
@ -1641,7 +1645,7 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& faceCells = bPatches[pI].faceCells();
|
const labelList& faceCells = bPatches[pI].faceCells();
|
||||||
forAll(faceCells, fcI)
|
forAll(faceCells, fcI)
|
||||||
{
|
{
|
||||||
if(zoneCell[faceCells[fcI] ])
|
if (zoneCell[faceCells[fcI] ])
|
||||||
{
|
{
|
||||||
boundaryZones[pI].append(name);
|
boundaryZones[pI].append(name);
|
||||||
break;
|
break;
|
||||||
@ -1649,8 +1653,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pShapeMesh.addZones(pz, fz, cz);
|
pShapeMesh.addZones(pz, fz, cz);
|
||||||
|
|
||||||
@ -1715,7 +1719,7 @@ int main(int argc, char *argv[])
|
|||||||
cellSet internal(pShapeMesh, name, end() - start());
|
cellSet internal(pShapeMesh, name, end() - start());
|
||||||
|
|
||||||
// shift cell indizes by 1
|
// shift cell indizes by 1
|
||||||
for(label celli=start() - 1; celli<=end() - 1; celli++)
|
for (label celli = start() - 1; celli <= end() - 1; celli++)
|
||||||
{
|
{
|
||||||
internal.insert(celli);
|
internal.insert(celli);
|
||||||
}
|
}
|
||||||
@ -1729,7 +1733,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
).c_str()
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info << "Writing Header" << endl;
|
Info<< "Writing Header" << endl;
|
||||||
|
|
||||||
fluentMeshFile
|
fluentMeshFile
|
||||||
<< "(0 \"FOAM to Fluent Mesh File\")" << std::endl << std::endl
|
<< "(0 \"FOAM to Fluent Mesh File\")" << std::endl << std::endl
|
||||||
|
|||||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
mesh.writeFluentMesh();
|
mesh.writeFluentMesh();
|
||||||
|
|
||||||
Info << "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,7 +233,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
|
|
||||||
<readProgramID>{space}{word} {
|
<readProgramID>{space}{word} {
|
||||||
|
|
||||||
Info << "Written by " << YYText() << " ";
|
Info<< "Written by " << YYText() << " ";
|
||||||
BEGIN(controlInfo);
|
BEGIN(controlInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,20 +245,20 @@ mtype {space}"MTYPE:"{space}
|
|||||||
|
|
||||||
<readVersionID>{space}{versionNumber} {
|
<readVersionID>{space}{versionNumber} {
|
||||||
|
|
||||||
Info << " version " << YYText() << endl;
|
Info<< " version " << YYText() << endl;
|
||||||
BEGIN(controlInfo);
|
BEGIN(controlInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<controlInfo>{space}{dateDDMonYYYY}{space}{time} {
|
<controlInfo>{space}{dateDDMonYYYY}{space}{time} {
|
||||||
|
|
||||||
Info << "File written on " << YYText() << endl;
|
Info<< "File written on " << YYText() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<controlInfo>{space}{dateDDMMYYYY}{space}{time} {
|
<controlInfo>{space}{dateDDMMYYYY}{space}{time} {
|
||||||
|
|
||||||
Info << "File written on " << YYText() << endl;
|
Info<< "File written on " << YYText() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -304,7 +304,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
{nodalCoords}{spaceNl} {
|
{nodalCoords}{spaceNl} {
|
||||||
|
|
||||||
curNumberOfNodes = 0;
|
curNumberOfNodes = 0;
|
||||||
Info << "Reading nodal coordinates" << endl;
|
Info<< "Reading nodal coordinates" << endl;
|
||||||
BEGIN(nodalCoords);
|
BEGIN(nodalCoords);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
{cellsAndElements}{spaceNl} {
|
{cellsAndElements}{spaceNl} {
|
||||||
|
|
||||||
curNumberOfCells = 0;
|
curNumberOfCells = 0;
|
||||||
Info << "Reading cells" << endl;
|
Info<< "Reading cells" << endl;
|
||||||
BEGIN(cellsAndElements);
|
BEGIN(cellsAndElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +422,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
/* ------ Reading element group information ------ */
|
/* ------ Reading element group information ------ */
|
||||||
|
|
||||||
{cellStreams}{spaceNl} {
|
{cellStreams}{spaceNl} {
|
||||||
Info << "Reading cell streams" << endl;
|
Info<< "Reading cell streams" << endl;
|
||||||
BEGIN(cellStreams);
|
BEGIN(cellStreams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
|
|
||||||
|
|
||||||
<cellStreamFlags>{labelList} {
|
<cellStreamFlags>{labelList} {
|
||||||
Info << "Reading cell stream labels" << endl;
|
Info<< "Reading cell stream labels" << endl;
|
||||||
BEGIN(cellStreamLabels);
|
BEGIN(cellStreamLabels);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
|
|
||||||
<cellStreamLabels>{endOfSection}\n {
|
<cellStreamLabels>{endOfSection}\n {
|
||||||
|
|
||||||
Info << "Finished reading cell stream labels" << endl;
|
Info<< "Finished reading cell stream labels" << endl;
|
||||||
|
|
||||||
// reset current group ID and a number of flags
|
// reset current group ID and a number of flags
|
||||||
curGroupID = 0;
|
curGroupID = 0;
|
||||||
@ -541,7 +541,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
|
|
||||||
{boundaryPatch}{spaceNl} {
|
{boundaryPatch}{spaceNl} {
|
||||||
curPatchFace = 0;
|
curPatchFace = 0;
|
||||||
Info << "Reading patches" << endl;
|
Info<< "Reading patches" << endl;
|
||||||
BEGIN(boundaryPatchParams);
|
BEGIN(boundaryPatchParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -665,10 +665,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
yyFlexLexer lexer(&gambitStream);
|
yyFlexLexer lexer(&gambitStream);
|
||||||
while(lexer.yylex() != 0)
|
while (lexer.yylex() != 0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Info << "Finished lexing" << endl;
|
Info<< "Finished lexing" << endl;
|
||||||
|
|
||||||
// make a point mapping array
|
// make a point mapping array
|
||||||
label maxPointIndex = 0;
|
label maxPointIndex = 0;
|
||||||
@ -815,7 +815,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info << "gambitToFoam: " << endl
|
Info<< "gambitToFoam: " << endl
|
||||||
<< "Gambit file format does not provide information about the type of "
|
<< "Gambit file format does not provide information about the type of "
|
||||||
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
|
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
|
||||||
<< "All the patches have been created "
|
<< "All the patches have been created "
|
||||||
@ -864,10 +864,10 @@ int main(int argc, char *argv[])
|
|||||||
// Set the precision of the points data to 10
|
// Set the precision of the points data to 10
|
||||||
IOstream::defaultPrecision(10);
|
IOstream::defaultPrecision(10);
|
||||||
|
|
||||||
Info << "Writing polyMesh" << endl;
|
Info<< "Writing polyMesh" << endl;
|
||||||
pShapeMesh.write();
|
pShapeMesh.write();
|
||||||
|
|
||||||
Info<< nl << "End" << endl;
|
Info<< "\nEnd\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -314,14 +314,14 @@ void readPhysNames(IFstream& inFile, Map<word>& physicalNames)
|
|||||||
IStringStream lineStr(line);
|
IStringStream lineStr(line);
|
||||||
label nSpaces = lineStr.str().count(' ');
|
label nSpaces = lineStr.str().count(' ');
|
||||||
|
|
||||||
if(nSpaces == 1)
|
if (nSpaces == 1)
|
||||||
{
|
{
|
||||||
lineStr >> regionI >> regionName;
|
lineStr >> regionI >> regionName;
|
||||||
|
|
||||||
Info<< " " << regionI << '\t'
|
Info<< " " << regionI << '\t'
|
||||||
<< string::validate<word>(regionName) << endl;
|
<< string::validate<word>(regionName) << endl;
|
||||||
}
|
}
|
||||||
else if(nSpaces == 2)
|
else if (nSpaces == 2)
|
||||||
{
|
{
|
||||||
// >= Gmsh2.4 physical types has tag in front.
|
// >= Gmsh2.4 physical types has tag in front.
|
||||||
label physType;
|
label physType;
|
||||||
@ -885,7 +885,7 @@ int main(int argc, char *argv[])
|
|||||||
// Now use the patchFaces to patch up the outside faces of the mesh.
|
// Now use the patchFaces to patch up the outside faces of the mesh.
|
||||||
|
|
||||||
// Get the patch for all the outside faces (= default patch added as last)
|
// Get the patch for all the outside faces (= default patch added as last)
|
||||||
const polyPatch& pp = mesh.boundaryMesh()[mesh.boundaryMesh().size()-1];
|
const polyPatch& pp = mesh.boundaryMesh().last();
|
||||||
|
|
||||||
// Storage for faceZones.
|
// Storage for faceZones.
|
||||||
List<DynamicList<label> > zoneFaces(patchFaces.size());
|
List<DynamicList<label> > zoneFaces(patchFaces.size());
|
||||||
|
|||||||
@ -324,13 +324,13 @@ void readCells
|
|||||||
cellVerts.append(cellShape(tet, cVerts, true));
|
cellVerts.append(cellShape(tet, cVerts, true));
|
||||||
cellMaterial.append(physProp);
|
cellMaterial.append(physProp);
|
||||||
|
|
||||||
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
|
if (cellVerts.last().size() != cVerts.size())
|
||||||
{
|
{
|
||||||
Pout<< "Line:" << is.lineNumber()
|
Pout<< "Line:" << is.lineNumber()
|
||||||
<< " element:" << cellI
|
<< " element:" << cellI
|
||||||
<< " type:" << feID
|
<< " type:" << feID
|
||||||
<< " collapsed from " << cVerts << nl
|
<< " collapsed from " << cVerts << nl
|
||||||
<< " to:" << cellVerts[cellVerts.size()-1]
|
<< " to:" << cellVerts.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -347,13 +347,13 @@ void readCells
|
|||||||
cellVerts.append(cellShape(prism, cVerts, true));
|
cellVerts.append(cellShape(prism, cVerts, true));
|
||||||
cellMaterial.append(physProp);
|
cellMaterial.append(physProp);
|
||||||
|
|
||||||
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
|
if (cellVerts.last().size() != cVerts.size())
|
||||||
{
|
{
|
||||||
Pout<< "Line:" << is.lineNumber()
|
Pout<< "Line:" << is.lineNumber()
|
||||||
<< " element:" << cellI
|
<< " element:" << cellI
|
||||||
<< " type:" << feID
|
<< " type:" << feID
|
||||||
<< " collapsed from " << cVerts << nl
|
<< " collapsed from " << cVerts << nl
|
||||||
<< " to:" << cellVerts[cellVerts.size()-1]
|
<< " to:" << cellVerts.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,13 +371,13 @@ void readCells
|
|||||||
cellVerts.append(cellShape(hex, cVerts, true));
|
cellVerts.append(cellShape(hex, cVerts, true));
|
||||||
cellMaterial.append(physProp);
|
cellMaterial.append(physProp);
|
||||||
|
|
||||||
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
|
if (cellVerts.last().size() != cVerts.size())
|
||||||
{
|
{
|
||||||
Pout<< "Line:" << is.lineNumber()
|
Pout<< "Line:" << is.lineNumber()
|
||||||
<< " element:" << cellI
|
<< " element:" << cellI
|
||||||
<< " type:" << feID
|
<< " type:" << feID
|
||||||
<< " collapsed from " << cVerts << nl
|
<< " collapsed from " << cVerts << nl
|
||||||
<< " to:" << cellVerts[cellVerts.size()-1]
|
<< " to:" << cellVerts.last()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -412,7 +412,7 @@ void readPatches
|
|||||||
Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
|
Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
while(true)
|
while (true)
|
||||||
{
|
{
|
||||||
string line;
|
string line;
|
||||||
is.getLine(line);
|
is.getLine(line);
|
||||||
@ -511,7 +511,7 @@ void readDOFS
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "For DOF set " << group
|
Info<< "For DOF set " << group
|
||||||
<< " named " << patchNames[patchNames.size()-1]
|
<< " named " << patchNames.last()
|
||||||
<< " trying to read vertex indices."
|
<< " trying to read vertex indices."
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
@ -534,7 +534,7 @@ void readDOFS
|
|||||||
}
|
}
|
||||||
|
|
||||||
Info<< "For DOF set " << group
|
Info<< "For DOF set " << group
|
||||||
<< " named " << patchNames[patchNames.size()-1]
|
<< " named " << patchNames.last()
|
||||||
<< " read " << vertices.size() << " vertex indices." << endl;
|
<< " read " << vertices.size() << " vertex indices." << endl;
|
||||||
|
|
||||||
dofVertices.append(vertices.shrink());
|
dofVertices.append(vertices.shrink());
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user