mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge commit 'origin/master' into splitCyclic
Conflicts: applications/utilities/mesh/manipulation/createBaffles/createBaffles.C applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C src/dynamicMesh/motionSmoother/motionSmoother.C src/dynamicMesh/motionSmoother/motionSmoother.H src/dynamicMesh/motionSmoother/motionSmootherTemplates.C
This commit is contained in:
@ -134,7 +134,7 @@ if (ign.ignited())
|
||||
(sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt)
|
||||
/(sqr(Su0 - SuInf) + sqr(SuMin));
|
||||
|
||||
solve
|
||||
fvScalarMatrix SuEqn
|
||||
(
|
||||
fvm::ddt(rho, Su)
|
||||
+ fvm::div(phi + phiXi, Su, "div(phiXi,Su)")
|
||||
@ -144,6 +144,9 @@ if (ign.ignited())
|
||||
- fvm::SuSp(rho*(sigmas + Rc), Su)
|
||||
);
|
||||
|
||||
SuEqn.relax();
|
||||
SuEqn.solve();
|
||||
|
||||
// Limit the maximum Su
|
||||
// ~~~~~~~~~~~~~~~~~~~~
|
||||
Su.min(SuMax);
|
||||
@ -196,7 +199,7 @@ if (ign.ignited())
|
||||
|
||||
// Solve for the flame wrinkling
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
solve
|
||||
fvScalarMatrix XiEqn
|
||||
(
|
||||
fvm::ddt(rho, Xi)
|
||||
+ fvm::div(phi + phiXi, Xi, "div(phiXi,Xi)")
|
||||
@ -215,6 +218,8 @@ if (ign.ignited())
|
||||
)
|
||||
);
|
||||
|
||||
XiEqn.relax();
|
||||
XiEqn.solve();
|
||||
|
||||
// Correct boundedness of Xi
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt = 0.0*Y[0];
|
||||
|
||||
for (label i=0; i<Y.size(); i++)
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
|
||||
@ -43,7 +43,7 @@ volScalarField Sevap
|
||||
dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0)
|
||||
);
|
||||
|
||||
for (label i=0; i<Y.size(); i++)
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (dieselSpray.isLiquidFuel()[i])
|
||||
{
|
||||
|
||||
@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt = 0.0*Y[0];
|
||||
|
||||
for (label i=0; i<Y.size(); i++)
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
|
||||
@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt = 0.0*Y[0];
|
||||
|
||||
for (label i=0; i<Y.size(); i++)
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
|
||||
@ -63,8 +63,7 @@
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
const labelList& faces =
|
||||
mesh.faceZones()[magnetZonei];
|
||||
const labelList& faces = mesh.faceZones()[magnetZonei];
|
||||
|
||||
const scalar muri = magnets[i].mur();
|
||||
const scalar Mri = magnets[i].Mr().value();
|
||||
|
||||
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
Executable file
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwclean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wclean
|
||||
wclean chtMultiRegionSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
Executable file
8
applications/solvers/heatTransfer/chtMultiRegionFoam/Allwmake
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake
|
||||
wmake chtMultiRegionSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,4 @@
|
||||
chtMultiRegionSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/chtMultiRegionSimpleFoam
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
EXE_INC = \
|
||||
/* -DFULLDEBUG -O0 -g */ \
|
||||
-I.. \
|
||||
-I../derivedFvPatchFields \
|
||||
-Ifluid \
|
||||
-Isolid \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
@ -1,7 +1,6 @@
|
||||
// Initialise solid field pointer lists
|
||||
PtrList<volScalarField> rhos(solidRegions.size());
|
||||
PtrList<volScalarField> cps(solidRegions.size());
|
||||
PtrList<volScalarField> rhosCps(solidRegions.size());
|
||||
PtrList<volScalarField> Ks(solidRegions.size());
|
||||
PtrList<volScalarField> Ts(solidRegions.size());
|
||||
|
||||
@ -47,12 +46,6 @@
|
||||
)
|
||||
);
|
||||
|
||||
rhosCps.set
|
||||
(
|
||||
i,
|
||||
new volScalarField("rhosCps", rhos[i]*cps[i])
|
||||
);
|
||||
|
||||
Info<< " Adding to Ks\n" << endl;
|
||||
Ks.set
|
||||
(
|
||||
@ -1,7 +1,6 @@
|
||||
// Initialise solid field pointer lists
|
||||
PtrList<volScalarField> rhos(solidRegions.size());
|
||||
PtrList<volScalarField> cps(solidRegions.size());
|
||||
PtrList<volScalarField> rhosCps(solidRegions.size());
|
||||
PtrList<volScalarField> Ks(solidRegions.size());
|
||||
PtrList<volScalarField> Ts(solidRegions.size());
|
||||
|
||||
@ -47,12 +46,6 @@
|
||||
)
|
||||
);
|
||||
|
||||
rhosCps.set
|
||||
(
|
||||
i,
|
||||
new volScalarField("rhosCps", rhos[i]*cps[i])
|
||||
);
|
||||
|
||||
Info<< " Adding to Ks\n" << endl;
|
||||
Ks.set
|
||||
(
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
(
|
||||
solidRegions[regionI],
|
||||
runTime,
|
||||
rhosCps[regionI],
|
||||
rhos[regionI]*cps[regionI],
|
||||
Ks[regionI]
|
||||
),
|
||||
DiNum
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
chtMultiRegionSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/chtMultiRegionSimpleFoam
|
||||
|
||||
@ -1,168 +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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidWallHeatFluxTemperatureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF),
|
||||
q_(p.size(), 0.0),
|
||||
KName_("undefined-K")
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(ptf, p, iF, mapper),
|
||||
q_(ptf.q_, mapper),
|
||||
KName_(ptf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(p, iF, dict),
|
||||
q_("q", dict, p.size()),
|
||||
KName_(dict.lookup("K"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(tppsf),
|
||||
q_(tppsf.q_),
|
||||
KName_(tppsf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidWallHeatFluxTemperatureFvPatchScalarField::
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& tppsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedGradientFvPatchScalarField(tppsf, iF),
|
||||
q_(tppsf.q_),
|
||||
KName_(tppsf.KName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedGradientFvPatchScalarField::autoMap(m);
|
||||
q_.autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedGradientFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField& hfptf =
|
||||
refCast<const solidWallHeatFluxTemperatureFvPatchScalarField>(ptf);
|
||||
|
||||
q_.rmap(hfptf.q_, addr);
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalarField& Kw = patch().lookupPatchField<volScalarField, scalar>
|
||||
(
|
||||
KName_
|
||||
);
|
||||
|
||||
gradient() = q_/Kw;
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fixedGradientFvPatchScalarField::write(os);
|
||||
q_.writeEntry("q", os);
|
||||
os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,180 +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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Heat flux boundary condition for temperature on solid region
|
||||
|
||||
Example usage:
|
||||
myWallPatch
|
||||
{
|
||||
type solidWallHeatFluxTemperature;
|
||||
K K; // Name of K field
|
||||
q uniform 1000; // Heat flux / [W/m2]
|
||||
value 300.0; // Initial temperature / [K]
|
||||
}
|
||||
|
||||
|
||||
SourceFiles
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
#define solidWallHeatFluxTemperatureFvPatchScalarField_H
|
||||
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class solidWallHeatFluxTemperatureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
:
|
||||
public fixedGradientFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Heat flux / [W/m2]
|
||||
scalarField q_;
|
||||
|
||||
//- Name of thermal conductivity field
|
||||
word KName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("solidWallHeatFluxTemperature");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
// onto a new patch
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallHeatFluxTemperatureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
solidWallHeatFluxTemperatureFvPatchScalarField
|
||||
(
|
||||
const solidWallHeatFluxTemperatureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new solidWallHeatFluxTemperatureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -84,10 +84,8 @@
|
||||
dimensionedScalar lambda(laminarTransport.lookup("lambda"));
|
||||
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
|
||||
|
||||
const labelList& inletCells =
|
||||
mesh.boundary()[mesh.boundaryMesh().findPatchID("inlet")].faceCells();
|
||||
//const labelList& outletCells =
|
||||
// mesh.boundary()[mesh.boundaryMesh().findPatchID("outlet")].faceCells();
|
||||
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
|
||||
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
|
||||
|
||||
volScalarField alpha
|
||||
(
|
||||
|
||||
@ -25,9 +25,9 @@ makeGraph(y, flowDirection & R & flowDirection, "Rff", gFormat);
|
||||
makeGraph(y, wallNormal & R & wallNormal, "Rww", gFormat);
|
||||
makeGraph(y, flowDirection & R & wallNormal, "Rfw", gFormat);
|
||||
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::XX))), "u", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::YY))), "v", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(tensor::ZZ))), "w", gFormat);
|
||||
makeGraph(y, R.component(tensor::XY), "uv", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::XX))), "u", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::YY))), "v", gFormat);
|
||||
makeGraph(y, sqrt(mag(R.component(symmTensor::ZZ))), "w", gFormat);
|
||||
makeGraph(y, R.component(symmTensor::XY), "uv", gFormat);
|
||||
|
||||
makeGraph(y, mag(fvc::grad(U)), "gammaDot", gFormat);
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
forAll(p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
||||
@ -150,9 +150,9 @@ int main(int argc, char *argv[])
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
||||
@ -41,7 +41,12 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addOption("cloudName", "cloud name");
|
||||
argList::addOption
|
||||
(
|
||||
"cloudName",
|
||||
"name",
|
||||
"specify alternative cloud name. default is 'kinematicCloud'"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
label inertIndex = -1;
|
||||
volScalarField Yt = 0.0*Y[0];
|
||||
|
||||
for (label i=0; i<Y.size(); i++)
|
||||
forAll(Y, i)
|
||||
{
|
||||
if (Y[i].name() != inertSpecie)
|
||||
{
|
||||
|
||||
@ -41,7 +41,12 @@ Description
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addOption("cloudName", "cloud name");
|
||||
argList::addOption
|
||||
(
|
||||
"cloudName",
|
||||
"name",
|
||||
"specify alternative cloud name. default is 'kinematicCloud'"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<Ua.boundaryField().size(); i++)
|
||||
forAll(Ua.boundaryField(), i)
|
||||
{
|
||||
if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i]))
|
||||
{
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<Ub.boundaryField().size(); i++)
|
||||
forAll(Ub.boundaryField(), i)
|
||||
{
|
||||
if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i]))
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
forAll(p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
||||
@ -98,7 +98,7 @@
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
forAll(p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
forAll(p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
forAll(p.boundaryField(), i)
|
||||
{
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
|
||||
@ -106,7 +106,7 @@ Foam::phaseModel::phaseModel
|
||||
calculatedFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
for (label i=0; i<U_.boundaryField().size(); i++)
|
||||
forAll(U_.boundaryField(), i)
|
||||
{
|
||||
if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]))
|
||||
{
|
||||
|
||||
@ -43,7 +43,6 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList args(argc, argv);
|
||||
|
||||
FixedList<label, 4> list;
|
||||
|
||||
@ -104,7 +104,6 @@ public:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("ODESolver");
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList args(argc, argv);
|
||||
|
||||
//Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] ";
|
||||
|
||||
@ -220,10 +220,7 @@ int main(int argc, char *argv[])
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
const word patchName = args[1];
|
||||
|
||||
label patchI = mesh.boundaryMesh().findPatchID(patchName);
|
||||
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchName];
|
||||
|
||||
Info<< "Patch:" << patch.name() << endl;
|
||||
|
||||
|
||||
@ -35,7 +35,6 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("CHEMKINIIIFile");
|
||||
argList::addOption("thermo", "fileName");
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -38,7 +38,7 @@ Description
|
||||
|
||||
E.g. to allow all faces on same patch to be merged:
|
||||
|
||||
combinePatchFaces .. cavity 180 -concaveAngle 90
|
||||
combinePatchFaces 180 -concaveAngle 90
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -428,15 +428,18 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
# include "addOverwriteOption.H"
|
||||
|
||||
argList::validArgs.append("feature angle [0..180]");
|
||||
argList::validArgs.append("featureAngle [0..180]");
|
||||
argList::addOption
|
||||
(
|
||||
"concaveAngle",
|
||||
"[0..180]",
|
||||
"specify concave angle [0..180] degrees (default: 30.0 degrees)"
|
||||
"degrees",
|
||||
"specify concave angle [0..180] (default: 30 degrees)"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"snapMesh",
|
||||
"use system/snapMeshDict"
|
||||
);
|
||||
|
||||
argList::addBoolOption("snapMesh");
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -51,7 +51,13 @@ int main(int argc, char *argv[])
|
||||
argList::validArgs.append("patchName");
|
||||
argList::validArgs.append("edgeWeight");
|
||||
|
||||
argList::addOption("useSet", "cellSet");
|
||||
argList::addOption
|
||||
(
|
||||
"useSet",
|
||||
"name",
|
||||
"restrict cells to refine based on specified cellSet name"
|
||||
);
|
||||
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -96,7 +96,11 @@ bool limitRefinementLevel
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addBoolOption("readLevel");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"readLevel",
|
||||
"read level from refinementLevel file"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
@ -109,7 +113,7 @@ int main(int argc, char *argv[])
|
||||
<< " to allow for some truncation error."
|
||||
<< nl << endl;
|
||||
|
||||
bool readLevel = args.optionFound("readLevel");
|
||||
const bool readLevel = args.optionFound("readLevel");
|
||||
|
||||
const scalarField& vols = mesh.cellVolumes();
|
||||
|
||||
|
||||
@ -517,12 +517,30 @@ void collectCuts
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"split cells with flat faces"
|
||||
);
|
||||
#include "addOverwriteOption.H"
|
||||
argList::noParallel();
|
||||
argList::addOption("set", "cellSet name");
|
||||
argList::addBoolOption("geometry");
|
||||
argList::addOption("tol", "edge snap tolerance");
|
||||
argList::validArgs.append("edge angle [0..360]");
|
||||
argList::validArgs.append("edgeAngle [0..360]");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"set",
|
||||
"name",
|
||||
"split cells from specified cellSet only"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"geometry",
|
||||
"use geometric cut for hexes as well"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"tol",
|
||||
"scalar", "edge snap tolerance (default 0.2)"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
@ -538,7 +556,7 @@ int main(int argc, char *argv[])
|
||||
const bool geometry = args.optionFound("geometry");
|
||||
const bool overwrite = args.optionFound("overwrite");
|
||||
|
||||
scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||
const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2);
|
||||
|
||||
Info<< "Trying to split cells with internal angles > feature angle\n" << nl
|
||||
<< "featureAngle : " << featureAngle << nl
|
||||
|
||||
@ -235,7 +235,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("ANSYS input file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -244,8 +249,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -49,7 +49,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("CFX geom file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -58,8 +63,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -761,10 +761,30 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption("ignoreCellGroups", "cell group names");
|
||||
argList::addOption("ignoreFaceGroups", "face group names");
|
||||
argList::addBoolOption("cubit");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"ignoreCellGroups",
|
||||
"names",
|
||||
"specify cell groups to ignore"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"ignoreFaceGroups",
|
||||
"names",
|
||||
"specify face groups to ignore"
|
||||
);
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"cubit",
|
||||
"special parsing of (incorrect) cubit files"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
|
||||
@ -20,8 +20,7 @@ Notes for fluentMeshToFoam with zone preservation
|
||||
with the cellZones(), faceZones() and pointZones() member functions
|
||||
|
||||
- Example (Members from polyMesh.H and ZoneMesh.H):
|
||||
label thisCellZoneID = mesh.cellZones().findZoneID("thisZoneName");
|
||||
const labelList& thisCellZone = mesh.cellZones()[thisCellZoneID];
|
||||
const labelList& thisCellZone = mesh.cellZones()["thisZoneName"];
|
||||
|
||||
- Zone integrity is preserved during mesh modification and decompomposition.
|
||||
|
||||
|
||||
@ -866,9 +866,22 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("Fluent mesh file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addBoolOption("writeSets");
|
||||
argList::addBoolOption("writeZones");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writeSets",
|
||||
"write cell zones and patches as sets"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"writeZones",
|
||||
"write cell zones as zones"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -877,8 +890,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
const bool writeSets = args.optionFound("writeSets");
|
||||
const bool writeZones = args.optionFound("writeZones");
|
||||
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"specify geometry scaling factor - default is 1000 ([m] to [mm])"
|
||||
"geometry scaling factor - default is 1000 ([m] to [mm])"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -61,8 +61,8 @@ int main(int argc, char *argv[])
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"scale",
|
||||
"specify geometry scaling factor"
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
|
||||
@ -628,7 +628,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("GAMBIT file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -637,8 +642,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -716,7 +716,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append(".msh file");
|
||||
argList::addBoolOption("keepOrientation");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"keepOrientation",
|
||||
"retain raw orientation for prisms/hexs"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -46,7 +46,7 @@ Description
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// Supported KIVA versions
|
||||
//- Supported KIVA versions
|
||||
enum kivaVersions
|
||||
{
|
||||
kiva3,
|
||||
@ -59,37 +59,51 @@ enum kivaVersions
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::addOption("file", "fileName");
|
||||
argList::addOption("version", "[kiva3|kiva3v]");
|
||||
argList::addOption("zHeadMin", "scalar");
|
||||
argList::addOption
|
||||
(
|
||||
"file",
|
||||
"name",
|
||||
"specify alternative input file name - default is otape17"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"version",
|
||||
"version",
|
||||
"specify kiva version [kiva3|kiva3v] - default is '3v'"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"zHeadMin",
|
||||
"scalar",
|
||||
"minimum z-height for transferring liner faces to cylinder-head"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
fileName kivaFileName("otape17");
|
||||
args.optionReadIfPresent("file", kivaFileName);
|
||||
const fileName kivaFileName =
|
||||
args.optionLookupOrDefault<fileName>("file", "otape17");
|
||||
|
||||
kivaVersions kivaVersion = kiva3v;
|
||||
if (args.optionFound("version"))
|
||||
{
|
||||
const word kivaVersionName = args["version"];
|
||||
const word versionName = args["version"];
|
||||
|
||||
if (kivaVersionName == "kiva3")
|
||||
if (versionName == "kiva3")
|
||||
{
|
||||
kivaVersion = kiva3;
|
||||
}
|
||||
else if (kivaVersionName == "kiva3v")
|
||||
else if (versionName == "kiva3v")
|
||||
{
|
||||
kivaVersion = kiva3v;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("main(int argc, char *argv[])")
|
||||
<< "KIVA file version " << kivaVersionName << " not supported"
|
||||
<< "KIVA file version " << versionName << " not supported"
|
||||
<< exit(FatalError);
|
||||
|
||||
args.printUsage();
|
||||
|
||||
FatalError.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ for (label i=0; i<nPoints; i++)
|
||||
}
|
||||
}
|
||||
|
||||
// Tranfer liner faces that are above the minimum cylinder-head z height
|
||||
// Transfer liner faces that are above the minimum cylinder-head z height
|
||||
// into the cylinder-head region
|
||||
if
|
||||
(
|
||||
|
||||
@ -56,7 +56,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append(".msh file");
|
||||
argList::addBoolOption("hex");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"hex",
|
||||
"treat input as containing hex instead of tet cells"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
@ -69,11 +73,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (readHex)
|
||||
{
|
||||
Info<< "Trying to read " << nCells << " hexes." << endl << endl;
|
||||
Info<< "Trying to read " << nCells << " hexes." << nl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Trying to read " << nCells << " tets." << endl << endl;
|
||||
Info<< "Trying to read " << nCells << " tets." << nl << endl;
|
||||
}
|
||||
|
||||
cellShapeList cells(nCells);
|
||||
|
||||
@ -57,10 +57,28 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("PLOT3D geom file");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addBoolOption("noBlank");
|
||||
argList::addBoolOption("singleBlock");
|
||||
argList::addOption("2D", "thickness");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noBlank",
|
||||
"skip blank items"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"singleBlock",
|
||||
"input is a single block"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"2D",
|
||||
"thickness",
|
||||
"use when converting a 2-D geometry"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -69,8 +87,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = 1.0;
|
||||
args.optionReadIfPresent("scale", scaleFactor);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
bool readBlank = !args.optionFound("noBlank");
|
||||
bool singleBlock = args.optionFound("singleBlock");
|
||||
|
||||
@ -356,7 +356,7 @@ int main(int argc, char *argv[])
|
||||
argList::noParallel();
|
||||
timeSelector::addOptions(true, false);
|
||||
|
||||
argList::validArgs.append("feature angle[0-180]");
|
||||
argList::validArgs.append("featureAngle [0-180]");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"splitAllFaces",
|
||||
|
||||
@ -40,7 +40,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("SAMM mesh file prefix");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -49,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -40,7 +40,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.append("STAR mesh file prefix");
|
||||
argList::addOption("scale", "scale factor");
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 1"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -49,7 +54,7 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
argList::addOption
|
||||
(
|
||||
"scale",
|
||||
"scale",
|
||||
"factor",
|
||||
"geometry scaling factor - default is 0.001 ([mm] to [m])"
|
||||
);
|
||||
argList::addBoolOption
|
||||
|
||||
@ -97,7 +97,11 @@ label findFace(const primitiveMesh& mesh, const face& f)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::validArgs.append("file prefix");
|
||||
argList::addBoolOption("noFaceFile");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noFaceFile",
|
||||
"skip reading .face file for boundary information"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -371,27 +371,65 @@ void writePointCells
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"for mesh debugging: write mesh as separate OBJ files"
|
||||
);
|
||||
|
||||
timeSelector::addOptions();
|
||||
argList::addBoolOption("patchFaces");
|
||||
argList::addBoolOption("patchEdges");
|
||||
argList::addOption("cell", "cellI");
|
||||
argList::addOption("face", "faceI");
|
||||
argList::addOption("point", "pointI");
|
||||
argList::addOption("cellSet", "setName");
|
||||
argList::addOption("faceSet", "setName");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"patchFaces",
|
||||
"write patch faces edges"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"patchEdges",
|
||||
"write patch boundary edges"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"cell",
|
||||
"int",
|
||||
"write points for the specified cell"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"face",
|
||||
"int",
|
||||
"write specified face"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"point",
|
||||
"int",
|
||||
"write specified point"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"cellSet",
|
||||
"name",
|
||||
"write points for specified cellSet"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"faceSet",
|
||||
"name",
|
||||
"write points for specified faceSet"
|
||||
);
|
||||
#include "addRegionOption.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
bool patchFaces = args.optionFound("patchFaces");
|
||||
bool patchEdges = args.optionFound("patchEdges");
|
||||
bool doCell = args.optionFound("cell");
|
||||
bool doPoint = args.optionFound("point");
|
||||
bool doFace = args.optionFound("face");
|
||||
bool doCellSet = args.optionFound("cellSet");
|
||||
bool doFaceSet = args.optionFound("faceSet");
|
||||
const bool patchFaces = args.optionFound("patchFaces");
|
||||
const bool patchEdges = args.optionFound("patchEdges");
|
||||
const bool doCell = args.optionFound("cell");
|
||||
const bool doPoint = args.optionFound("point");
|
||||
const bool doFace = args.optionFound("face");
|
||||
const bool doCellSet = args.optionFound("cellSet");
|
||||
const bool doFaceSet = args.optionFound("faceSet");
|
||||
|
||||
|
||||
Info<< "Writing mesh objects as .obj files such that the object"
|
||||
@ -465,7 +503,6 @@ int main(int argc, char *argv[])
|
||||
<< endl;
|
||||
|
||||
writePoints(mesh, cells.toc(), runTime.timeName());
|
||||
|
||||
}
|
||||
if (doFaceSet)
|
||||
{
|
||||
|
||||
@ -42,7 +42,7 @@ Usage
|
||||
Specify an alternative mesh region.
|
||||
|
||||
@param -dict \<filename\> \n
|
||||
Specify an alternative dictionary for the block mesh description.
|
||||
Specify alternative dictionary for the block mesh description.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"specify an alternative dictionary for the blockMesh description"
|
||||
"specify alternative dictionary for the blockMesh description"
|
||||
);
|
||||
|
||||
# include "addRegionOption.H"
|
||||
|
||||
@ -27,10 +27,7 @@
|
||||
// Master patch
|
||||
const word masterPatchName(mergePatchPairs[pairI].first());
|
||||
const polyPatch& masterPatch =
|
||||
mesh.boundaryMesh()
|
||||
[
|
||||
mesh.boundaryMesh().findPatchID(masterPatchName)
|
||||
];
|
||||
mesh.boundaryMesh()[masterPatchName];
|
||||
|
||||
labelList isf(masterPatch.size());
|
||||
|
||||
@ -51,10 +48,7 @@
|
||||
// Slave patch
|
||||
const word slavePatchName(mergePatchPairs[pairI].second());
|
||||
const polyPatch& slavePatch =
|
||||
mesh.boundaryMesh()
|
||||
[
|
||||
mesh.boundaryMesh().findPatchID(slavePatchName)
|
||||
];
|
||||
mesh.boundaryMesh()[slavePatchName];
|
||||
|
||||
labelList osf(slavePatch.size());
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName)
|
||||
|
||||
label findPatchID(const polyBoundaryMesh& patches, const word& name)
|
||||
{
|
||||
label patchID = patches.findPatchID(name);
|
||||
const label patchID = patches.findPatchID(name);
|
||||
|
||||
if (patchID == -1)
|
||||
{
|
||||
|
||||
@ -632,7 +632,7 @@ int main(int argc, char *argv[])
|
||||
argList::validArgs.append("thickness");
|
||||
|
||||
#include "addRegionOption.H"
|
||||
argList::validOptions.insert("overwrite", "");
|
||||
#include "addOverwriteOption.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createNamedMesh.H"
|
||||
@ -849,8 +849,7 @@ int main(int argc, char *argv[])
|
||||
nExtrudeFaces = 0;
|
||||
forAll(zoneNames, i)
|
||||
{
|
||||
label zoneI = faceZones.findZoneID(zoneNames[i]);
|
||||
const faceZone& fz = faceZones[zoneI];
|
||||
const faceZone& fz = faceZones[zoneNames[i]];
|
||||
forAll(fz, j)
|
||||
{
|
||||
extrudeTopPatchID[nExtrudeFaces] = interRegionTopPatch[i];
|
||||
|
||||
@ -143,11 +143,19 @@ castellatedMeshControls
|
||||
}
|
||||
}
|
||||
|
||||
// Optional angle to detect small-large cell situation perpendicular
|
||||
// to the surface. Is the angle of face w.r.t the local surface
|
||||
// normal. Use on flat(ish) surfaces only. Otherwise
|
||||
// leave out or set to negative number.
|
||||
//- Optional angle to detect small-large cell situation
|
||||
// perpendicular to the surface. Is the angle of face w.r.t.
|
||||
// the local surface normal. Use on flat(ish) surfaces only.
|
||||
// Otherwise leave out or set to negative number.
|
||||
//perpendicularAngle 10;
|
||||
|
||||
|
||||
//- Optional faceZone and (for closed surface) cellZone with
|
||||
// how to select the cells that are in the cellZone
|
||||
// (inside / outside / specified insidePoint)
|
||||
//faceZone sphere;
|
||||
//cellZone sphere;
|
||||
//cellZoneInside inside; //outside/insidePoint
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
cellSet.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/cellSet
|
||||
|
||||
@ -1,196 +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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Selects a cell set through a dictionary.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
#include "topoSetSource.H"
|
||||
#include "cellSet.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
Info<< "Reading cellSetDict\n" << endl;
|
||||
|
||||
IOdictionary cellSetDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellSetDict",
|
||||
runTime.system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
const word setName(cellSetDict.lookup("name"));
|
||||
const word actionName(cellSetDict.lookup("action"));
|
||||
|
||||
topoSetSource::setAction action = topoSetSource::toAction(actionName);
|
||||
|
||||
|
||||
// Create topoSetSources
|
||||
PtrList<topoSetSource> topoSetSources
|
||||
(
|
||||
cellSetDict.lookup("topoSetSources"),
|
||||
topoSetSource::iNew(mesh)
|
||||
);
|
||||
|
||||
|
||||
// Load set to work
|
||||
autoPtr<topoSet> currentSetPtr(NULL);
|
||||
IOobject::readOption r;
|
||||
|
||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||
{
|
||||
r = IOobject::NO_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new cellSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
mesh.nCells()/10+1 // Reasonable size estimate.
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = IOobject::MUST_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new cellSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
r
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
topoSet& currentSet = currentSetPtr();
|
||||
|
||||
Info<< "Set:" << currentSet.name()
|
||||
<< " Size:" << currentSet.size()
|
||||
<< " Action:" << actionName
|
||||
<< endl;
|
||||
|
||||
if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST))
|
||||
{
|
||||
// currentSet has been read so can make copy.
|
||||
//backup(mesh, setName, currentSet, setName + "_old");
|
||||
}
|
||||
|
||||
if (action == topoSetSource::CLEAR)
|
||||
{
|
||||
// Already handled above by not reading
|
||||
}
|
||||
else if (action == topoSetSource::INVERT)
|
||||
{
|
||||
currentSet.invert(currentSet.maxSize(mesh));
|
||||
}
|
||||
else if (action == topoSetSource::LIST)
|
||||
{
|
||||
currentSet.writeDebug(Info, mesh, 100);
|
||||
Info<< endl;
|
||||
}
|
||||
else if (action == topoSetSource::SUBSET)
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
// Backup current set.
|
||||
autoPtr<topoSet> oldSet
|
||||
(
|
||||
topoSet::New
|
||||
(
|
||||
currentSet.type(),
|
||||
mesh,
|
||||
currentSet.name() + "_old2",
|
||||
currentSet
|
||||
)
|
||||
);
|
||||
|
||||
currentSet.clear();
|
||||
|
||||
topoSetSources[topoSetSourceI].applyToSet
|
||||
(
|
||||
topoSetSource::NEW,
|
||||
currentSet
|
||||
);
|
||||
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet.subset(oldSet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
topoSetSources[topoSetSourceI].applyToSet(action, currentSet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (action != topoSetSource::LIST)
|
||||
{
|
||||
// Set has changed.
|
||||
|
||||
// Sync across coupled patches.
|
||||
currentSet.sync(mesh);
|
||||
|
||||
Info<< "Writing " << currentSet.name()
|
||||
<< " (size " << currentSet.size() << ") to "
|
||||
<< currentSet.instance()/currentSet.local()
|
||||
/currentSet.name()
|
||||
<< endl << endl;
|
||||
|
||||
currentSet.write();
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,149 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object cellSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Name of set to operate on
|
||||
name c0;
|
||||
|
||||
// One of clear/new/invert/add/delete|subset/list
|
||||
action new;
|
||||
|
||||
// Actions to apply to cellSet. These are all the topoSetSource's ending
|
||||
// in ..ToCell (see the meshTools library).
|
||||
|
||||
topoSetSources
|
||||
(
|
||||
// Select by explicitly providing cell labels
|
||||
labelToCell
|
||||
{
|
||||
value (12 13 56); // labels of cells
|
||||
}
|
||||
|
||||
// Copy elements from cellSet
|
||||
cellToCell
|
||||
{
|
||||
set c1;
|
||||
}
|
||||
|
||||
// Cells in cell zone
|
||||
zoneToCell
|
||||
{
|
||||
name ".*Zone"; // Name of cellZone, regular expressions allowed
|
||||
}
|
||||
|
||||
// Cells on master or slave side of faceZone
|
||||
faceZoneToCell
|
||||
{
|
||||
name ".*Zone"; // Name of faceZone, regular expressions allowed
|
||||
option master; // master/slave
|
||||
}
|
||||
|
||||
// Select based on faceSet
|
||||
faceToCell
|
||||
{
|
||||
set f0; // Name of faceSet
|
||||
|
||||
//option neighbour; // cell with neighbour in faceSet
|
||||
//option owner; // ,, owner
|
||||
option any; // cell with any face in faceSet
|
||||
//option all; // cell with all faces in faceSet
|
||||
}
|
||||
|
||||
// Select based on pointSet
|
||||
pointToCell
|
||||
{
|
||||
set p0;
|
||||
option any; // cell with any point in pointSet
|
||||
//option all; // cell with all points in pointSet
|
||||
}
|
||||
|
||||
// Select based on cellShape
|
||||
shapeToCell
|
||||
{
|
||||
type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex
|
||||
}
|
||||
|
||||
// Cells with cell centre within box
|
||||
boxToCell
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
}
|
||||
|
||||
// Cells with cell centre within box
|
||||
// Is skewed, rotated box. Given as origin and three spanning vectors.
|
||||
rotatedBoxToCell
|
||||
{
|
||||
origin (0.2 0.2 -10);
|
||||
i (0.2 0.2 0);
|
||||
j (-0.2 0.2 0);
|
||||
k (10 10 10);
|
||||
}
|
||||
|
||||
// Cells with centre within cylinder
|
||||
cylinderToCell
|
||||
{
|
||||
p1 (0.2 0.2 -10); // start point on cylinder axis
|
||||
p2 (0.2 0.2 0); // end point on cylinder axis
|
||||
radius 5.0;
|
||||
}
|
||||
|
||||
// Cells with centre within sphere
|
||||
sphereToCell
|
||||
{
|
||||
centre (0.2 0.2 -10);
|
||||
radius 5.0;
|
||||
}
|
||||
|
||||
// Cells with cellCentre nearest to coordinates
|
||||
nearestToCell
|
||||
{
|
||||
points ((0 0 0) (1 1 1)(2 2 2));
|
||||
}
|
||||
|
||||
// Select based on surface
|
||||
surfaceToCell
|
||||
{
|
||||
file "www.avl.com-geometry.stl";
|
||||
outsidePoints ((-99 -99 -59)); // definition of outside
|
||||
includeCut false; // cells cut by surface
|
||||
includeInside false; // cells not on outside of surf
|
||||
includeOutside false; // cells on outside of surf
|
||||
nearDistance -1; // cells with centre near surf
|
||||
// (set to -1 if not used)
|
||||
curvature 0.9; // cells within nearDistance
|
||||
// and near surf curvature
|
||||
// (set to -100 if not used)
|
||||
}
|
||||
|
||||
// values of field within certain range
|
||||
fieldToCell
|
||||
{
|
||||
fieldName U; // Note: uses mag(U) since volVectorField
|
||||
min 0.1;
|
||||
max 0.5;
|
||||
}
|
||||
|
||||
// Mesh region (non-face connected part of (subset of)mesh)
|
||||
regionToCell
|
||||
{
|
||||
set c0; // name of cellSet giving mesh subset
|
||||
insidePoint (1 2 3); // point inside region to select
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -48,9 +48,21 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
# include "addRegionOption.H"
|
||||
argList::addBoolOption("noTopology");
|
||||
argList::addBoolOption("allGeometry");
|
||||
argList::addBoolOption("allTopology");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"noTopology",
|
||||
"skip checking the mesh topology"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"allGeometry",
|
||||
"include bounding box checks"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"allTopology",
|
||||
"include extra topology checks"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
|
||||
@ -107,7 +107,7 @@ void modifyOrAddFace
|
||||
|
||||
label findPatchID(const polyMesh& mesh, const word& name)
|
||||
{
|
||||
label patchI = mesh.boundaryMesh().findPatchID(name);
|
||||
const label patchI = mesh.boundaryMesh().findPatchID(name);
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
@ -124,6 +124,12 @@ label findPatchID(const polyMesh& mesh, const word& name)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Makes internal faces into boundary faces.\n"
|
||||
"Does not duplicate points, unlike mergeOrSplitBaffles."
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
|
||||
@ -136,10 +142,23 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
argList::addBoolOption("internalFacesOnly");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
"additionalPatches",
|
||||
"(patch2 .. patchN)",
|
||||
"specify additional patches for creating baffles"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"internalFacesOnly",
|
||||
"do not convert boundary faces"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
|
||||
@ -672,17 +672,17 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const dictionary& dict = patchSources[addedI];
|
||||
|
||||
word patchName(dict.lookup("name"));
|
||||
|
||||
const word patchName(dict.lookup("name"));
|
||||
label destPatchI = patches.findPatchID(patchName);
|
||||
|
||||
if (destPatchI == -1)
|
||||
{
|
||||
FatalErrorIn(args.executable()) << "patch " << patchName
|
||||
<< " not added. Problem." << abort(FatalError);
|
||||
FatalErrorIn(args.executable())
|
||||
<< "patch " << patchName << " not added. Problem."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
word sourceType(dict.lookup("constructFrom"));
|
||||
const word sourceType(dict.lookup("constructFrom"));
|
||||
|
||||
if (sourceType == "patches")
|
||||
{
|
||||
@ -710,7 +710,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (sourceType == "set")
|
||||
{
|
||||
word setName(dict.lookup("set"));
|
||||
const word setName(dict.lookup("set"));
|
||||
|
||||
faceSet faces(mesh, setName);
|
||||
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
faceSet.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/faceSet
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools
|
||||
@ -1,196 +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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Selects a face set through a dictionary.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
#include "topoSetSource.H"
|
||||
#include "faceSet.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
Info<< "Reading faceSetDict\n" << endl;
|
||||
|
||||
IOdictionary faceSetDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"faceSetDict",
|
||||
runTime.system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
const word setName(faceSetDict.lookup("name"));
|
||||
const word actionName(faceSetDict.lookup("action"));
|
||||
|
||||
topoSetSource::setAction action = topoSetSource::toAction(actionName);
|
||||
|
||||
|
||||
// Create topoSetSources
|
||||
PtrList<topoSetSource> topoSetSources
|
||||
(
|
||||
faceSetDict.lookup("topoSetSources"),
|
||||
topoSetSource::iNew(mesh)
|
||||
);
|
||||
|
||||
|
||||
// Load set to work
|
||||
autoPtr<topoSet> currentSetPtr(NULL);
|
||||
IOobject::readOption r;
|
||||
|
||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||
{
|
||||
r = IOobject::NO_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new faceSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
mesh.nFaces()/10+1 // Reasonable size estimate.
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = IOobject::MUST_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new faceSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
r
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
topoSet& currentSet = currentSetPtr();
|
||||
|
||||
Info<< "Set:" << currentSet.name()
|
||||
<< " Size:" << currentSet.size()
|
||||
<< " Action:" << actionName
|
||||
<< endl;
|
||||
|
||||
if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST))
|
||||
{
|
||||
// currentSet has been read so can make copy.
|
||||
//backup(mesh, setName, currentSet, setName + "_old");
|
||||
}
|
||||
|
||||
if (action == topoSetSource::CLEAR)
|
||||
{
|
||||
// Already handled above by not reading
|
||||
}
|
||||
else if (action == topoSetSource::INVERT)
|
||||
{
|
||||
currentSet.invert(currentSet.maxSize(mesh));
|
||||
}
|
||||
else if (action == topoSetSource::LIST)
|
||||
{
|
||||
currentSet.writeDebug(Info, mesh, 100);
|
||||
Info<< endl;
|
||||
}
|
||||
else if (action == topoSetSource::SUBSET)
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
// Backup current set.
|
||||
autoPtr<topoSet> oldSet
|
||||
(
|
||||
topoSet::New
|
||||
(
|
||||
currentSet.type(),
|
||||
mesh,
|
||||
currentSet.name() + "_old2",
|
||||
currentSet
|
||||
)
|
||||
);
|
||||
|
||||
currentSet.clear();
|
||||
|
||||
topoSetSources[topoSetSourceI].applyToSet
|
||||
(
|
||||
topoSetSource::NEW,
|
||||
currentSet
|
||||
);
|
||||
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet.subset(oldSet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
topoSetSources[topoSetSourceI].applyToSet(action, currentSet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (action != topoSetSource::LIST)
|
||||
{
|
||||
// Set has changed.
|
||||
|
||||
// Sync across coupled patches.
|
||||
currentSet.sync(mesh);
|
||||
|
||||
Info<< "Writing " << currentSet.name()
|
||||
<< " (size " << currentSet.size() << ") to "
|
||||
<< currentSet.instance()/currentSet.local()
|
||||
/currentSet.name()
|
||||
<< endl << endl;
|
||||
|
||||
currentSet.write();
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,82 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object faceSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Name of set to operate on
|
||||
name f0;
|
||||
|
||||
// One of clear/new/invert/add/delete|subset/list
|
||||
action new;
|
||||
|
||||
// Actions to apply to pointSet. These are all the topoSetSource's ending
|
||||
// in ..ToFace (see the meshTools library).
|
||||
topoSetSources
|
||||
(
|
||||
// Copy elements from faceSet
|
||||
faceToFace
|
||||
{
|
||||
set f1;
|
||||
}
|
||||
|
||||
// Select based on cellSet
|
||||
cellToFace
|
||||
{
|
||||
set c0;
|
||||
option all; // All faces of cells
|
||||
//option both; // Only faces whose owner&neighbour are in cellSet
|
||||
}
|
||||
|
||||
// Select based on pointSet
|
||||
pointToFace
|
||||
{
|
||||
set p0;
|
||||
option any; // Faces using any point in pointSet
|
||||
//option all // Faces with all points in pointSet
|
||||
}
|
||||
|
||||
// Select by explicitly providing face labels
|
||||
labelToFace
|
||||
{
|
||||
value (12 13 56); // labels of faces
|
||||
}
|
||||
|
||||
// All faces of patch
|
||||
patchToFace
|
||||
{
|
||||
name ".*Wall"; // Name of patch, regular expressions allowed
|
||||
}
|
||||
|
||||
// All faces of faceZone
|
||||
zoneToFace
|
||||
{
|
||||
name ".*Zone1"; // Name of faceZone, regular expressions allowed
|
||||
}
|
||||
|
||||
// Faces with face centre within box
|
||||
boxToFace
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
}
|
||||
|
||||
// Faces with normal to within certain angle aligned with vector.
|
||||
normalToFace
|
||||
{
|
||||
normal (0 0 1); // Vector
|
||||
cos 0.01; // Tolerance (max cos of angle)
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,15 +1,22 @@
|
||||
Info<< nl << "Create Times" << endl;
|
||||
|
||||
const fileName masterCasePath = masterCase.path();
|
||||
const fileName masterCaseName = masterCase.name();
|
||||
|
||||
Time runTimeMaster
|
||||
(
|
||||
Time::controlDictName,
|
||||
rootDirMaster,
|
||||
caseDirMaster
|
||||
masterCasePath,
|
||||
masterCaseName
|
||||
);
|
||||
|
||||
const fileName addCasePath = addCase.path();
|
||||
const fileName addCaseName = addCase.name();
|
||||
|
||||
Time runTimeToAdd
|
||||
(
|
||||
Time::controlDictName,
|
||||
rootDirToAdd,
|
||||
caseDirToAdd
|
||||
addCasePath,
|
||||
addCaseName
|
||||
);
|
||||
|
||||
|
||||
@ -32,16 +32,74 @@ Description
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
void getRootCase(fileName& casePath)
|
||||
{
|
||||
casePath.clean();
|
||||
|
||||
if (casePath.empty() || casePath == ".")
|
||||
{
|
||||
// handle degenerate form and '.'
|
||||
casePath = cwd();
|
||||
}
|
||||
else if (casePath[0] != '/' && casePath.name() == "..")
|
||||
{
|
||||
// avoid relative cases ending in '..' - makes for very ugly names
|
||||
casePath = cwd()/casePath;
|
||||
casePath.clean();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"merge two meshes"
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
# include "setRoots.H"
|
||||
argList::validArgs.append("masterCase");
|
||||
argList::addOption
|
||||
(
|
||||
"masterRegion",
|
||||
"name",
|
||||
"specify alternative mesh region for the master mesh"
|
||||
);
|
||||
|
||||
argList::validArgs.append("addCase");
|
||||
argList::addOption
|
||||
(
|
||||
"addRegion",
|
||||
"name",
|
||||
"specify alternative mesh region for the additional mesh"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
if (!args.check())
|
||||
{
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
fileName masterCase = args[1];
|
||||
word masterRegion = polyMesh::defaultRegion;
|
||||
args.optionReadIfPresent("masterRegion", masterRegion);
|
||||
|
||||
fileName addCase = args[2];
|
||||
word addRegion = polyMesh::defaultRegion;
|
||||
args.optionReadIfPresent("addRegion", addRegion);
|
||||
|
||||
getRootCase(masterCase);
|
||||
getRootCase(addCase);
|
||||
|
||||
Info<< "Master: " << masterCase << " region " << masterRegion << nl
|
||||
<< "mesh to add: " << addCase << " region " << addRegion << endl;
|
||||
|
||||
#include "createTimes.H"
|
||||
|
||||
Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << endl;
|
||||
Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << nl;
|
||||
|
||||
Info<< "Create mesh\n" << endl;
|
||||
mergePolyMesh masterMesh
|
||||
@ -55,7 +113,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << endl;
|
||||
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl;
|
||||
|
||||
Info<< "Create mesh\n" << endl;
|
||||
polyMesh meshToAdd
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
argList::validArgs.clear();
|
||||
|
||||
argList::validArgs.append("master root");
|
||||
argList::validArgs.append("master case");
|
||||
argList::addOption("masterRegion", "name");
|
||||
|
||||
argList::validArgs.append("root to add");
|
||||
argList::validArgs.append("case to add");
|
||||
argList::addOption("addRegion", "name");
|
||||
|
||||
argList args(argc, argv);
|
||||
|
||||
if (!args.check())
|
||||
{
|
||||
FatalError.exit();
|
||||
}
|
||||
|
||||
fileName rootDirMaster = args[1];
|
||||
fileName caseDirMaster = args[2];
|
||||
word masterRegion = polyMesh::defaultRegion;
|
||||
args.optionReadIfPresent("masterRegion", masterRegion);
|
||||
|
||||
fileName rootDirToAdd = args[3];
|
||||
fileName caseDirToAdd = args[4];
|
||||
word addRegion = polyMesh::defaultRegion;
|
||||
args.optionReadIfPresent("addRegion", addRegion);
|
||||
|
||||
Info<< "Master: " << rootDirMaster << " " << caseDirMaster
|
||||
<< " region " << masterRegion << nl
|
||||
<< "mesh to add: " << rootDirToAdd << " " << caseDirToAdd
|
||||
<< " region " << addRegion << endl;
|
||||
|
||||
@ -221,15 +221,30 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Detect faces that share points (baffles).\n"
|
||||
"Merge them or duplicate the points."
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption("split");
|
||||
argList::addBoolOption("detectOnly");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"detectOnly",
|
||||
"find baffles only, but do not merge or split them"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"split",
|
||||
"topologically split duplicate surfaces"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const bool split = args.optionFound("split");
|
||||
@ -248,12 +263,10 @@ int main(int argc, char *argv[])
|
||||
if (detectOnly)
|
||||
{
|
||||
findBaffles(mesh, boundaryFaces);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Read objects in time directory
|
||||
IOobjectList objects(mesh, runTime.timeName());
|
||||
|
||||
|
||||
@ -110,7 +110,6 @@ labelList parseVertices(const string& line)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::validArgs.clear();
|
||||
argList::validArgs.append("OBJ file");
|
||||
argList::validArgs.append("output VTK file");
|
||||
argList args(argc, argv);
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
pointSet.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/pointSet
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools
|
||||
@ -1,196 +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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Selects a point set through a dictionary.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "Time.H"
|
||||
#include "polyMesh.H"
|
||||
#include "topoSetSource.H"
|
||||
#include "pointSet.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Main program:
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
Info<< "Reading pointSetDict\n" << endl;
|
||||
|
||||
IOdictionary pointSetDict
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pointSetDict",
|
||||
runTime.system(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
const word setName(pointSetDict.lookup("name"));
|
||||
const word actionName(pointSetDict.lookup("action"));
|
||||
|
||||
topoSetSource::setAction action = topoSetSource::toAction(actionName);
|
||||
|
||||
|
||||
// Create topoSetSources
|
||||
PtrList<topoSetSource> topoSetSources
|
||||
(
|
||||
pointSetDict.lookup("topoSetSources"),
|
||||
topoSetSource::iNew(mesh)
|
||||
);
|
||||
|
||||
|
||||
// Load set to work
|
||||
autoPtr<topoSet> currentSetPtr(NULL);
|
||||
IOobject::readOption r;
|
||||
|
||||
if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR))
|
||||
{
|
||||
r = IOobject::NO_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new pointSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
mesh.nPoints()/10+1 // Reasonable size estimate.
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = IOobject::MUST_READ;
|
||||
|
||||
currentSetPtr.reset
|
||||
(
|
||||
new pointSet
|
||||
(
|
||||
mesh,
|
||||
setName,
|
||||
r
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
topoSet& currentSet = currentSetPtr();
|
||||
|
||||
Info<< "Set:" << currentSet.name()
|
||||
<< " Size:" << currentSet.size()
|
||||
<< " Action:" << actionName
|
||||
<< endl;
|
||||
|
||||
if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST))
|
||||
{
|
||||
// currentSet has been read so can make copy.
|
||||
//backup(mesh, setName, currentSet, setName + "_old");
|
||||
}
|
||||
|
||||
if (action == topoSetSource::CLEAR)
|
||||
{
|
||||
// Already handled above by not reading
|
||||
}
|
||||
else if (action == topoSetSource::INVERT)
|
||||
{
|
||||
currentSet.invert(currentSet.maxSize(mesh));
|
||||
}
|
||||
else if (action == topoSetSource::LIST)
|
||||
{
|
||||
currentSet.writeDebug(Info, mesh, 100);
|
||||
Info<< endl;
|
||||
}
|
||||
else if (action == topoSetSource::SUBSET)
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
// Backup current set.
|
||||
autoPtr<topoSet> oldSet
|
||||
(
|
||||
topoSet::New
|
||||
(
|
||||
currentSet.type(),
|
||||
mesh,
|
||||
currentSet.name() + "_old2",
|
||||
currentSet
|
||||
)
|
||||
);
|
||||
|
||||
currentSet.clear();
|
||||
|
||||
topoSetSources[topoSetSourceI].applyToSet
|
||||
(
|
||||
topoSetSource::NEW,
|
||||
currentSet
|
||||
);
|
||||
|
||||
// Combine new value of currentSet with old one.
|
||||
currentSet.subset(oldSet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Apply topoSetSources to it to handle new/add/delete
|
||||
forAll(topoSetSources, topoSetSourceI)
|
||||
{
|
||||
topoSetSources[topoSetSourceI].applyToSet(action, currentSet);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (action != topoSetSource::LIST)
|
||||
{
|
||||
// Set has changed.
|
||||
|
||||
// Sync across coupled patches.
|
||||
currentSet.sync(mesh);
|
||||
|
||||
Info<< "Writing " << currentSet.name()
|
||||
<< " (size " << currentSet.size() << ") to "
|
||||
<< currentSet.instance()/currentSet.local()
|
||||
/currentSet.name()
|
||||
<< endl << endl;
|
||||
|
||||
currentSet.write();
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,84 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object pointSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Name of set to operate on
|
||||
name p0;
|
||||
|
||||
// One of clear/new/invert/add/delete|subset/list
|
||||
action new;
|
||||
|
||||
// Actions to apply to pointSet. These are all the topoSetSource's ending
|
||||
// in ..ToPoint (see the meshTools library).
|
||||
topoSetSources
|
||||
(
|
||||
// Copy elements from pointSet
|
||||
pointToPoint
|
||||
{
|
||||
set p1;
|
||||
}
|
||||
|
||||
// Select based on cellSet
|
||||
cellToPoint
|
||||
{
|
||||
set c0;
|
||||
option all; // all points of cell
|
||||
}
|
||||
|
||||
// Select based on faceSet
|
||||
faceToPoint
|
||||
{
|
||||
set f0; // name of faceSet
|
||||
option all; // all points of face
|
||||
}
|
||||
|
||||
// Select by explicitly providing point labels
|
||||
labelToPoint
|
||||
{
|
||||
value (12 13 56); // labels of points
|
||||
}
|
||||
|
||||
// All points in pointzone
|
||||
zoneToPoint
|
||||
{
|
||||
name ".*Zone"; // name of pointZone, regular expressions allowed
|
||||
}
|
||||
|
||||
// Points nearest to coordinates
|
||||
nearestToPoint
|
||||
{
|
||||
points ((0 0 0) (1 1 1));
|
||||
}
|
||||
|
||||
// Points with coordinate within box
|
||||
boxToPoint
|
||||
{
|
||||
box (0 0 0) (1 1 1);
|
||||
}
|
||||
|
||||
// Select based on surface
|
||||
surfaceToPoint
|
||||
{
|
||||
file "www.avl.com-geometry.stl";
|
||||
nearDistance 0.1; // points near to surface
|
||||
includeInside false; // points on inside of surface
|
||||
// (requires closed surface with consistent
|
||||
// normals)
|
||||
includeOutside false; // ,, outside ,,
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -290,8 +290,17 @@ label twoDNess(const polyMesh& mesh)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"refine cells in multiple directions"
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
argList::addBoolOption("dict");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"dict",
|
||||
"refine according to system/refineMeshDict"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
@ -301,7 +310,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
printEdgeStats(mesh);
|
||||
|
||||
|
||||
//
|
||||
// Read/construct control dictionary
|
||||
//
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user