mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -1,11 +1,18 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-IBCs/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-IBCs/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lrhoCentralFoam
|
-lrhoCentralFoam \
|
||||||
|
-lcompressibleTurbulenceModel \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lcompressibleLESModels \
|
||||||
|
-lmeshTools
|
||||||
|
|||||||
@ -96,3 +96,18 @@ surfaceScalarField neg
|
|||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("neg", dimless, -1.0)
|
dimensionedScalar("neg", dimless, -1.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
surfaceScalarField phi("phi", mesh.Sf() & fvc::interpolate(rhoU));
|
||||||
|
|
||||||
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::turbulenceModel::New
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../BCs/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I../BCs/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
@ -13,5 +13,8 @@ EXE_LIBS = \
|
|||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lrhoCentralFoam \
|
-lrhoCentralFoam \
|
||||||
|
-lcompressibleTurbulenceModel \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lcompressibleLESModels \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Application
|
Application
|
||||||
rhoCentralFoam
|
rhoCentralDyMFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Density-based compressible flow solver based on central-upwind schemes of
|
Density-based compressible flow solver based on central-upwind schemes of
|
||||||
@ -32,6 +32,7 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicPsiThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "fixedRhoFvPatchScalarField.H"
|
#include "fixedRhoFvPatchScalarField.H"
|
||||||
#include "motionSolver.H"
|
#include "motionSolver.H"
|
||||||
@ -185,12 +186,11 @@ int main(int argc, char *argv[])
|
|||||||
+ aSf*p_pos - aSf*p_neg
|
+ aSf*p_pos - aSf*p_neg
|
||||||
);
|
);
|
||||||
|
|
||||||
volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U))));
|
volScalarField muEff(turbulence->muEff());
|
||||||
|
volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));
|
||||||
|
|
||||||
// --- Solve density
|
// --- Solve density
|
||||||
Info<< max(rho) << " " << min(rho) << endl;
|
|
||||||
solve(fvm::ddt(rho) + fvc::div(phi));
|
solve(fvm::ddt(rho) + fvc::div(phi));
|
||||||
Info<< max(rho) << " " << min(rho) << endl;
|
|
||||||
|
|
||||||
// --- Solve momentum
|
// --- Solve momentum
|
||||||
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
|
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
|
||||||
@ -206,7 +206,7 @@ int main(int argc, char *argv[])
|
|||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U) - fvc::ddt(rho, U)
|
fvm::ddt(rho, U) - fvc::ddt(rho, U)
|
||||||
- fvm::laplacian(mu, U)
|
- fvm::laplacian(muEff, U)
|
||||||
- fvc::div(tauMC)
|
- fvc::div(tauMC)
|
||||||
);
|
);
|
||||||
rhoU = rho*U;
|
rhoU = rho*U;
|
||||||
@ -216,7 +216,7 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField sigmaDotU
|
surfaceScalarField sigmaDotU
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
fvc::interpolate(mu)*mesh.magSf()*fvc::snGrad(U)
|
fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
|
||||||
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
||||||
)
|
)
|
||||||
& (a_pos*U_pos + a_neg*U_neg)
|
& (a_pos*U_pos + a_neg*U_neg)
|
||||||
@ -240,12 +240,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!inviscid)
|
if (!inviscid)
|
||||||
{
|
{
|
||||||
volScalarField k("k", thermo.Cp()*mu/Pr);
|
volScalarField k("k", thermo.Cp()*muEff/Pr);
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, e) - fvc::ddt(rho, e)
|
fvm::ddt(rho, e) - fvc::ddt(rho, e)
|
||||||
- fvm::laplacian(thermo.alpha(), e)
|
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||||
+ fvc::laplacian(thermo.alpha(), e)
|
+ fvc::laplacian(turbulence->alpha(), e)
|
||||||
- fvc::laplacian(k, T)
|
- fvc::laplacian(k, T)
|
||||||
);
|
);
|
||||||
thermo.correct();
|
thermo.correct();
|
||||||
@ -258,6 +258,8 @@ int main(int argc, char *argv[])
|
|||||||
p.correctBoundaryConditions();
|
p.correctBoundaryConditions();
|
||||||
rho.boundaryField() = psi.boundaryField()*p.boundaryField();
|
rho.boundaryField() = psi.boundaryField()*p.boundaryField();
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,6 +32,7 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicPsiThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
|
#include "turbulenceModel.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "fixedRhoFvPatchScalarField.H"
|
#include "fixedRhoFvPatchScalarField.H"
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "readFluxScheme.H"
|
#include "readFluxScheme.H"
|
||||||
|
|
||||||
dimensionedScalar v_zero("v_zero",dimVolume/dimTime, 0.0);
|
dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0);
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
@ -128,14 +129,6 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap)));
|
surfaceScalarField amaxSf("amaxSf", max(mag(am), mag(ap)));
|
||||||
|
|
||||||
#include "compressibleCourantNo.H"
|
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
surfaceScalarField aSf(am*a_pos);
|
surfaceScalarField aSf(am*a_pos);
|
||||||
|
|
||||||
if (fluxScheme == "Tadmor")
|
if (fluxScheme == "Tadmor")
|
||||||
@ -152,6 +145,18 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField aphiv_pos(phiv_pos - aSf);
|
surfaceScalarField aphiv_pos(phiv_pos - aSf);
|
||||||
surfaceScalarField aphiv_neg(phiv_neg + aSf);
|
surfaceScalarField aphiv_neg(phiv_neg + aSf);
|
||||||
|
|
||||||
|
// Reuse amaxSf for the maximum positive and negative fluxes
|
||||||
|
// estimated by the central scheme
|
||||||
|
amaxSf = max(mag(aphiv_pos), mag(aphiv_neg));
|
||||||
|
|
||||||
|
#include "compressibleCourantNo.H"
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
surfaceScalarField phi("phi", aphiv_pos*rho_pos + aphiv_neg*rho_neg);
|
surfaceScalarField phi("phi", aphiv_pos*rho_pos + aphiv_neg*rho_neg);
|
||||||
|
|
||||||
surfaceVectorField phiUp
|
surfaceVectorField phiUp
|
||||||
@ -167,7 +172,8 @@ int main(int argc, char *argv[])
|
|||||||
+ aSf*p_pos - aSf*p_neg
|
+ aSf*p_pos - aSf*p_neg
|
||||||
);
|
);
|
||||||
|
|
||||||
volTensorField tauMC("tauMC", mu*dev2(Foam::T(fvc::grad(U))));
|
volScalarField muEff(turbulence->muEff());
|
||||||
|
volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));
|
||||||
|
|
||||||
// --- Solve density
|
// --- Solve density
|
||||||
solve(fvm::ddt(rho) + fvc::div(phi));
|
solve(fvm::ddt(rho) + fvc::div(phi));
|
||||||
@ -188,7 +194,7 @@ int main(int argc, char *argv[])
|
|||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U) - fvc::ddt(rho, U)
|
fvm::ddt(rho, U) - fvc::ddt(rho, U)
|
||||||
- fvm::laplacian(mu, U)
|
- fvm::laplacian(muEff, U)
|
||||||
- fvc::div(tauMC)
|
- fvc::div(tauMC)
|
||||||
);
|
);
|
||||||
rhoU = rho*U;
|
rhoU = rho*U;
|
||||||
@ -198,7 +204,7 @@ int main(int argc, char *argv[])
|
|||||||
surfaceScalarField sigmaDotU
|
surfaceScalarField sigmaDotU
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
fvc::interpolate(mu)*mesh.magSf()*fvc::snGrad(U)
|
fvc::interpolate(muEff)*mesh.magSf()*fvc::snGrad(U)
|
||||||
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
+ (mesh.Sf() & fvc::interpolate(tauMC))
|
||||||
)
|
)
|
||||||
& (a_pos*U_pos + a_neg*U_neg)
|
& (a_pos*U_pos + a_neg*U_neg)
|
||||||
@ -222,12 +228,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!inviscid)
|
if (!inviscid)
|
||||||
{
|
{
|
||||||
volScalarField k("k", thermo.Cp()*mu/Pr);
|
volScalarField k("k", thermo.Cp()*muEff/Pr);
|
||||||
solve
|
solve
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, e) - fvc::ddt(rho, e)
|
fvm::ddt(rho, e) - fvc::ddt(rho, e)
|
||||||
- fvm::laplacian(thermo.alpha(), e)
|
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||||
+ fvc::laplacian(thermo.alpha(), e)
|
+ fvc::laplacian(turbulence->alpha(), e)
|
||||||
- fvc::laplacian(k, T)
|
- fvc::laplacian(k, T)
|
||||||
);
|
);
|
||||||
thermo.correct();
|
thermo.correct();
|
||||||
@ -240,6 +246,8 @@ int main(int argc, char *argv[])
|
|||||||
p.correctBoundaryConditions();
|
p.correctBoundaryConditions();
|
||||||
rho.boundaryField() = psi.boundaryField()*p.boundaryField();
|
rho.boundaryField() = psi.boundaryField()*p.boundaryField();
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
8
applications/solvers/compressible/rhoPimpleFoam/Allwmake
Executable file
8
applications/solvers/compressible/rhoPimpleFoam/Allwmake
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake
|
||||||
|
wmake rhoPorousMRFPimpleFoam
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -39,6 +39,16 @@
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
dimensionedScalar rhoMax
|
||||||
|
(
|
||||||
|
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar rhoMin
|
||||||
|
(
|
||||||
|
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
|
||||||
|
);
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
rho.relax();
|
||||||
|
|
||||||
U = rAU*UEqn().H();
|
U = rAU*UEqn().H();
|
||||||
|
|
||||||
@ -98,6 +101,9 @@ p.relax();
|
|||||||
|
|
||||||
// Recalculate density from the relaxed pressure
|
// Recalculate density from the relaxed pressure
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
Info<< "rho max/min : " << max(rho).value()
|
||||||
<< " " << min(rho).value() << endl;
|
<< " " << min(rho).value() << endl;
|
||||||
|
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,6 +75,7 @@ int main(int argc, char *argv[])
|
|||||||
if (nOuterCorr != 1)
|
if (nOuterCorr != 1)
|
||||||
{
|
{
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
rho.storePrevIter();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../rhoPimpleFoam \
|
-I.. \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
MRFZones mrfZones(mesh);
|
||||||
|
mrfZones.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
|
porousZones pZones(mesh);
|
||||||
|
Switch pressureImplicitPorosity(false);
|
||||||
@ -1,4 +1,7 @@
|
|||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
rho.relax();
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn().A());
|
volScalarField rAU(1.0/UEqn().A());
|
||||||
U = rAU*UEqn().H();
|
U = rAU*UEqn().H();
|
||||||
@ -16,7 +19,7 @@ if (transonic)
|
|||||||
fvc::interpolate(psi)
|
fvc::interpolate(psi)
|
||||||
*(
|
*(
|
||||||
(fvc::interpolate(U) & mesh.Sf())
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
//+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||||
@ -96,30 +99,17 @@ else
|
|||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "compressibleContinuityErrs.H"
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
//if (oCorr != nOuterCorr-1)
|
// Explicitly relax pressure for momentum corrector
|
||||||
{
|
p.relax();
|
||||||
// Explicitly relax pressure for momentum corrector
|
|
||||||
p.relax();
|
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
rho = max(rho, rhoMin);
|
||||||
rho = min(rho, rhoMax);
|
rho = min(rho, rhoMax);
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
Info<< "rho max/min : " << max(rho).value()
|
||||||
<< " " << min(rho).value() << endl;
|
<< " " << min(rho).value() << endl;
|
||||||
}
|
|
||||||
|
|
||||||
U -= rAU*fvc::grad(p);
|
U -= rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
|
||||||
// to obey overall mass continuity
|
|
||||||
/*
|
|
||||||
if (closedVolume)
|
|
||||||
{
|
|
||||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
|
||||||
/fvc::domainIntegrate(psi);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,6 +48,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createZones.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -1,77 +0,0 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<basicPsiThermo> pThermo
|
|
||||||
(
|
|
||||||
basicPsiThermo::New(mesh)
|
|
||||||
);
|
|
||||||
basicPsiThermo& thermo = pThermo();
|
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
|
||||||
volScalarField& h = thermo.h();
|
|
||||||
const volScalarField& psi = thermo.psi();
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
thermo.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::turbulenceModel::New
|
|
||||||
(
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
//dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating field DpDt\n" << endl;
|
|
||||||
volScalarField DpDt
|
|
||||||
(
|
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
|
||||||
);
|
|
||||||
|
|
||||||
MRFZones mrfZones(mesh);
|
|
||||||
mrfZones.correctBoundaryVelocity(U);
|
|
||||||
|
|
||||||
porousZones pZones(mesh);
|
|
||||||
Switch pressureImplicitPorosity(false);
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
rhoPorousSimpleFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/rhoPorousSimpleFoam
|
|
||||||
@ -1,98 +0,0 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<basicPsiThermo> pThermo
|
|
||||||
(
|
|
||||||
basicPsiThermo::New(mesh)
|
|
||||||
);
|
|
||||||
basicPsiThermo& thermo = pThermo();
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
thermo.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
|
||||||
volScalarField& h = thermo.h();
|
|
||||||
const volScalarField& psi = thermo.psi();
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
|
||||||
autoPtr<compressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::RASModel::New
|
|
||||||
(
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
|
||||||
|
|
||||||
thermalPorousZones pZones(mesh);
|
|
||||||
Switch pressureImplicitPorosity(false);
|
|
||||||
|
|
||||||
// nUCorrectors used for pressureImplicitPorosity
|
|
||||||
int nUCorr = 0;
|
|
||||||
if (pZones.size())
|
|
||||||
{
|
|
||||||
// nUCorrectors for pressureImplicitPorosity
|
|
||||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
|
||||||
{
|
|
||||||
nUCorr = readInt
|
|
||||||
(
|
|
||||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nUCorr > 0)
|
|
||||||
{
|
|
||||||
pressureImplicitPorosity = true;
|
|
||||||
Info<< "Using pressure implicit porosity" << endl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Info<< "Using pressure explicit porosity" << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,73 +0,0 @@
|
|||||||
if (pressureImplicitPorosity)
|
|
||||||
{
|
|
||||||
U = trTU()&UEqn().H();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
U = trAU()*UEqn().H();
|
|
||||||
}
|
|
||||||
|
|
||||||
UEqn.clear();
|
|
||||||
|
|
||||||
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
|
||||||
bool closedVolume = adjustPhi(phi, U, p);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
tmp<fvScalarMatrix> tpEqn;
|
|
||||||
|
|
||||||
if (pressureImplicitPorosity)
|
|
||||||
{
|
|
||||||
tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi));
|
|
||||||
}
|
|
||||||
|
|
||||||
tpEqn().setReference(pRefCell, pRefValue);
|
|
||||||
// retain the residual from the first iteration
|
|
||||||
if (nonOrth == 0)
|
|
||||||
{
|
|
||||||
tpEqn().solve();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tpEqn().solve();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
|
||||||
{
|
|
||||||
phi -= tpEqn().flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "incompressible/continuityErrs.H"
|
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
|
||||||
p.relax();
|
|
||||||
|
|
||||||
if (pressureImplicitPorosity)
|
|
||||||
{
|
|
||||||
U -= trTU()&fvc::grad(p);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
U -= trAU()*fvc::grad(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
|
||||||
// to obey overall mass continuity
|
|
||||||
if (closedVolume)
|
|
||||||
{
|
|
||||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
|
||||||
/fvc::domainIntegrate(psi);
|
|
||||||
}
|
|
||||||
|
|
||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
|
||||||
8
applications/solvers/compressible/rhoSimpleFoam/Allwmake
Executable file
8
applications/solvers/compressible/rhoSimpleFoam/Allwmake
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake
|
||||||
|
wmake rhoPorousMRFSimpleFoam
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
rhoPorousMRFSimpleFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/rhoPorousMRFSimpleFoam
|
||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermalPorousZone/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermalPorousZone/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
UEqn().relax();
|
UEqn().relax();
|
||||||
|
|
||||||
|
mrfZones.addCoriolis(rho, UEqn());
|
||||||
|
|
||||||
// Include the porous media resistance and solve the momentum equation
|
// Include the porous media resistance and solve the momentum equation
|
||||||
// either implicit in the tensorial resistance or transport using by
|
// either implicit in the tensorial resistance or transport using by
|
||||||
// including the spherical part of the resistance in the momentum diagonal
|
// including the spherical part of the resistance in the momentum diagonal
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
MRFZones mrfZones(mesh);
|
||||||
|
mrfZones.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
|
thermalPorousZones pZones(mesh);
|
||||||
|
Switch pressureImplicitPorosity(false);
|
||||||
|
|
||||||
|
// nUCorrectors used for pressureImplicitPorosity
|
||||||
|
int nUCorr = 0;
|
||||||
|
if (pZones.size())
|
||||||
|
{
|
||||||
|
// nUCorrectors for pressureImplicitPorosity
|
||||||
|
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||||
|
{
|
||||||
|
nUCorr = readInt
|
||||||
|
(
|
||||||
|
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nUCorr > 0)
|
||||||
|
{
|
||||||
|
pressureImplicitPorosity = true;
|
||||||
|
Info<< "Using pressure implicit porosity" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "Using pressure explicit porosity" << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,8 +5,8 @@
|
|||||||
- fvm::Sp(fvc::div(phi), h)
|
- fvm::Sp(fvc::div(phi), h)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
==
|
==
|
||||||
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
|
fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
|
||||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
- (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
|
||||||
);
|
);
|
||||||
|
|
||||||
pZones.addEnthalpySource(thermo, rho, hEqn);
|
pZones.addEnthalpySource(thermo, rho, hEqn);
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
if (pressureImplicitPorosity)
|
||||||
|
{
|
||||||
|
U = trTU()&UEqn().H();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
U = trAU()*UEqn().H();
|
||||||
|
}
|
||||||
|
|
||||||
|
UEqn.clear();
|
||||||
|
|
||||||
|
bool closedVolume = false;
|
||||||
|
|
||||||
|
if (transonic)
|
||||||
|
{
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
);
|
||||||
|
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tpEqn;
|
||||||
|
|
||||||
|
if (pressureImplicitPorosity)
|
||||||
|
{
|
||||||
|
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trTU(), p));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trAU(), p));
|
||||||
|
}
|
||||||
|
|
||||||
|
tpEqn().setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
tpEqn().solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi == tpEqn().flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
||||||
|
mrfZones.relativeFlux(fvc::interpolate(rho), phi);
|
||||||
|
|
||||||
|
closedVolume = adjustPhi(phi, U, p);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
tmp<fvScalarMatrix> tpEqn;
|
||||||
|
|
||||||
|
if (pressureImplicitPorosity)
|
||||||
|
{
|
||||||
|
tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi));
|
||||||
|
}
|
||||||
|
|
||||||
|
tpEqn().setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
tpEqn().solve();
|
||||||
|
|
||||||
|
if (nonOrth == nNonOrthCorr)
|
||||||
|
{
|
||||||
|
phi -= tpEqn().flux();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "incompressible/continuityErrs.H"
|
||||||
|
|
||||||
|
// Explicitly relax pressure for momentum corrector
|
||||||
|
p.relax();
|
||||||
|
|
||||||
|
if (pressureImplicitPorosity)
|
||||||
|
{
|
||||||
|
U -= trTU()&fvc::grad(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
U -= trAU()*fvc::grad(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
|
||||||
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
|
// to obey overall mass continuity
|
||||||
|
if (closedVolume)
|
||||||
|
{
|
||||||
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
|
/fvc::domainIntegrate(psi);
|
||||||
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
rho.relax();
|
||||||
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,13 +26,15 @@ Application
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state solver for turbulent flow of compressible fluids with
|
Steady-state solver for turbulent flow of compressible fluids with
|
||||||
RANS turbulence modelling, and implicit or explicit porosity treatment
|
RANS turbulence modelling, implicit or explicit porosity treatment
|
||||||
|
and MRF for HVAC and similar applications.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicPsiThermo.H"
|
#include "basicPsiThermo.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
|
#include "MRFZones.H"
|
||||||
#include "thermalPorousZones.H"
|
#include "thermalPorousZones.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -43,6 +45,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createZones.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
#include "rhoEqn.H"
|
|
||||||
}
|
|
||||||
{
|
|
||||||
scalar sumLocalContErr =
|
|
||||||
sum
|
|
||||||
(
|
|
||||||
mag(rho.internalField() - (psi*p)().internalField())
|
|
||||||
)/sum(rho.internalField());
|
|
||||||
|
|
||||||
scalar globalContErr =
|
|
||||||
sum(rho.internalField() - (psi*p)().internalField())
|
|
||||||
/sum(rho.internalField());
|
|
||||||
|
|
||||||
cumulativeContErr += globalContErr;
|
|
||||||
|
|
||||||
Info<< "time step continuity errors : sum local = " << sumLocalContErr
|
|
||||||
<< ", global = " << globalContErr
|
|
||||||
<< ", cumulative = " << cumulativeContErr << endl;
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<basicPsiThermo> pThermo
|
|
||||||
(
|
|
||||||
basicPsiThermo::New(mesh)
|
|
||||||
);
|
|
||||||
basicPsiThermo& thermo = pThermo();
|
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
|
||||||
volScalarField& e = thermo.e();
|
|
||||||
const volScalarField& psi = thermo.psi();
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
thermo.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
# include "compressibleCreatePhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::turbulenceModel::New
|
|
||||||
(
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating field DpDt\n" << endl;
|
|
||||||
volScalarField DpDt
|
|
||||||
(
|
|
||||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
|
||||||
);
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
Info<< "Reading thermodynamicProperties\n" << endl;
|
|
||||||
|
|
||||||
IOdictionary thermodynamicProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"thermodynamicProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar R
|
|
||||||
(
|
|
||||||
thermodynamicProperties.lookup("R")
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar Cv
|
|
||||||
(
|
|
||||||
thermodynamicProperties.lookup("Cv")
|
|
||||||
);
|
|
||||||
9
applications/solvers/compressible/sonicFoam/Allwmake
Executable file
9
applications/solvers/compressible/sonicFoam/Allwmake
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
wmake
|
||||||
|
wmake sonicDyMFoam
|
||||||
|
wmake sonicLiquidFoam
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -1,8 +1,8 @@
|
|||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(phi, U)
|
+ fvm::div(phi, U)
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
);
|
);
|
||||||
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
solve(UEqn == -fvc::grad(p));
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I../sonicFoam \
|
-I.. \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
|
U = UEqn.H()/UEqn.A();
|
||||||
|
|
||||||
|
surfaceScalarField phid
|
||||||
|
(
|
||||||
|
"phid",
|
||||||
|
fvc::interpolate(psi)
|
||||||
|
*(
|
||||||
|
(fvc::interpolate(U) & mesh.Sf())
|
||||||
|
- fvc::meshPhi(rho, U)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(psi, p)
|
||||||
|
+ fvm::div(phid, p)
|
||||||
|
- fvm::laplacian(rho*rAU, p)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.solve();
|
||||||
|
|
||||||
|
phi = pEqn.flux();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "compressibleContinuityErrs.H"
|
||||||
|
|
||||||
|
U -= rAU*fvc::grad(p);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,14 +62,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "rhoEqn.H"
|
#include "rhoEqn.H"
|
||||||
|
|
||||||
fvVectorMatrix UEqn
|
#include "UEqn.H"
|
||||||
(
|
|
||||||
fvm::ddt(rho, U)
|
|
||||||
+ fvm::div(phi, U)
|
|
||||||
+ turbulence->divDevRhoReff(U)
|
|
||||||
);
|
|
||||||
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
|
||||||
|
|
||||||
#include "eEqn.H"
|
#include "eEqn.H"
|
||||||
|
|
||||||
@ -78,50 +71,12 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (int corr=0; corr<nCorr; corr++)
|
for (int corr=0; corr<nCorr; corr++)
|
||||||
{
|
{
|
||||||
U = UEqn.H()/UEqn.A();
|
#include "pEqn.H"
|
||||||
|
|
||||||
surfaceScalarField phid
|
|
||||||
(
|
|
||||||
"phid",
|
|
||||||
fvc::interpolate(psi)
|
|
||||||
*(
|
|
||||||
(fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(psi, p)
|
|
||||||
+ fvm::div(phid, p)
|
|
||||||
- fvm::laplacian(rho/UEqn.A(), p)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.solve();
|
|
||||||
|
|
||||||
phi = pEqn.flux();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "compressibleContinuityErrs.H"
|
|
||||||
|
|
||||||
U -= fvc::grad(p)/UEqn.A();
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DpDt = fvc::DDt
|
|
||||||
(
|
|
||||||
surfaceScalarField
|
|
||||||
(
|
|
||||||
"phiU",
|
|
||||||
phi/fvc::interpolate(rho) + fvc::meshPhi(rho, U)
|
|
||||||
),
|
|
||||||
p
|
|
||||||
);
|
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = psi*p;
|
rho = thermo.rho();
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1,18 +0,0 @@
|
|||||||
Info<< "Reading transportProperties\n" << endl;
|
|
||||||
|
|
||||||
IOdictionary transportProperties
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"transportProperties",
|
|
||||||
runTime.constant(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar mu
|
|
||||||
(
|
|
||||||
transportProperties.lookup("mu")
|
|
||||||
);
|
|
||||||
@ -24,12 +24,17 @@ boundaryField
|
|||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type buoyantPressure;
|
type buoyantPressure;
|
||||||
value uniform 101325;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
sides
|
sides
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type totalPressure;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho none;
|
||||||
|
psi none;
|
||||||
|
gamma 1;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
base
|
base
|
||||||
|
|||||||
@ -26,10 +26,15 @@ boundaryField
|
|||||||
type buoyantPressure;
|
type buoyantPressure;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
|
|
||||||
sides
|
sides
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type totalPressure;
|
||||||
|
p0 $internalField;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
|
rho none;
|
||||||
|
psi none;
|
||||||
|
gamma 1;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
base
|
base
|
||||||
|
|||||||
@ -18,18 +18,11 @@ FoamFile
|
|||||||
|
|
||||||
solvers
|
solvers
|
||||||
{
|
{
|
||||||
rho
|
"(rho|rhoFinal)"
|
||||||
{
|
{
|
||||||
solver PCG;
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-7;
|
tolerance 1e-7;
|
||||||
relTol 0.1;
|
|
||||||
};
|
|
||||||
|
|
||||||
rhoFinal
|
|
||||||
{
|
|
||||||
$rho;
|
|
||||||
tolerance 1e-7;
|
|
||||||
relTol 0;
|
relTol 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -69,7 +62,6 @@ solvers
|
|||||||
relTol 0;
|
relTol 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Ii
|
Ii
|
||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object turbulenceProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
simulationType laminar;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -52,6 +52,8 @@ PIMPLE
|
|||||||
nOuterCorrectors 2;
|
nOuterCorrectors 2;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
|
||||||
|
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -55,6 +55,8 @@ PIMPLE
|
|||||||
nOuterCorrectors 50;
|
nOuterCorrectors 50;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
|
||||||
|
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -59,6 +59,8 @@ PIMPLE
|
|||||||
nOuterCorrectors 1;
|
nOuterCorrectors 1;
|
||||||
nCorrectors 2;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
|
||||||
|
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application rhoPorousSimpleFoam;
|
application rhoPorousMRFSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
@ -23,8 +23,6 @@ ddtSchemes
|
|||||||
gradSchemes
|
gradSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear;
|
default Gauss linear;
|
||||||
grad(U) Gauss linear;
|
|
||||||
grad(p) Gauss linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
divSchemes
|
divSchemes
|
||||||
@ -34,6 +32,7 @@ divSchemes
|
|||||||
div(phi,h) Gauss upwind;
|
div(phi,h) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
|
div(U,p) Gauss upwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
@ -50,7 +49,6 @@ laplacianSchemes
|
|||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
{
|
{
|
||||||
default linear;
|
default linear;
|
||||||
div(U,p) upwind phi;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
@ -57,7 +57,7 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
rhoMin rhoMin [ 1 -3 0 0 0 ] 1.0;
|
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
|
||||||
rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
|
rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
FoamFile
|
FoamFile
|
||||||
{
|
{
|
||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format binary;
|
||||||
class polyBoundaryMesh;
|
class polyBoundaryMesh;
|
||||||
location "constant/polyMesh";
|
location "constant/polyMesh";
|
||||||
object boundary;
|
object boundary;
|
||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application rhoPorousSimpleFoam;
|
application rhoPorousMRFSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
@ -23,8 +23,6 @@ ddtSchemes
|
|||||||
gradSchemes
|
gradSchemes
|
||||||
{
|
{
|
||||||
default Gauss linear;
|
default Gauss linear;
|
||||||
grad(U) Gauss linear;
|
|
||||||
grad(p) Gauss linear;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
divSchemes
|
divSchemes
|
||||||
@ -34,6 +32,7 @@ divSchemes
|
|||||||
div(phi,h) Gauss upwind;
|
div(phi,h) Gauss upwind;
|
||||||
div(phi,epsilon) Gauss upwind;
|
div(phi,epsilon) Gauss upwind;
|
||||||
div(phi,k) Gauss upwind;
|
div(phi,k) Gauss upwind;
|
||||||
|
div(U,p) Gauss upwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
@ -49,7 +48,6 @@ laplacianSchemes
|
|||||||
interpolationSchemes
|
interpolationSchemes
|
||||||
{
|
{
|
||||||
default linear;
|
default linear;
|
||||||
div(U,p) upwind phi;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snGradSchemes
|
snGradSchemes
|
||||||
@ -25,13 +25,12 @@ sets
|
|||||||
{
|
{
|
||||||
type uniform;
|
type uniform;
|
||||||
axis x;
|
axis x;
|
||||||
start ( -4.995 0 0 );
|
start (-4.995 0 0);
|
||||||
end ( 4.995 0 0 );
|
end (4.995 0 0);
|
||||||
nPoints 1000;
|
nPoints 1000;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
fields ( T magU p );
|
fields (T magU p);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user