|
[Sponsors] |
PISO predictor-corrector scheme for non-divergence free velocity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 23, 2014, 12:03 |
PISO predictor-corrector scheme for non-divergence free velocity
|
#1 | ||
Member
Bruno Blais
Join Date: Sep 2013
Location: Canada
Posts: 64
Rep Power: 12 |
Hello everyone,
I am trying to work a specific subset of the volume averaged navier stokes equation using OpenFOAM. I couple openfoam to a DEM code and use the results from the DEM code (position and velocities of the particles) and use those in the OpenFOAM solver. However, first, I am trying to verify that i am solving the right set of equation using the method of manufactured solutions. The equations I want to solve are : Quote:
Quote:
My problem is this. These equation can have non-divergence free velocity field, in fact only div (voidfraction * U) must be divergence free. I have manufactured solution for the Navier-Stokes equation and for this equation but with a divergence free velocity and in both case I have managed to recoved second-order convergence for BOTH pressure and velocity. However, as soon as I input a non-divergence free velocity, I get a wrong pressure field. The code for UEqn is : Code:
// Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(voidfraction,U) +fvm::div(phi, U) +particleCloud.divVoidfractionTau(U, voidfraction) ); if(momentumPredictor) solve(UEqn == - fvc::grad(p) + G); Code:
for (int corr=0; corr<nCorrSoph; corr++) { volScalarField rUA = 1.0/UEqn.A(); surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA*voidfraction)); volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction); U = rUA*UEqn.H(); phi = (fvc::interpolate(U*voidfraction) & mesh.Sf() ) + fvc::ddtPhiCorr(rUA, U, phi); // Non-orthogonal pressure corrector loop for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { // Pressure corrector fvScalarMatrix pEqn ( fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) +fvc::div(rUAvoidfraction * G) ); pEqn.setReference(pRefCell, pRefValue); if ( corr == nCorr-1 && nonOrth == nNonOrthCorr ) { pEqn.solve(mesh.solver("pFinal")); } else { pEqn.solve(); } if (nonOrth == nNonOrthCorr) { phiGes -= pEqn.flux(); } } // end non-orthogonal corrector loop #include "continuityErrorPhiPU.H" U -= rUA*fvc::grad(p) - G * rUA ; } Does anyone have a clue? Thank you very much for both your time and your help. Best regards, |
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LES and TKE calculations | MST | Main CFD Forum | 3 | May 30, 2016 06:26 |
How to calculate the divergence of velocity at the grid vertex | xiaof | OpenFOAM Programming & Development | 9 | December 18, 2014 07:21 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |
Velocity on Free Surface Boundary | Lin F.F | Main CFD Forum | 3 | August 4, 2001 11:30 |
help:spectral methods & divergence free functionsn | D. Puigjaner | Main CFD Forum | 1 | August 28, 2000 10:06 |