mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev
This commit is contained in:
@ -91,10 +91,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -107,10 +107,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -42,8 +42,5 @@ U.correctBoundaryConditions();
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ fvOptions.correct(U);
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -93,10 +93,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -85,6 +85,6 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phiv - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phiv/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -55,10 +55,10 @@ int main(int argc, char *argv[])
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createUf.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createPrghCorrTypes.H"
|
||||
#include "correctPhi.H"
|
||||
#include "createUf.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -65,10 +65,10 @@ int main(int argc, char *argv[])
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createUf.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createPcorrTypes.H"
|
||||
#include "../interFoam/interDyMFoam/correctPhi.H"
|
||||
#include "createUf.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -83,6 +83,7 @@ label addPatch
|
||||
pp.inGroups().append(groupName);
|
||||
}
|
||||
|
||||
|
||||
// Add patch, create calculated everywhere
|
||||
fvMeshTools::addPatch
|
||||
(
|
||||
@ -207,7 +208,10 @@ void createFaces
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use neighbour side of face
|
||||
// Use neighbour side of face.
|
||||
// To keep faceZone pointing out of original neighbour
|
||||
// we don't need to set faceFlip since that cell
|
||||
// now becomes the owner
|
||||
modifyOrAddFace
|
||||
(
|
||||
meshMod,
|
||||
@ -217,7 +221,7 @@ void createFaces
|
||||
true, // face flip
|
||||
newMasterPatches[i], // patch for face
|
||||
fZone.index(), // zone for face
|
||||
true, // face flip in zone
|
||||
false, // face flip in zone
|
||||
modifiedFace // modify or add status
|
||||
);
|
||||
}
|
||||
@ -264,7 +268,7 @@ void createFaces
|
||||
false, // face flip
|
||||
newSlavePatches[i], // patch for face
|
||||
fZone.index(), // zone for face
|
||||
false, // face flip in zone
|
||||
true, // face flip in zone
|
||||
modifiedFace // modify or add status
|
||||
);
|
||||
}
|
||||
@ -633,19 +637,18 @@ int main(int argc, char *argv[])
|
||||
// Note: This is added for the particular case where we want
|
||||
// master and slave in different groupNames
|
||||
// (ie 3D thermal baffles)
|
||||
bool groupBase = false;
|
||||
if (patchSource.found("groupBase"))
|
||||
{
|
||||
groupBase = readBool(patchSource.lookup("groupBase"));
|
||||
|
||||
if (groupBase)
|
||||
Switch sameGroup
|
||||
(
|
||||
patchSource.lookupOrDefault("sameGroup", true)
|
||||
);
|
||||
if (!sameGroup)
|
||||
{
|
||||
groupNameMaster = groupName + "Group_master";
|
||||
groupNameSlave = groupName + "Group_slave";
|
||||
patchDictMaster.set("coupleGroup", groupNameMaster);
|
||||
patchDictSlave.set("coupleGroup", groupNameSlave);
|
||||
}
|
||||
}
|
||||
|
||||
addPatch(mesh, masterName, groupNameMaster, patchDictMaster);
|
||||
addPatch(mesh, slaveName, groupNameSlave, patchDictSlave);
|
||||
@ -815,11 +818,11 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
const dictionary& patchSource = dict.subDict("patchPairs");
|
||||
bool groupBase = false;
|
||||
if (patchSource.found("groupBase"))
|
||||
{
|
||||
groupBase = readBool(patchSource.lookup("groupBase"));
|
||||
}
|
||||
|
||||
Switch sameGroup
|
||||
(
|
||||
patchSource.lookupOrDefault("sameGroup", true)
|
||||
);
|
||||
|
||||
const word& groupName = selectors[selectorI].name();
|
||||
|
||||
@ -830,7 +833,7 @@ int main(int argc, char *argv[])
|
||||
"patchFields"
|
||||
);
|
||||
|
||||
if (!groupBase)
|
||||
if (sameGroup)
|
||||
{
|
||||
// Add coupleGroup to all entries
|
||||
forAllIter(dictionary, patchFieldsDict, iter)
|
||||
|
||||
@ -1078,7 +1078,6 @@ labelList addRegionPatches
|
||||
mesh.boundaryMesh()
|
||||
);
|
||||
|
||||
//interfacePatches[interI] = addPatch(mesh, patch1);
|
||||
interfacePatches[interI] = fvMeshTools::addPatch
|
||||
(
|
||||
mesh,
|
||||
@ -1100,7 +1099,6 @@ labelList addRegionPatches
|
||||
point::zero, // offset
|
||||
mesh.boundaryMesh()
|
||||
);
|
||||
//addPatch(mesh, patch2);
|
||||
fvMeshTools::addPatch
|
||||
(
|
||||
mesh,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,6 +125,9 @@ public:
|
||||
//- Maximum number of iterations in the solver
|
||||
label maxIter_;
|
||||
|
||||
//- Minimum number of iterations in the solver
|
||||
label minIter_;
|
||||
|
||||
//- Final convergence tolerance
|
||||
Type tolerance_;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -135,6 +135,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::solver
|
||||
controlDict_(solverDict),
|
||||
|
||||
maxIter_(1000),
|
||||
minIter_(0),
|
||||
tolerance_(1e-6*pTraits<Type>::one),
|
||||
relTol_(pTraits<Type>::zero)
|
||||
{
|
||||
@ -148,6 +149,7 @@ template<class Type, class DType, class LUType>
|
||||
void Foam::LduMatrix<Type, DType, LUType>::solver::readControls()
|
||||
{
|
||||
readControl(controlDict_, maxIter_, "maxIter");
|
||||
readControl(controlDict_, minIter_, "minIter");
|
||||
readControl(controlDict_, tolerance_, "tolerance");
|
||||
readControl(controlDict_, relTol_, "relTol");
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,7 +104,11 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
|
||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||
|
||||
// --- Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
if
|
||||
(
|
||||
this->minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
{
|
||||
// --- Select and construct the preconditioner
|
||||
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||
@ -181,9 +185,12 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
|
||||
cmptDivide(gSumCmptMag(rA), normFactor);
|
||||
|
||||
} while
|
||||
(
|
||||
(
|
||||
solverPerf.nIterations()++ < this->maxIter_
|
||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < this->minIter_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,11 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
|
||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||
|
||||
// --- Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
if
|
||||
(
|
||||
this->minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
{
|
||||
// --- Select and construct the preconditioner
|
||||
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||
@ -173,9 +177,12 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
|
||||
cmptDivide(gSumCmptMag(rA), normFactor);
|
||||
|
||||
} while
|
||||
(
|
||||
(
|
||||
solverPerf.nIterations()++ < this->maxIter_
|
||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < this->minIter_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,7 +113,11 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const
|
||||
|
||||
|
||||
// Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
if
|
||||
(
|
||||
this->minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
{
|
||||
autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>
|
||||
smootherPtr = LduMatrix<Type, DType, LUType>::smoother::New
|
||||
@ -139,9 +143,12 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const
|
||||
normFactor
|
||||
);
|
||||
} while
|
||||
(
|
||||
(
|
||||
(solverPerf.nIterations() += nSweeps_) < this->maxIter_
|
||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
||||
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < this->minIter_
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(lduMatrix, 1);
|
||||
defineTypeNameAndDebug(lduMatrix, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -107,6 +107,9 @@ public:
|
||||
//- Maximum number of iterations in the solver
|
||||
label maxIter_;
|
||||
|
||||
//- Minimum number of iterations in the solver
|
||||
label minIter_;
|
||||
|
||||
//- Final convergence tolerance
|
||||
scalar tolerance_;
|
||||
|
||||
|
||||
@ -164,6 +164,7 @@ Foam::lduMatrix::solver::solver
|
||||
void Foam::lduMatrix::solver::readControls()
|
||||
{
|
||||
maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", 1000);
|
||||
minIter_ = controlDict_.lookupOrDefault<label>("minIter", 0);
|
||||
tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6);
|
||||
relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0);
|
||||
}
|
||||
|
||||
@ -69,7 +69,11 @@ Foam::solverPerformance Foam::GAMGSolver::solve
|
||||
|
||||
|
||||
// Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
if
|
||||
(
|
||||
minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
{
|
||||
// Create coarse grid correction fields
|
||||
PtrList<scalarField> coarseCorrFields;
|
||||
@ -130,9 +134,12 @@ Foam::solverPerformance Foam::GAMGSolver::solve
|
||||
solverPerf.print(Info(matrix().mesh().comm()));
|
||||
}
|
||||
} while
|
||||
(
|
||||
(
|
||||
++solverPerf.nIterations() < maxIter_
|
||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < minIter_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +120,11 @@ Foam::solverPerformance Foam::PBiCG::solve
|
||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||
|
||||
// --- Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
if
|
||||
(
|
||||
minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
{
|
||||
// --- Select and construct the preconditioner
|
||||
autoPtr<lduMatrix::preconditioner> preconPtr =
|
||||
@ -191,9 +195,12 @@ Foam::solverPerformance Foam::PBiCG::solve
|
||||
gSumMag(rA, matrix().mesh().comm())
|
||||
/normFactor;
|
||||
} while
|
||||
(
|
||||
(
|
||||
solverPerf.nIterations()++ < maxIter_
|
||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < minIter_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -111,7 +111,11 @@ Foam::solverPerformance Foam::PCG::solve
|
||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||
|
||||
// --- Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
if
|
||||
(
|
||||
minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
{
|
||||
// --- Select and construct the preconditioner
|
||||
autoPtr<lduMatrix::preconditioner> preconPtr =
|
||||
@ -176,9 +180,12 @@ Foam::solverPerformance Foam::PCG::solve
|
||||
/normFactor;
|
||||
|
||||
} while
|
||||
(
|
||||
(
|
||||
solverPerf.nIterations()++ < maxIter_
|
||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < minIter_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -138,7 +138,11 @@ Foam::solverPerformance Foam::smoothSolver::solve
|
||||
|
||||
|
||||
// Check convergence, solve if not converged
|
||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
if
|
||||
(
|
||||
minIter_ > 0
|
||||
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
{
|
||||
autoPtr<lduMatrix::smoother> smootherPtr = lduMatrix::smoother::New
|
||||
(
|
||||
@ -175,9 +179,12 @@ Foam::solverPerformance Foam::smoothSolver::solve
|
||||
matrix().mesh().comm()
|
||||
)/normFactor;
|
||||
} while
|
||||
(
|
||||
(
|
||||
(solverPerf.nIterations() += nSweeps_) < maxIter_
|
||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
||||
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||
)
|
||||
|| solverPerf.nIterations() < minIter_
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,7 +49,13 @@ Foam::wallPolyPatch::wallPolyPatch
|
||||
)
|
||||
:
|
||||
polyPatch(name, size, start, index, bm, patchType)
|
||||
{}
|
||||
{
|
||||
// wall is not constraint type so add wall group explicitly
|
||||
if (findIndex(inGroups(), typeName) == -1)
|
||||
{
|
||||
inGroups().append(typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::wallPolyPatch::wallPolyPatch
|
||||
@ -62,7 +68,13 @@ Foam::wallPolyPatch::wallPolyPatch
|
||||
)
|
||||
:
|
||||
polyPatch(name, dict, index, bm, patchType)
|
||||
{}
|
||||
{
|
||||
// wall is not constraint type so add wall group explicitly
|
||||
if (findIndex(inGroups(), typeName) == -1)
|
||||
{
|
||||
inGroups().append(typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::wallPolyPatch::wallPolyPatch
|
||||
|
||||
@ -267,7 +267,11 @@ Foam::label Foam::polyMeshFilter::filterFacesLoop(const label nOriginalBadFaces)
|
||||
newBadFaces = false;
|
||||
forAll(mesh_.points(), pI)
|
||||
{
|
||||
if (isErrorPoint[origToCurrentPointMap[pI]])
|
||||
if
|
||||
(
|
||||
origToCurrentPointMap[pI] >= 0
|
||||
&& isErrorPoint[origToCurrentPointMap[pI]]
|
||||
)
|
||||
{
|
||||
if (!newErrorPoint[pI])
|
||||
{
|
||||
@ -862,14 +866,22 @@ void Foam::polyMeshFilter::updateOldToNewPointMap
|
||||
{
|
||||
label oldPointI = origToCurrentPointMap[origPointI];
|
||||
|
||||
if (oldPointI < currToNew.size())
|
||||
if (oldPointI != -1)
|
||||
{
|
||||
label newPointI = currToNew[oldPointI];
|
||||
|
||||
if (newPointI != -1)
|
||||
if (newPointI >= 0)
|
||||
{
|
||||
origToCurrentPointMap[origPointI] = newPointI;
|
||||
}
|
||||
else if (newPointI == -1)
|
||||
{
|
||||
origToCurrentPointMap[origPointI] = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
origToCurrentPointMap[origPointI] = -newPointI-2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,6 +31,7 @@ SourceFiles
|
||||
edgeMeshI.H
|
||||
edgeMesh.C
|
||||
edgeMeshIO.C
|
||||
edgeMeshNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -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
|
||||
@ -48,14 +48,11 @@ Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr< edgeMesh >(cstrIter()(name));
|
||||
return autoPtr<edgeMesh>(cstrIter()(name));
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
|
||||
(
|
||||
const fileName& name
|
||||
)
|
||||
Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New(const fileName& name)
|
||||
{
|
||||
word ext = name.ext();
|
||||
if (ext == "gz")
|
||||
|
||||
@ -161,7 +161,7 @@ private:
|
||||
// points and edges, unsorted
|
||||
vectorField normals_;
|
||||
|
||||
//-
|
||||
//- Type per normal: which side of normal to mesh
|
||||
List<sideVolumeType> normalVolumeTypes_;
|
||||
|
||||
//- Flat and open edges require the direction of the edge
|
||||
|
||||
@ -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
|
||||
@ -78,6 +78,8 @@ public:
|
||||
featureEdgeMesh(const IOobject&, const featureEdgeMesh&);
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- ReadData function required for regIOobject read operation
|
||||
virtual bool readData(Istream&);
|
||||
|
||||
|
||||
@ -46,9 +46,14 @@ surfaceVectorField rhoUf
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(rho*U)
|
||||
fvc::interpolate(rho*U)
|
||||
);
|
||||
|
||||
{
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf += n*(phi/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -46,9 +46,15 @@ surfaceVectorField Uf
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(U)
|
||||
fvc::interpolate(U)
|
||||
);
|
||||
|
||||
{
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -139,6 +139,21 @@ Foam::displacementLaplacianFvMotionSolver::
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::motionDiffusivity&
|
||||
Foam::displacementLaplacianFvMotionSolver::diffusivity()
|
||||
{
|
||||
if (!diffusivityPtr_.valid())
|
||||
{
|
||||
diffusivityPtr_ = motionDiffusivity::New
|
||||
(
|
||||
fvMesh_,
|
||||
coeffDict().lookup("diffusivity")
|
||||
);
|
||||
}
|
||||
return diffusivityPtr_();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::pointField>
|
||||
Foam::displacementLaplacianFvMotionSolver::curPoints() const
|
||||
{
|
||||
@ -210,14 +225,14 @@ void Foam::displacementLaplacianFvMotionSolver::solve()
|
||||
// the motionSolver accordingly
|
||||
movePoints(fvMesh_.points());
|
||||
|
||||
diffusivityPtr_->correct();
|
||||
diffusivity().correct();
|
||||
pointDisplacement_.boundaryField().updateCoeffs();
|
||||
|
||||
Foam::solve
|
||||
(
|
||||
fvm::laplacian
|
||||
(
|
||||
diffusivityPtr_->operator()(),
|
||||
diffusivity().operator()(),
|
||||
cellDisplacement_,
|
||||
"laplacian(diffusivity,cellDisplacement)"
|
||||
)
|
||||
@ -234,12 +249,7 @@ void Foam::displacementLaplacianFvMotionSolver::updateMesh
|
||||
|
||||
// Update diffusivity. Note two stage to make sure old one is de-registered
|
||||
// before creating/registering new one.
|
||||
diffusivityPtr_.reset(NULL);
|
||||
diffusivityPtr_ = motionDiffusivity::New
|
||||
(
|
||||
fvMesh_,
|
||||
coeffDict().lookup("diffusivity")
|
||||
);
|
||||
diffusivityPtr_.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,7 +53,6 @@ class motionDiffusivity;
|
||||
|
||||
class displacementLaplacianFvMotionSolver
|
||||
:
|
||||
// public displacementFvMotionSolver
|
||||
public displacementMotionSolver,
|
||||
public fvMotionSolverCore
|
||||
{
|
||||
@ -120,6 +119,9 @@ public:
|
||||
return cellDisplacement_;
|
||||
}
|
||||
|
||||
//- Return reference to the diffusivity field
|
||||
motionDiffusivity& diffusivity();
|
||||
|
||||
//- Return point location obtained from the current motion field
|
||||
virtual tmp<pointField> curPoints() const;
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ License
|
||||
#include "SurfaceFilmModel.H"
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "mappedPatchBase.H"
|
||||
|
||||
using namespace Foam::constant;
|
||||
|
||||
|
||||
@ -55,8 +55,6 @@ namespace regionModels
|
||||
}
|
||||
}
|
||||
|
||||
class mappedPatchBase;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class SurfaceFilmModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -66,7 +66,6 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs
|
||||
if (isA<valuePointPatchField<vector> >(patchFld))
|
||||
{
|
||||
adaptPatchIDs.append(patchI);
|
||||
//Info<< "Detected adapt patch " << patchFld.patch().name() << endl;
|
||||
}
|
||||
}
|
||||
return adaptPatchIDs;
|
||||
@ -1259,6 +1258,7 @@ handleFeatureAngleLayerTerminations
|
||||
void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||
(
|
||||
const scalar minCosLayerTermination,
|
||||
const bool detectExtrusionIsland,
|
||||
const PackedBoolList& isMasterPoint,
|
||||
const PackedBoolList& isMasterEdge,
|
||||
const labelList& meshEdges,
|
||||
@ -1268,6 +1268,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||
) const
|
||||
{
|
||||
const indirectPrimitivePatch& pp = adaptPatchPtr_();
|
||||
const labelListList& pointFaces = pp.pointFaces();
|
||||
|
||||
|
||||
Info<< typeName << " : Removing isolated regions ..." << endl;
|
||||
|
||||
@ -1292,9 +1294,78 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||
syncPatchDisplacement(minThickness, patchDisp, extrudeStatus);
|
||||
|
||||
|
||||
|
||||
// Detect either:
|
||||
// - point where all surrounding points are not extruded
|
||||
// (detectExtrusionIsland)
|
||||
// or
|
||||
// - point where all the faces surrounding it are not fully
|
||||
// extruded
|
||||
|
||||
boolList keptPoints(pp.nPoints(), false);
|
||||
|
||||
if (detectExtrusionIsland)
|
||||
{
|
||||
// Do not extrude from point where all neighbouring
|
||||
// points are not grown
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
labelList islandPoint(pp.size(), -1);
|
||||
forAll(pp, faceI)
|
||||
{
|
||||
const face& f = pp.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label patchPointI = f[fp];
|
||||
|
||||
if (extrudeStatus[f[fp]] != autoLayerDriver::NOEXTRUDE)
|
||||
{
|
||||
if (islandPoint[faceI] == -1)
|
||||
{
|
||||
// First point to extrude
|
||||
islandPoint[faceI] = patchPointI;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Second or more point to extrude
|
||||
islandPoint[faceI] = -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// islandPoint:
|
||||
// -1 : no point extruded
|
||||
// -2 : >= 2 points extruded
|
||||
// >=0: label of point extruded
|
||||
|
||||
// Check all surrounding faces that I am the islandPoint
|
||||
boolList keptPoints(pp.nPoints(), false);
|
||||
forAll(pointFaces, patchPointI)
|
||||
{
|
||||
if (extrudeStatus[patchPointI] != autoLayerDriver::NOEXTRUDE)
|
||||
{
|
||||
const labelList& pFaces = pointFaces[patchPointI];
|
||||
|
||||
forAll(pFaces, i)
|
||||
{
|
||||
label faceI = pFaces[i];
|
||||
if (islandPoint[faceI] != patchPointI)
|
||||
{
|
||||
keptPoints[patchPointI] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do not extrude from point where all neighbouring
|
||||
// faces are not grown
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
boolList extrudedFaces(pp.size(), true);
|
||||
forAll(pp.localFaces(), faceI)
|
||||
{
|
||||
@ -1311,7 +1382,6 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||
|
||||
const labelListList& pointFaces = pp.pointFaces();
|
||||
|
||||
boolList keptPoints(pp.nPoints(), false);
|
||||
forAll(keptPoints, patchPointI)
|
||||
{
|
||||
const labelList& pFaces = pointFaces[patchPointI];
|
||||
@ -1326,6 +1396,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
syncTools::syncPointList
|
||||
(
|
||||
@ -1701,6 +1773,13 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
||||
mesh().globalData().nTotalPoints()
|
||||
);
|
||||
|
||||
//- Use strick extrusionIsland detection
|
||||
const Switch detectExtrusionIsland = coeffDict.lookupOrDefault<label>
|
||||
(
|
||||
"detectExtrusionIsland",
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
// Precalulate master points/edge (only relevant for shared points/edges)
|
||||
const PackedBoolList isMasterPoint(syncTools::getMasterPoints(mesh()));
|
||||
@ -1851,6 +1930,8 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
||||
findIsolatedRegions
|
||||
(
|
||||
minCosLayerTermination,
|
||||
detectExtrusionIsland,
|
||||
|
||||
isMasterPoint,
|
||||
isMasterEdge,
|
||||
meshEdges,
|
||||
|
||||
@ -219,6 +219,7 @@ class medialAxisMeshMover
|
||||
void findIsolatedRegions
|
||||
(
|
||||
const scalar minCosLayerTermination,
|
||||
const bool detectExtrusionIsland,
|
||||
const PackedBoolList& isMasterPoint,
|
||||
const PackedBoolList& isMasterEdge,
|
||||
const labelList& meshEdges,
|
||||
|
||||
@ -303,7 +303,7 @@ Foam::refinementFeatures::refinementFeatures
|
||||
|
||||
Info<< "Detected " << featurePoints.size()
|
||||
<< " featurePoints out of " << pointEdges.size()
|
||||
<< " on feature " << eMesh.name() << endl;
|
||||
<< " points on feature " << eMesh.name() << endl;
|
||||
|
||||
buildTrees(i, featurePoints);
|
||||
}
|
||||
@ -372,7 +372,7 @@ Foam::refinementFeatures::refinementFeatures
|
||||
|
||||
Info<< "Detected " << featurePoints.size()
|
||||
<< " featurePoints out of " << points.size()
|
||||
<< " on feature " << eMesh.name()
|
||||
<< " points on feature " << eMesh.name()
|
||||
<< " when using feature cos " << minCos << endl;
|
||||
|
||||
buildTrees(i, featurePoints);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,7 +51,13 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
||||
:
|
||||
polyPatch(name, size, start, index, bm, patchType),
|
||||
mappedPatchBase(static_cast<const polyPatch&>(*this))
|
||||
{}
|
||||
{
|
||||
// mapped is not constraint type so add mapped group explicitly
|
||||
if (findIndex(inGroups(), typeName) == -1)
|
||||
{
|
||||
inGroups().append(typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
@ -115,7 +121,13 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
||||
:
|
||||
polyPatch(name, dict, index, bm, patchType),
|
||||
mappedPatchBase(*this, dict)
|
||||
{}
|
||||
{
|
||||
// mapped is not constraint type so add mapped group explicitly
|
||||
if (findIndex(inGroups(), typeName) == -1)
|
||||
{
|
||||
inGroups().append(typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "mappedWallPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mappedPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -56,7 +57,13 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
:
|
||||
wallPolyPatch(name, size, start, index, bm, patchType),
|
||||
mappedPatchBase(static_cast<const polyPatch&>(*this))
|
||||
{}
|
||||
{
|
||||
// mapped is not constraint type so add mapped group explicitly
|
||||
if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
|
||||
{
|
||||
inGroups().append(mappedPolyPatch::typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
@ -120,7 +127,13 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
:
|
||||
wallPolyPatch(name, dict, index, bm, patchType),
|
||||
mappedPatchBase(*this, dict)
|
||||
{}
|
||||
{
|
||||
// mapped is not constraint type so add mapped group explicitly
|
||||
if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
|
||||
{
|
||||
inGroups().append(mappedPolyPatch::typeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
|
||||
@ -263,9 +263,9 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
forAll (thicknessLayers_, iLayer)
|
||||
{
|
||||
const scalar l = thicknessLayers_[iLayer];
|
||||
if (l > 0.0)
|
||||
if (kappaLayers_[iLayer] > 0.0)
|
||||
{
|
||||
totalSolidRes += kappaLayers_[iLayer]/l;
|
||||
totalSolidRes += l/kappaLayers_[iLayer];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,11 @@ boundaryField
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
processor
|
||||
{
|
||||
type processor;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform (0.1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type fixedValue;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type mutkWallFunction;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 101325;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type calculated;
|
||||
|
||||
@ -21,6 +21,9 @@ internalField uniform 101325;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
|
||||
@ -52,8 +52,9 @@ baffles
|
||||
{
|
||||
type mappedWall;
|
||||
sampleMode nearestPatchFace;
|
||||
//Group master and slave in different groups. (default off)
|
||||
groupBase on;
|
||||
// Put master and slave patch in same group (default on)
|
||||
// Otherwise makeup group names xxx_master and xxx_slave
|
||||
sameGroup off;
|
||||
patchFields
|
||||
{
|
||||
#include "./0/include/wallBafflePatches"
|
||||
|
||||
@ -15,46 +15,441 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
6
|
||||
72
|
||||
(
|
||||
front
|
||||
frontAndBack
|
||||
{
|
||||
type symmetryPlane;
|
||||
inGroups 1(symmetryPlane);
|
||||
nFaces 160;
|
||||
startFace 3456;
|
||||
}
|
||||
back
|
||||
{
|
||||
type symmetryPlane;
|
||||
inGroups 1(symmetryPlane);
|
||||
nFaces 160;
|
||||
startFace 3616;
|
||||
nFaces 320;
|
||||
startFace 9440280;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 64;
|
||||
startFace 3776;
|
||||
startFace 9440600;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 64;
|
||||
startFace 3840;
|
||||
startFace 9440664;
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
nFaces 160;
|
||||
startFace 3904;
|
||||
nFaces 15243;
|
||||
startFace 9440728;
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
inGroups 1(symmetryPlane);
|
||||
nFaces 160;
|
||||
startFace 4064;
|
||||
startFace 9455971;
|
||||
}
|
||||
motorBike_frt-fairing:001%1
|
||||
{
|
||||
type wall;
|
||||
nFaces 90875;
|
||||
startFace 9456131;
|
||||
}
|
||||
motorBike_windshield:002%2
|
||||
{
|
||||
type wall;
|
||||
nFaces 376;
|
||||
startFace 9547006;
|
||||
}
|
||||
motorBike_rr-wh-rim:005%5
|
||||
{
|
||||
type wall;
|
||||
nFaces 2402;
|
||||
startFace 9547382;
|
||||
}
|
||||
motorBike_rr-wh-rim:010%10
|
||||
{
|
||||
type wall;
|
||||
nFaces 5288;
|
||||
startFace 9549784;
|
||||
}
|
||||
motorBike_fr-wh-rim:011%11
|
||||
{
|
||||
type wall;
|
||||
nFaces 7215;
|
||||
startFace 9555072;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk:012%12
|
||||
{
|
||||
type wall;
|
||||
nFaces 973;
|
||||
startFace 9562287;
|
||||
}
|
||||
motorBike_frame:016-shadow%13
|
||||
{
|
||||
type wall;
|
||||
nFaces 1718;
|
||||
startFace 9563260;
|
||||
}
|
||||
motorBike_rear-susp:014%14
|
||||
{
|
||||
type wall;
|
||||
nFaces 14936;
|
||||
startFace 9564978;
|
||||
}
|
||||
motorBike_rear-susp:014-shadow%15
|
||||
{
|
||||
type wall;
|
||||
nFaces 8564;
|
||||
startFace 9579914;
|
||||
}
|
||||
motorBike_frame:016%16
|
||||
{
|
||||
type wall;
|
||||
nFaces 969;
|
||||
startFace 9588478;
|
||||
}
|
||||
motorBike_rr-wh-rim:005-shadow%17
|
||||
{
|
||||
type wall;
|
||||
nFaces 1251;
|
||||
startFace 9589447;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub:022%22
|
||||
{
|
||||
type wall;
|
||||
nFaces 1827;
|
||||
startFace 9590698;
|
||||
}
|
||||
motorBike_rearseat%24
|
||||
{
|
||||
type wall;
|
||||
nFaces 3241;
|
||||
startFace 9592525;
|
||||
}
|
||||
motorBike_frt-fairing%25
|
||||
{
|
||||
type wall;
|
||||
nFaces 5078;
|
||||
startFace 9595766;
|
||||
}
|
||||
motorBike_windshield%26
|
||||
{
|
||||
type wall;
|
||||
nFaces 6545;
|
||||
startFace 9600844;
|
||||
}
|
||||
motorBike_headlights%27
|
||||
{
|
||||
type wall;
|
||||
nFaces 455;
|
||||
startFace 9607389;
|
||||
}
|
||||
motorBike_driversseat%28
|
||||
{
|
||||
type wall;
|
||||
nFaces 5112;
|
||||
startFace 9607844;
|
||||
}
|
||||
motorBike_rear-body%29
|
||||
{
|
||||
type wall;
|
||||
nFaces 12033;
|
||||
startFace 9612956;
|
||||
}
|
||||
motorBike_fuel-tank%30
|
||||
{
|
||||
type wall;
|
||||
nFaces 6586;
|
||||
startFace 9624989;
|
||||
}
|
||||
motorBike_exhaust%31
|
||||
{
|
||||
type wall;
|
||||
nFaces 20319;
|
||||
startFace 9631575;
|
||||
}
|
||||
motorBike_rr-wh-rim%32
|
||||
{
|
||||
type wall;
|
||||
nFaces 9928;
|
||||
startFace 9651894;
|
||||
}
|
||||
motorBike_fr-mud-guard%33
|
||||
{
|
||||
type wall;
|
||||
nFaces 13989;
|
||||
startFace 9661822;
|
||||
}
|
||||
motorBike_fr-wh-rim%34
|
||||
{
|
||||
type wall;
|
||||
nFaces 6592;
|
||||
startFace 9675811;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk%35
|
||||
{
|
||||
type wall;
|
||||
nFaces 7374;
|
||||
startFace 9682403;
|
||||
}
|
||||
motorBike_fr-brake-caliper%36
|
||||
{
|
||||
type wall;
|
||||
nFaces 2178;
|
||||
startFace 9689777;
|
||||
}
|
||||
motorBike_fr-wh-tyre%37
|
||||
{
|
||||
type wall;
|
||||
nFaces 9947;
|
||||
startFace 9691955;
|
||||
}
|
||||
motorBike_hbars%38
|
||||
{
|
||||
type wall;
|
||||
nFaces 7345;
|
||||
startFace 9701902;
|
||||
}
|
||||
motorBike_fr-forks%39
|
||||
{
|
||||
type wall;
|
||||
nFaces 10349;
|
||||
startFace 9709247;
|
||||
}
|
||||
motorBike_chain%40
|
||||
{
|
||||
type wall;
|
||||
nFaces 7168;
|
||||
startFace 9719596;
|
||||
}
|
||||
motorBike_rr-wh-tyre%41
|
||||
{
|
||||
type wall;
|
||||
nFaces 7245;
|
||||
startFace 9726764;
|
||||
}
|
||||
motorBike_square-dial%42
|
||||
{
|
||||
type wall;
|
||||
nFaces 62;
|
||||
startFace 9734009;
|
||||
}
|
||||
motorBike_round-dial%43
|
||||
{
|
||||
type wall;
|
||||
nFaces 183;
|
||||
startFace 9734071;
|
||||
}
|
||||
motorBike_dial-holder%44
|
||||
{
|
||||
type wall;
|
||||
nFaces 1336;
|
||||
startFace 9734254;
|
||||
}
|
||||
motorBike_rear-susp%45
|
||||
{
|
||||
type wall;
|
||||
nFaces 25738;
|
||||
startFace 9735590;
|
||||
}
|
||||
motorBike_rear-brake-lights%46
|
||||
{
|
||||
type wall;
|
||||
nFaces 860;
|
||||
startFace 9761328;
|
||||
}
|
||||
motorBike_rear-light-bracket%47
|
||||
{
|
||||
type wall;
|
||||
nFaces 2003;
|
||||
startFace 9762188;
|
||||
}
|
||||
motorBike_frame%48
|
||||
{
|
||||
type wall;
|
||||
nFaces 20232;
|
||||
startFace 9764191;
|
||||
}
|
||||
motorBike_rear-mud-guard%49
|
||||
{
|
||||
type wall;
|
||||
nFaces 10690;
|
||||
startFace 9784423;
|
||||
}
|
||||
motorBike_rear-susp-spring-damp%50
|
||||
{
|
||||
type wall;
|
||||
nFaces 1769;
|
||||
startFace 9795113;
|
||||
}
|
||||
motorBike_fairing-inner-plate%51
|
||||
{
|
||||
type wall;
|
||||
nFaces 4660;
|
||||
startFace 9796882;
|
||||
}
|
||||
motorBike_clutch-housing%52
|
||||
{
|
||||
type wall;
|
||||
nFaces 8237;
|
||||
startFace 9801542;
|
||||
}
|
||||
motorBike_radiator%53
|
||||
{
|
||||
type wall;
|
||||
nFaces 1849;
|
||||
startFace 9809779;
|
||||
}
|
||||
motorBike_water-pipe%54
|
||||
{
|
||||
type wall;
|
||||
nFaces 1182;
|
||||
startFace 9811628;
|
||||
}
|
||||
motorBike_water-pump%55
|
||||
{
|
||||
type wall;
|
||||
nFaces 902;
|
||||
startFace 9812810;
|
||||
}
|
||||
motorBike_engine%56
|
||||
{
|
||||
type wall;
|
||||
nFaces 19087;
|
||||
startFace 9813712;
|
||||
}
|
||||
motorBike_rear-shock-link%57
|
||||
{
|
||||
type wall;
|
||||
nFaces 512;
|
||||
startFace 9832799;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot-bracket%58
|
||||
{
|
||||
type wall;
|
||||
nFaces 721;
|
||||
startFace 9833311;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot%59
|
||||
{
|
||||
type wall;
|
||||
nFaces 795;
|
||||
startFace 9834032;
|
||||
}
|
||||
motorBike_footpeg%60
|
||||
{
|
||||
type wall;
|
||||
nFaces 1405;
|
||||
startFace 9834827;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub%61
|
||||
{
|
||||
type wall;
|
||||
nFaces 1984;
|
||||
startFace 9836232;
|
||||
}
|
||||
motorBike_rear-brake-caliper%62
|
||||
{
|
||||
type wall;
|
||||
nFaces 2119;
|
||||
startFace 9838216;
|
||||
}
|
||||
motorBike_rider-helmet%65
|
||||
{
|
||||
type wall;
|
||||
nFaces 2244;
|
||||
startFace 9840335;
|
||||
}
|
||||
motorBike_rider-visor%66
|
||||
{
|
||||
type wall;
|
||||
nFaces 171;
|
||||
startFace 9842579;
|
||||
}
|
||||
motorBike_rider-boots%67
|
||||
{
|
||||
type wall;
|
||||
nFaces 5287;
|
||||
startFace 9842750;
|
||||
}
|
||||
motorBike_rider-gloves%68
|
||||
{
|
||||
type wall;
|
||||
nFaces 3129;
|
||||
startFace 9848037;
|
||||
}
|
||||
motorBike_rider-body%69
|
||||
{
|
||||
type wall;
|
||||
nFaces 22909;
|
||||
startFace 9851166;
|
||||
}
|
||||
motorBike_frame:0%70
|
||||
{
|
||||
type wall;
|
||||
nFaces 361;
|
||||
startFace 9874075;
|
||||
}
|
||||
motorBike_frt-fairing:001-shadow%74
|
||||
{
|
||||
type wall;
|
||||
nFaces 56996;
|
||||
startFace 9874436;
|
||||
}
|
||||
motorBike_windshield-shadow%75
|
||||
{
|
||||
type wall;
|
||||
nFaces 4535;
|
||||
startFace 9931432;
|
||||
}
|
||||
motorBike_fr-mud-guard-shadow%81
|
||||
{
|
||||
type wall;
|
||||
nFaces 9174;
|
||||
startFace 9935967;
|
||||
}
|
||||
motorBike_fr-wh-brake-disk-shadow%83
|
||||
{
|
||||
type wall;
|
||||
nFaces 3923;
|
||||
startFace 9945141;
|
||||
}
|
||||
motorBike_rear-mud-guard-shadow%84
|
||||
{
|
||||
type wall;
|
||||
nFaces 6792;
|
||||
startFace 9949064;
|
||||
}
|
||||
motorBike_rear-susp-spring-damp-shadow%85
|
||||
{
|
||||
type wall;
|
||||
nFaces 1211;
|
||||
startFace 9955856;
|
||||
}
|
||||
motorBike_radiator-shadow%86
|
||||
{
|
||||
type wall;
|
||||
nFaces 1080;
|
||||
startFace 9957067;
|
||||
}
|
||||
motorBike_rear-shock-link-shadow%87
|
||||
{
|
||||
type wall;
|
||||
nFaces 357;
|
||||
startFace 9958147;
|
||||
}
|
||||
motorBike_rear-brake-fluid-pot-bracket-shadow%88
|
||||
{
|
||||
type wall;
|
||||
nFaces 420;
|
||||
startFace 9958504;
|
||||
}
|
||||
motorBike_rr-wh-chain-hub-shadow%89
|
||||
{
|
||||
type wall;
|
||||
nFaces 1071;
|
||||
startFace 9958924;
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -4,36 +4,10 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
\cp system/controlDict.flow system/controlDict
|
||||
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
# Get number of processors to run on
|
||||
nProcs=$(getNumberOfProcessors)
|
||||
|
||||
\rm -rf 0
|
||||
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
|
||||
# Get rid of zero faced patches
|
||||
runApplication createPatch -overwrite
|
||||
|
||||
# Copy fields after meshing to avoind the generation of unnecessary patch fields
|
||||
\cp -r 0.org 0
|
||||
|
||||
# Initialize alpha
|
||||
runApplication setFields
|
||||
|
||||
# Decompose
|
||||
runApplication decomposePar -force
|
||||
|
||||
# Run
|
||||
runParallel $application 8
|
||||
|
||||
# Reconstruct
|
||||
runApplication reconstructPar -noFunctionObjects
|
||||
# Generate mesh
|
||||
./Allrun-pre
|
||||
|
||||
## Run simulation
|
||||
#./Allrun-simulation
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
40
tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
Executable file
40
tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
\cp system/controlDict.flow system/controlDict
|
||||
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
# Get number of processors to run on
|
||||
nProcs=$(getNumberOfProcessors)
|
||||
|
||||
\rm -rf 0
|
||||
|
||||
runApplication createBaffles -overwrite
|
||||
runApplication mergeOrSplitBaffles -split -overwrite
|
||||
|
||||
# Get rid of zero faced patches
|
||||
runApplication createPatch -overwrite
|
||||
|
||||
# Copy fields after meshing to avoind the generation of unnecessary patch fields
|
||||
\cp -r 0.org 0
|
||||
|
||||
# Initialize alpha
|
||||
runApplication setFields
|
||||
|
||||
# Decompose
|
||||
\rm log.decomposePar
|
||||
runApplication decomposePar -force
|
||||
|
||||
# Run
|
||||
runParallel $application 8
|
||||
|
||||
# Reconstruct
|
||||
runApplication reconstructPar -noFunctionObjects
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -37,8 +37,6 @@ divSchemes
|
||||
div(rhoPhi,K) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,13 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
pcorrFinal
|
||||
{
|
||||
$pcorr;
|
||||
tolerance 0.1;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
".*(rho|rhoFinal)"
|
||||
{
|
||||
solver diagonal;
|
||||
|
||||
@ -46,6 +46,7 @@ Usage
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
||||
void nextFile(const char* fileName);
|
||||
void importFile(const char* fileName);
|
||||
|
||||
Reference in New Issue
Block a user