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);
|
rhoUf = fvc::interpolate(rho*U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
rhoUf +=
|
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||||
mesh.Sf()
|
|
||||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
|
||||||
/sqr(mesh.magSf());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
|
|||||||
@ -107,10 +107,7 @@ K = 0.5*magSqr(U);
|
|||||||
{
|
{
|
||||||
rhoUf = fvc::interpolate(rho*U);
|
rhoUf = fvc::interpolate(rho*U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
rhoUf +=
|
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||||
mesh.Sf()
|
|
||||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
|
||||||
/sqr(mesh.magSf());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
|
|||||||
@ -42,8 +42,5 @@ U.correctBoundaryConditions();
|
|||||||
{
|
{
|
||||||
rhoUf = fvc::interpolate(rho*U);
|
rhoUf = fvc::interpolate(rho*U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
rhoUf +=
|
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||||
mesh.Sf()
|
|
||||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
|
||||||
/sqr(mesh.magSf());
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ fvOptions.correct(U);
|
|||||||
{
|
{
|
||||||
Uf = fvc::interpolate(U);
|
Uf = fvc::interpolate(U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
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
|
// Make the fluxes relative to the mesh motion
|
||||||
|
|||||||
@ -93,10 +93,7 @@ K = 0.5*magSqr(U);
|
|||||||
{
|
{
|
||||||
rhoUf = fvc::interpolate(rho*U);
|
rhoUf = fvc::interpolate(rho*U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
rhoUf +=
|
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||||
mesh.Sf()
|
|
||||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
|
||||||
/sqr(mesh.magSf());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
|
|||||||
@ -85,6 +85,6 @@
|
|||||||
{
|
{
|
||||||
Uf = fvc::interpolate(U);
|
Uf = fvc::interpolate(U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
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);
|
Uf = fvc::interpolate(U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
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
|
// Make the fluxes relative to the mesh motion
|
||||||
|
|||||||
@ -55,10 +55,10 @@ int main(int argc, char *argv[])
|
|||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createUf.H"
|
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "createPrghCorrTypes.H"
|
#include "createPrghCorrTypes.H"
|
||||||
#include "correctPhi.H"
|
#include "correctPhi.H"
|
||||||
|
#include "createUf.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
{
|
{
|
||||||
Uf = fvc::interpolate(U);
|
Uf = fvc::interpolate(U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
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
|
// Make the fluxes relative to the mesh motion
|
||||||
|
|||||||
@ -65,10 +65,10 @@ int main(int argc, char *argv[])
|
|||||||
pimpleControl pimple(mesh);
|
pimpleControl pimple(mesh);
|
||||||
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createUf.H"
|
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
#include "createPcorrTypes.H"
|
#include "createPcorrTypes.H"
|
||||||
#include "../interFoam/interDyMFoam/correctPhi.H"
|
#include "../interFoam/interDyMFoam/correctPhi.H"
|
||||||
|
#include "createUf.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
{
|
{
|
||||||
Uf = fvc::interpolate(U);
|
Uf = fvc::interpolate(U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
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
|
// Make the fluxes relative to the mesh motion
|
||||||
|
|||||||
@ -83,6 +83,7 @@ label addPatch
|
|||||||
pp.inGroups().append(groupName);
|
pp.inGroups().append(groupName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add patch, create calculated everywhere
|
// Add patch, create calculated everywhere
|
||||||
fvMeshTools::addPatch
|
fvMeshTools::addPatch
|
||||||
(
|
(
|
||||||
@ -207,7 +208,10 @@ void createFaces
|
|||||||
}
|
}
|
||||||
else
|
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
|
modifyOrAddFace
|
||||||
(
|
(
|
||||||
meshMod,
|
meshMod,
|
||||||
@ -217,7 +221,7 @@ void createFaces
|
|||||||
true, // face flip
|
true, // face flip
|
||||||
newMasterPatches[i], // patch for face
|
newMasterPatches[i], // patch for face
|
||||||
fZone.index(), // zone for face
|
fZone.index(), // zone for face
|
||||||
true, // face flip in zone
|
false, // face flip in zone
|
||||||
modifiedFace // modify or add status
|
modifiedFace // modify or add status
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -264,7 +268,7 @@ void createFaces
|
|||||||
false, // face flip
|
false, // face flip
|
||||||
newSlavePatches[i], // patch for face
|
newSlavePatches[i], // patch for face
|
||||||
fZone.index(), // zone for face
|
fZone.index(), // zone for face
|
||||||
false, // face flip in zone
|
true, // face flip in zone
|
||||||
modifiedFace // modify or add status
|
modifiedFace // modify or add status
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -633,18 +637,17 @@ int main(int argc, char *argv[])
|
|||||||
// Note: This is added for the particular case where we want
|
// Note: This is added for the particular case where we want
|
||||||
// master and slave in different groupNames
|
// master and slave in different groupNames
|
||||||
// (ie 3D thermal baffles)
|
// (ie 3D thermal baffles)
|
||||||
bool groupBase = false;
|
|
||||||
if (patchSource.found("groupBase"))
|
|
||||||
{
|
|
||||||
groupBase = readBool(patchSource.lookup("groupBase"));
|
|
||||||
|
|
||||||
if (groupBase)
|
Switch sameGroup
|
||||||
{
|
(
|
||||||
groupNameMaster = groupName + "Group_master";
|
patchSource.lookupOrDefault("sameGroup", true)
|
||||||
groupNameSlave = groupName + "Group_slave";
|
);
|
||||||
patchDictMaster.set("coupleGroup", groupNameMaster);
|
if (!sameGroup)
|
||||||
patchDictSlave.set("coupleGroup", groupNameSlave);
|
{
|
||||||
}
|
groupNameMaster = groupName + "Group_master";
|
||||||
|
groupNameSlave = groupName + "Group_slave";
|
||||||
|
patchDictMaster.set("coupleGroup", groupNameMaster);
|
||||||
|
patchDictSlave.set("coupleGroup", groupNameSlave);
|
||||||
}
|
}
|
||||||
|
|
||||||
addPatch(mesh, masterName, groupNameMaster, patchDictMaster);
|
addPatch(mesh, masterName, groupNameMaster, patchDictMaster);
|
||||||
@ -815,11 +818,11 @@ int main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const dictionary& patchSource = dict.subDict("patchPairs");
|
const dictionary& patchSource = dict.subDict("patchPairs");
|
||||||
bool groupBase = false;
|
|
||||||
if (patchSource.found("groupBase"))
|
Switch sameGroup
|
||||||
{
|
(
|
||||||
groupBase = readBool(patchSource.lookup("groupBase"));
|
patchSource.lookupOrDefault("sameGroup", true)
|
||||||
}
|
);
|
||||||
|
|
||||||
const word& groupName = selectors[selectorI].name();
|
const word& groupName = selectors[selectorI].name();
|
||||||
|
|
||||||
@ -830,7 +833,7 @@ int main(int argc, char *argv[])
|
|||||||
"patchFields"
|
"patchFields"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!groupBase)
|
if (sameGroup)
|
||||||
{
|
{
|
||||||
// Add coupleGroup to all entries
|
// Add coupleGroup to all entries
|
||||||
forAllIter(dictionary, patchFieldsDict, iter)
|
forAllIter(dictionary, patchFieldsDict, iter)
|
||||||
|
|||||||
@ -1078,7 +1078,6 @@ labelList addRegionPatches
|
|||||||
mesh.boundaryMesh()
|
mesh.boundaryMesh()
|
||||||
);
|
);
|
||||||
|
|
||||||
//interfacePatches[interI] = addPatch(mesh, patch1);
|
|
||||||
interfacePatches[interI] = fvMeshTools::addPatch
|
interfacePatches[interI] = fvMeshTools::addPatch
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
@ -1100,7 +1099,6 @@ labelList addRegionPatches
|
|||||||
point::zero, // offset
|
point::zero, // offset
|
||||||
mesh.boundaryMesh()
|
mesh.boundaryMesh()
|
||||||
);
|
);
|
||||||
//addPatch(mesh, patch2);
|
|
||||||
fvMeshTools::addPatch
|
fvMeshTools::addPatch
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -125,6 +125,9 @@ public:
|
|||||||
//- Maximum number of iterations in the solver
|
//- Maximum number of iterations in the solver
|
||||||
label maxIter_;
|
label maxIter_;
|
||||||
|
|
||||||
|
//- Minimum number of iterations in the solver
|
||||||
|
label minIter_;
|
||||||
|
|
||||||
//- Final convergence tolerance
|
//- Final convergence tolerance
|
||||||
Type tolerance_;
|
Type tolerance_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -135,6 +135,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::solver
|
|||||||
controlDict_(solverDict),
|
controlDict_(solverDict),
|
||||||
|
|
||||||
maxIter_(1000),
|
maxIter_(1000),
|
||||||
|
minIter_(0),
|
||||||
tolerance_(1e-6*pTraits<Type>::one),
|
tolerance_(1e-6*pTraits<Type>::one),
|
||||||
relTol_(pTraits<Type>::zero)
|
relTol_(pTraits<Type>::zero)
|
||||||
{
|
{
|
||||||
@ -148,6 +149,7 @@ template<class Type, class DType, class LUType>
|
|||||||
void Foam::LduMatrix<Type, DType, LUType>::solver::readControls()
|
void Foam::LduMatrix<Type, DType, LUType>::solver::readControls()
|
||||||
{
|
{
|
||||||
readControl(controlDict_, maxIter_, "maxIter");
|
readControl(controlDict_, maxIter_, "maxIter");
|
||||||
|
readControl(controlDict_, minIter_, "minIter");
|
||||||
readControl(controlDict_, tolerance_, "tolerance");
|
readControl(controlDict_, tolerance_, "tolerance");
|
||||||
readControl(controlDict_, relTol_, "relTol");
|
readControl(controlDict_, relTol_, "relTol");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,7 +104,11 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
|
|||||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||||
|
|
||||||
// --- Check convergence, solve if not converged
|
// --- 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
|
// --- Select and construct the preconditioner
|
||||||
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||||
@ -182,8 +186,11 @@ Foam::PBiCCCG<Type, DType, LUType>::solve
|
|||||||
|
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
solverPerf.nIterations()++ < this->maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
solverPerf.nIterations()++ < this->maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < this->minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,11 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
|
|||||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||||
|
|
||||||
// --- Check convergence, solve if not converged
|
// --- 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
|
// --- Select and construct the preconditioner
|
||||||
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
autoPtr<typename LduMatrix<Type, DType, LUType>::preconditioner>
|
||||||
@ -174,8 +178,11 @@ Foam::PCICG<Type, DType, LUType>::solve(Field<Type>& psi) const
|
|||||||
|
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
solverPerf.nIterations()++ < this->maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
solverPerf.nIterations()++ < this->maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < this->minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,7 +113,11 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const
|
|||||||
|
|
||||||
|
|
||||||
// Check convergence, solve if not converged
|
// 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>
|
autoPtr<typename LduMatrix<Type, DType, LUType>::smoother>
|
||||||
smootherPtr = LduMatrix<Type, DType, LUType>::smoother::New
|
smootherPtr = LduMatrix<Type, DType, LUType>::smoother::New
|
||||||
@ -140,8 +144,11 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const
|
|||||||
);
|
);
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
(solverPerf.nIterations() += nSweeps_) < this->maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(this->tolerance_, this->relTol_))
|
(solverPerf.nIterations() += nSweeps_) < this->maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(this->tolerance_, this->relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < this->minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ License
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(lduMatrix, 1);
|
defineTypeNameAndDebug(lduMatrix, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -107,6 +107,9 @@ public:
|
|||||||
//- Maximum number of iterations in the solver
|
//- Maximum number of iterations in the solver
|
||||||
label maxIter_;
|
label maxIter_;
|
||||||
|
|
||||||
|
//- Minimum number of iterations in the solver
|
||||||
|
label minIter_;
|
||||||
|
|
||||||
//- Final convergence tolerance
|
//- Final convergence tolerance
|
||||||
scalar tolerance_;
|
scalar tolerance_;
|
||||||
|
|
||||||
|
|||||||
@ -164,6 +164,7 @@ Foam::lduMatrix::solver::solver
|
|||||||
void Foam::lduMatrix::solver::readControls()
|
void Foam::lduMatrix::solver::readControls()
|
||||||
{
|
{
|
||||||
maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", 1000);
|
maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", 1000);
|
||||||
|
minIter_ = controlDict_.lookupOrDefault<label>("minIter", 0);
|
||||||
tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6);
|
tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6);
|
||||||
relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0);
|
relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,11 @@ Foam::solverPerformance Foam::GAMGSolver::solve
|
|||||||
|
|
||||||
|
|
||||||
// Check convergence, solve if not converged
|
// Check convergence, solve if not converged
|
||||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
if
|
||||||
|
(
|
||||||
|
minIter_ > 0
|
||||||
|
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// Create coarse grid correction fields
|
// Create coarse grid correction fields
|
||||||
PtrList<scalarField> coarseCorrFields;
|
PtrList<scalarField> coarseCorrFields;
|
||||||
@ -131,8 +135,11 @@ Foam::solverPerformance Foam::GAMGSolver::solve
|
|||||||
}
|
}
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
++solverPerf.nIterations() < maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
++solverPerf.nIterations() < maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,7 +120,11 @@ Foam::solverPerformance Foam::PBiCG::solve
|
|||||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||||
|
|
||||||
// --- Check convergence, solve if not converged
|
// --- Check convergence, solve if not converged
|
||||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
if
|
||||||
|
(
|
||||||
|
minIter_ > 0
|
||||||
|
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// --- Select and construct the preconditioner
|
// --- Select and construct the preconditioner
|
||||||
autoPtr<lduMatrix::preconditioner> preconPtr =
|
autoPtr<lduMatrix::preconditioner> preconPtr =
|
||||||
@ -192,8 +196,11 @@ Foam::solverPerformance Foam::PBiCG::solve
|
|||||||
/normFactor;
|
/normFactor;
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
solverPerf.nIterations()++ < maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
solverPerf.nIterations()++ < maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,11 @@ Foam::solverPerformance Foam::PCG::solve
|
|||||||
solverPerf.finalResidual() = solverPerf.initialResidual();
|
solverPerf.finalResidual() = solverPerf.initialResidual();
|
||||||
|
|
||||||
// --- Check convergence, solve if not converged
|
// --- Check convergence, solve if not converged
|
||||||
if (!solverPerf.checkConvergence(tolerance_, relTol_))
|
if
|
||||||
|
(
|
||||||
|
minIter_ > 0
|
||||||
|
|| !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// --- Select and construct the preconditioner
|
// --- Select and construct the preconditioner
|
||||||
autoPtr<lduMatrix::preconditioner> preconPtr =
|
autoPtr<lduMatrix::preconditioner> preconPtr =
|
||||||
@ -177,8 +181,11 @@ Foam::solverPerformance Foam::PCG::solve
|
|||||||
|
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
solverPerf.nIterations()++ < maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
solverPerf.nIterations()++ < maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -138,7 +138,11 @@ Foam::solverPerformance Foam::smoothSolver::solve
|
|||||||
|
|
||||||
|
|
||||||
// Check convergence, solve if not converged
|
// 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
|
autoPtr<lduMatrix::smoother> smootherPtr = lduMatrix::smoother::New
|
||||||
(
|
(
|
||||||
@ -176,8 +180,11 @@ Foam::solverPerformance Foam::smoothSolver::solve
|
|||||||
)/normFactor;
|
)/normFactor;
|
||||||
} while
|
} while
|
||||||
(
|
(
|
||||||
(solverPerf.nIterations() += nSweeps_) < maxIter_
|
(
|
||||||
&& !(solverPerf.checkConvergence(tolerance_, relTol_))
|
(solverPerf.nIterations() += nSweeps_) < maxIter_
|
||||||
|
&& !solverPerf.checkConvergence(tolerance_, relTol_)
|
||||||
|
)
|
||||||
|
|| solverPerf.nIterations() < minIter_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,13 @@ Foam::wallPolyPatch::wallPolyPatch
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
polyPatch(name, size, start, index, bm, patchType)
|
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
|
Foam::wallPolyPatch::wallPolyPatch
|
||||||
@ -62,7 +68,13 @@ Foam::wallPolyPatch::wallPolyPatch
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
polyPatch(name, dict, index, bm, patchType)
|
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
|
Foam::wallPolyPatch::wallPolyPatch
|
||||||
|
|||||||
@ -267,7 +267,11 @@ Foam::label Foam::polyMeshFilter::filterFacesLoop(const label nOriginalBadFaces)
|
|||||||
newBadFaces = false;
|
newBadFaces = false;
|
||||||
forAll(mesh_.points(), pI)
|
forAll(mesh_.points(), pI)
|
||||||
{
|
{
|
||||||
if (isErrorPoint[origToCurrentPointMap[pI]])
|
if
|
||||||
|
(
|
||||||
|
origToCurrentPointMap[pI] >= 0
|
||||||
|
&& isErrorPoint[origToCurrentPointMap[pI]]
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (!newErrorPoint[pI])
|
if (!newErrorPoint[pI])
|
||||||
{
|
{
|
||||||
@ -862,14 +866,22 @@ void Foam::polyMeshFilter::updateOldToNewPointMap
|
|||||||
{
|
{
|
||||||
label oldPointI = origToCurrentPointMap[origPointI];
|
label oldPointI = origToCurrentPointMap[origPointI];
|
||||||
|
|
||||||
if (oldPointI < currToNew.size())
|
if (oldPointI != -1)
|
||||||
{
|
{
|
||||||
label newPointI = currToNew[oldPointI];
|
label newPointI = currToNew[oldPointI];
|
||||||
|
|
||||||
if (newPointI != -1)
|
if (newPointI >= 0)
|
||||||
{
|
{
|
||||||
origToCurrentPointMap[origPointI] = newPointI;
|
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
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,6 +31,7 @@ SourceFiles
|
|||||||
edgeMeshI.H
|
edgeMeshI.H
|
||||||
edgeMesh.C
|
edgeMesh.C
|
||||||
edgeMeshIO.C
|
edgeMeshIO.C
|
||||||
|
edgeMeshNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,14 +48,11 @@ Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr< edgeMesh >(cstrIter()(name));
|
return autoPtr<edgeMesh>(cstrIter()(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New
|
Foam::autoPtr<Foam::edgeMesh> Foam::edgeMesh::New(const fileName& name)
|
||||||
(
|
|
||||||
const fileName& name
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
word ext = name.ext();
|
word ext = name.ext();
|
||||||
if (ext == "gz")
|
if (ext == "gz")
|
||||||
|
|||||||
@ -161,7 +161,7 @@ private:
|
|||||||
// points and edges, unsorted
|
// points and edges, unsorted
|
||||||
vectorField normals_;
|
vectorField normals_;
|
||||||
|
|
||||||
//-
|
//- Type per normal: which side of normal to mesh
|
||||||
List<sideVolumeType> normalVolumeTypes_;
|
List<sideVolumeType> normalVolumeTypes_;
|
||||||
|
|
||||||
//- Flat and open edges require the direction of the edge
|
//- Flat and open edges require the direction of the edge
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,6 +78,8 @@ public:
|
|||||||
featureEdgeMesh(const IOobject&, const featureEdgeMesh&);
|
featureEdgeMesh(const IOobject&, const featureEdgeMesh&);
|
||||||
|
|
||||||
|
|
||||||
|
// IO
|
||||||
|
|
||||||
//- ReadData function required for regIOobject read operation
|
//- ReadData function required for regIOobject read operation
|
||||||
virtual bool readData(Istream&);
|
virtual bool readData(Istream&);
|
||||||
|
|
||||||
|
|||||||
@ -46,9 +46,14 @@ surfaceVectorField rhoUf
|
|||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
linearInterpolate(rho*U)
|
fvc::interpolate(rho*U)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
rhoUf += n*(phi/mesh.magSf() - (n & rhoUf));
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -46,9 +46,15 @@ surfaceVectorField Uf
|
|||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
linearInterpolate(U)
|
fvc::interpolate(U)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
{
|
||||||
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,6 +139,21 @@ Foam::displacementLaplacianFvMotionSolver::
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::motionDiffusivity&
|
||||||
|
Foam::displacementLaplacianFvMotionSolver::diffusivity()
|
||||||
|
{
|
||||||
|
if (!diffusivityPtr_.valid())
|
||||||
|
{
|
||||||
|
diffusivityPtr_ = motionDiffusivity::New
|
||||||
|
(
|
||||||
|
fvMesh_,
|
||||||
|
coeffDict().lookup("diffusivity")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return diffusivityPtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::pointField>
|
Foam::tmp<Foam::pointField>
|
||||||
Foam::displacementLaplacianFvMotionSolver::curPoints() const
|
Foam::displacementLaplacianFvMotionSolver::curPoints() const
|
||||||
{
|
{
|
||||||
@ -210,14 +225,14 @@ void Foam::displacementLaplacianFvMotionSolver::solve()
|
|||||||
// the motionSolver accordingly
|
// the motionSolver accordingly
|
||||||
movePoints(fvMesh_.points());
|
movePoints(fvMesh_.points());
|
||||||
|
|
||||||
diffusivityPtr_->correct();
|
diffusivity().correct();
|
||||||
pointDisplacement_.boundaryField().updateCoeffs();
|
pointDisplacement_.boundaryField().updateCoeffs();
|
||||||
|
|
||||||
Foam::solve
|
Foam::solve
|
||||||
(
|
(
|
||||||
fvm::laplacian
|
fvm::laplacian
|
||||||
(
|
(
|
||||||
diffusivityPtr_->operator()(),
|
diffusivity().operator()(),
|
||||||
cellDisplacement_,
|
cellDisplacement_,
|
||||||
"laplacian(diffusivity,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
|
// Update diffusivity. Note two stage to make sure old one is de-registered
|
||||||
// before creating/registering new one.
|
// before creating/registering new one.
|
||||||
diffusivityPtr_.reset(NULL);
|
diffusivityPtr_.clear();
|
||||||
diffusivityPtr_ = motionDiffusivity::New
|
|
||||||
(
|
|
||||||
fvMesh_,
|
|
||||||
coeffDict().lookup("diffusivity")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,7 +53,6 @@ class motionDiffusivity;
|
|||||||
|
|
||||||
class displacementLaplacianFvMotionSolver
|
class displacementLaplacianFvMotionSolver
|
||||||
:
|
:
|
||||||
// public displacementFvMotionSolver
|
|
||||||
public displacementMotionSolver,
|
public displacementMotionSolver,
|
||||||
public fvMotionSolverCore
|
public fvMotionSolverCore
|
||||||
{
|
{
|
||||||
@ -120,6 +119,9 @@ public:
|
|||||||
return cellDisplacement_;
|
return cellDisplacement_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return reference to the diffusivity field
|
||||||
|
motionDiffusivity& diffusivity();
|
||||||
|
|
||||||
//- Return point location obtained from the current motion field
|
//- Return point location obtained from the current motion field
|
||||||
virtual tmp<pointField> curPoints() const;
|
virtual tmp<pointField> curPoints() const;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "SurfaceFilmModel.H"
|
#include "SurfaceFilmModel.H"
|
||||||
#include "surfaceFilmModel.H"
|
#include "surfaceFilmModel.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
#include "mappedPatchBase.H"
|
|
||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
|
|
||||||
|
|||||||
@ -55,8 +55,6 @@ namespace regionModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class mappedPatchBase;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class SurfaceFilmModel Declaration
|
Class SurfaceFilmModel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -66,7 +66,6 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs
|
|||||||
if (isA<valuePointPatchField<vector> >(patchFld))
|
if (isA<valuePointPatchField<vector> >(patchFld))
|
||||||
{
|
{
|
||||||
adaptPatchIDs.append(patchI);
|
adaptPatchIDs.append(patchI);
|
||||||
//Info<< "Detected adapt patch " << patchFld.patch().name() << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return adaptPatchIDs;
|
return adaptPatchIDs;
|
||||||
@ -1259,6 +1258,7 @@ handleFeatureAngleLayerTerminations
|
|||||||
void Foam::medialAxisMeshMover::findIsolatedRegions
|
void Foam::medialAxisMeshMover::findIsolatedRegions
|
||||||
(
|
(
|
||||||
const scalar minCosLayerTermination,
|
const scalar minCosLayerTermination,
|
||||||
|
const bool detectExtrusionIsland,
|
||||||
const PackedBoolList& isMasterPoint,
|
const PackedBoolList& isMasterPoint,
|
||||||
const PackedBoolList& isMasterEdge,
|
const PackedBoolList& isMasterEdge,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
@ -1268,6 +1268,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const indirectPrimitivePatch& pp = adaptPatchPtr_();
|
const indirectPrimitivePatch& pp = adaptPatchPtr_();
|
||||||
|
const labelListList& pointFaces = pp.pointFaces();
|
||||||
|
|
||||||
|
|
||||||
Info<< typeName << " : Removing isolated regions ..." << endl;
|
Info<< typeName << " : Removing isolated regions ..." << endl;
|
||||||
|
|
||||||
@ -1292,40 +1294,110 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
syncPatchDisplacement(minThickness, patchDisp, extrudeStatus);
|
syncPatchDisplacement(minThickness, patchDisp, extrudeStatus);
|
||||||
|
|
||||||
|
|
||||||
// Do not extrude from point where all neighbouring
|
|
||||||
// faces are not grown
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
boolList extrudedFaces(pp.size(), true);
|
|
||||||
forAll(pp.localFaces(), faceI)
|
|
||||||
{
|
|
||||||
const face& f = pp.localFaces()[faceI];
|
|
||||||
forAll(f, fp)
|
|
||||||
{
|
|
||||||
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
|
|
||||||
{
|
|
||||||
extrudedFaces[faceI] = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const labelListList& pointFaces = pp.pointFaces();
|
// 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);
|
boolList keptPoints(pp.nPoints(), false);
|
||||||
forAll(keptPoints, patchPointI)
|
|
||||||
{
|
|
||||||
const labelList& pFaces = pointFaces[patchPointI];
|
|
||||||
|
|
||||||
forAll(pFaces, i)
|
if (detectExtrusionIsland)
|
||||||
|
{
|
||||||
|
// Do not extrude from point where all neighbouring
|
||||||
|
// points are not grown
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
labelList islandPoint(pp.size(), -1);
|
||||||
|
forAll(pp, faceI)
|
||||||
{
|
{
|
||||||
label faceI = pFaces[i];
|
const face& f = pp.localFaces()[faceI];
|
||||||
if (extrudedFaces[faceI])
|
|
||||||
|
forAll(f, fp)
|
||||||
{
|
{
|
||||||
keptPoints[patchPointI] = true;
|
label patchPointI = f[fp];
|
||||||
break;
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
const face& f = pp.localFaces()[faceI];
|
||||||
|
forAll(f, fp)
|
||||||
|
{
|
||||||
|
if (extrudeStatus[f[fp]] == autoLayerDriver::NOEXTRUDE)
|
||||||
|
{
|
||||||
|
extrudedFaces[faceI] = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const labelListList& pointFaces = pp.pointFaces();
|
||||||
|
|
||||||
|
forAll(keptPoints, patchPointI)
|
||||||
|
{
|
||||||
|
const labelList& pFaces = pointFaces[patchPointI];
|
||||||
|
|
||||||
|
forAll(pFaces, i)
|
||||||
|
{
|
||||||
|
label faceI = pFaces[i];
|
||||||
|
if (extrudedFaces[faceI])
|
||||||
|
{
|
||||||
|
keptPoints[patchPointI] = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
syncTools::syncPointList
|
syncTools::syncPointList
|
||||||
(
|
(
|
||||||
@ -1344,8 +1416,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions
|
|||||||
{
|
{
|
||||||
if (unmarkExtrusion(patchPointI, patchDisp, extrudeStatus))
|
if (unmarkExtrusion(patchPointI, patchDisp, extrudeStatus))
|
||||||
{
|
{
|
||||||
nPointCounter++;
|
nPointCounter++;
|
||||||
nChanged++;
|
nChanged++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1701,6 +1773,13 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
mesh().globalData().nTotalPoints()
|
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)
|
// Precalulate master points/edge (only relevant for shared points/edges)
|
||||||
const PackedBoolList isMasterPoint(syncTools::getMasterPoints(mesh()));
|
const PackedBoolList isMasterPoint(syncTools::getMasterPoints(mesh()));
|
||||||
@ -1851,6 +1930,8 @@ void Foam::medialAxisMeshMover::calculateDisplacement
|
|||||||
findIsolatedRegions
|
findIsolatedRegions
|
||||||
(
|
(
|
||||||
minCosLayerTermination,
|
minCosLayerTermination,
|
||||||
|
detectExtrusionIsland,
|
||||||
|
|
||||||
isMasterPoint,
|
isMasterPoint,
|
||||||
isMasterEdge,
|
isMasterEdge,
|
||||||
meshEdges,
|
meshEdges,
|
||||||
|
|||||||
@ -219,6 +219,7 @@ class medialAxisMeshMover
|
|||||||
void findIsolatedRegions
|
void findIsolatedRegions
|
||||||
(
|
(
|
||||||
const scalar minCosLayerTermination,
|
const scalar minCosLayerTermination,
|
||||||
|
const bool detectExtrusionIsland,
|
||||||
const PackedBoolList& isMasterPoint,
|
const PackedBoolList& isMasterPoint,
|
||||||
const PackedBoolList& isMasterEdge,
|
const PackedBoolList& isMasterEdge,
|
||||||
const labelList& meshEdges,
|
const labelList& meshEdges,
|
||||||
|
|||||||
@ -303,7 +303,7 @@ Foam::refinementFeatures::refinementFeatures
|
|||||||
|
|
||||||
Info<< "Detected " << featurePoints.size()
|
Info<< "Detected " << featurePoints.size()
|
||||||
<< " featurePoints out of " << pointEdges.size()
|
<< " featurePoints out of " << pointEdges.size()
|
||||||
<< " on feature " << eMesh.name() << endl;
|
<< " points on feature " << eMesh.name() << endl;
|
||||||
|
|
||||||
buildTrees(i, featurePoints);
|
buildTrees(i, featurePoints);
|
||||||
}
|
}
|
||||||
@ -372,7 +372,7 @@ Foam::refinementFeatures::refinementFeatures
|
|||||||
|
|
||||||
Info<< "Detected " << featurePoints.size()
|
Info<< "Detected " << featurePoints.size()
|
||||||
<< " featurePoints out of " << points.size()
|
<< " featurePoints out of " << points.size()
|
||||||
<< " on feature " << eMesh.name()
|
<< " points on feature " << eMesh.name()
|
||||||
<< " when using feature cos " << minCos << endl;
|
<< " when using feature cos " << minCos << endl;
|
||||||
|
|
||||||
buildTrees(i, featurePoints);
|
buildTrees(i, featurePoints);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,13 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
|||||||
:
|
:
|
||||||
polyPatch(name, size, start, index, bm, patchType),
|
polyPatch(name, size, start, index, bm, patchType),
|
||||||
mappedPatchBase(static_cast<const polyPatch&>(*this))
|
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
|
Foam::mappedPolyPatch::mappedPolyPatch
|
||||||
@ -115,7 +121,13 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
|||||||
:
|
:
|
||||||
polyPatch(name, dict, index, bm, patchType),
|
polyPatch(name, dict, index, bm, patchType),
|
||||||
mappedPatchBase(*this, dict)
|
mappedPatchBase(*this, dict)
|
||||||
{}
|
{
|
||||||
|
// mapped is not constraint type so add mapped group explicitly
|
||||||
|
if (findIndex(inGroups(), typeName) == -1)
|
||||||
|
{
|
||||||
|
inGroups().append(typeName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::mappedPolyPatch::mappedPolyPatch
|
Foam::mappedPolyPatch::mappedPolyPatch
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
#include "mappedWallPolyPatch.H"
|
#include "mappedWallPolyPatch.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "mappedPolyPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -56,7 +57,13 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
|||||||
:
|
:
|
||||||
wallPolyPatch(name, size, start, index, bm, patchType),
|
wallPolyPatch(name, size, start, index, bm, patchType),
|
||||||
mappedPatchBase(static_cast<const polyPatch&>(*this))
|
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
|
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||||
@ -120,7 +127,13 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
|||||||
:
|
:
|
||||||
wallPolyPatch(name, dict, index, bm, patchType),
|
wallPolyPatch(name, dict, index, bm, patchType),
|
||||||
mappedPatchBase(*this, dict)
|
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
|
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||||
|
|||||||
@ -263,9 +263,9 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
forAll (thicknessLayers_, iLayer)
|
forAll (thicknessLayers_, iLayer)
|
||||||
{
|
{
|
||||||
const scalar l = 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;
|
type empty;
|
||||||
}
|
}
|
||||||
|
processor
|
||||||
|
{
|
||||||
|
type processor;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform (0.1 0 0);
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type compressible::alphatWallFunction;
|
type compressible::alphatWallFunction;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 0.01;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type compressible::epsilonWallFunction;
|
type compressible::epsilonWallFunction;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 0.1;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type compressible::kqRWallFunction;
|
type compressible::kqRWallFunction;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type mutkWallFunction;
|
type mutkWallFunction;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 101325;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
|
|||||||
@ -21,6 +21,9 @@ internalField uniform 101325;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
//- Set patchGroups for constraint patches
|
||||||
|
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
floor
|
floor
|
||||||
{
|
{
|
||||||
type fixedFluxPressure;
|
type fixedFluxPressure;
|
||||||
|
|||||||
@ -52,8 +52,9 @@ baffles
|
|||||||
{
|
{
|
||||||
type mappedWall;
|
type mappedWall;
|
||||||
sampleMode nearestPatchFace;
|
sampleMode nearestPatchFace;
|
||||||
//Group master and slave in different groups. (default off)
|
// Put master and slave patch in same group (default on)
|
||||||
groupBase on;
|
// Otherwise makeup group names xxx_master and xxx_slave
|
||||||
|
sameGroup off;
|
||||||
patchFields
|
patchFields
|
||||||
{
|
{
|
||||||
#include "./0/include/wallBafflePatches"
|
#include "./0/include/wallBafflePatches"
|
||||||
|
|||||||
@ -15,46 +15,441 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
6
|
72
|
||||||
(
|
(
|
||||||
front
|
frontAndBack
|
||||||
{
|
{
|
||||||
type symmetryPlane;
|
type symmetryPlane;
|
||||||
inGroups 1(symmetryPlane);
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 160;
|
nFaces 320;
|
||||||
startFace 3456;
|
startFace 9440280;
|
||||||
}
|
|
||||||
back
|
|
||||||
{
|
|
||||||
type symmetryPlane;
|
|
||||||
inGroups 1(symmetryPlane);
|
|
||||||
nFaces 160;
|
|
||||||
startFace 3616;
|
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 64;
|
nFaces 64;
|
||||||
startFace 3776;
|
startFace 9440600;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 64;
|
nFaces 64;
|
||||||
startFace 3840;
|
startFace 9440664;
|
||||||
}
|
}
|
||||||
lowerWall
|
lowerWall
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 160;
|
nFaces 15243;
|
||||||
startFace 3904;
|
startFace 9440728;
|
||||||
}
|
}
|
||||||
upperWall
|
upperWall
|
||||||
{
|
{
|
||||||
type symmetryPlane;
|
type symmetryPlane;
|
||||||
inGroups 1(symmetryPlane);
|
inGroups 1(symmetryPlane);
|
||||||
nFaces 160;
|
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
|
# Source tutorial run functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
\cp system/controlDict.flow system/controlDict
|
# Generate mesh
|
||||||
|
./Allrun-pre
|
||||||
# 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
|
|
||||||
|
|
||||||
|
## Run simulation
|
||||||
|
#./Allrun-simulation
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- 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(rhoPhi,K) Gauss upwind;
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
|
||||||
|
|
||||||
div((muEff*dev(T(grad(U))))) Gauss linear;
|
div((muEff*dev(T(grad(U))))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,13 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pcorrFinal
|
||||||
|
{
|
||||||
|
$pcorr;
|
||||||
|
tolerance 0.1;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
|
||||||
".*(rho|rhoFinal)"
|
".*(rho|rhoFinal)"
|
||||||
{
|
{
|
||||||
solver diagonal;
|
solver diagonal;
|
||||||
|
|||||||
@ -46,6 +46,7 @@ Usage
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
void nextFile(const char* fileName);
|
void nextFile(const char* fileName);
|
||||||
void importFile(const char* fileName);
|
void importFile(const char* fileName);
|
||||||
|
|||||||
Reference in New Issue
Block a user