Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
laurence 2013-06-26 15:56:59 +01:00
commit e2f62ee317
57 changed files with 433 additions and 385 deletions

View File

@ -52,7 +52,6 @@
phiAbs = phi;
phiAbs.oldTime() = phi;
fvc::makeRelative(phi, U);
phi.oldTime() = phi;
}
}
}

View File

@ -81,6 +81,9 @@ int main(int argc, char *argv[])
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
{
// Ensure old-time U exists for mapping
U.oldTime();
// Calculate the relative velocity used to map the relative flux phi
volVectorField Urel("Urel", U);

View File

@ -812,7 +812,7 @@ void Foam::multiphaseSystem::solve()
const Time& runTime = mesh_.time();
const dictionary& alphaControls = mesh_.solverDict(phases_.first().name());
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
if (nAlphaSubCycles > 1)

View File

@ -166,6 +166,9 @@
{
phaseModel& phase = iter();
phase.phi().boundaryField() ==
(mesh.Sf().boundaryField() & phase.U().boundaryField());
mrfZones.relativeFlux(phase.phi().oldTime());
mrfZones.relativeFlux(phase.phi());

View File

@ -246,7 +246,7 @@ void Foam::multiphaseMixture::solve()
volScalarField& alpha = phases_.first();
const dictionary& alphaControls = mesh_.solverDict(alpha.name());
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
scalar cAlpha(readScalar(alphaControls.lookup("cAlpha")));

View File

@ -219,8 +219,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
true
);
scalarField internalClosenessPointField =
patchInterpolate.faceToPointInterpolate(internalCloseness);
scalarField internalClosenessPointField
(
patchInterpolate.faceToPointInterpolate(internalCloseness)
);
forAll(pointCellSize, pI)
{
@ -254,8 +256,10 @@ Foam::tmp<Foam::triSurfacePointScalarField> Foam::automatic::load()
true
);
scalarField featureProximityPointField =
patchInterpolate.faceToPointInterpolate(featureProximity);
scalarField featureProximityPointField
(
patchInterpolate.faceToPointInterpolate(featureProximity)
);
forAll(pointCellSize, pI)
{

View File

@ -80,7 +80,8 @@ Foam::searchableBoxFeatures::features() const
{
autoPtr<extendedFeatureEdgeMesh> features;
vectorField faceNormals(List<vector>(treeBoundBox::faceNormals));
List<vector> faceNormalsList(treeBoundBox::faceNormals);
vectorField faceNormals(faceNormalsList);
vectorField edgeDirections(12);
labelListList normalDirections(12);

View File

@ -1,7 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
EXE_LIBS = \
-ltriSurface \
-lsurfMesh \
-lmeshTools

View File

@ -35,6 +35,7 @@ Description
#include "triSurfaceSearch.H"
#include "argList.H"
#include "OFstream.H"
#include "OBJstream.H"
#include "surfaceIntersection.H"
#include "SortableList.H"
#include "PatchTools.H"
@ -615,8 +616,6 @@ int main(int argc, char *argv[])
subSurf.write(subFileName);
}
return 0;
}
@ -654,61 +653,75 @@ int main(int argc, char *argv[])
triSurfaceSearch querySurf(surf);
//{
// OBJstream intStream("selfInter2.obj");
// const indexedOctree<treeDataTriSurface>& tree = querySurf.tree();
// forAll(surf.edges(), edgeI)
// {
// const edge& e = surf.edges()[edgeI];
//
// pointIndexHit hitInfo
// (
// tree.findLine
// (
// surf.points()[surf.meshPoints()[e[0]]],
// surf.points()[surf.meshPoints()[e[1]]],
// treeDataTriSurface::findSelfIntersectOp
// (
// tree,
// edgeI
// )
// )
// );
//
// if (hitInfo.hit())
// {
// Pout<< "Found hit:" << hitInfo.hitPoint() << endl;
// intStream.write(hitInfo.hitPoint());
// }
// }
//}
const indexedOctree<treeDataTriSurface>& tree = querySurf.tree();
surfaceIntersection inter(querySurf);
OBJstream intStream("selfInterPoints.obj");
if (inter.cutEdges().empty() && inter.cutPoints().empty())
label nInt = 0;
forAll(surf.edges(), edgeI)
{
const edge& e = surf.edges()[edgeI];
pointIndexHit hitInfo
(
tree.findLine
(
surf.points()[surf.meshPoints()[e[0]]],
surf.points()[surf.meshPoints()[e[1]]],
treeDataTriSurface::findSelfIntersectOp
(
tree,
edgeI
)
)
);
if (hitInfo.hit())
{
intStream.write(hitInfo.hitPoint());
nInt++;
}
}
if (nInt == 0)
{
Info<< "Surface is not self-intersecting" << endl;
}
else
{
Info<< "Surface is self-intersecting" << endl;
Info<< "Writing edges of intersection to selfInter.obj" << endl;
OFstream intStream("selfInter.obj");
forAll(inter.cutPoints(), cutPointI)
{
const point& pt = inter.cutPoints()[cutPointI];
intStream << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z()
Info<< "Surface is self-intersecting at " << nInt
<< " locations." << endl;
Info<< "Writing intersection points to " << intStream.name()
<< endl;
}
forAll(inter.cutEdges(), cutEdgeI)
{
const edge& e = inter.cutEdges()[cutEdgeI];
intStream << "l " << e.start()+1 << ' ' << e.end()+1 << endl;
}
}
//surfaceIntersection inter(querySurf);
//
//if (inter.cutEdges().empty() && inter.cutPoints().empty())
//{
// Info<< "Surface is not self-intersecting" << endl;
//}
//else
//{
// Info<< "Surface is self-intersecting" << endl;
// Info<< "Writing edges of intersection to selfInter.obj" << endl;
//
// OFstream intStream("selfInter.obj");
// forAll(inter.cutPoints(), cutPointI)
// {
// const point& pt = inter.cutPoints()[cutPointI];
//
// intStream << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z()
// << endl;
// }
// forAll(inter.cutEdges(), cutEdgeI)
// {
// const edge& e = inter.cutEdges()[cutEdgeI];
//
// intStream << "l " << e.start()+1 << ' ' << e.end()+1 << endl;
// }
//}
Info<< endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,10 +41,9 @@ SourceFiles
#define pointConstraint_H
#include "label.H"
#include "uLabel.H"
#include "vector.H"
#include "tensor.H"
#include "Tuple2.H"
#include "transform.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,6 +66,9 @@ public:
//- Construct null
inline pointConstraint();
//- Construct from components
inline pointConstraint(const Tuple2<label, vector>&);
//- Construct from Istream
inline pointConstraint(Istream&);
@ -84,6 +86,23 @@ public:
};
//- reduce operator
class combineConstraintsEqOp
{
public:
inline void operator()(pointConstraint&, const pointConstraint&) const;
};
//- transformation function
inline pointConstraint transform(const tensor& tt, const pointConstraint& v);
//- contiguous
template<class T> bool contiguous();
template<>
inline bool contiguous<pointConstraint>() {return true;}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,6 +31,12 @@ inline Foam::pointConstraint::pointConstraint()
{}
inline Foam::pointConstraint::pointConstraint(const Tuple2<label, vector>& pc)
:
Tuple2<label, vector>(pc)
{}
inline Foam::pointConstraint::pointConstraint(Istream& is)
:
Tuple2<label, vector>(is)
@ -130,4 +136,27 @@ Foam::tensor Foam::pointConstraint::constraintTransformation() const
}
void Foam::combineConstraintsEqOp::operator()
(
pointConstraint& x,
const pointConstraint& y
) const
{
x.combine(y);
}
Foam::pointConstraint Foam::transform
(
const tensor& tt,
const pointConstraint& v
)
{
return pointConstraint
(
Tuple2<label, vector>(v.first(), transform(tt, v.second()))
);
}
// ************************************************************************* //

View File

@ -174,14 +174,17 @@ void Foam::faceZone::checkAddressing() const
const labelList& mf = *this;
// Note: nFaces, nCells might not be set yet on mesh so use owner size
const label nFaces = zoneMesh().mesh().faceOwner().size();
bool hasWarned = false;
forAll(mf, i)
{
if (!hasWarned && (mf[i] < 0 || mf[i] >= zoneMesh().mesh().nFaces()))
if (!hasWarned && (mf[i] < 0 || mf[i] >= nFaces))
{
WarningIn("void Foam::faceZone::checkAddressing() const")
<< "Illegal face index " << mf[i] << " outside range 0.."
<< zoneMesh().mesh().nFaces()-1 << endl;
<< nFaces-1 << endl;
hasWarned = true;
}
}

View File

@ -56,20 +56,7 @@ reconstruct
const fvMesh& mesh = ssf.mesh();
surfaceVectorField faceVols
(
mesh.Sf()/(mesh.magSf()*mesh.nonOrthDeltaCoeffs())
);
faceVols.internalField() *= (1.0 - mesh.weights().internalField());
forAll(faceVols.boundaryField(), patchi)
{
if (faceVols.boundaryField()[patchi].coupled())
{
faceVols.boundaryField()[patchi] *=
(1.0 - mesh.weights().boundaryField()[patchi]);
}
}
surfaceVectorField SfHat(mesh.Sf()/mesh.magSf());
tmp<GeometricField<GradType, fvPatchField, volMesh> > treconField
(
@ -83,7 +70,7 @@ reconstruct
IOobject::NO_READ,
IOobject::NO_WRITE
),
inv(surfaceSum(mesh.Sf()*faceVols))&surfaceSum(faceVols*ssf),
inv(surfaceSum(SfHat*mesh.Sf()))&surfaceSum(SfHat*ssf),
zeroGradientFvPatchField<GradType>::typeName
)
);

View File

@ -47,8 +47,8 @@ namespace Foam
defineTemplateTypeNameAndDebugWithName \
( \
SS##Schem##Comp##SThermo##GThermo, \
(#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \
+ GThermo::typeName() + ">>").c_str(), \
(#SS"<" + word(Schem::typeName_()) + "<"#Comp"," + SThermo::typeName()\
+ "," + GThermo::typeName() + ">>").c_str(), \
0 \
); \
\

View File

@ -24,13 +24,13 @@ boundaryField
movingWall
{
type compressible::epsilonWallFunction;
value uniform 0;
value $internalField;
}
fixedWalls
{
type compressible::epsilonWallFunction;
value uniform 0;
value $internalField;
}
frontAndBack

View File

@ -24,13 +24,13 @@ boundaryField
rotor
{
type epsilonWallFunction;
value uniform 0;
value $internalField;
}
stator
{
type epsilonWallFunction;
value uniform 0;
value $internalField;
}
front

View File

@ -1,81 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8
(
inlet
{
type patch;
nFaces 40;
startFace 21464;
}
outlet
{
type patch;
nFaces 96;
startFace 21504;
}
walls
{
type wall;
nFaces 320;
startFace 21600;
}
defaultFaces
{
type empty;
inGroups 1(empty);
nFaces 21760;
startFace 21920;
}
ACMI1_blockage
{
type wall;
nFaces 40;
startFace 43680;
}
ACMI1_couple
{
type cyclicACMI;
inGroups 1(cyclicACMI);
nFaces 40;
startFace 43720;
matchTolerance 0.0001;
transform noOrdering;
neighbourPatch ACMI2_couple;
nonOverlapPatch ACMI1_blockage;
}
ACMI2_blockage
{
type wall;
nFaces 96;
startFace 43760;
}
ACMI2_couple
{
type cyclicACMI;
inGroups 1(cyclicACMI);
nFaces 96;
startFace 43856;
matchTolerance 0.0001;
transform noOrdering;
neighbourPatch ACMI1_couple;
nonOverlapPatch ACMI2_blockage;
}
)
// ************************************************************************* //

View File

@ -43,7 +43,7 @@ boundaryField
defaultFaces
{
type epsilonWallFunction;
value uniform 0;
value $internalField;
}
}

View File

@ -24,13 +24,13 @@ boundaryField
rotor
{
type epsilonWallFunction;
value uniform 0;
value $internalField;
}
stator
{
type epsilonWallFunction;
value uniform 0;
value $internalField;
}
front

View File

@ -54,7 +54,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value $internalField;
}
}

View File

@ -54,7 +54,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value $internalField;
}
}

View File

@ -54,7 +54,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value $internalField;
}
}

View File

@ -54,7 +54,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value $internalField;
}
}

View File

@ -54,7 +54,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value $internalField;
}
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -79,10 +86,6 @@ PIMPLE
nCorrectors 1;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
maxCo 0.9;
maxAlphaCo 0.2;
nAlphaSweepIter 1;

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -55,9 +62,7 @@ PIMPLE
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha
{
nAlphaCorr 4;
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -55,10 +62,7 @@ PIMPLE
momentumPredictor no;
nCorrectors 4;
nNonOrthogonalCorrectors 0;
nAlphaCorr 4;
nAlphaSubCycles 4;
cycleAlpha yes;
cAlpha 2;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alphawater
{
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -107,9 +114,6 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alphawater
{
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -107,9 +114,6 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 1;
cAlpha 1;
}

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alphaair
{
nAlphaCorr 1;
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -55,14 +61,6 @@ solvers
relTol 0;
}
"alpha.*"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
"(k|epsilon|Theta).*"
{
solver PBiCG;
@ -77,8 +75,6 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
}
relaxationFactors

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -67,8 +73,7 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -102,9 +109,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
pRefPoint (0.51 0.51 0.51);
pRefValue 0;

View File

@ -29,6 +29,13 @@ solvers
mergeLevels 1;
}
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -115,9 +122,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
correctPhi yes;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0 0 0.15);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0 0 0.15);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0 0 0.15);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0 0 0.15);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0 0 0.15);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
}
pcorr
{
solver PCG;
@ -94,9 +101,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefPoint (0.0013 0.0017 0.0017);

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -100,9 +107,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 1;
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -63,9 +70,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -63,9 +70,6 @@ PIMPLE
momentumPredictor yes;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}
relaxationFactors

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -39,14 +46,6 @@ solvers
maxIter 100;
}
/* pcorr
{
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0;
};
*/
p_rgh
{
$pcorr;
@ -79,10 +78,6 @@ PIMPLE
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
maxCo 0.5;
maxAlphaCo 0.2;
nAlphaSweepIter 1;

View File

@ -17,6 +17,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -68,10 +75,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
}
relaxationFactors

View File

@ -16,6 +16,13 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}
pcorr
{
solver PCG;
@ -58,9 +65,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
}

View File

@ -17,6 +17,11 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -92,7 +97,6 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 2;
}
relaxationFactors

View File

@ -17,6 +17,11 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 3;
}
p
{
solver GAMG;
@ -83,7 +88,6 @@ PIMPLE
{
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 3;
}
relaxationFactors

View File

@ -17,6 +17,11 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 3;
}
p
{
solver GAMG;
@ -83,7 +88,6 @@ PIMPLE
{
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 3;
}
relaxationFactors

View File

@ -17,6 +17,11 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -84,7 +89,7 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 2;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -98,8 +104,6 @@ PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 4;
cAlpha 2;
}
relaxationFactors

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha
{
nAlphaSubCycles 4;
cAlpha 2;
}
pcorr
{
solver PCG;
@ -92,8 +98,6 @@ PIMPLE
momentumPredictor no;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 4;
cAlpha 2;
}
relaxationFactors

View File

@ -19,6 +19,9 @@ solvers
{
"alpha1.*"
{
nAlphaSubCycles 2;
nAlphaCorr 1;
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-9;
@ -66,8 +69,7 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaSubCycles 2;
nAlphaCorr 1;
pRefValue 0;
pRefPoint (0.1 0.1 1);
}

View File

@ -17,6 +17,17 @@ FoamFile
solvers
{
"alpha1.*"
{
nAlphaCorr 1;
nAlphaSubCycles 3;
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0.1;
}
p
{
solver GAMG;
@ -52,26 +63,6 @@ solvers
$k;
relTol 0;
}
alpha1
{
nAlphaCorr 2;
nAlphaSubCycles 3;
}
alpha
{
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0.1;
}
alpha1Final
{
$alpha;
relTol 0;
}
}
PIMPLE
@ -79,6 +70,7 @@ PIMPLE
nCorrectors 2;
nNonOrthogonalCorrectors 0;
correctAlpha yes;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
}
p
{
solver GAMG;
@ -54,31 +60,14 @@ solvers
tolerance 1e-05;
relTol 0;
}
alpha
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0.1;
}
alpha1Final
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
correctAlpha yes;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 2;
}
p
{
solver GAMG;
@ -54,31 +60,14 @@ solvers
tolerance 1e-05;
relTol 0;
}
alpha
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0.1;
}
alpha1Final
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 2;
correctAlpha yes;
pRefCell 0;
pRefValue 0;
}

View File

@ -17,6 +17,12 @@ FoamFile
solvers
{
alpha1
{
nAlphaCorr 1;
nAlphaSubCycles 3;
}
p
{
solver GAMG;
@ -53,14 +59,6 @@ solvers
relTol 0;
}
"alpha.*"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
"(k|epsilon|Theta|T).*"
{
solver PBiCG;
@ -75,9 +73,8 @@ PIMPLE
nOuterCorrectors 1;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nAlphaCorr 1;
nAlphaSubCycles 3;
correctAlpha yes;
pRefCell 0;
pRefValue 0;
}

View File

@ -50,7 +50,6 @@ The 'target' is a Makefile target:
e.g., Make/linux64GccDPOpt/fvMesh.o
or a special target:
dwim search up directories tree for Make sub-directory and build
all all subdirectories, uses any Allwmake files if they exist
exe build statically linked executable
lib build statically linked archive lib (.a)
@ -86,9 +85,11 @@ do
esac
done
#
# check environment variables
#
#------------------------------------------------------------------------------
# Check environment variables
#------------------------------------------------------------------------------
for check in WM_OPTIONS WM_LINK_LANGUAGE WM_DIR
do
eval test "\$$check" || {
@ -109,7 +110,7 @@ done
#------------------------------------------------------------------------------
# Select the version of make to be used
# Select the version of make use
#------------------------------------------------------------------------------
# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
@ -169,51 +170,6 @@ then
fi
#------------------------------------------------------------------------------
# Search up directories tree for the Make sub-directory and build there
#------------------------------------------------------------------------------
unset dir
MakeDir=Make
expandpath()
{
dir=`dirname $1`
cwd=$PWD
cd $dir
exPath=$PWD
cd $cwd
}
find_target()
{
expandpath $1
if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then
echo "$Script error: could not find Make directory"
elif [ -d "$1/Make" ]; then
echo Target $1
dir=$1
else
find_target "$1/.."
fi
}
if [ "$makeType" = dwim ]
then
find_target .
makeType=
if [ "$dir" ]
then
cd $dir 2>/dev/null || {
echo "$Script error: could not change to directory '$dir'" 1>&2
exit 1
}
fi
fi
#------------------------------------------------------------------------------
# Recurse the application directories tree
#------------------------------------------------------------------------------
@ -236,19 +192,65 @@ fi
#------------------------------------------------------------------------------
# Require the existence of the 'Make' directory and 'files' file
# Search up directories tree for the Make sub-directory and build there
# Also check the existance of the 'files' file
#------------------------------------------------------------------------------
[ -d $MakeDir ] || {
echo "$Script error: '$MakeDir' directory does not exist in $PWD" 1>&2
exit 1
unset dir
MakeDir=Make
expandpath()
{
dir=`dirname $1`
cwd=$PWD
cd $dir
exPath=$PWD
cd $cwd
}
find_target()
{
expandpath $1
if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]
then
echo "$Script error: could not find Make directory"
elif [ -d "$1/Make" ]; then
echo " Found target directory " $1
dir=$1
else
find_target "$1/.."
fi
}
if [ ! -d $MakeDir ]
then
echo "$Script: '$MakeDir' directory does not exist in $PWD" 1>&2
echo " Searching up directories tree for Make directory"
find_target .
makeType=
if [ "$dir" ]
then
cd $dir 2>/dev/null || {
echo "$Script error: could not change to directory '$dir'" 1>&2
exit 1
}
fi
fi
[ -r $MakeDir/files ] || {
echo "$Script error: file '$MakeDir/files' does not exist in $PWD" 1>&2
exit 1
}
#------------------------------------------------------------------------------
# Transform options
#------------------------------------------------------------------------------
# transform "all" or no option to "libso" if that looks appropriate or remove it
# so that the call to make builds the application
if [ "$makeType" = all -o "$makeType" = "" ]
@ -261,8 +263,11 @@ then
fi
#------------------------------------------------------------------------------
# Spawn a sub-shell and unset MAKEFLAGS in that sub-shell to avoid
# files and options being built in parallel
#------------------------------------------------------------------------------
(
cd $MakeDir
unset MAKEFLAGS