CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

solver for sub-sonic flow

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2009, 14:05
Question solver for sub-sonic flow
  #1
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   August 24, 2009, 14:47
Default oops
  #2
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
sorry.. see the file attached.!

regards,
Nishant
Attached Files
File Type: doc sonicFoam.doc (28.5 KB, 30 views)
nishant_hull is offline   Reply With Quote

Old   August 25, 2009, 10:04
Default can anybody have a look in it?
  #3
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
can anybody have a look in it please? I am stucked here
nishant_hull is offline   Reply With Quote

Old   May 16, 2010, 21:29
Default
  #4
Senior Member
 
Ehsan
Join Date: Mar 2009
Posts: 112
Rep Power: 17
ehsan is on a distinguished road
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
ehsan is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:58.