CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

BuoyantBoussinesqPimpleFoam Modification for LES Capability

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 23, 2013, 09:56
Default BuoyantBoussinesqPimpleFoam Modification for LES Capability
  #1
New Member
 
Simon Zhang
Join Date: Dec 2013
Posts: 12
Rep Power: 13
simonsg is on a distinguished road
Hi OpenFOAMers

I am currently simulating a turbulent wall jet and I want to investigate its mixing process using temperature as a tracer. Therefore I used BuoyantBoussinesqPimpleFoam solver, neglecting the buoyancy by set the value in the file /constant/g to (0 0 0) and I got reasonable velocity spreading results (see attachment). Then I changed the code for the capability of LES so as to get better results. However the LES results is quite abnormal that there seems to be no spreading and large velocity remains along the centerline (see attachment). It seems that there is no turbulence in LES simulation!

I succeeded to compile the new solver named myBuoyantBoussinesqPimpleFoam and I changed the files in 0 directory by removing all the wall functions used for original BuoyantBoussinesqPimpleFoam solve. The mesh is checked ok. Since original solver can succeed but new solver cannot, I am afraid that there should be something wrong with the new solver. So I share all the solver code here and it will be greatly appreciated if someone can help me.

creatFields.H
Code:
Info<< "Reading thermophysical properties\n" << endl;

    Info<< "Reading field T\n" << endl;
    volScalarField T
    (
        IOobject
        (
            "T",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    Info<< "Reading field p_rgh\n" << endl;
    volScalarField p_rgh
    (
        IOobject
        (
            "p_rgh",
            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"

    #include "readTransportProperties.H"

    Info<< "Creating turbulence model\n" << endl;
//    autoPtr<incompressible::RASModel> turbulence
//    (
//        incompressible::RASModel::New(U, phi, laminarTransport)
//    );
    autoPtr<incompressible::turbulenceModel> turbulence        //MJC 12-21-2009
    (                                                          //MJC 12-21-2009
        incompressible::turbulenceModel::New                   //MJC 12-21-2009
    (                                                      //MJC 12-21-2009
        U,                                                 //MJC 12-21-2009
        phi,                                               //MJC 12-21-2009
        laminarTransport                                   //MJC 12-21-2009
    )                                                      //MJC 12-21-2009
    );                                                         //MJC 12-21-2009
    // Kinematic density for buoyancy force
    volScalarField rhok
    (
        IOobject
        (
            "rhok",
            runTime.timeName(),
            mesh
        ),
        1.0 - beta*(T - TRef)
    );

    // kinematic turbulent thermal thermal conductivity m2/s
    Info<< "Reading field kappat\n" << endl;
    volScalarField kappat
    (
        IOobject
        (
            "kappat",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

    Info<< "Calculating field g.h\n" << endl;
    volScalarField gh("gh", g & mesh.C());
    surfaceScalarField ghf("ghf", g & mesh.Cf());

    volScalarField p
    (
        IOobject
        (
            "p",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        p_rgh + rhok*gh
    );

    label pRefCell = 0;
    scalar pRefValue = 0.0;
    setRefCell
    (
        p,
        p_rgh,
        mesh.solutionDict().subDict("PIMPLE"),
        pRefCell,
        pRefValue
    );

    if (p_rgh.needReference())
    {
        p += dimensionedScalar
        (
            "p",
            p.dimensions(),
            pRefValue - getRefCellValue(p, pRefCell)
        );
    }
myBuoyantBoussinesqPimpleFoam.C
Code:
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
//#include "RASModel.H"
//add here
#include "turbulenceModel.H"
//stop here
#include "pimpleControl.H"

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

int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "readGravitationalAcceleration.H"
    #include "createFields.H"
    #include "initContinuityErrs.H"
    #include "readTimeControls.H"
    #include "CourantNo.H"
    #include "setInitialDeltaT.H"

    pimpleControl pimple(mesh);

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

    Info<< "\nStarting time loop\n" << endl;

    while (runTime.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        #include "readTimeControls.H"
        #include "CourantNo.H"
        #include "setDeltaT.H"

        // --- Pressure-velocity PIMPLE corrector loop
        while (pimple.loop())
        {
            #include "UEqn.H"
            #include "TEqn.H"

            // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }

            if (pimple.turbCorr())
            {
                turbulence->correct();
            }
        }

        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

    Info<< "End\n" << endl;

    return 0;
}
readTransportProperties.H
Code:
    singlePhaseTransportModel laminarTransport(U, phi);

    // Thermal expansion coefficient [1/K]
    dimensionedScalar beta(laminarTransport.lookup("beta"));

    // Reference temperature [K]
    dimensionedScalar TRef(laminarTransport.lookup("TRef"));

    // Laminar Prandtl number
    dimensionedScalar Pr(laminarTransport.lookup("Pr"));

    // Turbulent Prandtl number
    dimensionedScalar Prt(laminarTransport.lookup("Prt"));
pEqn.H
Code:
{
    volScalarField rAU("rAU", 1.0/UEqn.A());
    surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));

    U = rAU*UEqn.H();

    phi = (fvc::interpolate(U) & mesh.Sf())
        + fvc::ddtPhiCorr(rAU, U, phi);

    surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
    phi -= buoyancyPhi;

    while (pimple.correctNonOrthogonal())
    {
        fvScalarMatrix p_rghEqn
        (
            fvm::laplacian(rAUf, p_rgh) == fvc::div(phi)
        );

        p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));

        p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));

        if (pimple.finalNonOrthogonalIter())
        {
            // Calculate the conservative fluxes
            phi -= 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 -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rAUf);
            U.correctBoundaryConditions();
        }
    }

    #include "continuityErrs.H"

    p = p_rgh + rhok*gh;

    if (p_rgh.needReference())
    {
        p += dimensionedScalar
        (
            "p",
            p.dimensions(),
            pRefValue - getRefCellValue(p, pRefCell)
        );
        p_rgh = p - rhok*gh;
    }
}
TEqn.H
Code:
{
    kappat = turbulence->nut()/Prt;
    kappat.correctBoundaryConditions();

    volScalarField kappaEff("kappaEff", turbulence->nu()/Pr + kappat);

    fvScalarMatrix TEqn
    (
        fvm::ddt(T)
      + fvm::div(phi, T)
      - fvm::laplacian(kappaEff, T)
    );

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

    rhok = 1.0 - beta*(T - TRef);
}
UEqn.H
Code:
    // Solve the momentum equation

    fvVectorMatrix UEqn
    (
        fvm::ddt(U)
      + fvm::div(phi, U)
      + turbulence->divDevReff(U)
    );

    UEqn.relax();

    if (pimple.momentumPredictor())
    {
        solve
        (
            UEqn
         ==
            fvc::reconstruct
            (
                (
                  - ghf*fvc::snGrad(rhok)
                  - fvc::snGrad(p_rgh)
                )*mesh.magSf()
            )
        );
    }
In the Make directory,
files
Code:
myBuoyantBoussinesqPimpleFoam.C

EXE = $(FOAM_USER_APPBIN)/myBuoyantBoussinesqPimpleFoam
options
Code:
EXE_INC = \
    -I../buoyantBoussinesqSimpleFoam \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel/lnInclude \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel

EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lincompressibleTransportModels
Regards,
Simon
Attached Images
File Type: jpg velocityContourRas.jpg (12.4 KB, 90 views)
File Type: jpg velocityContourLes.jpg (11.2 KB, 71 views)
simonsg is offline   Reply With Quote

Old   December 24, 2013, 22:17
Default
  #2
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Hi Simon,

Is your case a 2d case or 3d for RANS/LES? And you said that you have gotten reasonable velocity result with RANS. Is it concluded by comparing it with exp data or just coming out with the outlook? what's more can you share your LES case(0 and system) with us?

Best regards

Sunxing
Sunxing is offline   Reply With Quote

Old   December 25, 2013, 01:21
Default
  #3
New Member
 
Simon Zhang
Join Date: Dec 2013
Posts: 12
Rep Power: 13
simonsg is on a distinguished road
Quote:
Originally Posted by Sunxing View Post
Hi Simon,

Is your case a 2d case or 3d for RANS/LES? And you said that you have gotten reasonable velocity result with RANS. Is it concluded by comparing it with exp data or just coming out with the outlook? what's more can you share your LES case(0 and system) with us?

Best regards

Sunxing
Hi Sunxing,

Thanks for your reply.

The case is a 3d one and the OF version is 2.1.1. Actually I have performed RANS/LES simulations of wall jets in FLUENT in the past and it was concluded that LES was better than RANS. This is the first time for me to use OF and I want to test the solver in OF by simulating the same case.

The solver code posted is created by following guide named buoyantBoussinesqPisoFoam on the openfoamwiki. The computational domain is a block(up: free water surface, down: bottom wall, lelf/right/back: side wall, hole: inlet encircled by back surface, exit: far field outlet). The system files are as following:

controlDict
Code:
application     myBuoyantBoussinesqPimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          0.0004;

writeControl    timeStep;

writeInterval   2500;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;

// maxCo           0.5;

functions
{
    fieldAverage1
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        outputControl   outputTime;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

            T
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }
}
fvSchemes
Code:
ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind;
    div(phi,T)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(R)          Gauss linear;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEff,U) Gauss linear uncorrected;
    laplacian((1|A(U)),p_rgh) Gauss linear uncorrected;
    laplacian(kappaEff,T) Gauss linear uncorrected;
    laplacian(DkEff,k) Gauss linear uncorrected;
    laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
    laplacian(DREff,R) Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p_rgh;
}

// ************************************************************************* //
fvSolution
Code:
solvers
{
    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-8;
        relTol          0.01;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "(U|T|k|epsilon|R)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0.1;
    }

    "(U|T|k|epsilon|R)Final"
    {
        $U;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        "(U|T|k|epsilon|R)" 1;
        "(U|T|k|epsilon|R)Final" 1;
    }
}

// ************************************************************************* //
The constant dir is as following
transportProperties
Code:
transportModel  Newtonian;

// Laminar viscosity
nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06;

// Thermal expansion coefficient
beta            beta [0 0 0 -1 0 0 0] 2.7e-04;

// Reference temperature
TRef            TRef [0 0 0 1 0 0 0] 300;

// Laminar Prandtl number
Pr              Pr [0 0 0 0 0 0 0] 7;

// Turbulent Prandtl number
Prt             Prt [0 0 0 0 0 0 0] 0.85;
LESProperties
Code:
LESModel        oneEqEddy;

delta           cubeRootVol;

printCoeffs     on;

cubeRootVolCoeffs
{
    deltaCoeff      1;
}

PrandtlCoeffs
{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }

    smoothCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }

        maxDeltaRatio   1.1;
    }

    Cdelta          0.158;
}

vanDriestCoeffs
{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }

    smoothCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }

        maxDeltaRatio   1.1;
    }

    Aplus           26;
    Cdelta          0.158;
}

smoothCoeffs
{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }

    maxDeltaRatio   1.1;
}
turbulenceProperties
Code:
simulationType  LESModel;
The 0 dir as following:

p_rgh
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    left
    {
        type            buoyantPressure;
        rho             rhok;
        value           uniform 0;
    }

    right
    {
        type            buoyantPressure;
        rho             rhok;
        value           uniform 0;
    }

    down
    {
        type            buoyantPressure;
        rho             rhok;
        value           uniform 0;
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            buoyantPressure;
        rho             rhok;
        value           uniform 0;
    }

    back
    {
        type            buoyantPressure;
        rho             rhok;
        value           uniform 0;
    }

    exit
    {
        type            fixedValue;
        value           uniform 0;
    }

}
U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    left
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    right
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    down
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            fixedValue;
        value           uniform (2.2288 0 0);
    }

    back
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    exit
    {
        type            zeroGradient;
    }

}
T
Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    left
    {
        type            fixedValue;
        value           uniform 300;
    }

    right
    {
        type            fixedValue;
        value           uniform 300;
    }

    down
    {
        type            zeroGradient;
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            fixedValue;
        value           uniform 305;
    }

    back
    {
        type            zeroGradient;
    }

    exit
    {
        type            zeroGradient;
    }

}
kappat
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    left
    {
        type            fixedValue;
        value           uniform 0;
    }

    right
    {
        type            fixedValue;
        value           uniform 0;
    }

    down
    {
        type            fixedValue;
        value           uniform 0;
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            fixedValue;
        value           uniform 1.18e-5;
    }

    back
    {
        type            fixedValue;
        value           uniform 0;
    }

    exit
    {
        type            zeroGradient;
    }

}
nuSgs
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    left
    {
        type            zeroGradient;
    }

    right
    {
        type            zeroGradient;
    }

    down
    {
        type            zeroGradient;
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            zeroGradient;
    }

    back
    {
        type            zeroGradient;
    }

    exit
    {
        type            zeroGradient;
    }

}
k
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.018628;

boundaryField
{
    left
    {
        type            fixedValue;
        value           uniform 0;
    }

    right
    {
        type            fixedValue;
        value           uniform 0;
    }

    down
    {
        type            fixedValue;
        value           uniform 0;
    }

    up
    {
        type            symmetryPlane;
    }

    hole
    {
        type            fixedValue;
        value           uniform 0.018628;
    }

    back
    {
        type            fixedValue;
        value           uniform 0;
    }

    exit
    {
        type            zeroGradient;
    }

}
simonsg is offline   Reply With Quote

Old   December 25, 2013, 02:13
Default
  #4
Member
 
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 14
Sunxing is on a distinguished road
Hi simon,

How many points in your LES case? Does it satisfy y+<1 in the first level grid along the wall side?

Best,
sunxing
Sunxing is offline   Reply With Quote

Old   December 25, 2013, 05:35
Default
  #5
New Member
 
Simon Zhang
Join Date: Dec 2013
Posts: 12
Rep Power: 13
simonsg is on a distinguished road
Quote:
Originally Posted by Sunxing View Post
Hi simon,

How many points in your LES case? Does it satisfy y+<1 in the first level grid along the wall side?

Best,
sunxing
Hi Sunxing,

I did not do y+ check and the grid is very coarse in my simulation. However it is the same grid in RANS simulation. This is just a trial to test solver and I will try a finer grid for LES in the future.

In your view, what effects will be caused from the large y+ along wall side? As seen in the figure, I do not think it is due to the large y+ because we even do not see any turbulence, like vortex and so on. It just looks like a laminar flow rather than a flow from LES.

Regards,
Simon
simonsg is offline   Reply With Quote

Old   December 28, 2013, 09:05
Default
  #6
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Hi, Simon!

Are these all of the files in your 0 dir? I am recently trying to use buoyantBoussinesqPimpleFoam for LES too. I am not familiar with this solver, so I just try to mix a buoyantBoussinesqPimpleFoam tutorial case and an LES tutorial case together and turn it into my case. In my 0 dir, I have alphat, B, nuTilda and T.org files besides those you showed here. Now I know that nuTilda is not necessary in LES case and B is useless for dynSmagorinsky model which I use. I also find out that T.org is a backup of T, so the content of T.org can be the same as T (please correct me if I am wrong.) My question is: is alphat not needed at all?

Regards,
Peter

Last edited by palmerlee; December 29, 2013 at 09:52.
palmerlee is offline   Reply With Quote

Old   December 29, 2013, 09:59
Default
  #7
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Also, how to set up k for LES? I know that for RANS, k can be calculated using equation k=1.5*(u_avg*I)^2. Is it the same for LES?
Quote:
hole
{
type fixedValue;
value uniform 0.018628;
}
palmerlee is offline   Reply With Quote

Old   December 29, 2013, 11:01
Default
  #8
New Member
 
Simon Zhang
Join Date: Dec 2013
Posts: 12
Rep Power: 13
simonsg is on a distinguished road
Quote:
Originally Posted by palmerlee View Post
Hi, Simon!

Are these all of the files in your 0 dir? I am recently trying to use buoyantBoussinesqPimpleFoam for LES too. I am not familiar with this solver, so I just try to mix a buoyantBoussinesqPimpleFoam tutorial case and an LES tutorial case together and turn it into my case. In my 0 dir, I have alphat, B, nuTilda and T.org files besides those you showed here. Now I know that nuTilda is not necessary in LES case and B is useless for dynSmagorinsky model which I use. I also find out that T.org is a backup of T, so the content of T.org can be the same as T (please correct me if I am wrong.) My question is: is alphat not needed at all?

Regards,
Peter
Hi Peter,

Are you using OF version 2.2.x? Because alphat is needed in this version. I am using OF version 2.1.1 and kappat is required instead of alphat.

For k, I think the estimated k is independent of what solver used. So I estimated k by the same equation described in chapter 2 in the tutorial.

Regards,
Simon
simonsg is offline   Reply With Quote

Old   December 29, 2013, 21:47
Default
  #9
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Hi, Simon!

Thank you for your reply! By "chapter 2 in the tutorial", do you mean User Guide, where I didn't find the equation?

I agree with you on that k is independent of what solver used. But it is not the same thing in RANS and in LES if I understand correctly. In LES, k is subgrid-scale kinetic energy. So I guess it is estimated by a different equation from that in RANS. That's only my option.

Also, I came up with another question. How to calculate kappat on inlet boundary?
Quote:
hole
{
type fixedValue;
value uniform 1.18e-5;
}
Regards,
Peter
palmerlee is offline   Reply With Quote

Old   December 29, 2013, 22:54
Default
  #10
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 15
palmerlee is on a distinguished road
Quote:
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,T) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
As far as I know, Gauss upwind is one order scheme and LES requires at least two order. Hope it helps.
palmerlee is offline   Reply With Quote

Old   December 30, 2013, 01:55
Default
  #11
New Member
 
Simon Zhang
Join Date: Dec 2013
Posts: 12
Rep Power: 13
simonsg is on a distinguished road
Quote:
Originally Posted by palmerlee View Post
Hi, Simon!

Thank you for your reply! By "chapter 2 in the tutorial", do you mean User Guide, where I didn't find the equation?

I agree with you on that k is independent of what solver used. But it is not the same thing in RANS and in LES if I understand correctly. In LES, k is subgrid-scale kinetic energy. So I guess it is estimated by a different equation from that in RANS. That's only my option.

Also, I came up with another question. How to calculate kappat on inlet boundary?


Regards,
Peter
Hi Peter,

Thanks for your comments. Now I have changed the fvscheme and let's see what will happen.

For k, I used the equations in section 2.1.8.1 of official user guide. In my simulation, the inlet k is believed not to affect the flow field much and thus I used the same equation as in RANS.

For kappat, I have to say sorry because I do not understand it very clearly either. Please see thread http://www.cfd-online.com/Forums/ope...am-kappat.html for help.

Regards,
Simon
simonsg is offline   Reply With Quote

Old   July 20, 2017, 12:31
Default
  #12
New Member
 
Yangmo Zhu
Join Date: Jan 2016
Posts: 3
Rep Power: 10
zym604 is on a distinguished road
Which version of Openfoam did you use?

In the old version, RAS is used in buoyantBoussinesqPimpleFoam by default:
https://github.com/OpenFOAM/OpenFOAM...createFields.H
Code:
Info<< "Creating turbulence model\n" << endl;
    autoPtr<incompressible::RASModel> turbulence
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );
In the latest version of Openfoam 4.1 LES function is enabled.
https://github.com/OpenFOAM/OpenFOAM...createFields.H
Code:
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::turbulenceModel> turbulence
(
    incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
zym604 is offline   Reply With Quote

Reply

Tags
les, modification, solver


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Modification of a mesh during runtime Scofield OpenFOAM Meshing & Mesh Conversion 6 October 15, 2013 13:49
Runtime modification of a volScalarField Scofield OpenFOAM Programming & Development 4 October 1, 2013 09:31
Fluent is not accepting Modification in Material properties er.mkumar FLUENT 0 September 1, 2012 15:24
(Dynamic) Mesh Modification Mr. Joe Fluent UDF and Scheme Programming 3 March 24, 2010 21:31
compressible modification of nearwall turbulence Quain Tchew Main CFD Forum 0 March 4, 2002 02:29


All times are GMT -4. The time now is 14:11.