CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

buoyantBoussinesqPisoFoam modification for LES capability

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   January 2, 2014, 03:53
Default buoyantBoussinesqPisoFoam modification for LES capability
Thangam Natarajan
Join Date: Dec 2010
Location: Perth
Posts: 63
Rep Power: 8
Thangam is on a distinguished road
I have tried to modify the buoyantBoussinesqPisoFoam for the LES capability solver which was available in a 1.6.x git repository and followed the instructions on the openfoam wiki site ( to have the LES capability.

Though the code compiled without any warnings, when I tried to run the case with this solver, I got the error :
keyword laplacian((1|A(U)),p) is undefined in dictionary 

file: /home/thangam/Documents/LES_dec23/system/fvSchemes::laplacianSchemes from line 48 to line 56.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 400.

FOAM exiting
The solver was reading laplacian((1|A(U)),p) though I had laplacian((1|A(U)),p_rgh).

Though I had no clue why this was happening, I tried to edit the pEqn.H to its present form which is :

    volScalarField rUA("rUA", 1.0/UEqn.A());
    surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));

    U = rUA*UEqn.H();

    surfaceScalarField phiU
        (fvc::interpolate(U) & mesh.Sf())
      + fvc::ddtPhiCorr(rUA, U, phi)

    phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());

    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
        fvScalarMatrix p_rghEqn
            fvm::laplacian(rUAf, p_rgh) == fvc::div(phi)

        if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
            p_rghEqn.solve(mesh.solver( + "Final"));

        if (nonOrth == nNonOrthCorr)
            phi -= p_rghEqn.flux();

    U += rUA*fvc::reconstruct((phi - phiU)/rUAf);

    #include "continuityErrs.H"

    p = p_rgh + rhok*gh;

    if (p_rgh.needReference())
        p += dimensionedScalar
            pRefValue - getRefCellValue(p, pRefCell)
        p_rgh = p - rhok*gh;
The issue is this compiles and runs successfully but it is solving for p_rgh twice(see below for the output). Not clear where im going wrong with the code! Any advise would be appreciated!

Time = 0.01143

Courant Number mean: 0.00258195 max: 0.975465
DILUPBiCG:  Solving for Ux, Initial residual = 0.000280691, Final residual = 4.0324e-07, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 7.18944e-06, Final residual = 6.81315e-09, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.000280614, Final residual = 3.93437e-07, No Iterations 1
DILUPBiCG:  Solving for T, Initial residual = 3.25608e-05, Final residual = 3.01528e-09, No Iterations 1
DICPCG:  Solving for p_rgh, Initial residual = 0.00346845, Final residual = 3.36784e-05, No Iterations 68
time step continuity errors : sum local = 5.57448e-11, global = 6.73984e-13, cumulative = -1.04705e-10
DICPCG:  Solving for p_rgh, Initial residual = 0.000499402, Final residual = 9.95821e-09, No Iterations 826
time step continuity errors : sum local = 1.64757e-14, global = -5.49e-16, cumulative = -1.04706e-10
bounding k, min: -1.19509 max: 11.2655 average: 0.0156095
ExecutionTime = 53260.1 s  ClockTime = 53494 s
Thangam is offline   Reply With Quote

Old   January 2, 2014, 04:05
Senior Member
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 14
Bernhard is on a distinguished road
I would like to encourage you to read about the PISO algorithm. You will notice the importance of solving the pressure-corrector equation multiple times. Also, I think I explained this in another topic to you as well, with a reference to the release notes of OF 1.7, where for these solvers p has been changed to p_rgh.

It does not makes sense to change p to p_rgh in your pEqn.H file, because it is misleading and inconsistent with all other solvers using p or p_rgh. If I were you, I would rather change this in system/fvSchemes, which is actually what your error message clearly indicates.
Bernhard is offline   Reply With Quote


buoyantboussinsqpisofoam, les

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
BuoyantBoussinesqPimpleFoam Modification for LES Capability simonsg OpenFOAM 10 December 30, 2013 01:55
Modification of a mesh during runtime Scofield OpenFOAM Meshing & Mesh Conversion 6 October 15, 2013 12:49
Runtime modification of a volScalarField Scofield OpenFOAM Programming & Development 4 October 1, 2013 08:31
(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 11:32.