ENH: Adding overBuoyantPimpleFoam and tutorial
This commit is contained in:
parent
aaf5d7be6d
commit
5c58b07f5a
@ -0,0 +1,3 @@
|
||||
overBuoyantPimpleDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/overBuoyantPimpleDyMFoam
|
@ -0,0 +1,30 @@
|
||||
EXE_INC = \
|
||||
-I$(FOAM_SOLVERS)/heatTransfer/buoyantPimpleFoam \
|
||||
-I$(FOAM_SOLVERS)/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/overset/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lfvOptions \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lradiationModels \
|
||||
-lspecie \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-latmosphericModels \
|
||||
-loverset \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh
|
@ -0,0 +1,91 @@
|
||||
if (mesh.changing())
|
||||
{
|
||||
volVectorField::Boundary& bfld = U.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].initEvaluate();
|
||||
}
|
||||
}
|
||||
|
||||
surfaceScalarField::Boundary& phiBfld = phi.boundaryFieldRef();
|
||||
forAll(bfld, patchi)
|
||||
{
|
||||
if (bfld[patchi].fixesValue())
|
||||
{
|
||||
bfld[patchi].evaluate();
|
||||
|
||||
phiBfld[patchi] =
|
||||
rho.boundaryField()[patchi]
|
||||
* (
|
||||
bfld[patchi]
|
||||
& mesh.Sf().boundaryField()[patchi]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Initialize BCs list for pcorr to zero-gradient
|
||||
wordList pcorrTypes
|
||||
(
|
||||
p.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
// Set BCs of pcorr to fixed-value for patches at which p is fixed
|
||||
forAll(p.boundaryField(), patchi)
|
||||
{
|
||||
if (p.boundaryField()[patchi].fixesValue())
|
||||
{
|
||||
pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
}
|
||||
|
||||
volScalarField pcorr
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"pcorr",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(p.dimensions(), Zero),
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(pcorr.name());
|
||||
|
||||
{
|
||||
dimensionedScalar rAUf("rAUf", dimTime, 1.0);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::ddt(psi, pcorr)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rAUf, pcorr)
|
||||
==
|
||||
divrhoU()
|
||||
);
|
||||
|
||||
//pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter())));
|
||||
//Bypass virtual layer
|
||||
const dictionary& d = mesh.solver
|
||||
(
|
||||
pcorr.select
|
||||
(
|
||||
pimple.finalInnerIter()
|
||||
)
|
||||
);
|
||||
mesh.fvMesh::solve(pcorrEqn, d);
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pcorrEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
const volScalarField& psi = thermo.psi();
|
@ -0,0 +1,126 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
|
||||
rhoThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
|
||||
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
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "readhRef.H"
|
||||
#include "gh.H"
|
||||
|
||||
|
||||
Info<< "Reading field p_rgh\n" << endl;
|
||||
volScalarField p_rgh
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p_rgh",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
// Force p_rgh to be consistent with p
|
||||
p_rgh = p - rho*gh;
|
||||
|
||||
mesh.setFluxRequired(p_rgh.name());
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
|
||||
if (p_rgh.needReference())
|
||||
{
|
||||
setRefCell
|
||||
(
|
||||
p,
|
||||
p_rgh,
|
||||
pimple.dict(),
|
||||
pRefCell,
|
||||
pRefValue
|
||||
);
|
||||
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pRefCell)
|
||||
);
|
||||
}
|
||||
|
||||
dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho));
|
||||
|
||||
#include "createDpdt.H"
|
||||
|
||||
#include "createK.H"
|
||||
|
||||
#include "createMRF.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
//- Overset specific
|
||||
|
||||
// Add solver-specific interpolations
|
||||
{
|
||||
wordHashSet& nonInt =
|
||||
const_cast<wordHashSet&>(Stencil::New(mesh).nonInterpolatedFields());
|
||||
|
||||
nonInt.insert("HbyA");
|
||||
nonInt.insert("grad(p_rgh)");
|
||||
nonInt.insert("surfaceIntegrate(phi)");
|
||||
nonInt.insert("surfaceIntegrate(phiHbyA)");
|
||||
nonInt.insert("cellMask");
|
||||
nonInt.insert("cellDisplacement");
|
||||
nonInt.insert("interpolatedCells");
|
||||
nonInt.insert("cellInterpolationWeight");
|
||||
}
|
||||
|
||||
// Mask field for zeroing out contributions on hole cells
|
||||
#include "createCellMask.H"
|
@ -0,0 +1,212 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2019 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
|
||||
overBuoyantPimpleDymFoam
|
||||
|
||||
Group
|
||||
grpHeatTransferSolvers
|
||||
|
||||
Description
|
||||
Transient solver for buoyant, turbulent flow of compressible fluids for
|
||||
ventilation and heat-transfer with overset feature
|
||||
|
||||
Turbulence is modelled using a run-time selectable compressible RAS or
|
||||
LES model.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "radiationModel.H"
|
||||
#include "fvOptions.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureControl.H"
|
||||
|
||||
#include "CorrectPhi.H"
|
||||
#include "cellCellStencilObject.H"
|
||||
#include "localMin.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"Transient solver for buoyant, turbulent fluid flow"
|
||||
" of compressible fluids, including radiation."
|
||||
);
|
||||
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "addCheckCaseOptions.H"
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createDynamicFvMesh.H"
|
||||
#include "createDyMControls.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
#include "createRhoUfIfPresent.H"
|
||||
#include "createControls.H"
|
||||
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
|
||||
#include "readControls.H"
|
||||
#include "readDyMControls.H"
|
||||
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
// Store divrhoU from the previous mesh so that it can be mapped
|
||||
// and used in correctPhi to ensure the corrected phi has the
|
||||
// same divergence
|
||||
autoPtr<volScalarField> divrhoU;
|
||||
if (correctPhi)
|
||||
{
|
||||
divrhoU.reset
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"divrhoU",
|
||||
fvc::div(fvc::absolute(phi, rho, U))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
++runTime;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||
{
|
||||
// Do any mesh changes
|
||||
mesh.update();
|
||||
|
||||
if (mesh.changing())
|
||||
{
|
||||
MRF.update();
|
||||
|
||||
#include "setCellMask.H"
|
||||
|
||||
const surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
|
||||
// Zero Uf on old faceMask (H-I)
|
||||
rhoUf() *= faceMaskOld;
|
||||
|
||||
//fvc::correctRhoUf(rhoUfint, rho, U, phi);
|
||||
surfaceVectorField rhoUfint(fvc::interpolate(rho*U));
|
||||
|
||||
// Update Uf and phi on new C-I faces
|
||||
rhoUf() += (1-faceMaskOld)*rhoUfint;
|
||||
|
||||
// Update Uf boundary
|
||||
forAll(rhoUf().boundaryField(), patchI)
|
||||
{
|
||||
rhoUf().boundaryFieldRef()[patchI] =
|
||||
rhoUfint.boundaryField()[patchI];
|
||||
}
|
||||
|
||||
// Calculate absolute flux from the mapped surface velocity
|
||||
phi = mesh.Sf() & rhoUf();
|
||||
|
||||
if (correctPhi)
|
||||
{
|
||||
#include "correctPhi.H"
|
||||
}
|
||||
|
||||
// Zero phi on current H-I
|
||||
const surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
|
||||
phi *= faceMask;
|
||||
U *= cellMask;
|
||||
|
||||
// Make the fluxes relative to the mesh-motion
|
||||
fvc::makeRelative(phi, rho, U);
|
||||
}
|
||||
|
||||
if (checkMeshCourantNo)
|
||||
{
|
||||
#include "meshCourantNo.H"
|
||||
}
|
||||
}
|
||||
|
||||
if (pimple.firstIter())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
runTime.write();
|
||||
|
||||
runTime.printExecutionTime(Info);
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,130 @@
|
||||
|
||||
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
|
||||
bool compressible = (compressibility.value() > SMALL);
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||
// pressure solution
|
||||
const volScalarField psip0(psi*p);
|
||||
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
mesh.interpolate(rAU);
|
||||
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
|
||||
|
||||
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::flux(rho*HbyA) + phig
|
||||
);
|
||||
|
||||
if (ddtCorr)
|
||||
{
|
||||
surfaceScalarField faceMaskOld
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask.oldTime())
|
||||
);
|
||||
|
||||
phiHbyA +=
|
||||
faceMaskOld*MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi));
|
||||
}
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
fvScalarMatrix p_rghDDtEqn
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
|
||||
+ fvc::div(phiHbyA)
|
||||
==
|
||||
fvOptions(psi, p_rgh, rho.name())
|
||||
);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix p_rghEqn
|
||||
(
|
||||
p_rghDDtEqn
|
||||
- fvm::laplacian(rhorAUf, p_rgh)
|
||||
);
|
||||
|
||||
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
// Calculate the conservative fluxes
|
||||
phi = phiHbyA + p_rghEqn.flux();
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p_rgh.relax();
|
||||
|
||||
// Correct the momentum source with the pressure gradient flux
|
||||
// calculated from the relaxed pressure
|
||||
U =
|
||||
cellMask*
|
||||
(
|
||||
HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf)
|
||||
);
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
}
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
if (p_rgh.needReference())
|
||||
{
|
||||
if (!compressible)
|
||||
{
|
||||
p += dimensionedScalar
|
||||
(
|
||||
"p",
|
||||
p.dimensions(),
|
||||
pRefValue - getRefCellValue(p, pRefCell)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/compressibility;
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
rho = thermo.rho();
|
||||
p_rgh = p - rho*gh;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
thermo.correctRho(psi*p - psip0);
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
|
||||
{
|
||||
fvc::correctRhoUf(rhoUf, rho, U, phi);
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
|
||||
if (mesh.moving())
|
||||
{
|
||||
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
}
|
||||
|
||||
surfaceScalarField faceMask
|
||||
(
|
||||
localMin<scalar>(mesh).interpolate(cellMask)
|
||||
);
|
||||
phi *= faceMask;
|
@ -0,0 +1,9 @@
|
||||
#include "readTimeControls.H"
|
||||
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||
|
||||
checkMeshCourantNo =
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
|
||||
ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true);
|
57
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/T
Executable file
57
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/T
Executable file
@ -0,0 +1,57 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 400;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
60
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/U
Executable file
60
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/U
Executable file
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue uniform (0 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue uniform (0 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue uniform (0 0 0);
|
||||
}
|
||||
hole
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/alphat
Executable file
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/alphat
Executable file
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/epsilon
Executable file
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/epsilon
Executable file
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 0.1;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/k
Executable file
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/k
Executable file
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 0.01;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/nut
Executable file
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/nut
Executable file
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 0;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
60
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p
Executable file
60
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p
Executable file
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type calculated;
|
||||
value uniform 100000;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 100000;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 100000;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type calculated;
|
||||
value uniform 100000;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p_rgh
Executable file
61
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p_rgh
Executable file
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 100000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 100000;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 100000;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
63
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/pointDisplacement
Executable file
63
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/pointDisplacement
Executable file
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class pointVectorField;
|
||||
location "0";
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type zeroGradient;
|
||||
patchType overset;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type uniformFixedValue;
|
||||
value uniform (0 0 0);
|
||||
uniformValue constant (0 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
value uniform (0 0 0);
|
||||
uniformValue constant (0 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
value uniform (0 0 0);
|
||||
uniformValue constant (0 0 0);
|
||||
}
|
||||
hole
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
57
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/zoneID
Executable file
57
tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/zoneID
Executable file
@ -0,0 +1,57 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object zoneID;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
value uniform 1;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
hole
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
10
tutorials/heatTransfer/overBuoyantPimpleFoam/Allclean
Executable file
10
tutorials/heatTransfer/overBuoyantPimpleFoam/Allclean
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
|
||||
cleanCase0
|
||||
|
||||
rm -f constant/polyMesh/boundary
|
||||
rm -f constant/polyMesh/zoneID
|
||||
|
||||
#------------------------------------------------------------------------------
|
17
tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun
Executable file
17
tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
# Serial
|
||||
runApplication $(getApplication)
|
||||
|
||||
# Parallel
|
||||
#runApplication decomposePar -cellDist
|
||||
#runParallel $(getApplication)
|
||||
|
||||
#post
|
||||
runApplication foamToVTK
|
||||
|
||||
#------------------------------------------------------------------------------
|
20
tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun.pre
Executable file
20
tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun.pre
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 1 topoSet
|
||||
|
||||
runApplication subsetMesh box -patch hole -overwrite
|
||||
|
||||
# Select cellSets
|
||||
runApplication -s 2 topoSet
|
||||
|
||||
restore0Dir
|
||||
|
||||
# Use cellSets to write zoneID
|
||||
runApplication setFields
|
||||
|
||||
#------------------------------------------------------------------------------
|
39
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/dynamicMeshDict
Executable file
39
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/dynamicMeshDict
Executable file
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus-overset |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicOversetFvMesh;
|
||||
|
||||
dynamicOversetFvMeshCoeffs
|
||||
{
|
||||
// layerRelax 0.3;
|
||||
}
|
||||
|
||||
solver multiSolidBodyMotionSolver;
|
||||
|
||||
multiSolidBodyMotionSolverCoeffs
|
||||
{
|
||||
movingZone1
|
||||
{
|
||||
solidBodyMotionFunction oscillatingLinearMotion;
|
||||
oscillatingLinearMotionCoeffs
|
||||
{
|
||||
amplitude (0.035 0 0);
|
||||
omega 2.094395;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
22
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/g
Executable file
22
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/g
Executable file
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport sutherland;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleEnthalpy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
As 1.4792e-06;
|
||||
Ts 116;
|
||||
}
|
||||
}
|
||||
|
||||
dpdt true;
|
||||
|
||||
// ************************************************************************* //
|
28
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/turbulenceProperties
Executable file
28
tutorials/heatTransfer/overBuoyantPimpleFoam/constant/turbulenceProperties
Executable file
@ -0,0 +1,28 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
122
tutorials/heatTransfer/overBuoyantPimpleFoam/system/blockMeshDict
Executable file
122
tutorials/heatTransfer/overBuoyantPimpleFoam/system/blockMeshDict
Executable file
@ -0,0 +1,122 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
( -2.00 0.0 0)
|
||||
( 107.00 0.0 0)
|
||||
( 107.00 45.0 0)
|
||||
( -2.00 45.0 0)
|
||||
( -2.00 0.0 10)
|
||||
( 107.00 0.0 10)
|
||||
( 107.00 45.0 10)
|
||||
( -2.00 45.0 10)
|
||||
|
||||
// movingZone1
|
||||
( 44.5 5.0 0)
|
||||
( 60.5 5.0 0)
|
||||
( 60.5 40.0 0)
|
||||
( 44.5 40.0 0)
|
||||
( 44.5 5.0 10)
|
||||
( 60.5 5.0 10)
|
||||
( 60.5 40.0 10)
|
||||
( 44.5 40.0 10)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (109 55 1) simpleGrading (1 1 1)
|
||||
hex (8 9 10 11 12 13 14 15) movingZone1 (16 48 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
overset1
|
||||
{
|
||||
type overset;
|
||||
faces
|
||||
(
|
||||
( 8 12 15 11)
|
||||
(10 14 13 9)
|
||||
(11 15 14 10)
|
||||
( 9 13 12 8)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
|
||||
// Populated by subsetMesh
|
||||
hole
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
|
||||
frontAndBack1
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
( 8 11 10 9)
|
||||
(12 13 14 15)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
58
tutorials/heatTransfer/overBuoyantPimpleFoam/system/controlDict
Executable file
58
tutorials/heatTransfer/overBuoyantPimpleFoam/system/controlDict
Executable file
@ -0,0 +1,58 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
overset 0;
|
||||
dynamicOversetFvMesh 0;
|
||||
cellVolumeWeight 0;
|
||||
}
|
||||
|
||||
application overBuoyantPimpleDyMFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1.5;
|
||||
|
||||
deltaT 0.001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.05;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
// ************************************************************************* //
|
30
tutorials/heatTransfer/overBuoyantPimpleFoam/system/decomposeParDict
Executable file
30
tutorials/heatTransfer/overBuoyantPimpleFoam/system/decomposeParDict
Executable file
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
|
||||
method scotch;
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 1 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
79
tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSchemes
Executable file
79
tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSchemes
Executable file
@ -0,0 +1,79 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,h) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss linear;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
div(meshPhi,p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
laplacian(diffusivity,cellDisplacement) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
oversetInterpolation
|
||||
{
|
||||
method cellVolumeWeight;
|
||||
//method inverseDistance;
|
||||
|
||||
searchBox (-0.002 0 0)(0.107 0.5 0.01);
|
||||
searchBoxDivisions (200 200 1);
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pcorr ;
|
||||
p ;
|
||||
}
|
||||
|
||||
oversetInterpolationSuppressed
|
||||
{
|
||||
grad(p_rgh);
|
||||
surfaceIntegrate(phiHbyA);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
110
tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSolution
Executable file
110
tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSolution
Executable file
@ -0,0 +1,110 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
cellDisplacement
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
maxIter 100;
|
||||
}
|
||||
|
||||
"(rho|h)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(rho|h)Final"
|
||||
{
|
||||
$rho;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-11;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
pcorr
|
||||
{
|
||||
$p_rghFinal;
|
||||
preconditioner DIC;
|
||||
}
|
||||
|
||||
pcorrFinal
|
||||
{
|
||||
$pcorr;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-6;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor true;
|
||||
correctPhi false;
|
||||
checkMeshCourantNo yes;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
ddtCorr true;
|
||||
pRefCell 0;
|
||||
pRefValue 1e5;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
48
tutorials/heatTransfer/overBuoyantPimpleFoam/system/setFieldsDict
Executable file
48
tutorials/heatTransfer/overBuoyantPimpleFoam/system/setFieldsDict
Executable file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 123
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
// Set cell values
|
||||
// (does zerogradient on boundaries)
|
||||
cellToCell
|
||||
{
|
||||
set c0;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 0
|
||||
);
|
||||
}
|
||||
|
||||
cellToCell
|
||||
{
|
||||
set c1;
|
||||
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue zoneID 1
|
||||
);
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
69
tutorials/heatTransfer/overBuoyantPimpleFoam/system/topoSetDict
Executable file
69
tutorials/heatTransfer/overBuoyantPimpleFoam/system/topoSetDict
Executable file
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1812 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name c0;
|
||||
type cellSet;
|
||||
action new;
|
||||
source regionToCell;
|
||||
insidePoints ((0.0001 0.0001 0.0001));
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c0;
|
||||
}
|
||||
|
||||
{
|
||||
name c1;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
|
||||
// Select box to remove from region 1 and 2
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
set c1;
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action subset;
|
||||
source boxToCell;
|
||||
boxes
|
||||
(
|
||||
(0.0485 0.01 -100)(0.0565 0.035 100)
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
name box;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user