CFD Online Discussion Forums

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

immortality April 8, 2013 09: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 05: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 05:58

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


All times are GMT -4. The time now is 16:45.