Creation of OpenFOAM-dev repository 15/04/2008

This commit is contained in:
OpenFOAM-admin
2008-04-15 18:56:58 +01:00
commit 3170c7c0c9
9896 changed files with 4016171 additions and 0 deletions

View File

@ -0,0 +1,74 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
div(rho*phi,U) Gauss linear;
div(phi,gamma) Gauss <>;
div(phirb,gamma) Gauss <>;
div(phi,k) Gauss <>;
div(phi,epsilon) Gauss <>;
div(phi,R) Gauss <>;
div(phi,nuTilda) Gauss <>;
div(R) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
pd;
pcorr;
gamma;
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
pcorr ICCG 1e-10 0;
pd ICCG 1e-10 0;
pdFinal ICCG 1e-08 0;
U BICCG 1e-06 0;
k BICCG 1e-08 0;
epsilon BICCG 1e-08 0;
R BICCG 1e-08 0;
nuTilda BICCG 1e-08 0;
}
PISO
{
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 0;
nGammaCorr 1;
nGammaSubCycles 4;
cGamma 2;
}
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
include "$FOAMX_CONFIG/dictionaries/fvSchemes/fvSchemes.cfg";
entries
{
include "$FOAMX_CONFIG/dictionaries/fvSchemes/ddt/transient.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/grad/defaultOnly.cfg";
include "fvSchemes/divSchemes.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/laplacian/defaultOnly.cfg";
include "fvSchemes/interpolationSchemes.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/snGrad/defaultOnly.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/flux/pdPcorrGamma.cfg"
;
}
default
{
include "defaults/system/fvSchemes";
}
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
divSchemes
{
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/schemes.cfg";
entries
{
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/rhoPhiU.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phiGamma.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phirbGamma.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phik.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phiEpsilon.cfg"
;
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phiR.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/R.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/phiNuTilda.cfg"
include "$FOAMX_CONFIG/dictionaries/fvSchemes/div/nuEffGradUT.cfg";
}
}
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
interpolationSchemes
{
include "$FOAMX_CONFIG/dictionaries/fvSchemes/interpolation/schemes.cfg";
entries
{
include "$FOAMX_CONFIG/dictionaries/fvSchemes/interpolation/default.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSchemes/interpolation/HbyA.cfg";
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
include "$FOAMX_CONFIG/dictionaries/fvSolution/fvSolution.cfg";
entries
{
solvers
{
type dictionary;
entries
{
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/pcorr.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/pd.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/pdFinal.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/U.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/k.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/epsilon.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/R.cfg";
include "$FOAMX_CONFIG/dictionaries/fvSolution/solvers/nuTilda.cfg";
}
}
PISO
{
type dictionary;
entries
{
include "$FOAMX_CONFIG/entries/label/nCorrectors.cfg";
include "$FOAMX_CONFIG/entries/label/nNonOrthogonalCorrectors.cfg";
include "$FOAMX_CONFIG/entries/label/nGammaCorr.cfg";
include "$FOAMX_CONFIG/entries/label/nGammaSubCycles.cfg";
include "$FOAMX_CONFIG/entries/scalar/cGamma.cfg";
}
}
}
default
{
include "defaults/system/fvSolution";
}
// ************************************************************************* //

View File

@ -0,0 +1,94 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
description "Free surface-capturing unsteady RAS two-phase flow code";
dictionaries
{
include "$FOAMX_CONFIG/dictionaries/controlDict/controlDictAdjustTimeStep.cfg";
fvSchemes;
fvSolution;
include "$FOAMX_CONFIG/dictionaries/transportProperties/twoPhaseTransportProperties.cfg";
include "$FOAMX_CONFIG/dictionaries/environmentalProperties/environmentalPropertiesg.cfg";
include "$FOAMX_CONFIG/dictionaries/turbulenceProperties/turbulenceModelsIncompressible.cfg";
}
fields
{
include "$FOAMX_CONFIG/entries/geometricFields/pd.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/U.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/gamma.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/k.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/epsilon.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/Rkinematic.cfg";
include "$FOAMX_CONFIG/entries/geometricFields/nuTilda.cfg";
}
patchPhysicalTypes
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/patches.cfg";
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/wallFunctions/patches.cfg";
wallContactAngle
{
description "Wall boundary condition with specified contact-angle";
parentType wall;
}
wallFunctionsContactAngle
{
description "Wall-functions boundary condition with specified contact-angle";
parentType wallFunctions;
}
}
patchFieldsPhysicalTypes
{
gamma
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/gamma.cfg";
wallContactAngle gammaContactAngle;
wallFunctionsContactAngle gammaContactAngle;
}
U
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/U.cfg";
}
pd
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/pd.cfg";
}
k
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/k.cfg";
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/wallFunctions/k.cfg";
}
epsilon
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/epsilon.cfg";
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/wallFunctions/epsilon.cfg";
}
R
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/R.cfg";
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/wallFunctions/R.cfg";
}
nuTilda
{
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/standard/nuTilda.cfg";
include "$FOAMX_CONFIG/entries/patchPhysicalTypes/wallFunctions/nuTilda.cfg";
}
}
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
rasInterFoam.C
EXE = $(FOAM_APPBIN)/rasInterFoam

View File

@ -0,0 +1,13 @@
EXE_INC = \
-I../interFoam \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-linterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModels \
-lfiniteVolume

View File

@ -0,0 +1,29 @@
surfaceScalarField muf =
twoPhaseProperties.muf()
+ fvc::interpolate(rho*turbulence->nut());
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muf, U)
- (fvc::grad(U) & fvc::grad(muf))
//- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
);
if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
- ghf*fvc::snGrad(rho)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);
}

View File

@ -0,0 +1,101 @@
Info<< "Reading field pd\n" << endl;
volScalarField pd
(
IOobject
(
"pd",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field gamma\n" << endl;
volScalarField gamma
(
IOobject
(
"gamma",
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"
Info<< "Reading transportProperties\n" << endl;
twoPhaseMixture twoPhaseProperties(U, phi, "gamma");
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT
),
gamma*rho1 + (scalar(1) - gamma)*rho2,
gamma.boundaryField().types()
);
rho.oldTime();
// Mass flux
// Initialisation does not matter because rhoPhi is reset after the
// gamma solution before it is used in the U equation.
surfaceScalarField rhoPhi
(
IOobject
(
"rho*phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho1*phi
);
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
Info<< "Calculating field g.h\n" << endl;
surfaceScalarField ghf("gh", g & mesh.Cf());
// Construct interface from gamma distribution
interfaceProperties interface(gamma, U, twoPhaseProperties);
// Construct LES model
autoPtr<turbulenceModel> turbulence
(
turbulenceModel::New(U, phi, twoPhaseProperties)
);

View File

@ -0,0 +1,100 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2007 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
lesInterFoam
Description
Solver for 2 incompressible fluids capturing the interface. Turbulence is
modelled using a runtime selectable incompressible RAS model.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
#include "incompressible/turbulenceModel/turbulenceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "readEnvironmentalProperties.H"
# include "readPISOControls.H"
# include "initContinuityErrs.H"
# include "createFields.H"
# include "readTimeControls.H"
# include "correctPhi.H"
# include "CourantNo.H"
# include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
# include "readPISOControls.H"
# include "readTimeControls.H"
# include "CourantNo.H"
# include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "gammaEqnSubCycle.H"
# include "UEqn.H"
// --- PISO loop
for (int corr=0; corr < nCorr; corr++)
{
# include "pEqn.H"
}
# include "continuityErrs.H"
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return(0);
}
// ************************************************************************* //