一个简单的速度压力非迭代求解器



  • 之前OKSS2课程的一部分:自定义求解器。在icoFoam中替换下述即可:

        while (runTime.loop())
        {
            Info<< "Time = " << runTime.timeName() << nl << endl;
            #include "CourantNo.H"
            solve(fvm::ddt(U) + fvc::div(phi,U));
            U.oldTime() = U;
            solve(fvm::ddt(U) - fvm::laplacian(nu, U));
            phi = linearInterpolate(U) & mesh.Sf();
    
            solve(fvm::laplacian(runTime.deltaT(), p) == fvc::div(phi));
    
            U -= runTime.deltaT()*fvc::grad(p);
            phi = linearInterpolate(U) & mesh.Sf();
    
            runTime.write();
            Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
                << "  ClockTime = " << runTime.elapsedClockTime() << " s"
                << nl << endl;
        }
    


  • 这是什么原理啊,有没有资料参考下。



  • 参考Hirsch 2007: 12.4.1 Basic Approach of Pressure Correction Methods


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2