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

localEuler in rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By praveen
  • 1 Post By laurensvd

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 3, 2011, 05:49
Default localEuler in rhoCentralFoam
  #1
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
In order to do steady state calculations with rhoCentralFoam, I am trying to use localEuler ddt scheme. From what I understood, this requires specifying rDeltaT as a volScalarField. I have made following additions to rhoCentralFoam in version 2.0.0

createField.H:
Code:
volScalarField rDeltaT
(
    IOobject
    (
        "rDeltaT",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh,
    1/dimensionedScalar("maxDeltaT", dimTime, GREAT),
    zeroGradientFvPatchScalarField::typeName
);
setrDeltaT.H:
Code:
{       
        
    // Set the reciprocal time-step from the local Courant number
    rDeltaT.dimensionedInternalField() = max
    (   
        1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
        fvc::surfaceSum(amaxSf)().dimensionedInternalField()
       /(maxCo*mesh.V())
    );  

    // Update tho boundary values of the reciprocal time-step
    rDeltaT.correctBoundaryConditions();
        
}
rhoCentralFoam.C:
Code:
        surfaceScalarField aphiv_pos(phiv_pos - aSf);
        surfaceScalarField aphiv_neg(phiv_neg + aSf);

        // Reuse amaxSf for the maximum positive and negative fluxes
        // estimated by the central scheme
        amaxSf = max(mag(aphiv_pos), mag(aphiv_neg));

        #include "compressibleCourantNo.H"
        #include "readTimeControls.H"
        //#include "setDeltaT.H"
        #include "setrDeltaT.H"

        runTime++;

        Info<< "Time = " << runTime.timeName() << nl << endl;
Then in system/fvSchemes, I specify


Code:
ddtSchemes
{
    default         localEuler  rDeltaT;
}
The code compiles and runs but blows up after some iterations. With the usual rhoCentralFoam it runs fine, but it takes forever to converge. I use a maxCo of 0.1 and it is a subsonic flow. Limiters are also used (Gamma scheme). I could not find anything on localEuler in the forums so I want to know if anybody has succeeded in using it, or if you can find any mistake in my modifications.
praveen is offline   Reply With Quote

 


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
NACA0012 with rhoCentralFoam praveen OpenFOAM 17 July 5, 2018 05:49
rhoCentralFoam with totalPressure/totalTemperature at inlet of subsonic channel deepblue17 OpenFOAM Running, Solving & CFD 5 February 11, 2013 02:42
Hypersonic flow rhoCentralFoam ishaninair OpenFOAM Running, Solving & CFD 0 April 7, 2011 04:38
Always crash when solve a C-D nozzle flow field using rhoCentralFoam hawklion OpenFOAM Running, Solving & CFD 0 March 9, 2011 06:13


All times are GMT -4. The time now is 18:59.