Backported viscoelasticFluidFoam and tutorials (vanilla OF 3.0.1)

This commit is contained in:
Vanja Skuric 2016-05-28 11:32:51 +02:00
parent 7bd4c355c0
commit 7888cf1617
15 changed files with 9 additions and 83 deletions

View file

@ -31,7 +31,8 @@
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
setRefCell(p, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p.name());
// Create viscoelastic model
viscoelasticModel visco(U, phi);

View file

@ -34,6 +34,7 @@ Author
#include "fvCFD.H"
#include "viscoelasticModel.H"
#include "pisoControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,6 +45,9 @@ int main(int argc, char *argv[])
# include "createTime.H"
# include "createMesh.H"
pisoControl piso(mesh);
# include "createFields.H"
# include "initContinuityErrs.H"
# include "createTimeControls.H"
@ -55,7 +59,6 @@ int main(int argc, char *argv[])
while (runTime.run())
{
# include "readPISOControls.H"
# include "readTimeControls.H"
# include "CourantNo.H"
# include "setDeltaT.H"
@ -65,7 +68,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
// Pressure-velocity SIMPLE corrector loop
for (int corr = 0; corr < nCorr; corr++)
while (piso.correct())
{
// Momentum predictor
@ -91,7 +94,7 @@ int main(int argc, char *argv[])
p.storePrevIter();
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
while (piso.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
@ -101,7 +104,7 @@ int main(int argc, char *argv[])
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
if (piso.finalNonOrthogonalIter())
{
phi -= pEqn.flux();
}

View file

@ -63,10 +63,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -58,10 +58,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -58,10 +58,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -58,10 +58,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -57,10 +57,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -54,10 +54,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -69,10 +69,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View file

@ -62,10 +62,4 @@ snGradSchemes
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //