CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   it seems compressibleCourantNo doesn't account for wave velocities.whats the solution (http://www.cfd-online.com/Forums/openfoam-solving/115847-seems-compressiblecourantno-doesnt-account-wave-velocities-whats-solution.html)

immortality April 8, 2013 10:04

it seems compressibleCourantNo doesn't account for wave velocities.whats the solution
 
in cases where there are compression or expansion waves its important to put the into account for calculating courant Number but it isn't in OpenFOAM code.why?
also there is a factor of .5 in equation.why it is there in formula?
Code:

#include "compressibleCourantNo.H"
#include "fvc.H"

Foam::scalar Foam::compressibleCourantNo
(
    const fvMesh& mesh,
    const Time& runTime,
    const volScalarField& rho,
    const surfaceScalarField& phi
)
{
    scalarField sumPhi
    (
        fvc::surfaceSum(mag(phi))().internalField()
      / rho.internalField()
    );

    scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

    scalar meanCoNum =
        0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();

    Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum
        << " max: " << CoNum << endl;

    return CoNum;
}


immortality April 9, 2013 06:03

how should we account for wave speeds when they are important to us in the problem?
Any idea or guidance are be thanked.

immortality April 10, 2013 06:58

do i understand right about courant number in openfoam?
Whats your opinion openfoamers?


All times are GMT -4. The time now is 08:01.