time step continiuty error
Hi,
I'm using pisoFoam solver and I added energy equation to it. But when I run it at first time step "time stem continuity error" is appeared and in the following time step, my Courant number increases. Do you have any idea why it happens? or how I can find the cell which causes the problem ? Maryam 
Dear Maryam
you should use adjustabletimestep to limit your Co number. and I suggest you to use pimpleFoam instead of pisoFoam. it works more stable than pisoFoam. 
some general advices:
1)put your initial time step at 1e08 2) use " adjustabletimestep to limit your Co number" if you again encounter problem, 3) check your BC 
Thanks guys for your help. It works.
I'm trying to add energy equation to pisoFoam and I followed http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam When the code is running, it shows me residual for T, but in my results, T is constant. Do you have any idea? 
whats your BC?

I have two cylinders inside each other, which fluid flows between cylinders. The inner one has constant heat (fixedGradient) and the outer one is zeroGradient. fixedValue for inlet and zeroGradient for outlet.

it's weird :) does it solve for T at all ?
compare your code with code in heat transfer folder, you will find how to add energy equation 
It shows solving, but in any time step, T file shows constant temperature.

put your code here ;)

Thanks for following up.
I added T field in creatField.H. and #include "fvCFD.H" #include "MysinglePhaseTransportModel.H" #include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" #include "initContinuityErrs.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; #include "readPISOControls.H" #include "CourantNo.H" // Pressurevelocity PISO corrector { // Momentum predictor fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence>divDevReff(U) ); UEqn.relax(); if (momentumPredictor) { solve(UEqn == fvc::grad(p)); } //  PISO loop for (int corr=0; corr<nCorr; corr++) { volScalarField rAU(1.0/UEqn.A()); U = rAU*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rAU, U, phi); adjustPhi(phi, U, p ,T); // Nonorthogonal pressure corrector loop for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { // Pressure corrector fvScalarMatrix pEqn ( fvm::laplacian(rAU, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); if ( corr == nCorr1 && nonOrth == nNonOrthCorr ) { pEqn.solve(mesh.solver("pFinal")); } else { pEqn.solve(); } if (nonOrth == nNonOrthCorr) { phi = pEqn.flux(); } } #include "continuityErrs.H" U = rAU*fvc::grad(p); U.correctBoundaryConditions(); //add these lines... fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(U, T) == fvm::laplacian(DT, T) ); TEqn.solve(); } } //done adding lines... turbulence>correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } 
replace it
fvm::ddt(T) + fvm::div(U, T) == fvm::laplacian(DT, T) with fvm::ddt(T) +fvm::div(phi, T) == fvm::laplacian(DT, T) 
Thanks for checking the code. I have same problem with "phi" also. At first I used "phi" then I changed it to "U":(

adjustPhi(phi, U, p ,T); ???????
i think this is wrong too! whats the role of p or T ? and if it was ok ! then change your BC , put two fixed BC for example one at 200 and the other in 500 with no inletout, and look whether it works at all! 
Hi Everybody
Today I started looking at foam again :D. in pisofoam there is line "Mesh.solver" . Could any body tell to me what is that? Best Mahdi 
All times are GMT 4. The time now is 19:40. 