|
[Sponsors] |
August 24, 2009, 14:05 |
solver for sub-sonic flow
|
#1 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi Foamers
I am trying to develop a subsonic solver based on original PISO for low mach number. I have started with the sonicFoam solver and changed that solver accordingly. Changes are: 1. The energy equation is coupled with the pressure equation to solve it iteratively. (as mentioned in the original PISO) 2. The pressure equation is changed and reference is taken from other sonicfoam solver. (like XiFoam, as suggested by Henery) 3. solution of continuity equation at the start of iteration is abandoned to preserve the pressure fluctuation at low ach number which would die otherwise. the source file is: #include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" # include "createMesh.H" # include "readThermodynamicProperties.H" # include "readTransportProperties.H" # include "createFields.H" # include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; for (runTime++; !runTime.end(); runTime++) { Info<< "Time = " << runTime.timeName() << nl << endl; # include "readPISOControls.H" # include "compressibleCourantNo.H" // removed solving of the continuity equation to make sure low pressure fluctuations do not die out //# include "rhoEqn.H" fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - fvm::laplacian(mu, U) ); solve(UEqn == -fvc::grad(p)); // --- PISO loop for (int corr=0; corr<nCorr; corr++) { // coupled energy and pressure equations !! solve ( fvm::ddt(rho, e) + fvm::div(phi, e) - fvm::laplacian(mu, e) == - p*fvc::div(phi/fvc::interpolate(rho)) + mu*magSqr(symm(fvc::grad(U))) ); T = e/Cv; psi = 1.0/(R*T); volScalarField rUA = 1.0/UEqn.A(); U = rUA*UEqn.H(); // pressure equation has been copied from other solvers solving for sub sonic flow cases for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( fvm::ddt(psi, p) + fvc::div(phi) - fvm::laplacian(rho*rUA, p) ); pEqn.solve(); phi = pEqn.flux(); } # include "compressibleContinuityErrs.H" U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); } rho = psi*p; runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return(0); } I have tested this solver with plane channel flow and result are good. I have checked it with forward step problem also. Let me know if this solver is correct or not? or if there is any improvement you can suggest. with regards, Nishant Singh |
|
August 24, 2009, 14:47 |
oops
|
#2 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
sorry.. see the file attached.!
regards, Nishant |
|
August 25, 2009, 10:04 |
can anybody have a look in it?
|
#3 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
can anybody have a look in it please? I am stucked here
|
|
May 16, 2010, 21:29 |
|
#4 |
Senior Member
Ehsan
Join Date: Mar 2009
Posts: 112
Rep Power: 17 |
Hello,
Would you please send me your new solver? (ehsan.roohi@gmail.com) I try to solve subsonic compressible channel flow but I can't. I put a tread under the name of subsonic Poiseelle flow for my problem. Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SteadyState solver for compressible flow | matteo_gautero | OpenFOAM Running, Solving & CFD | 32 | November 21, 2012 04:27 |
Segregated flow solver and no convergence | Ankit Purohit | Siemens | 0 | June 15, 2007 09:22 |
Turbulent flow solver selection | Jenner | FLUENT | 1 | December 5, 2006 03:38 |
Solver fails with compressible flow | Eric | CFX | 4 | February 4, 2006 08:28 |
Incompressible flow solver (staggered grid) | J. Ehrhard | Main CFD Forum | 1 | October 8, 1998 19:47 |