Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry authored and Henry committed Dec 14, 2012
2 parents e91d307 + 4a4c06f commit fa2c23b
Show file tree
Hide file tree
Showing 78 changed files with 157,026 additions and 107 deletions.
Expand Up @@ -39,46 +39,6 @@

Info<< "\nReading freeSurfaceProperties\n" << endl;

IOdictionary freeSurfaceProperties
(
IOobject
(
"freeSurfaceProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

word freeSurfacePatch(freeSurfaceProperties.lookup("freeSurfacePatch"));
label freeSurfacePatchI = mesh.boundaryMesh().findPatchID(freeSurfacePatch);
if (freeSurfacePatchI < 0)
{
FatalErrorIn(args.executable())
<< "Patch " << freeSurfacePatch << " not found. "
<< "Available patches are:" << mesh.boundaryMesh().names()
<< exit(FatalError);
}

Info<< "Creating field refLevel\n" << endl;
volVectorField refLevel
(
IOobject
(
"refLevel",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedVector("zero", dimLength, vector::zero)
);

refLevel.boundaryField()[freeSurfacePatchI]
== mesh.C().boundaryField()[freeSurfacePatchI];

Info<< "Creating field zeta\n" << endl;
volVectorField zeta
(
Expand Down Expand Up @@ -109,8 +69,7 @@
);

// Force p_gh to be consistent with p
// Height is made relative to field 'refLevel'
p_gh = p - (g & (mesh.C() + zeta - refLevel));
p_gh = p - (g & mesh.C());


label p_ghRefCell = 0;
Expand Down
Expand Up @@ -37,7 +37,7 @@ while (pimple.correctNonOrthogonal())
// Explicitly relax pressure for momentum corrector
p_gh.relax();

p = p_gh + (g & (mesh.C() + zeta - refLevel));
p = p_gh + (g & mesh.C());

U -= rAU*fvc::grad(p_gh);
U.correctBoundaryConditions();
Expand Down
1 change: 1 addition & 0 deletions applications/solvers/multiphase/interFoam/Allwclean
Expand Up @@ -7,5 +7,6 @@ wclean interDyMFoam
wclean MRFInterFoam
wclean porousInterFoam
wclean LTSInterFoam
wclean interMixingFoam

# ----------------------------------------------------------------- end-of-file
1 change: 1 addition & 0 deletions applications/solvers/multiphase/interFoam/Allwmake
Expand Up @@ -7,5 +7,6 @@ wmake interDyMFoam
wmake MRFInterFoam
wmake porousInterFoam
wmake LTSInterFoam
wmake interMixingFoam

# ----------------------------------------------------------------- end-of-file
Expand Up @@ -45,6 +45,7 @@ Description
#include "turbulenceModel.H"
#include "fvcSmooth.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
Expand Up @@ -4,12 +4,14 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools
Expand Up @@ -44,6 +44,7 @@ Description
#include "turbulenceModel.H"
#include "MRFZones.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
Expand Up @@ -4,12 +4,14 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools
Expand Up @@ -12,10 +12,13 @@
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
==
sources(rho, U)
);
mrfZones.addCoriolis(rho, UEqn);

mrfZones.addCoriolis(rho, UEqn);
UEqn.relax();
sources.constrain(UEqn);

if (pimple.momentumPredictor())
{
Expand Down
Expand Up @@ -42,6 +42,7 @@

U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
sources.correct(U);
}
}

Expand Down
6 changes: 4 additions & 2 deletions applications/solvers/multiphase/interFoam/Make/options
Expand Up @@ -3,12 +3,14 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools
3 changes: 3 additions & 0 deletions applications/solvers/multiphase/interFoam/UEqn.H
Expand Up @@ -3,9 +3,12 @@
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
+ turbulence->divDevRhoReff(rho, U)
==
sources(rho, U)
);

UEqn.relax();
sources.constrain(UEqn);

if (pimple.momentumPredictor())
{
Expand Down
2 changes: 2 additions & 0 deletions applications/solvers/multiphase/interFoam/createFields.H
Expand Up @@ -131,3 +131,5 @@
);
p_rgh = p - rho*gh;
}

IObasicSourceList sources(mesh);
Expand Up @@ -40,6 +40,7 @@ Description
#include "twoPhaseMixture.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
Expand Up @@ -48,6 +48,7 @@

U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
sources.correct(U);
}
}

Expand Down
1 change: 1 addition & 0 deletions applications/solvers/multiphase/interFoam/interFoam.C
Expand Up @@ -45,6 +45,7 @@ Description
#include "turbulenceModel.H"
#include "interpolationTable.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
@@ -1,19 +1,21 @@
INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam

EXE_INC = \
-I$(INTERFOAM) \
-I.. \
-IincompressibleThreePhaseMixture \
-IthreePhaseInterfaceProperties \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/meshTools/lnInclude

EXE_LIBS = \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume
-lfiniteVolume \
-lmeshTools
Expand Up @@ -165,3 +165,5 @@
);
p_rgh = p - rho*gh;
}

IObasicSourceList sources(mesh);
Expand Up @@ -37,6 +37,7 @@ Description
#include "threePhaseInterfaceProperties.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
1 change: 1 addition & 0 deletions applications/solvers/multiphase/interFoam/pEqn.H
Expand Up @@ -42,6 +42,7 @@

U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
sources.correct(U);
}
}

Expand Down
Expand Up @@ -16,11 +16,13 @@
- fvm::laplacian(muEff, U)
- (fvc::grad(U) & fvc::grad(muEff))
//- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
==
sources(rho, U)
);

UEqn.relax();

pZones.addResistance(UEqn);
sources.constrain(UEqn);

if (pimple.momentumPredictor())
{
Expand Down
Expand Up @@ -46,6 +46,7 @@ Description
#include "turbulenceModel.H"
#include "porousZones.H"
#include "pimpleControl.H"
#include "IObasicSourceList.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Expand Down
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -238,6 +238,22 @@ int main(int argc, char *argv[])
dict.lookup("constructFrom")
);

// Any merging of small edges
const scalar mergeTol(dict.lookupOrDefault<scalar>("mergeTol", 1e-4));

Info<< "Extruding from " << ExtrudeModeNames[mode]
<< " using model " << model().type() << endl;

if (mergeTol > 0)
{
Info<< "Collapsing edges < " << mergeTol << " of bounding box" << endl;
}
else
{
Info<< "Not collapsing any edges after extrusion" << endl;
}
Info<< endl;


// Generated mesh (one of either)
autoPtr<fvMesh> meshFromMesh;
Expand Down Expand Up @@ -666,7 +682,7 @@ int main(int argc, char *argv[])

const boundBox& bb = mesh.bounds();
const vector span = bb.span();
const scalar mergeDim = 1E-4 * bb.minDim();
const scalar mergeDim = mergeTol * bb.minDim();

Info<< "Mesh bounding box : " << bb << nl
<< " with span : " << span << nl
Expand All @@ -677,6 +693,7 @@ int main(int argc, char *argv[])
// Collapse edges
// ~~~~~~~~~~~~~~

if (mergeDim > 0)
{
Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;

Expand Down
Expand Up @@ -87,4 +87,8 @@ sigmaRadialCoeffs
// degree wedges.
mergeFaces false; //true;

// Merge small edges. Fraction of bounding box.
mergeTol 0;


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

0 comments on commit fa2c23b

Please sign in to comment.