Skip to content

Commit

Permalink
ENH: Merging some updates from the internal development line
Browse files Browse the repository at this point in the history
  • Loading branch information
andy committed Mar 7, 2013
1 parent a3c0017 commit a9d0f04
Show file tree
Hide file tree
Showing 1,442 changed files with 12,308 additions and 6,251 deletions.
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -116,7 +116,7 @@ void PDRkEpsilon::correct()
}

tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();

// Update espsilon and G at the wall
Expand Down
Expand Up @@ -15,15 +15,15 @@
}

label nSpecie = Y.size();
PtrList<gasThermoPhysics> specieData(Y.size());
PtrList<gasHThermoPhysics> specieData(Y.size());
forAll(specieData, i)
{
specieData.set
(
i,
new gasThermoPhysics
new gasHThermoPhysics
(
dynamic_cast<const reactingMixture<gasThermoPhysics>&>
dynamic_cast<const reactingMixture<gasHThermoPhysics>&>
(thermo).speciesData()[i]
)
);
Expand Down
Expand Up @@ -4,11 +4,13 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude

EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleTransportModels
-lincompressibleTransportModels \
-lradiationModels
Expand Up @@ -9,10 +9,14 @@
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(kappaEff, T)
==
radiation->ST(rhoCpRef, T)
);

TEqn.relax();
TEqn.solve();

radiation->correct();

rhok = 1.0 - beta*(T - TRef);
}
Expand Up @@ -49,6 +49,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "pimpleControl.H"
#include "radiationModel.H"

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

Expand All @@ -59,6 +60,7 @@ int main(int argc, char *argv[])
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
Expand Down
@@ -1,4 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
Expand Down
@@ -1,6 +1,7 @@
EXE_INC = \
-I.. \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
Expand Down
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -35,7 +35,7 @@ Description
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "barotropicCompressibilityModel.H"
#include "twoPhaseMixture.H"
#include "incompressibleTwoPhaseMixture.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"

Expand Down
Expand Up @@ -4,8 +4,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}

Expand Down Expand Up @@ -57,8 +57,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;

p.correctBoundaryConditions();
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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -34,7 +34,7 @@ Description

#include "fvCFD.H"
#include "barotropicCompressibilityModel.H"
#include "twoPhaseMixture.H"
#include "incompressibleTwoPhaseMixture.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"

Expand Down
@@ -1,5 +1,5 @@
{
volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
volScalarField thermoRho = psi*p + gamma2*rhol0;

dimensionedScalar totalMass = fvc::domainIntegrate(rho);

Expand Down
8 changes: 5 additions & 3 deletions applications/solvers/multiphase/cavitatingFoam/createFields.H
Expand Up @@ -44,11 +44,13 @@

Info<< "Reading transportProperties\n" << endl;

twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv, "gamma");

volScalarField& gamma(twoPhaseProperties.alpha1());
gamma.oldTime();

volScalarField& gamma2(twoPhaseProperties.alpha2());

Info<< "Creating compressibilityModel\n" << endl;
autoPtr<barotropicCompressibilityModel> psiModel =
barotropicCompressibilityModel::New
Expand All @@ -62,8 +64,8 @@
rho == max
(
psi*p
+ (1.0 - gamma)*rhol0
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ gamma2*rhol0
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);

Expand Down
1 change: 1 addition & 0 deletions applications/solvers/multiphase/cavitatingFoam/gammaPsi.H
@@ -1,5 +1,6 @@
{
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
gamma2 = 1.0 - gamma;

Info<< "max-min gamma: " << max(gamma).value()
<< " " << min(gamma).value() << endl;
Expand Down
12 changes: 6 additions & 6 deletions applications/solvers/multiphase/cavitatingFoam/pEqn.H
Expand Up @@ -4,8 +4,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}

Expand Down Expand Up @@ -49,8 +49,8 @@
rho == max
(
psi*p
+ (1.0 - gamma)*rhol0
+ ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ gamma2*rhol0
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);

Expand All @@ -59,8 +59,8 @@
p =
(
rho
- (1.0 - gamma)*rhol0
- ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
- gamma2*rhol0
- ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;

p.correctBoundaryConditions();
Expand Down
Expand Up @@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x

wclean libso phaseEquationsOfState
wclean libso twoPhaseMixtureThermo
wclean
wclean compressibleInterDyMFoam

Expand Down
Expand Up @@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
set -x

wmake libso phaseEquationsOfState
wmake libso twoPhaseMixtureThermo
wmake
wmake compressibleInterDyMFoam

Expand Down
@@ -1,4 +1,3 @@
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
compressibleInterFoam.C

EXE = $(FOAM_APPBIN)/compressibleInterFoam
21 changes: 11 additions & 10 deletions applications/solvers/multiphase/compressibleInterFoam/Make/options
@@ -1,17 +1,18 @@
EXE_INC = \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-ItwoPhaseMixtureThermo \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-IphaseEquationsOfState/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
-ltwoPhaseMixtureThermo \
-lfluidThermophysicalModels \
-lspecie \
-ltwoPhaseProperties \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lphaseEquationsOfState \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume
22 changes: 10 additions & 12 deletions applications/solvers/multiphase/compressibleInterFoam/TEqn.H
@@ -1,20 +1,18 @@
{
volScalarField kByCv
(
"kByCv",
(alpha1*k1/Cv1 + alpha2*k2/Cv2)
+ (alpha1*rho1 + alpha2*rho2)*turbulence->nut()
);

solve
(
fvm::ddt(rho, T)
+ fvm::div(rhoPhi, T)
- fvm::laplacian(kByCv, T)
+ p*fvc::div(phi)*(alpha1/Cv1 + alpha2/Cv2)
- fvm::laplacian(twoPhaseProperties.alphaEff(turbulence->mut()), T)
+ (
p*fvc::div(phi)
+ fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
)
*(
alpha1/twoPhaseProperties.thermo1().Cv()
+ alpha2/twoPhaseProperties.thermo2().Cv()
)
);

// Update compressibilities
psi1 = eos1->psi(p, T);
psi2 = eos2->psi(p, T);
twoPhaseProperties.correct();
}
4 changes: 3 additions & 1 deletion applications/solvers/multiphase/compressibleInterFoam/UEqn.H
Expand Up @@ -2,7 +2,7 @@
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
+ turbulence->divDevRhoReff(rho, U)
+ turbulence->divDevRhoReff(U)
);

UEqn.relax();
Expand All @@ -22,4 +22,6 @@
) * mesh.magSf()
)
);

K = 0.5*magSqr(U);
}
@@ -1,24 +1,25 @@
EXE_INC = \
-I.. \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I../twoPhaseMixtureThermo \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I../phaseEquationsOfState/lnInclude \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
-ltwoPhaseMixtureThermo \
-lfluidThermophysicalModels \
-lspecie \
-ltwoPhaseProperties \
-linterfaceProperties \
-ltwoPhaseInterfaceProperties \
-lincompressibleTransportModels \
-lphaseEquationsOfState \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lfiniteVolume \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lcompressibleLESModels \
-ldynamicMesh \
-lmeshTools \
-ldynamicFvMesh
-ldynamicFvMesh \
-lfiniteVolume
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -43,7 +43,7 @@ Description
#include "subCycle.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
#include "phaseEquationOfState.H"
#include "twoPhaseMixtureThermo.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"

Expand Down

0 comments on commit a9d0f04

Please sign in to comment.