applications/test/PisoFoam: test version of pisoFoam using new templated turbulence library

This commit is contained in:
Henry
2013-07-28 18:09:54 +01:00
parent adcb3b7dfc
commit def7148136
3 changed files with 19 additions and 55 deletions

View File

@ -1,13 +1,13 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModel/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lincompressibleTurbulenceModel \ -lturbulenceModels \
-lincompressibleRASModels \ -lincompressibleTurbulenceModels \
-lincompressibleLESModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools

View 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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,12 +33,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "turbulenceModel.H" #include "IncompressibleTurbulenceModel.H"
#include "LduMatrix.H"
#include "diagTensorField.H"
typedef LduMatrix<vector, scalar, scalar> lduVectorMatrix;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -73,50 +68,12 @@ int main(int argc, char *argv[])
+ turbulence->divDevReff(U) + turbulence->divDevReff(U)
); );
//UEqn.relax(); UEqn.relax();
fvVectorMatrix UEqnp(UEqn == -fvc::grad(p)); if (momentumPredictor)
lduVectorMatrix U3Eqnp(mesh);
U3Eqnp.diag() = UEqnp.diag();
U3Eqnp.upper() = UEqnp.upper();
U3Eqnp.lower() = UEqnp.lower();
U3Eqnp.source() = UEqnp.source();
UEqnp.addBoundaryDiag(U3Eqnp.diag(), 0);
UEqnp.addBoundarySource(U3Eqnp.source(), false);
U3Eqnp.interfaces() = U.boundaryField().interfaces();
U3Eqnp.interfacesUpper() = UEqnp.boundaryCoeffs().component(0);
U3Eqnp.interfacesLower() = UEqnp.internalCoeffs().component(0);
autoPtr<lduVectorMatrix::solver> U3EqnpSolver =
lduVectorMatrix::solver::New
(
U.name(),
U3Eqnp,
dictionary
(
IStringStream
(
"{"
" /*solver SmoothSolver;*/"
" smoother GaussSeidel;"
" solver PBiCCCG;"
" preconditioner none;"
" tolerance (1e-7 1e-7 1);"
" relTol (0 0 0);"
"}"
)()
)
);
//for (int i=0; i<3; i++)
{ {
U3EqnpSolver->solve(U).print(Info); solve(UEqn == -fvc::grad(p));
U.correctBoundaryConditions();
} }
//solve(UEqnp);
// --- PISO loop // --- PISO loop
@ -173,6 +130,7 @@ int main(int argc, char *argv[])
} }
} }
laminarTransport.correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -26,7 +26,7 @@
mesh mesh
); );
# include "createPhi.H" #include "createPhi.H"
label pRefCell = 0; label pRefCell = 0;
@ -36,7 +36,13 @@
singlePhaseTransportModel laminarTransport(U, phi); singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::turbulenceModel> turbulence autoPtr<IncompressibleTurbulenceModel<transportModel> >
turbulence
( (
incompressible::turbulenceModel::New(U, phi, laminarTransport) IncompressibleTurbulenceModel<transportModel>::New
(
U,
phi,
laminarTransport
)
); );