mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: overset: Initial release of overset capability.
Adds overset discretisation to selected physics: - diffusion : overLaplacianDyMFoam - incompressible steady : overSimpleFoam - incompressible transient : overPimpleDyMFoam - compressible transient: overRhoPimpleDyMFoam - two-phase VOF: overInterDyMFoam The overset method chosen is a parallel, fully implicit implementation whereby the interpolation (from donor to acceptor) is inserted as an adapted discretisation on the donor cells, such that the resulting matrix can be solved using the standard linear solvers. Above solvers come with a set of tutorials, showing how to create and set-up simple simulations from scratch.
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
CourantNo
|
||||
|
||||
Description
|
||||
Calculates and outputs the mean and maximum Courant Numbers.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
scalar CoNum = 0.0;
|
||||
scalar meanCoNum = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
surfaceScalarField phiMask(localMin<scalar>(mesh).interpolate(cellMask));
|
||||
|
||||
scalarField sumPhi(fvc::surfaceSum(mag(phiMask*phi))().internalField());
|
||||
|
||||
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanCoNum =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Courant Number mean: " << meanCoNum
|
||||
<< " max: " << CoNum << endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
pimpleDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overPimpleDyMFoam
|
||||
@ -0,0 +1,24 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/overset/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-ldynamicMesh \
|
||||
-loverset
|
||||
@ -0,0 +1,24 @@
|
||||
// Solve the Momentum equation
|
||||
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::ddt(U) + fvm::div(phi, U)
|
||||
+ MRF.DDt(U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
fvOptions(U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -cellMask*fvc::grad(p));
|
||||
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
continuityErrs
|
||||
|
||||
Description
|
||||
Calculates and prints the continuity errors.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
volScalarField contErr(interpolatedCells*cellMask*fvc::div(phi));
|
||||
|
||||
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||
mag(contErr)().weightedAverage(mesh.V()).value();
|
||||
|
||||
scalar globalContErr = runTime.deltaTValue()*
|
||||
contErr.weightedAverage(mesh.V()).value();
|
||||
cumulativeContErr += globalContErr;
|
||||
|
||||
Info<< "time step continuity errors : sum local = " << sumLocalContErr
|
||||
<< ", global = " << globalContErr
|
||||
<< ", cumulative = " << cumulativeContErr
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,113 @@
|
||||
if (mesh.changing())
|
||||
{
|
||||
volVectorField::Boundary& bfld = U.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].initEvaluate();
|
||||
}
|
||||
}
|
||||
|
||||
surfaceScalarField::Boundary& phiBfld = phi.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].evaluate();
|
||||
|
||||
phiBfld[patchi] = bfld[patchi] & mesh.Sf().boundaryField()[patchi];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Initialize BCs list for pcorr to zero-gradient
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
forAll(p.boundaryField(), patchi)
|
||||
{
|
||||
if (p.boundaryField()[patchi].fixesValue())
|
||||
{
|
||||
pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pcorr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("pcorr", p.dimensions(), 0.0),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
{
|
||||
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
|
||||
|
||||
const cellCellStencilObject& overlap = Stencil::New(mesh);
|
||||
const labelList& cellTypes = overlap.cellTypes();
|
||||
const labelIOList& zoneIDs = overlap.zoneID();
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
label nZones = gMax(zoneIDs)+1;
|
||||
|
||||
//label refCellI2 = -1;
|
||||
labelList refCells(nZones, -1);
|
||||
labelList refZones(nZones, -1);
|
||||
|
||||
forAll(zoneIDs, cellI)
|
||||
{
|
||||
label zoneId = zoneIDs[cellI];
|
||||
if
|
||||
(
|
||||
refCells[zoneId] == -1
|
||||
&& cellTypes[cellI] == cellCellStencil::CALCULATED
|
||||
&& refZones[zoneId] == -1
|
||||
)
|
||||
{
|
||||
refCells[zoneId] = cellI;
|
||||
refZones[zoneId] = zoneId;
|
||||
}
|
||||
}
|
||||
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, pcorr) == fvc::div(phi)
|
||||
);
|
||||
|
||||
//pcorrEqn.setReference(refCellI2, 0.0, true);
|
||||
scalarList values(nZones, 0.0);
|
||||
pcorrEqn.setReferences(refCells, values, true);
|
||||
|
||||
const dictionary& d = mesh.solver
|
||||
(
|
||||
pcorr.select
|
||||
(
|
||||
pimple.finalInnerIter()
|
||||
)
|
||||
);
|
||||
mesh.fvMesh::solve(pcorrEqn, d);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pcorrEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
volScalarField("contPhiPcorr", fvc::div(phi)).write();
|
||||
pcorr.write();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
#include "createTimeControls.H"
|
||||
|
||||
bool correctPhi
|
||||
(
|
||||
pimple.dict().lookupOrDefault("correctPhi", false)
|
||||
);
|
||||
|
||||
bool checkMeshCourantNo
|
||||
(
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||
);
|
||||
|
||||
bool massFluxInterpolation
|
||||
(
|
||||
pimple.dict().lookupOrDefault("massFluxInterpolation", false)
|
||||
);
|
||||
|
||||
bool adjustFringe
|
||||
(
|
||||
pimple.dict().lookupOrDefault("oversetAdjustPhi", false)
|
||||
);
|
||||
|
||||
bool ddtCorr
|
||||
(
|
||||
pimple.dict().lookupOrDefault("ddtCorr", true)
|
||||
);
|
||||
@ -0,0 +1,70 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, pimple.dict(), pRefCell, pRefValue);
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
|
||||
//- Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("U", true);
|
||||
oversetDict.add("p", true);
|
||||
oversetDict.add("HbyA", true);
|
||||
oversetDict.add("grad(p)", true);
|
||||
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
// Create bool field with interpolated cells
|
||||
#include "createInterpolatedCells.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
@ -0,0 +1,269 @@
|
||||
// Interpolation used
|
||||
interpolationCellPoint<vector> UInterpolator(HbyA);
|
||||
|
||||
// Determine faces on outside of interpolated cells
|
||||
PackedBoolList isOwnerInterpolatedFace(mesh.nInternalFaces());
|
||||
PackedBoolList isNeiInterpolatedFace(mesh.nInternalFaces());
|
||||
|
||||
// Determine donor cells
|
||||
labelListList donorCell(mesh.nInternalFaces());
|
||||
|
||||
scalarListList weightCellCells(mesh.nInternalFaces());
|
||||
|
||||
// Interpolated HbyA faces
|
||||
vectorField UIntFaces(mesh.nInternalFaces(), vector::zero);
|
||||
|
||||
// Determine receptor neighbourd cells
|
||||
labelList receptorNeigCell(mesh.nInternalFaces(), -1);
|
||||
|
||||
{
|
||||
const cellCellStencilObject& overlap = Stencil::New(mesh);
|
||||
const labelList& cellTypes = overlap.cellTypes();
|
||||
const labelIOList& zoneID = overlap.zoneID();
|
||||
|
||||
label nZones = gMax(zoneID)+1;
|
||||
PtrList<fvMeshSubset> meshParts(nZones);
|
||||
labelList nCellsPerZone(nZones, 0);
|
||||
|
||||
forAll(nCellsPerZone, zoneI)
|
||||
{
|
||||
meshParts.set(zoneI, new fvMeshSubset(mesh));
|
||||
meshParts[zoneI].setLargeCellSubset(zoneID, zoneI);
|
||||
}
|
||||
|
||||
for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
|
||||
{
|
||||
label ownType = cellTypes[mesh.faceOwner()[faceI]];
|
||||
label neiType = cellTypes[mesh.faceNeighbour()[faceI]];
|
||||
if
|
||||
(
|
||||
ownType == cellCellStencil::INTERPOLATED
|
||||
&& neiType == cellCellStencil::CALCULATED
|
||||
)
|
||||
{
|
||||
isOwnerInterpolatedFace[faceI] = true;
|
||||
|
||||
const vector& fc = mesh.faceCentres()[faceI];
|
||||
|
||||
for (label zoneI = 0; zoneI < nZones; zoneI++)
|
||||
{
|
||||
if (zoneI != zoneID[mesh.faceOwner()[faceI]])
|
||||
{
|
||||
const fvMesh& partMesh = meshParts[zoneI].subMesh();
|
||||
const labelList& cellMap = meshParts[zoneI].cellMap();
|
||||
label cellI = partMesh.findCell(fc);
|
||||
|
||||
if (cellI != -1)
|
||||
{
|
||||
// Determine weights
|
||||
labelList stencil(partMesh.cellCells()[cellI]);
|
||||
|
||||
stencil.append(cellI);
|
||||
|
||||
label st = stencil.size();
|
||||
|
||||
donorCell[faceI].setSize(st);
|
||||
|
||||
weightCellCells[faceI].setSize(st);
|
||||
|
||||
scalarField weights(st);
|
||||
|
||||
forAll(stencil, i)
|
||||
{
|
||||
scalar d = mag
|
||||
(
|
||||
partMesh.cellCentres()[stencil[i]]
|
||||
- fc
|
||||
);
|
||||
weights[i] = 1.0/d;
|
||||
donorCell[faceI][i] = cellMap[stencil[i]];
|
||||
}
|
||||
weights /= sum(weights);
|
||||
|
||||
weightCellCells[faceI] = weights;
|
||||
|
||||
forAll(stencil, i)
|
||||
{
|
||||
UIntFaces[faceI] +=
|
||||
weightCellCells[faceI][i]
|
||||
*UInterpolator.interpolate
|
||||
(
|
||||
fc,
|
||||
donorCell[faceI][i]
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
receptorNeigCell[faceI] = mesh.faceNeighbour()[faceI];
|
||||
}
|
||||
else if
|
||||
(
|
||||
ownType == cellCellStencil::CALCULATED
|
||||
&& neiType == cellCellStencil::INTERPOLATED
|
||||
)
|
||||
{
|
||||
isNeiInterpolatedFace[faceI] = true;
|
||||
|
||||
const vector& fc = mesh.faceCentres()[faceI];
|
||||
for (label zoneI = 0; zoneI < nZones; zoneI++)
|
||||
{
|
||||
if (zoneI != zoneID[mesh.faceNeighbour()[faceI]])
|
||||
{
|
||||
const fvMesh& partMesh = meshParts[zoneI].subMesh();
|
||||
const labelList& cellMap = meshParts[zoneI].cellMap();
|
||||
label cellI = partMesh.findCell(fc);
|
||||
|
||||
if (cellI != -1)
|
||||
{
|
||||
// Determine weights
|
||||
labelList stencil(partMesh.cellCells()[cellI]);
|
||||
|
||||
stencil.append(cellI);
|
||||
|
||||
label st = stencil.size();
|
||||
|
||||
donorCell[faceI].setSize(st);
|
||||
|
||||
weightCellCells[faceI].setSize(st);
|
||||
|
||||
scalarField weights(st);
|
||||
|
||||
forAll(stencil, i)
|
||||
{
|
||||
scalar d = mag
|
||||
(
|
||||
partMesh.cellCentres()[stencil[i]]
|
||||
- fc
|
||||
);
|
||||
weights[i] = 1.0/d;
|
||||
donorCell[faceI][i] = cellMap[stencil[i]];
|
||||
}
|
||||
weights /= sum(weights);
|
||||
|
||||
weightCellCells[faceI] = weights;
|
||||
|
||||
forAll(stencil, i)
|
||||
{
|
||||
UIntFaces[faceI] +=
|
||||
weightCellCells[faceI][i]
|
||||
*UInterpolator.interpolate
|
||||
(
|
||||
fc,
|
||||
donorCell[faceI][i]
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
receptorNeigCell[faceI] = mesh.faceOwner()[faceI];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// contravariant U
|
||||
vectorField U1Contrav(mesh.nInternalFaces(), vector::zero);
|
||||
|
||||
surfaceVectorField faceNormals(mesh.Sf()/mesh.magSf());
|
||||
|
||||
forAll(isNeiInterpolatedFace, faceI)
|
||||
{
|
||||
label cellId = -1;
|
||||
if (isNeiInterpolatedFace[faceI])
|
||||
{
|
||||
cellId = mesh.faceNeighbour()[faceI];
|
||||
}
|
||||
else if (isOwnerInterpolatedFace[faceI])
|
||||
{
|
||||
cellId = mesh.faceOwner()[faceI];
|
||||
}
|
||||
|
||||
if (cellId != -1)
|
||||
{
|
||||
const vector& n = faceNormals[faceI];
|
||||
vector n1 = vector::zero;
|
||||
// 2-D cases
|
||||
if (mesh.nSolutionD() == 2)
|
||||
{
|
||||
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
|
||||
{
|
||||
if (mesh.geometricD()[cmpt] == -1)
|
||||
{
|
||||
switch (cmpt)
|
||||
{
|
||||
case vector::X:
|
||||
{
|
||||
n1 = vector(0, n.z(), -n.y());
|
||||
break;
|
||||
}
|
||||
|
||||
case vector::Y:
|
||||
{
|
||||
n1 = vector(n.z(), 0, -n.x());
|
||||
break;
|
||||
}
|
||||
|
||||
case vector::Z:
|
||||
{
|
||||
n1 = vector(n.y(), -n.x(), 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (mesh.nSolutionD() == 3)
|
||||
{
|
||||
//Determine which is the primary direction
|
||||
if (mag(n.x()) > mag(n.y()) && mag(n.x()) > mag(n.z()))
|
||||
{
|
||||
n1 = vector(n.y(), -n.x(), 0);
|
||||
}
|
||||
else if (mag(n.y()) > mag(n.z()))
|
||||
{
|
||||
n1 = vector(0, n.z(), -n.y());
|
||||
}
|
||||
else
|
||||
{
|
||||
n1 = vector(-n.z(), 0, n.x());
|
||||
}
|
||||
}
|
||||
|
||||
n1 /= mag(n1);
|
||||
|
||||
vector n2 = n ^ n1;
|
||||
n2 /= mag(n2);
|
||||
|
||||
tensor rot =
|
||||
tensor
|
||||
(
|
||||
n.x() ,n.y(), n.z(),
|
||||
n1.x() ,n1.y(), n1.z(),
|
||||
n2.x() ,n2.y(), n2.z()
|
||||
);
|
||||
|
||||
// tensor rot =
|
||||
// tensor
|
||||
// (
|
||||
// n & x ,n & y, n & z,
|
||||
// n1 & x ,n1 & y, n1 & z,
|
||||
// n2 & x ,n2 & y, n2 & z
|
||||
// );
|
||||
|
||||
U1Contrav[faceI].x() =
|
||||
2*transform(rot, UIntFaces[faceI]).x()
|
||||
- transform(rot, HbyA[receptorNeigCell[faceI]]).x();
|
||||
|
||||
U1Contrav[faceI].y() = transform(rot, HbyA[cellId]).y();
|
||||
|
||||
U1Contrav[faceI].z() = transform(rot, HbyA[cellId]).z();
|
||||
|
||||
HbyA[cellId] = transform(inv(rot), U1Contrav[faceI]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
|
||||
// Option 1: interpolate rAU, do not block out rAU on blocked cells
|
||||
//mesh.interpolate(rAU, false);
|
||||
//surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
|
||||
|
||||
// Option 2: do not interpolate rAU but block out rAU
|
||||
//surfaceScalarField rAUf("rAUf", fvc::interpolate(blockedCells*rAU));
|
||||
|
||||
|
||||
// Option 3: do not interpolate rAU but zero out rAUf on faces on holes
|
||||
// But what about:
|
||||
//
|
||||
// H
|
||||
// H I C C C C
|
||||
// H
|
||||
//
|
||||
|
||||
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
|
||||
surfaceScalarField rAUf("rAUf", faceMask*fvc::interpolate(rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = constrainHbyA(rAU*UEqn.H(), U, p);
|
||||
|
||||
//mesh.interpolate(HbyA);
|
||||
if (massFluxInterpolation)
|
||||
{
|
||||
#include "interpolatedFaces.H"
|
||||
}
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
tUEqn.clear();
|
||||
}
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
phiHbyA += rAUf*fvc::ddtCorr(U, Uf);
|
||||
}
|
||||
|
||||
MRF.makeRelative(phiHbyA);
|
||||
|
||||
if (p.needReference())
|
||||
{
|
||||
fvc::makeRelative(phiHbyA, U);
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
fvc::makeAbsolute(phiHbyA, U);
|
||||
}
|
||||
|
||||
if (adjustFringe)
|
||||
{
|
||||
fvc::makeRelative(phiHbyA, U);
|
||||
oversetAdjustPhi(phiHbyA, U);
|
||||
fvc::makeAbsolute(phiHbyA, U);
|
||||
}
|
||||
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
volScalarField
|
||||
(
|
||||
"div(phiHbyA)",
|
||||
fvc::div(phiHbyA)
|
||||
//interpolatedCells*cellMask*fvc::div(phiHbyA)
|
||||
).write();
|
||||
}
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA - pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
volVectorField gradP(fvc::grad(p));
|
||||
//mesh.interpolate(gradP);
|
||||
|
||||
// Option 1: leave velocity intact on blocked out cells
|
||||
//U = HbyA - rAU*gradP;
|
||||
|
||||
// Option 2: zero out velocity on blocked out cells
|
||||
U = (HbyA - rAU*cellMask*gradP);
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
fvOptions.correct(U);
|
||||
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
@ -0,0 +1,157 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
pimpleDyMFoam.C
|
||||
|
||||
Group
|
||||
grpIncompressibleSolvers grpMovingMeshSolvers
|
||||
|
||||
Description
|
||||
Transient solver for incompressible, flow of Newtonian fluids
|
||||
on a moving mesh using the PIMPLE (merged PISO-SIMPLE) algorithm.
|
||||
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "localMin.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "transform.H"
|
||||
#include "fvMeshSubset.H"
|
||||
#include "oversetAdjustPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Experimental version of pimpleDyMFoam with support for overset meshes"
|
||||
);
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createUf.H"
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "createControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readControls.H"
|
||||
#include "CourantNo.H"
|
||||
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
bool changed = mesh.update();
|
||||
|
||||
if (changed)
|
||||
{
|
||||
#include "setCellMask.H"
|
||||
#include "setInterpolatedCells.H"
|
||||
}
|
||||
|
||||
// Calculate absolute flux from the mapped surface velocity
|
||||
phi = mesh.Sf() & Uf;
|
||||
|
||||
if (runTime.outputTime())
|
||||
{
|
||||
volScalarField
|
||||
(
|
||||
"contPhi",
|
||||
interpolatedCells*cellMask*fvc::div(phi)
|
||||
).write();
|
||||
}
|
||||
|
||||
if (mesh.changing() && correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
// Make the flux relative to the mesh motion
|
||||
fvc::makeRelative(phi, U);
|
||||
|
||||
if (mesh.changing() && checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
laminarTransport.correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,10 @@
|
||||
#include "readTimeControls.H"
|
||||
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||
|
||||
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
massFluxInterpolation =
|
||||
pimple.dict().lookupOrDefault("massFluxInterpolation", false);
|
||||
|
||||
ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true);
|
||||
@ -0,0 +1,3 @@
|
||||
simpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overSimpleFoam
|
||||
@ -0,0 +1,25 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(FOAM_SOLVERS)/incompressible/pimpleFoam/overPimpleDyMFoam \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/overset/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-ldynamicMesh \
|
||||
-loverset
|
||||
@ -0,0 +1,21 @@
|
||||
// Momentum predictor
|
||||
|
||||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ MRF.DDt(U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
fvOptions(U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
solve(UEqn == -cellMask*fvc::grad(p));
|
||||
|
||||
fvOptions.correct(U);
|
||||
@ -0,0 +1,48 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
continuityErrs
|
||||
|
||||
Description
|
||||
Calculates and prints the continuity errors.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
volScalarField contErr(interpolatedCells*cellMask*fvc::div(phi));
|
||||
|
||||
scalar sumLocalContErr = runTime.deltaTValue()*
|
||||
mag(contErr)().weightedAverage(mesh.V()).value();
|
||||
|
||||
scalar globalContErr = runTime.deltaTValue()*
|
||||
contErr.weightedAverage(mesh.V()).value();
|
||||
cumulativeContErr += globalContErr;
|
||||
|
||||
Info<< "time step continuity errors : sum local = " << sumLocalContErr
|
||||
<< ", global = " << globalContErr
|
||||
<< ", cumulative = " << cumulativeContErr
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,47 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
#include "createOversetFields.H"
|
||||
@ -0,0 +1,34 @@
|
||||
//- Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
dictionary oversetDict;
|
||||
oversetDict.add("U", true);
|
||||
oversetDict.add("p", true);
|
||||
oversetDict.add("HbyA", true);
|
||||
oversetDict.add("grad(p)", true);
|
||||
|
||||
const_cast<dictionary&>
|
||||
(
|
||||
mesh.schemesDict()
|
||||
).add
|
||||
(
|
||||
"oversetInterpolationRequired",
|
||||
oversetDict,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
||||
|
||||
#include "createInterpolatedCells.H"
|
||||
|
||||
bool adjustFringe
|
||||
(
|
||||
simple.dict().lookupOrDefault("oversetAdjustPhi", false)
|
||||
);
|
||||
bool massFluxInterpolation
|
||||
(
|
||||
simple.dict().lookupOrDefault("massFluxInterpolation", false)
|
||||
);
|
||||
@ -0,0 +1,22 @@
|
||||
Info<< "Create dynamic mesh for time = "
|
||||
<< runTime.timeName() << nl << endl;
|
||||
|
||||
autoPtr<dynamicFvMesh> meshPtr
|
||||
(
|
||||
dynamicFvMesh::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
dynamicFvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
dynamicFvMesh& mesh = meshPtr();
|
||||
|
||||
// Calculate initial mesh-to-mesh mapping. Note that this should be
|
||||
// done under the hood, e.g. as a MeshObject
|
||||
mesh.update();
|
||||
@ -0,0 +1,57 @@
|
||||
{
|
||||
surfaceScalarField faceMask(localMin<scalar>(mesh).interpolate(cellMask));
|
||||
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rAUf("rAUf", faceMask*fvc::interpolate(rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = constrainHbyA(rAU*UEqn.H(), U, p);
|
||||
|
||||
//mesh.interpolate(HbyA);
|
||||
if (massFluxInterpolation)
|
||||
{
|
||||
#include "interpolatedFaces.H"
|
||||
}
|
||||
|
||||
tUEqn.clear();
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA));
|
||||
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
if (adjustFringe)
|
||||
{
|
||||
oversetAdjustPhi(phiHbyA, U);
|
||||
}
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA - pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Momentum corrector
|
||||
volVectorField gradP(fvc::grad(p));
|
||||
//mesh.interpolate(gradP);
|
||||
|
||||
U = HbyA - rAU*cellMask*gradP;
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
simpleFoam
|
||||
|
||||
Group
|
||||
grpIncompressibleSolvers
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible flows with turbulence modelling.
|
||||
|
||||
\heading Solver details
|
||||
The solver uses the SIMPLE algorithm to solve the continuity equation:
|
||||
|
||||
\f[
|
||||
\div \vec{U} = 0
|
||||
\f]
|
||||
|
||||
and momentum equation:
|
||||
|
||||
\f[
|
||||
\div \left( \vec{U} \vec{U} \right) - \div \gvec{R}
|
||||
= - \grad p + \vec{S}_U
|
||||
\f]
|
||||
|
||||
Where:
|
||||
\vartable
|
||||
\vec{U} | Velocity
|
||||
p | Pressure
|
||||
\vec{R} | Stress tensor
|
||||
\vec{S}_U | Momentum source
|
||||
\endvartable
|
||||
|
||||
\heading Required fields
|
||||
\plaintable
|
||||
U | Velocity [m/s]
|
||||
p | Kinematic pressure, p/rho [m2/s2]
|
||||
\<turbulence fields\> | As required by user selection
|
||||
\endplaintable
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "fvMeshSubset.H"
|
||||
#include "transform.H"
|
||||
#include "oversetAdjustPhi.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#define CREATE_MESH createUpdatedDynamicFvMesh.H
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createUpdatedDynamicFvMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user