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:
@ -3,6 +3,10 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake
|
wmake
|
||||||
|
|
||||||
|
wmake SRFSimpleFoam
|
||||||
|
wmake MRFSimpleFoam
|
||||||
|
wmake windSimpleFoam
|
||||||
wmake porousSimpleFoam
|
wmake porousSimpleFoam
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -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
|
||||||
@ -22,19 +22,19 @@ 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
|
||||||
rhoPisoTwinParcelFoam
|
MRFSimpleFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Transient solver for compressible, turbulent flow with two thermo-clouds.
|
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||||
|
fluids with MRF regions.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "basicPsiThermo.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "turbulenceModel.H"
|
#include "RASModel.H"
|
||||||
|
#include "MRFZones.H"
|
||||||
#include "basicThermoCloud.H"
|
#include "simpleControl.H"
|
||||||
#include "basicKinematicCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -44,54 +44,32 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
#include "readGravitationalAcceleration.H"
|
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "createClouds.H"
|
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "compressibleCourantNo.H"
|
MRFZones mrfZones(mesh);
|
||||||
#include "setInitialDeltaT.H"
|
mrfZones.correctBoundaryVelocity(U);
|
||||||
|
|
||||||
|
simpleControl simple(mesh);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.run())
|
while (simple.loop())
|
||||||
{
|
{
|
||||||
#include "readTimeControls.H"
|
|
||||||
#include "readPISOControls.H"
|
|
||||||
#include "compressibleCourantNo.H"
|
|
||||||
#include "setDeltaT.H"
|
|
||||||
|
|
||||||
runTime++;
|
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
thermoCloud1.evolve();
|
p.storePrevIter();
|
||||||
|
|
||||||
kinematicCloud1.evolve();
|
// --- Pressure-velocity SIMPLE corrector
|
||||||
|
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
|
||||||
|
|
||||||
// --- PIMPLE loop
|
|
||||||
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
|
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
|
#include "pEqn.H"
|
||||||
// --- PISO loop
|
|
||||||
for (int corr=1; corr<=nCorr; corr++)
|
|
||||||
{
|
|
||||||
#include "hsEqn.H"
|
|
||||||
#include "pEqn.H"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
rho = thermo.rho();
|
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
MRFSimpleFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/MRFSimpleFoam
|
||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
// Momentum predictor
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> UEqn
|
||||||
|
(
|
||||||
|
fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevReff(U)
|
||||||
|
);
|
||||||
|
mrfZones.addCoriolis(UEqn());
|
||||||
|
|
||||||
|
UEqn().relax();
|
||||||
|
|
||||||
|
solve(UEqn() == -fvc::grad(p));
|
||||||
@ -1,9 +1,12 @@
|
|||||||
|
{
|
||||||
p.boundaryField().updateCoeffs();
|
p.boundaryField().updateCoeffs();
|
||||||
|
|
||||||
volScalarField AU = UEqn().A();
|
volScalarField rAU(1.0/UEqn().A());
|
||||||
U = UEqn().H()/AU;
|
U = rAU*UEqn().H();
|
||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
phi = fvc::interpolate(U) & mesh.Sf();
|
|
||||||
|
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||||
|
mrfZones.relativeFlux(phi);
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
@ -11,7 +14,7 @@
|
|||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
|
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
@ -29,5 +32,6 @@
|
|||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
// Momentum corrector
|
// Momentum corrector
|
||||||
U -= fvc::grad(p)/AU;
|
U -= rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
SRFSimpleFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/SRFSimpleFoam
|
||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||||
@ -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
|
||||||
@ -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
|
||||||
simpleSRFFoam
|
SRFSimpleFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||||
@ -34,6 +34,7 @@ Description
|
|||||||
#include "singlePhaseTransportModel.H"
|
#include "singlePhaseTransportModel.H"
|
||||||
#include "RASModel.H"
|
#include "RASModel.H"
|
||||||
#include "SRFModel.H"
|
#include "SRFModel.H"
|
||||||
|
#include "simpleControl.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -45,20 +46,19 @@ int main(int argc, char *argv[])
|
|||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
|
simpleControl simple(mesh);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
while (runTime.loop())
|
while (simple.loop())
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
#include "readSIMPLEControls.H"
|
|
||||||
#include "initConvergenceCheck.H"
|
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// --- Pressure-velocity SIMPLE corrector
|
||||||
{
|
{
|
||||||
#include "UrelEqn.H"
|
#include "UrelEqn.H"
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
@ -87,8 +87,6 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
#include "convergenceCheck.H"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
@ -1,4 +1,5 @@
|
|||||||
// Relative momentum predictor
|
// Relative momentum predictor
|
||||||
|
|
||||||
tmp<fvVectorMatrix> UrelEqn
|
tmp<fvVectorMatrix> UrelEqn
|
||||||
(
|
(
|
||||||
fvm::div(phi, Urel)
|
fvm::div(phi, Urel)
|
||||||
@ -8,9 +9,4 @@
|
|||||||
|
|
||||||
UrelEqn().relax();
|
UrelEqn().relax();
|
||||||
|
|
||||||
eqnResidual = solve
|
solve(UrelEqn() == -fvc::grad(p));
|
||||||
(
|
|
||||||
UrelEqn() == -fvc::grad(p)
|
|
||||||
).initialResidual();
|
|
||||||
|
|
||||||
maxResidual = max(eqnResidual, maxResidual);
|
|
||||||
@ -1,34 +1,37 @@
|
|||||||
{
|
{
|
||||||
p.boundaryField().updateCoeffs();
|
p.boundaryField().updateCoeffs();
|
||||||
volScalarField AUrel = UrelEqn().A();
|
|
||||||
Urel = UrelEqn().H()/AUrel;
|
volScalarField rAUrel(1.0/UrelEqn().A());
|
||||||
|
Urel = rAUrel*UrelEqn().H();
|
||||||
UrelEqn.clear();
|
UrelEqn.clear();
|
||||||
phi = fvc::interpolate(Urel) & mesh.Sf();
|
|
||||||
|
phi = fvc::interpolate(Urel, "interpolate(HbyA)") & mesh.Sf();
|
||||||
adjustPhi(phi, Urel, p);
|
adjustPhi(phi, Urel, p);
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi)
|
fvm::laplacian(rAUrel, p) == fvc::div(phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
if (nonOrth == nNonOrthCorr)
|
if (nonOrth == simple.nNonOrthCorr())
|
||||||
{
|
{
|
||||||
phi -= pEqn.flux();
|
phi -= pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "continuityErrs.H"
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
// Momentum corrector
|
// Momentum corrector
|
||||||
Urel -= fvc::grad(p)/AUrel;
|
Urel -= rAUrel*fvc::grad(p);
|
||||||
Urel.correctBoundaryConditions();
|
Urel.correctBoundaryConditions();
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
// Solve the Momentum equation
|
// Momentum predictor
|
||||||
|
|
||||||
tmp<fvVectorMatrix> UEqn
|
tmp<fvVectorMatrix> UEqn
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
|
{
|
||||||
p.boundaryField().updateCoeffs();
|
p.boundaryField().updateCoeffs();
|
||||||
|
|
||||||
volScalarField AU(UEqn().A());
|
volScalarField rAU(1.0/UEqn().A());
|
||||||
U = UEqn().H()/AU;
|
U = rAU*UEqn().H();
|
||||||
UEqn.clear();
|
UEqn.clear();
|
||||||
phi = fvc::interpolate(U) & mesh.Sf();
|
|
||||||
|
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
||||||
adjustPhi(phi, U, p);
|
adjustPhi(phi, U, p);
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
// Non-orthogonal pressure corrector loop
|
||||||
@ -11,7 +13,7 @@
|
|||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::laplacian(1.0/AU, p) == fvc::div(phi)
|
fvm::laplacian(rAU, p) == fvc::div(phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
@ -30,5 +32,6 @@
|
|||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
// Momentum corrector
|
// Momentum corrector
|
||||||
U -= fvc::grad(p)/AU;
|
U -= rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// --- Pressure-velocity SIMPLE corrector
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
windSimpleFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/windSimpleFoam
|
||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
@ -46,6 +46,8 @@ int main(int argc, char *argv[])
|
|||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
|
IObasicSourceList actuationDisks(mesh);
|
||||||
|
|
||||||
simpleControl simple(mesh);
|
simpleControl simple(mesh);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
datToFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/datToFoam
|
||||||
@ -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
|
||||||
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
# include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
std::ifstream plot3dFile(args.args()[1].c_str());
|
std::ifstream plot3dFile(args.args()[1].c_str());
|
||||||
|
|
||||||
@ -1,3 +1,6 @@
|
|||||||
|
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance());
|
||||||
|
mkDir(path);
|
||||||
|
|
||||||
scalarField UMeanXvalues
|
scalarField UMeanXvalues
|
||||||
(
|
(
|
||||||
channelIndexing.collapse(UMean.component(vector::X)())
|
channelIndexing.collapse(UMean.component(vector::X)())
|
||||||
@ -42,19 +45,19 @@
|
|||||||
|
|
||||||
const scalarField& y = channelIndexing.y();
|
const scalarField& y = channelIndexing.y();
|
||||||
|
|
||||||
makeGraph(y, UMeanXvalues, "Uf", UMean.path(), gFormat);
|
makeGraph(y, UMeanXvalues, "Uf", path, gFormat);
|
||||||
makeGraph(y, urmsValues, "u", UMean.path(), gFormat);
|
makeGraph(y, urmsValues, "u", path, gFormat);
|
||||||
makeGraph(y, vrmsValues, "v", UMean.path(), gFormat);
|
makeGraph(y, vrmsValues, "v", path, gFormat);
|
||||||
makeGraph(y, wrmsValues, "w", UMean.path(), gFormat);
|
makeGraph(y, wrmsValues, "w", path, gFormat);
|
||||||
makeGraph(y, RxyValues, "uv", UMean.path(), gFormat);
|
makeGraph(y, RxyValues, "uv", path, gFormat);
|
||||||
makeGraph(y, kValues, "k", UMean.path(), gFormat);
|
makeGraph(y, kValues, "k", path, gFormat);
|
||||||
|
|
||||||
makeGraph(y, pPrime2MeanValues, "pPrime2Mean", UMean.path(), gFormat);
|
makeGraph(y, pPrime2MeanValues, "pPrime2Mean", path, gFormat);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
makeGraph(y, epsilonValues, "epsilon", UMean.path(), gFormat);
|
makeGraph(y, epsilonValues, "epsilon", path, gFormat);
|
||||||
makeGraph(y, nuMeanValues, "nu", UMean.path(), gFormat);
|
makeGraph(y, nuMeanValues, "nu", path, gFormat);
|
||||||
makeGraph(y, nuPrimeValues, "nuPrime", UMean.path(), gFormat);
|
makeGraph(y, nuPrimeValues, "nuPrime", path, gFormat);
|
||||||
makeGraph(y, gammaDotMeanValues, "gammaDot", UMean.path(), gFormat);
|
makeGraph(y, gammaDotMeanValues, "gammaDot", path, gFormat);
|
||||||
makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", UMean.path(), gFormat);
|
makeGraph(y, gammaDotPrimeValues, "gammaDotPrime", path, gFormat);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -76,7 +76,10 @@ cleanCase()
|
|||||||
rm -rf processor* > /dev/null 2>&1
|
rm -rf processor* > /dev/null 2>&1
|
||||||
rm -rf probes* > /dev/null 2>&1
|
rm -rf probes* > /dev/null 2>&1
|
||||||
rm -rf forces* > /dev/null 2>&1
|
rm -rf forces* > /dev/null 2>&1
|
||||||
|
rm -rf graphs* > /dev/null 2>&1
|
||||||
rm -rf sets > /dev/null 2>&1
|
rm -rf sets > /dev/null 2>&1
|
||||||
|
rm -rf surfaceSampling > /dev/null 2>&1
|
||||||
|
rm -rf cuttingPlane > /dev/null 2>&1
|
||||||
rm -rf system/machines > /dev/null 2>&1
|
rm -rf system/machines > /dev/null 2>&1
|
||||||
|
|
||||||
if [ -d constant/polyMesh ]
|
if [ -d constant/polyMesh ]
|
||||||
|
|||||||
@ -257,7 +257,7 @@ Foam::Time::Time
|
|||||||
graphFormat_("raw"),
|
graphFormat_("raw"),
|
||||||
runTimeModifiable_(true),
|
runTimeModifiable_(true),
|
||||||
|
|
||||||
readLibs_(controlDict_, "libs"),
|
libs_(controlDict_, "libs"),
|
||||||
functionObjects_(*this)
|
functionObjects_(*this)
|
||||||
{
|
{
|
||||||
// Explicitly set read flags on objectRegistry so anything constructed
|
// Explicitly set read flags on objectRegistry so anything constructed
|
||||||
@ -343,7 +343,7 @@ Foam::Time::Time
|
|||||||
graphFormat_("raw"),
|
graphFormat_("raw"),
|
||||||
runTimeModifiable_(true),
|
runTimeModifiable_(true),
|
||||||
|
|
||||||
readLibs_(controlDict_, "libs"),
|
libs_(controlDict_, "libs"),
|
||||||
functionObjects_(*this)
|
functionObjects_(*this)
|
||||||
{
|
{
|
||||||
// Explicitly set read flags on objectRegistry so anything constructed
|
// Explicitly set read flags on objectRegistry so anything constructed
|
||||||
@ -430,7 +430,7 @@ Foam::Time::Time
|
|||||||
graphFormat_("raw"),
|
graphFormat_("raw"),
|
||||||
runTimeModifiable_(true),
|
runTimeModifiable_(true),
|
||||||
|
|
||||||
readLibs_(controlDict_, "libs"),
|
libs_(controlDict_, "libs"),
|
||||||
functionObjects_(*this)
|
functionObjects_(*this)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -166,8 +166,8 @@ private:
|
|||||||
//- Is runtime modification of dictionaries allowed?
|
//- Is runtime modification of dictionaries allowed?
|
||||||
Switch runTimeModifiable_;
|
Switch runTimeModifiable_;
|
||||||
|
|
||||||
//- Instantiate a dummy class to cause the reading of dynamic libraries
|
//- Any loaded dynamic libraries
|
||||||
dlLibraryTable::readDlLibrary readLibs_;
|
dlLibraryTable libs_;
|
||||||
|
|
||||||
//- Function objects executed at start and on ++, +=
|
//- Function objects executed at start and on ++, +=
|
||||||
mutable functionObjectList functionObjects_;
|
mutable functionObjectList functionObjects_;
|
||||||
@ -375,6 +375,12 @@ public:
|
|||||||
return functionObjects_;
|
return functionObjects_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- External access to the loaded libraries
|
||||||
|
dlLibraryTable& libs()
|
||||||
|
{
|
||||||
|
return libs_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return true if time currently being sub-cycled, otherwise false
|
//- Return true if time currently being sub-cycled, otherwise false
|
||||||
bool subCycling() const
|
bool subCycling() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,6 +36,7 @@ License
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
|
|
||||||
|
#include "long.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -61,6 +62,36 @@ const Foam::word Foam::functionEntries::codeStream::codeTemplateC
|
|||||||
= "codeStreamTemplate.C";
|
= "codeStreamTemplate.C";
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::dictionary& Foam::functionEntries::codeStream::topDict
|
||||||
|
(
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const dictionary& p = dict.parent();
|
||||||
|
|
||||||
|
if (&p != &dict && !p.name().empty())
|
||||||
|
{
|
||||||
|
return topDict(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return dict;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::dlLibraryTable& Foam::functionEntries::codeStream::libs
|
||||||
|
(
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const IOdictionary& d = static_cast<const IOdictionary&>(topDict(dict));
|
||||||
|
return const_cast<Time&>(d.time()).libs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::functionEntries::codeStream::execute
|
bool Foam::functionEntries::codeStream::execute
|
||||||
@ -99,8 +130,15 @@ bool Foam::functionEntries::codeStream::execute
|
|||||||
const fileName libPath = dynCode.libPath();
|
const fileName libPath = dynCode.libPath();
|
||||||
|
|
||||||
// see if library is loaded
|
// see if library is loaded
|
||||||
void* lib = dlLibraryTable::findLibrary(libPath);
|
void* lib = NULL;
|
||||||
|
if
|
||||||
|
(
|
||||||
|
isA<IOdictionary>(topDict(parentDict))
|
||||||
|
&& parentDict.dictName() != Time::controlDictName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
lib = libs(parentDict).findLibrary(libPath);
|
||||||
|
}
|
||||||
|
|
||||||
if (!lib)
|
if (!lib)
|
||||||
{
|
{
|
||||||
@ -110,9 +148,27 @@ bool Foam::functionEntries::codeStream::execute
|
|||||||
|
|
||||||
// nothing loaded
|
// nothing loaded
|
||||||
// avoid compilation if possible by loading an existing library
|
// avoid compilation if possible by loading an existing library
|
||||||
if (!lib && dlLibraryTable::open(libPath, false))
|
if (!lib)
|
||||||
{
|
{
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
if
|
||||||
|
(
|
||||||
|
isA<IOdictionary>(topDict(parentDict))
|
||||||
|
&& parentDict.dictName() != Time::controlDictName
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||||
|
// of Time.
|
||||||
|
dlLibraryTable& dlLibs = libs(parentDict);
|
||||||
|
if (dlLibs.open(libPath, false))
|
||||||
|
{
|
||||||
|
lib = dlLibs.findLibrary(libPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Uncached opening of libPath
|
||||||
|
lib = dlOpen(libPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -167,19 +223,34 @@ bool Foam::functionEntries::codeStream::execute
|
|||||||
// all processes must wait for compile to finish
|
// all processes must wait for compile to finish
|
||||||
reduce(create, orOp<bool>());
|
reduce(create, orOp<bool>());
|
||||||
|
|
||||||
if (!dlLibraryTable::open(libPath, false))
|
if
|
||||||
|
(
|
||||||
|
isA<IOdictionary>(topDict(parentDict))
|
||||||
|
&& parentDict.dictName() != Time::controlDictName
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
// Cached access to dl libs. Guarantees clean up upon destruction
|
||||||
(
|
// of Time.
|
||||||
"functionEntries::codeStream::execute(..)",
|
dlLibraryTable& dlLibs = libs(parentDict);
|
||||||
parentDict
|
if (!dlLibs.open(libPath, false))
|
||||||
) << "Failed loading library " << libPath << nl
|
{
|
||||||
<< "Did you add all libraries to the 'libs' entry"
|
FatalIOErrorIn
|
||||||
<< " in system/controlDict?"
|
(
|
||||||
<< exit(FatalIOError);
|
"functionEntries::codeStream::execute(..)",
|
||||||
}
|
parentDict
|
||||||
|
) << "Failed loading library " << libPath << nl
|
||||||
|
<< "Did you add all libraries to the 'libs' entry"
|
||||||
|
<< " in system/controlDict?"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
lib = dlLibs.findLibrary(libPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Uncached opening of libPath
|
||||||
|
lib = dlOpen(libPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -98,6 +98,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
class dlLibraryTable;
|
||||||
|
|
||||||
namespace functionEntries
|
namespace functionEntries
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -113,9 +115,14 @@ class codeStream
|
|||||||
//- Interpreter function type
|
//- Interpreter function type
|
||||||
typedef void (*streamingFunctionType)(Ostream&, const dictionary&);
|
typedef void (*streamingFunctionType)(Ostream&, const dictionary&);
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Helper function: parent (of parent etc.) of dictionary up to the top
|
||||||
|
static const dictionary& topDict(const dictionary&);
|
||||||
|
|
||||||
|
//- Helper function: access to dlLibraryTable of Time
|
||||||
|
static dlLibraryTable& libs(const dictionary& dict);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
//- Disallow default bitwise copy construct
|
||||||
codeStream(const codeStream&);
|
codeStream(const codeStream&);
|
||||||
|
|
||||||
|
|||||||
@ -26,11 +26,6 @@ License
|
|||||||
#include "dlLibraryTable.H"
|
#include "dlLibraryTable.H"
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::dlLibraryTable Foam::dlLibraryTable::loadedLibraries;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::dlLibraryTable::dlLibraryTable()
|
Foam::dlLibraryTable::dlLibraryTable()
|
||||||
@ -39,11 +34,13 @@ Foam::dlLibraryTable::dlLibraryTable()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
Foam::dlLibraryTable::readDlLibrary::readDlLibrary
|
Foam::dlLibraryTable::dlLibraryTable
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const word& libsEntry
|
const word& libsEntry
|
||||||
)
|
)
|
||||||
|
:
|
||||||
|
HashTable<fileName, void*, Hash<void*> >()
|
||||||
{
|
{
|
||||||
open(dict, libsEntry);
|
open(dict, libsEntry);
|
||||||
}
|
}
|
||||||
@ -91,14 +88,7 @@ bool Foam::dlLibraryTable::open
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (loadedLibraries.insert(functionLibPtr, functionLibName))
|
return insert(functionLibPtr, functionLibName);
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -117,7 +107,7 @@ bool Foam::dlLibraryTable::close
|
|||||||
void* libPtr = findLibrary(functionLibName);
|
void* libPtr = findLibrary(functionLibName);
|
||||||
if (libPtr)
|
if (libPtr)
|
||||||
{
|
{
|
||||||
loadedLibraries.erase(libPtr);
|
erase(libPtr);
|
||||||
|
|
||||||
if (!dlClose(libPtr))
|
if (!dlClose(libPtr))
|
||||||
{
|
{
|
||||||
@ -141,7 +131,7 @@ bool Foam::dlLibraryTable::close
|
|||||||
|
|
||||||
void* Foam::dlLibraryTable::findLibrary(const fileName& functionLibName)
|
void* Foam::dlLibraryTable::findLibrary(const fileName& functionLibName)
|
||||||
{
|
{
|
||||||
forAllConstIter(dlLibraryTable, loadedLibraries, iter)
|
forAllConstIter(dlLibraryTable, *this, iter)
|
||||||
{
|
{
|
||||||
if (iter() == functionLibName)
|
if (iter() == functionLibName)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -63,30 +63,15 @@ class dlLibraryTable
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
|
||||||
|
|
||||||
//- Static data someStaticData
|
|
||||||
static dlLibraryTable loadedLibraries;
|
|
||||||
|
|
||||||
|
|
||||||
// Public classes
|
|
||||||
|
|
||||||
//- Class whose construction causes the reading of dynamic libraries
|
|
||||||
class readDlLibrary
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Read all the libraries listed in the 'libsEntry' entry in the
|
|
||||||
// given dictionary if present
|
|
||||||
readDlLibrary(const dictionary&, const word& libsEntry);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
dlLibraryTable();
|
dlLibraryTable();
|
||||||
|
|
||||||
|
//- Construct from dictionary and name of 'libs' entry giving
|
||||||
|
// the libraries to load
|
||||||
|
dlLibraryTable(const dictionary&, const word&);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~dlLibraryTable();
|
~dlLibraryTable();
|
||||||
@ -95,23 +80,23 @@ public:
|
|||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Open the named library, optionally with warnings if problems occur
|
//- Open the named library, optionally with warnings if problems occur
|
||||||
static bool open(const fileName& name, const bool verbose = true);
|
bool open(const fileName& name, const bool verbose = true);
|
||||||
|
|
||||||
//- Close the named library, optionally with warnings if problems occur
|
//- Close the named library, optionally with warnings if problems occur
|
||||||
static bool close(const fileName& name, const bool verbose = true);
|
bool close(const fileName& name, const bool verbose = true);
|
||||||
|
|
||||||
//- Find the handle of the named library
|
//- Find the handle of the named library
|
||||||
static void* findLibrary(const fileName& name);
|
void* findLibrary(const fileName& name);
|
||||||
|
|
||||||
//- Open all the libraries listed in the 'libsEntry' entry in the
|
//- Open all the libraries listed in the 'libsEntry' entry in the
|
||||||
// given dictionary if present
|
// given dictionary if present
|
||||||
static bool open(const dictionary&, const word& libsEntry);
|
bool open(const dictionary&, const word& libsEntry);
|
||||||
|
|
||||||
//- Open all the libraries listed in the 'libsEntry' entry in the
|
//- Open all the libraries listed in the 'libsEntry' entry in the
|
||||||
// given dictionary if present and check the additions
|
// given dictionary if present and check the additions
|
||||||
// to the given constructor table
|
// to the given constructor table
|
||||||
template<class TablePtr>
|
template<class TablePtr>
|
||||||
static bool open
|
bool open
|
||||||
(
|
(
|
||||||
const dictionary&,
|
const dictionary&,
|
||||||
const word& libsEntry,
|
const word& libsEntry,
|
||||||
|
|||||||
@ -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,6 +26,7 @@ License
|
|||||||
#include "functionObject.H"
|
#include "functionObject.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "dlLibraryTable.H"
|
#include "dlLibraryTable.H"
|
||||||
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ Foam::autoPtr<Foam::functionObject> Foam::functionObject::New
|
|||||||
Info<< "Selecting function " << functionType << endl;
|
Info<< "Selecting function " << functionType << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
dlLibraryTable::open
|
const_cast<Time&>(t).libs().open
|
||||||
(
|
(
|
||||||
functionDict,
|
functionDict,
|
||||||
"functionObjectLibs",
|
"functionObjectLibs",
|
||||||
|
|||||||
@ -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
|
||||||
@ -104,7 +104,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
|||||||
{
|
{
|
||||||
const word agglomeratorType(controlDict.lookup("agglomerator"));
|
const word agglomeratorType(controlDict.lookup("agglomerator"));
|
||||||
|
|
||||||
dlLibraryTable::open
|
const_cast<Time&>(mesh.thisDb().time()).libs().open
|
||||||
(
|
(
|
||||||
controlDict,
|
controlDict,
|
||||||
"geometricGAMGAgglomerationLibs",
|
"geometricGAMGAgglomerationLibs",
|
||||||
@ -159,7 +159,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New
|
|||||||
{
|
{
|
||||||
const word agglomeratorType(controlDict.lookup("agglomerator"));
|
const word agglomeratorType(controlDict.lookup("agglomerator"));
|
||||||
|
|
||||||
dlLibraryTable::open
|
const_cast<Time&>(mesh.thisDb().time()).libs().open
|
||||||
(
|
(
|
||||||
controlDict,
|
controlDict,
|
||||||
"algebraicGAMGAgglomerationLibs",
|
"algebraicGAMGAgglomerationLibs",
|
||||||
|
|||||||
@ -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
|
||||||
@ -49,7 +49,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
|
|||||||
|
|
||||||
Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl;
|
Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl;
|
||||||
|
|
||||||
dlLibraryTable::open
|
const_cast<Time&>(io.time()).libs().open
|
||||||
(
|
(
|
||||||
dict,
|
dict,
|
||||||
"dynamicFvMeshLibs",
|
"dynamicFvMeshLibs",
|
||||||
|
|||||||
@ -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
|
||||||
@ -79,7 +79,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh)
|
|||||||
|
|
||||||
Info<< "Selecting motion solver: " << solverTypeName << endl;
|
Info<< "Selecting motion solver: " << solverTypeName << endl;
|
||||||
|
|
||||||
dlLibraryTable::open
|
const_cast<Time&>(mesh.time()).libs().open
|
||||||
(
|
(
|
||||||
solverDict,
|
solverDict,
|
||||||
"motionSolverLibs",
|
"motionSolverLibs",
|
||||||
|
|||||||
@ -59,60 +59,66 @@ void* Foam::codedFixedValueFvPatchField<Type>::loadLibrary
|
|||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
void* lib = 0;
|
void* lib = 0;
|
||||||
|
|
||||||
// avoid compilation by loading an existing library
|
// avoid compilation by loading an existing library
|
||||||
if (!libPath.empty() && dlLibraryTable::open(libPath, false))
|
if (!libPath.empty())
|
||||||
{
|
{
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
dlLibraryTable& libs = const_cast<Time&>(this->db().time()).libs();
|
||||||
|
|
||||||
// verify the loaded version and unload if needed
|
if (libs.open(libPath, false))
|
||||||
if (lib)
|
|
||||||
{
|
{
|
||||||
// provision for manual execution of code after loading
|
lib = libs.findLibrary(libPath);
|
||||||
if (dlSymFound(lib, globalFuncName))
|
|
||||||
{
|
|
||||||
loaderFunctionType function =
|
|
||||||
reinterpret_cast<loaderFunctionType>
|
|
||||||
(
|
|
||||||
dlSym(lib, globalFuncName)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (function)
|
// verify the loaded version and unload if needed
|
||||||
|
if (lib)
|
||||||
|
{
|
||||||
|
// provision for manual execution of code after loading
|
||||||
|
if (dlSymFound(lib, globalFuncName))
|
||||||
{
|
{
|
||||||
(*function)(true); // force load
|
loaderFunctionType function =
|
||||||
|
reinterpret_cast<loaderFunctionType>
|
||||||
|
(
|
||||||
|
dlSym(lib, globalFuncName)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (function)
|
||||||
|
{
|
||||||
|
(*function)(true); // force load
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"codedFixedValueFvPatchField<Type>::"
|
||||||
|
"updateLibrary()",
|
||||||
|
contextDict
|
||||||
|
) << "Failed looking up symbol " << globalFuncName
|
||||||
|
<< nl << "from " << libPath << exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"codedFixedValueFvPatchField<Type>::updateLibrary()",
|
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
||||||
contextDict
|
contextDict
|
||||||
) << "Failed looking up symbol " << globalFuncName << nl
|
) << "Failed looking up symbol " << globalFuncName << nl
|
||||||
<< "from " << libPath << exit(FatalIOError);
|
<< "from " << libPath << exit(FatalIOError);
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorIn
|
|
||||||
(
|
|
||||||
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
|
||||||
contextDict
|
|
||||||
) << "Failed looking up symbol " << globalFuncName << nl
|
|
||||||
<< "from " << libPath << exit(FatalIOError);
|
|
||||||
|
|
||||||
lib = 0;
|
lib = 0;
|
||||||
if (!dlLibraryTable::close(libPath, false))
|
if (!libs.close(libPath, false))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
||||||
contextDict
|
contextDict
|
||||||
) << "Failed unloading library "
|
) << "Failed unloading library "
|
||||||
<< libPath
|
<< libPath
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,15 +134,19 @@ void Foam::codedFixedValueFvPatchField<Type>::unloadLibrary
|
|||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
void* lib = 0;
|
void* lib = 0;
|
||||||
|
|
||||||
if (!libPath.empty())
|
if (libPath.empty())
|
||||||
{
|
{
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dlLibraryTable& libs = const_cast<Time&>(this->db().time()).libs();
|
||||||
|
|
||||||
|
lib = libs.findLibrary(libPath);
|
||||||
|
|
||||||
if (!lib)
|
if (!lib)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -166,7 +176,7 @@ void Foam::codedFixedValueFvPatchField<Type>::unloadLibrary
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dlLibraryTable::close(libPath, false))
|
if (!libs.close(libPath, false))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
@ -334,7 +344,7 @@ void Foam::codedFixedValueFvPatchField<Type>::updateLibrary() const
|
|||||||
|
|
||||||
|
|
||||||
// the correct library was already loaded => we are done
|
// the correct library was already loaded => we are done
|
||||||
if (dlLibraryTable::findLibrary(libPath))
|
if (const_cast<Time&>(this->db().time()).libs().findLibrary(libPath))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,20 +130,20 @@ class codedFixedValueFvPatchField
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Load specified library and execute globalFuncName(true)
|
//- Load specified library and execute globalFuncName(true)
|
||||||
static void* loadLibrary
|
void* loadLibrary
|
||||||
(
|
(
|
||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Execute globalFuncName(false) and unload specified library
|
//- Execute globalFuncName(false) and unload specified library
|
||||||
static void unloadLibrary
|
void unloadLibrary
|
||||||
(
|
(
|
||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Set the rewrite vars controlling the Type
|
//- Set the rewrite vars controlling the Type
|
||||||
static void setFieldTemplates(dynamicCode& dynCode);
|
static void setFieldTemplates(dynamicCode& dynCode);
|
||||||
|
|||||||
@ -54,60 +54,65 @@ void* Foam::codedFunctionObject::loadLibrary
|
|||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
void* lib = 0;
|
void* lib = 0;
|
||||||
|
|
||||||
// avoid compilation by loading an existing library
|
// avoid compilation by loading an existing library
|
||||||
if (!libPath.empty() && dlLibraryTable::open(libPath, false))
|
if (!libPath.empty())
|
||||||
{
|
{
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
dlLibraryTable& libs = const_cast<Time&>(time_).libs();
|
||||||
|
|
||||||
// verify the loaded version and unload if needed
|
if (libs.open(libPath, false))
|
||||||
if (lib)
|
|
||||||
{
|
{
|
||||||
// provision for manual execution of code after loading
|
lib = libs.findLibrary(libPath);
|
||||||
if (dlSymFound(lib, globalFuncName))
|
|
||||||
{
|
|
||||||
loaderFunctionType function =
|
|
||||||
reinterpret_cast<loaderFunctionType>
|
|
||||||
(
|
|
||||||
dlSym(lib, globalFuncName)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (function)
|
// verify the loaded version and unload if needed
|
||||||
|
if (lib)
|
||||||
|
{
|
||||||
|
// provision for manual execution of code after loading
|
||||||
|
if (dlSymFound(lib, globalFuncName))
|
||||||
{
|
{
|
||||||
(*function)(true); // force load
|
loaderFunctionType function =
|
||||||
|
reinterpret_cast<loaderFunctionType>
|
||||||
|
(
|
||||||
|
dlSym(lib, globalFuncName)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (function)
|
||||||
|
{
|
||||||
|
(*function)(true); // force load
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"codedFunctionObject::updateLibrary()",
|
||||||
|
contextDict
|
||||||
|
) << "Failed looking up symbol " << globalFuncName
|
||||||
|
<< nl << "from " << libPath << exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"codedFunctionObject::updateLibrary()",
|
"codedFunctionObject::loadLibrary()",
|
||||||
contextDict
|
contextDict
|
||||||
) << "Failed looking up symbol " << globalFuncName << nl
|
) << "Failed looking up symbol " << globalFuncName << nl
|
||||||
<< "from " << libPath << exit(FatalIOError);
|
<< "from " << libPath << exit(FatalIOError);
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorIn
|
|
||||||
(
|
|
||||||
"codedFunctionObject::loadLibrary()",
|
|
||||||
contextDict
|
|
||||||
) << "Failed looking up symbol " << globalFuncName << nl
|
|
||||||
<< "from " << libPath << exit(FatalIOError);
|
|
||||||
|
|
||||||
lib = 0;
|
lib = 0;
|
||||||
if (!dlLibraryTable::close(libPath, false))
|
if (!libs.close(libPath, false))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"codedFunctionObject::loadLibrary()",
|
"codedFunctionObject::loadLibrary()",
|
||||||
contextDict
|
contextDict
|
||||||
) << "Failed unloading library "
|
) << "Failed unloading library "
|
||||||
<< libPath
|
<< libPath
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -122,15 +127,19 @@ void Foam::codedFunctionObject::unloadLibrary
|
|||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
void* lib = 0;
|
void* lib = 0;
|
||||||
|
|
||||||
if (!libPath.empty())
|
if (libPath.empty())
|
||||||
{
|
{
|
||||||
lib = dlLibraryTable::findLibrary(libPath);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dlLibraryTable& libs = const_cast<Time&>(time_).libs();
|
||||||
|
|
||||||
|
lib = libs.findLibrary(libPath);
|
||||||
|
|
||||||
if (!lib)
|
if (!lib)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -160,7 +169,7 @@ void Foam::codedFunctionObject::unloadLibrary
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dlLibraryTable::close(libPath, false))
|
if (!libs.close(libPath, false))
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
@ -274,7 +283,7 @@ void Foam::codedFunctionObject::updateLibrary() const
|
|||||||
|
|
||||||
|
|
||||||
// the correct library was already loaded => we are done
|
// the correct library was already loaded => we are done
|
||||||
if (dlLibraryTable::findLibrary(libPath))
|
if (const_cast<Time&>(time_).libs().findLibrary(libPath))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,20 +88,20 @@ protected:
|
|||||||
typedef void (*loaderFunctionType)(bool);
|
typedef void (*loaderFunctionType)(bool);
|
||||||
|
|
||||||
//- Load specified library and execute globalFuncName(true)
|
//- Load specified library and execute globalFuncName(true)
|
||||||
static void* loadLibrary
|
void* loadLibrary
|
||||||
(
|
(
|
||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Execute globalFuncName(false) and unload specified library
|
//- Execute globalFuncName(false) and unload specified library
|
||||||
static void unloadLibrary
|
void unloadLibrary
|
||||||
(
|
(
|
||||||
const fileName& libPath,
|
const fileName& libPath,
|
||||||
const string& globalFuncName,
|
const string& globalFuncName,
|
||||||
const dictionary& contextDict
|
const dictionary& contextDict
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
//- Create library based on the dynamicCodeContext
|
//- Create library based on the dynamicCodeContext
|
||||||
|
|||||||
@ -62,7 +62,17 @@ void makeGraph
|
|||||||
const word& graphFormat
|
const word& graphFormat
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
makeGraph(x, vsf.internalField(), name, vsf.path(), graphFormat);
|
fileName path(vsf.rootPath()/vsf.caseName()/"graphs"/vsf.instance());
|
||||||
|
mkDir(path);
|
||||||
|
|
||||||
|
makeGraph
|
||||||
|
(
|
||||||
|
x,
|
||||||
|
vsf.internalField(),
|
||||||
|
name,
|
||||||
|
path,
|
||||||
|
graphFormat
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
datToFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/datToFoam
|
|
||||||
@ -1,127 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
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
|
|
||||||
MRFSimpleFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
|
||||||
fluids with MRF regions.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "singlePhaseTransportModel.H"
|
|
||||||
#include "RASModel.H"
|
|
||||||
#include "MRFZones.H"
|
|
||||||
#include "simpleControl.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
#include "setRootCase.H"
|
|
||||||
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createMesh.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
simpleControl simple(mesh);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
while (simple.loop())
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
p.storePrevIter();
|
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
|
||||||
{
|
|
||||||
// Momentum predictor
|
|
||||||
tmp<fvVectorMatrix> UEqn
|
|
||||||
(
|
|
||||||
fvm::div(phi, U)
|
|
||||||
+ turbulence->divDevReff(U)
|
|
||||||
);
|
|
||||||
mrfZones.addCoriolis(UEqn());
|
|
||||||
|
|
||||||
UEqn().relax();
|
|
||||||
|
|
||||||
solve(UEqn() == -fvc::grad(p));
|
|
||||||
|
|
||||||
p.boundaryField().updateCoeffs();
|
|
||||||
volScalarField rAU(1.0/UEqn().A());
|
|
||||||
U = rAU*UEqn().H();
|
|
||||||
UEqn.clear();
|
|
||||||
|
|
||||||
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
|
|
||||||
mrfZones.relativeFlux(phi);
|
|
||||||
adjustPhi(phi, U, p);
|
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
|
||||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rAU, p) == fvc::div(phi)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
pEqn.solve();
|
|
||||||
|
|
||||||
if (nonOrth == simple.nNonOrthCorr())
|
|
||||||
{
|
|
||||||
phi -= pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
|
||||||
p.relax();
|
|
||||||
|
|
||||||
// Momentum corrector
|
|
||||||
U -= rAU*fvc::grad(p);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
}
|
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
MRFSimpleFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
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, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
MRFZones mrfZones(mesh);
|
|
||||||
mrfZones.correctBoundaryVelocity(U);
|
|
||||||
@ -47,6 +47,9 @@ FoamFile
|
|||||||
nFaces 1600;
|
nFaces 1600;
|
||||||
startFace 101720;
|
startFace 101720;
|
||||||
neighbourPatch cyclic_half1;
|
neighbourPatch cyclic_half1;
|
||||||
|
transform rotational;
|
||||||
|
rotationAxis (0 0 1);
|
||||||
|
rotationCentre (0 0 0);
|
||||||
}
|
}
|
||||||
cyclic_half1
|
cyclic_half1
|
||||||
{
|
{
|
||||||
@ -54,6 +57,9 @@ FoamFile
|
|||||||
nFaces 1600;
|
nFaces 1600;
|
||||||
startFace 103320;
|
startFace 103320;
|
||||||
neighbourPatch cyclic_half0;
|
neighbourPatch cyclic_half0;
|
||||||
|
transform rotational;
|
||||||
|
rotationAxis (0 0 1);
|
||||||
|
rotationCentre (0 0 0);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application simpleSRFFoam;
|
application SRFSimpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom startTime;
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
|
|||||||
|
|
||||||
transportModel Newtonian;
|
transportModel Newtonian;
|
||||||
|
|
||||||
nu nu [ 0 2 -1 0 0 0 0 ] 1e-3;
|
nu nu [ 0 2 -1 0 0 0 0 ] 1e-8;
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -25,6 +25,8 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type turbulentMixingLengthDissipationRateInlet;
|
type turbulentMixingLengthDissipationRateInlet;
|
||||||
mixingLength 0.01;
|
mixingLength 0.01;
|
||||||
|
phi phi;
|
||||||
|
k k;
|
||||||
value uniform 1;
|
value uniform 1;
|
||||||
}
|
}
|
||||||
outlet1
|
outlet1
|
||||||
@ -45,7 +47,7 @@ boundaryField
|
|||||||
Cmu 0.09;
|
Cmu 0.09;
|
||||||
kappa 0.41;
|
kappa 0.41;
|
||||||
E 9.8;
|
E 9.8;
|
||||||
value uniform 0;
|
value uniform 1;
|
||||||
}
|
}
|
||||||
fan_half0
|
fan_half0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,6 +25,8 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type turbulentIntensityKineticEnergyInlet;
|
type turbulentIntensityKineticEnergyInlet;
|
||||||
intensity 0.05;
|
intensity 0.05;
|
||||||
|
U U;
|
||||||
|
phi phi;
|
||||||
value uniform 1;
|
value uniform 1;
|
||||||
}
|
}
|
||||||
outlet1
|
outlet1
|
||||||
@ -42,7 +44,7 @@ boundaryField
|
|||||||
baffles
|
baffles
|
||||||
{
|
{
|
||||||
type kqRWallFunction;
|
type kqRWallFunction;
|
||||||
value uniform 0;
|
value uniform 1;
|
||||||
}
|
}
|
||||||
fan_half0
|
fan_half0
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -21,433 +21,433 @@ FoamFile
|
|||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 320;
|
nFaces 320;
|
||||||
startFace 1027872;
|
startFace 1028059;
|
||||||
}
|
}
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 64;
|
nFaces 64;
|
||||||
startFace 1028192;
|
startFace 1028379;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 64;
|
nFaces 64;
|
||||||
startFace 1028256;
|
startFace 1028443;
|
||||||
}
|
}
|
||||||
lowerWall
|
lowerWall
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 5330;
|
nFaces 5330;
|
||||||
startFace 1028320;
|
startFace 1028507;
|
||||||
}
|
}
|
||||||
upperWall
|
upperWall
|
||||||
{
|
{
|
||||||
type patch;
|
type patch;
|
||||||
nFaces 160;
|
nFaces 160;
|
||||||
startFace 1033650;
|
startFace 1033837;
|
||||||
}
|
}
|
||||||
motorBike_frt-fairing:001%1
|
motorBike_frt-fairing:001%1
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 5416;
|
nFaces 5410;
|
||||||
startFace 1033810;
|
startFace 1033997;
|
||||||
}
|
}
|
||||||
motorBike_windshield:002%2
|
motorBike_windshield:002%2
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 50;
|
nFaces 50;
|
||||||
startFace 1039226;
|
startFace 1039407;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-rim:005%5
|
motorBike_rr-wh-rim:005%5
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 137;
|
nFaces 136;
|
||||||
startFace 1039276;
|
startFace 1039457;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-rim:010%10
|
motorBike_rr-wh-rim:010%10
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 340;
|
nFaces 340;
|
||||||
startFace 1039413;
|
startFace 1039593;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-rim:011%11
|
motorBike_fr-wh-rim:011%11
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 473;
|
nFaces 473;
|
||||||
startFace 1039753;
|
startFace 1039933;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-brake-disk:012%12
|
motorBike_fr-wh-brake-disk:012%12
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 54;
|
nFaces 54;
|
||||||
startFace 1040226;
|
startFace 1040406;
|
||||||
}
|
}
|
||||||
motorBike_frame:016-shadow%13
|
motorBike_frame:016-shadow%13
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 98;
|
nFaces 98;
|
||||||
startFace 1040280;
|
startFace 1040460;
|
||||||
}
|
}
|
||||||
motorBike_rear-susp:014%14
|
motorBike_rear-susp:014%14
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 844;
|
nFaces 847;
|
||||||
startFace 1040378;
|
startFace 1040558;
|
||||||
}
|
}
|
||||||
motorBike_rear-susp:014-shadow%15
|
motorBike_rear-susp:014-shadow%15
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 461;
|
nFaces 462;
|
||||||
startFace 1041222;
|
startFace 1041405;
|
||||||
}
|
}
|
||||||
motorBike_frame:016%16
|
motorBike_frame:016%16
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 67;
|
nFaces 64;
|
||||||
startFace 1041683;
|
startFace 1041867;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-rim:005-shadow%17
|
motorBike_rr-wh-rim:005-shadow%17
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 70;
|
nFaces 70;
|
||||||
startFace 1041750;
|
startFace 1041931;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-chain-hub:022%22
|
motorBike_rr-wh-chain-hub:022%22
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 141;
|
nFaces 141;
|
||||||
startFace 1041820;
|
startFace 1042001;
|
||||||
}
|
}
|
||||||
motorBike_rearseat%24
|
motorBike_rearseat%24
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 430;
|
nFaces 430;
|
||||||
startFace 1041961;
|
startFace 1042142;
|
||||||
}
|
}
|
||||||
motorBike_frt-fairing%25
|
motorBike_frt-fairing%25
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 626;
|
nFaces 626;
|
||||||
startFace 1042391;
|
startFace 1042572;
|
||||||
}
|
}
|
||||||
motorBike_windshield%26
|
motorBike_windshield%26
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 368;
|
nFaces 379;
|
||||||
startFace 1043017;
|
startFace 1043198;
|
||||||
}
|
}
|
||||||
motorBike_headlights%27
|
motorBike_headlights%27
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 161;
|
nFaces 161;
|
||||||
startFace 1043385;
|
startFace 1043577;
|
||||||
}
|
}
|
||||||
motorBike_driversseat%28
|
motorBike_driversseat%28
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 368;
|
nFaces 368;
|
||||||
startFace 1043546;
|
startFace 1043738;
|
||||||
}
|
}
|
||||||
motorBike_rear-body%29
|
motorBike_rear-body%29
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 2077;
|
nFaces 2077;
|
||||||
startFace 1043914;
|
startFace 1044106;
|
||||||
}
|
}
|
||||||
motorBike_fuel-tank%30
|
motorBike_fuel-tank%30
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 912;
|
nFaces 912;
|
||||||
startFace 1045991;
|
startFace 1046183;
|
||||||
}
|
}
|
||||||
motorBike_exhaust%31
|
motorBike_exhaust%31
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 2392;
|
nFaces 2392;
|
||||||
startFace 1046903;
|
startFace 1047095;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-rim%32
|
motorBike_rr-wh-rim%32
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1430;
|
nFaces 1430;
|
||||||
startFace 1049295;
|
startFace 1049487;
|
||||||
}
|
}
|
||||||
motorBike_fr-mud-guard%33
|
motorBike_fr-mud-guard%33
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 624;
|
nFaces 634;
|
||||||
startFace 1050725;
|
startFace 1050917;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-rim%34
|
motorBike_fr-wh-rim%34
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 591;
|
nFaces 591;
|
||||||
startFace 1051349;
|
startFace 1051551;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-brake-disk%35
|
motorBike_fr-wh-brake-disk%35
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 427;
|
nFaces 426;
|
||||||
startFace 1051940;
|
startFace 1052142;
|
||||||
}
|
}
|
||||||
motorBike_fr-brake-caliper%36
|
motorBike_fr-brake-caliper%36
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 164;
|
nFaces 164;
|
||||||
startFace 1052367;
|
startFace 1052568;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-tyre%37
|
motorBike_fr-wh-tyre%37
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1116;
|
nFaces 1116;
|
||||||
startFace 1052531;
|
startFace 1052732;
|
||||||
}
|
}
|
||||||
motorBike_hbars%38
|
motorBike_hbars%38
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 535;
|
nFaces 535;
|
||||||
startFace 1053647;
|
startFace 1053848;
|
||||||
}
|
}
|
||||||
motorBike_fr-forks%39
|
motorBike_fr-forks%39
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1140;
|
nFaces 1140;
|
||||||
startFace 1054182;
|
startFace 1054383;
|
||||||
}
|
}
|
||||||
motorBike_chain%40
|
motorBike_chain%40
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 474;
|
nFaces 474;
|
||||||
startFace 1055322;
|
startFace 1055523;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-tyre%41
|
motorBike_rr-wh-tyre%41
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1787;
|
nFaces 1787;
|
||||||
startFace 1055796;
|
startFace 1055997;
|
||||||
}
|
}
|
||||||
motorBike_square-dial%42
|
motorBike_square-dial%42
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 6;
|
nFaces 6;
|
||||||
startFace 1057583;
|
startFace 1057784;
|
||||||
}
|
}
|
||||||
motorBike_round-dial%43
|
motorBike_round-dial%43
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 17;
|
nFaces 17;
|
||||||
startFace 1057589;
|
startFace 1057790;
|
||||||
}
|
}
|
||||||
motorBike_dial-holder%44
|
motorBike_dial-holder%44
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 87;
|
nFaces 87;
|
||||||
startFace 1057606;
|
startFace 1057807;
|
||||||
}
|
}
|
||||||
motorBike_rear-susp%45
|
motorBike_rear-susp%45
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1786;
|
nFaces 1786;
|
||||||
startFace 1057693;
|
startFace 1057894;
|
||||||
}
|
}
|
||||||
motorBike_rear-brake-lights%46
|
motorBike_rear-brake-lights%46
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 53;
|
nFaces 53;
|
||||||
startFace 1059479;
|
startFace 1059680;
|
||||||
}
|
}
|
||||||
motorBike_rear-light-bracket%47
|
motorBike_rear-light-bracket%47
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 163;
|
nFaces 163;
|
||||||
startFace 1059532;
|
startFace 1059733;
|
||||||
}
|
}
|
||||||
motorBike_frame%48
|
motorBike_frame%48
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 2040;
|
nFaces 2040;
|
||||||
startFace 1059695;
|
startFace 1059896;
|
||||||
}
|
}
|
||||||
motorBike_rear-mud-guard%49
|
motorBike_rear-mud-guard%49
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 663;
|
nFaces 660;
|
||||||
startFace 1061735;
|
startFace 1061936;
|
||||||
}
|
}
|
||||||
motorBike_rear-susp-spring-damp%50
|
motorBike_rear-susp-spring-damp%50
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 107;
|
nFaces 107;
|
||||||
startFace 1062398;
|
startFace 1062596;
|
||||||
}
|
}
|
||||||
motorBike_fairing-inner-plate%51
|
motorBike_fairing-inner-plate%51
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 445;
|
nFaces 445;
|
||||||
startFace 1062505;
|
startFace 1062703;
|
||||||
}
|
}
|
||||||
motorBike_clutch-housing%52
|
motorBike_clutch-housing%52
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 970;
|
nFaces 970;
|
||||||
startFace 1062950;
|
startFace 1063148;
|
||||||
}
|
}
|
||||||
motorBike_radiator%53
|
motorBike_radiator%53
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 39;
|
nFaces 40;
|
||||||
startFace 1063920;
|
startFace 1064118;
|
||||||
}
|
}
|
||||||
motorBike_water-pipe%54
|
motorBike_water-pipe%54
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 104;
|
nFaces 104;
|
||||||
startFace 1063959;
|
startFace 1064158;
|
||||||
}
|
}
|
||||||
motorBike_water-pump%55
|
motorBike_water-pump%55
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 74;
|
nFaces 74;
|
||||||
startFace 1064063;
|
startFace 1064262;
|
||||||
}
|
}
|
||||||
motorBike_engine%56
|
motorBike_engine%56
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 2389;
|
nFaces 2389;
|
||||||
startFace 1064137;
|
startFace 1064336;
|
||||||
}
|
}
|
||||||
motorBike_rear-shock-link%57
|
motorBike_rear-shock-link%57
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 26;
|
nFaces 25;
|
||||||
startFace 1066526;
|
startFace 1066725;
|
||||||
}
|
}
|
||||||
motorBike_rear-brake-fluid-pot-bracket%58
|
motorBike_rear-brake-fluid-pot-bracket%58
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 44;
|
nFaces 46;
|
||||||
startFace 1066552;
|
startFace 1066750;
|
||||||
}
|
}
|
||||||
motorBike_rear-brake-fluid-pot%59
|
motorBike_rear-brake-fluid-pot%59
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 53;
|
nFaces 53;
|
||||||
startFace 1066596;
|
startFace 1066796;
|
||||||
}
|
}
|
||||||
motorBike_footpeg%60
|
motorBike_footpeg%60
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 86;
|
nFaces 86;
|
||||||
startFace 1066649;
|
startFace 1066849;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-chain-hub%61
|
motorBike_rr-wh-chain-hub%61
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 122;
|
nFaces 122;
|
||||||
startFace 1066735;
|
startFace 1066935;
|
||||||
}
|
}
|
||||||
motorBike_rear-brake-caliper%62
|
motorBike_rear-brake-caliper%62
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 142;
|
nFaces 142;
|
||||||
startFace 1066857;
|
startFace 1067057;
|
||||||
}
|
}
|
||||||
motorBike_rider-helmet%65
|
motorBike_rider-helmet%65
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 583;
|
nFaces 583;
|
||||||
startFace 1066999;
|
startFace 1067199;
|
||||||
}
|
}
|
||||||
motorBike_rider-visor%66
|
motorBike_rider-visor%66
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 95;
|
nFaces 95;
|
||||||
startFace 1067582;
|
startFace 1067782;
|
||||||
}
|
}
|
||||||
motorBike_rider-boots%67
|
motorBike_rider-boots%67
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 1025;
|
nFaces 1025;
|
||||||
startFace 1067677;
|
startFace 1067877;
|
||||||
}
|
}
|
||||||
motorBike_rider-gloves%68
|
motorBike_rider-gloves%68
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 319;
|
nFaces 319;
|
||||||
startFace 1068702;
|
startFace 1068902;
|
||||||
}
|
}
|
||||||
motorBike_rider-body%69
|
motorBike_rider-body%69
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 4555;
|
nFaces 4555;
|
||||||
startFace 1069021;
|
startFace 1069221;
|
||||||
}
|
}
|
||||||
motorBike_frame:0%70
|
motorBike_frame:0%70
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 37;
|
nFaces 37;
|
||||||
startFace 1073576;
|
startFace 1073776;
|
||||||
}
|
}
|
||||||
motorBike_frt-fairing:001-shadow%74
|
motorBike_frt-fairing:001-shadow%74
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 3317;
|
nFaces 3329;
|
||||||
startFace 1073613;
|
startFace 1073813;
|
||||||
}
|
}
|
||||||
motorBike_windshield-shadow%75
|
motorBike_windshield-shadow%75
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 236;
|
nFaces 237;
|
||||||
startFace 1076930;
|
startFace 1077142;
|
||||||
}
|
}
|
||||||
motorBike_fr-mud-guard-shadow%81
|
motorBike_fr-mud-guard-shadow%81
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 350;
|
nFaces 348;
|
||||||
startFace 1077166;
|
startFace 1077379;
|
||||||
}
|
}
|
||||||
motorBike_fr-wh-brake-disk-shadow%83
|
motorBike_fr-wh-brake-disk-shadow%83
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 186;
|
nFaces 187;
|
||||||
startFace 1077516;
|
startFace 1077727;
|
||||||
}
|
}
|
||||||
motorBike_rear-mud-guard-shadow%84
|
motorBike_rear-mud-guard-shadow%84
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 388;
|
nFaces 394;
|
||||||
startFace 1077702;
|
startFace 1077914;
|
||||||
}
|
}
|
||||||
motorBike_rear-susp-spring-damp-shadow%85
|
motorBike_rear-susp-spring-damp-shadow%85
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 41;
|
nFaces 41;
|
||||||
startFace 1078090;
|
startFace 1078308;
|
||||||
}
|
}
|
||||||
motorBike_radiator-shadow%86
|
motorBike_radiator-shadow%86
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 22;
|
nFaces 20;
|
||||||
startFace 1078131;
|
startFace 1078349;
|
||||||
}
|
}
|
||||||
motorBike_rear-shock-link-shadow%87
|
motorBike_rear-shock-link-shadow%87
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 9;
|
nFaces 10;
|
||||||
startFace 1078153;
|
startFace 1078369;
|
||||||
}
|
}
|
||||||
motorBike_rear-brake-fluid-pot-bracket-shadow%88
|
motorBike_rear-brake-fluid-pot-bracket-shadow%88
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 22;
|
nFaces 20;
|
||||||
startFace 1078162;
|
startFace 1078379;
|
||||||
}
|
}
|
||||||
motorBike_rr-wh-chain-hub-shadow%89
|
motorBike_rr-wh-chain-hub-shadow%89
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 53;
|
nFaces 53;
|
||||||
startFace 1078184;
|
startFace 1078399;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
simpleSRFFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
// check convergence
|
|
||||||
|
|
||||||
if (maxResidual < convergenceCriterion)
|
|
||||||
{
|
|
||||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
|
||||||
runTime.writeAndEnd();
|
|
||||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
// initialize values for convergence checks
|
|
||||||
|
|
||||||
scalar eqnResidual = 1, maxResidual = 0;
|
|
||||||
scalar convergenceCriterion = 0;
|
|
||||||
|
|
||||||
simple.readIfPresent("convergence", convergenceCriterion);
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
simpleWindFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/simpleWindFoam
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
if (maxResidual < convergenceCriterion)
|
|
||||||
{
|
|
||||||
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
|
|
||||||
runTime.writeAndEnd();
|
|
||||||
Info<< "latestTime = " << runTime.timeName() << endl;
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
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, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
|
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
|
||||||
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
|
||||||
);
|
|
||||||
|
|
||||||
IObasicSourceList actuationDisks(mesh);
|
|
||||||
@ -50,7 +50,7 @@ FoamFile
|
|||||||
terrain_patch0
|
terrain_patch0
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
nFaces 18201;
|
nFaces 16037;
|
||||||
startFace 369404;
|
startFace 369404;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
application simpleWindFoam;
|
application windSimpleFoam;
|
||||||
|
|
||||||
startFrom latestTime;
|
startFrom latestTime;
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
rhoPisoTwinParcelFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/rhoPisoTwinParcelFoam
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
|
||||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-llagrangian \
|
|
||||||
-llagrangianIntermediate \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lmeshTools \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lbasicThermophysicalModels \
|
|
||||||
-lreactionThermophysicalModels \
|
|
||||||
-lSLGThermo \
|
|
||||||
-lspecie \
|
|
||||||
-lradiationModels \
|
|
||||||
-lcompressibleRASModels \
|
|
||||||
-lcompressibleLESModels \
|
|
||||||
-lregionModels \
|
|
||||||
-lsurfaceFilmModels
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
fvVectorMatrix UEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, U)
|
|
||||||
+ fvm::div(phi, U)
|
|
||||||
+ turbulence->divDevRhoReff(U)
|
|
||||||
==
|
|
||||||
thermoCloud1.SU(U)
|
|
||||||
+ kinematicCloud1.SU(U)
|
|
||||||
+ rho.dimensionedInternalField()*g
|
|
||||||
);
|
|
||||||
|
|
||||||
UEqn.relax();
|
|
||||||
|
|
||||||
if (momentumPredictor)
|
|
||||||
{
|
|
||||||
solve(UEqn == -fvc::grad(p));
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
Info<< "Constructing thermoCloud1" << endl;
|
|
||||||
basicThermoCloud thermoCloud1
|
|
||||||
(
|
|
||||||
"thermoCloud1",
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
slgThermo
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Constructing kinematicCloud1" << endl;
|
|
||||||
basicKinematicCloud kinematicCloud1
|
|
||||||
(
|
|
||||||
"kinematicCloud1",
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
thermo.mu(),
|
|
||||||
g
|
|
||||||
);
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user