Backported fluid solving part of icoFsiFoam, icoFsiElasticNonLinULSolidFoam and tutorials (vanilla OF 3.0.1)
This commit is contained in:
parent
4a87e64c33
commit
f64478bded
8 changed files with 19 additions and 24 deletions
|
@ -56,4 +56,5 @@
|
|||
|
||||
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());
|
||||
|
|
|
@ -39,6 +39,7 @@ Description
|
|||
#include "faceTetPolyPatch.H"
|
||||
#include "tetPolyPatchInterpolation.H"
|
||||
#include "fixedValueTetPolyPatchFields.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
#include "pointMesh.H"
|
||||
#include "pointFields.H"
|
||||
|
@ -51,6 +52,9 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "createStressMesh.H"
|
||||
# include "createFields.H"
|
||||
# include "createStressFields.H"
|
||||
|
@ -66,7 +70,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
while (runTime.run())
|
||||
{
|
||||
# include "readPISOControls.H"
|
||||
# include "readTimeControls.H"
|
||||
# include "CourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
// SIMPLE loop
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
|
@ -23,7 +23,7 @@
|
|||
|
||||
p.storePrevIter();
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -33,7 +33,7 @@
|
|||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -58,7 +58,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());
|
||||
|
||||
// pRefCell = mesh.findNearestCell(vector(0,0.205,0));
|
||||
// Info << "Ref. cell: " << pRefCell << endl;
|
||||
|
|
|
@ -64,6 +64,7 @@ Author
|
|||
#include "scalarIOField.H"
|
||||
#include "leastSquaresVolPointInterpolation.H"
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -72,6 +73,9 @@ int main(int argc, char *argv[])
|
|||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createDynamicFvMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
|
||||
# include "createFields.H"
|
||||
# include "createStressMesh.H"
|
||||
# include "createStressFields.H"
|
||||
|
@ -88,8 +92,6 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info << "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
# include "readPISOControls.H"
|
||||
|
||||
# include "readFsiControls.H"
|
||||
|
||||
# include "createStressPointMesh.H"
|
||||
|
@ -117,7 +119,7 @@ int main(int argc, char *argv[])
|
|||
while
|
||||
(
|
||||
(fsiResidualNorm > outerCorrTolerance)
|
||||
&& (outerCorr < nOuterCorr)
|
||||
&& (outerCorr < piso.nCorrPIMPLE())
|
||||
);
|
||||
|
||||
Vs += DV;
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
// --- PISO loop
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
U = rUA*UEqn.H();
|
||||
phi = (fvc::interpolate(U) & mesh.Sf());
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
@ -37,7 +37,7 @@
|
|||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
|
|
@ -55,10 +55,4 @@ snGradSchemes
|
|||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -58,10 +58,4 @@ snGradSchemes
|
|||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
Reference in a new issue