what is the role of solve(UEqn == fvc::grad(p));" in icoFoam pisoFoam and ...
Hello All
I could not found the role of term "solve(UEqn == fvc::grad(p));" in icoFoam pisoFoam and ... when I have deactivated this term (insert // befor it) the answer did not changed. it is worthwhile to notice that if this term calculate algebraic equation for U and find the new U but this new U is not used in the following of the program and term U = rAU*UEqn.H(); replaced the new value in variable U Best Regards Yasser 
Hi
Are you sure you complied the solver after the commenting, correctly, and did not use converged data as initial data? 
Quote:
Hi ata yes, I placed a copy of icoFoam to my FOAM_USER_APPBIN and replaced icoFoam to icoFoamMod in directory name, .C file and in Make/files then run the wclean then I comment the // solve(UEqn == fvc::grad(p)); at the end I run wmake and successfully compile icoFoamMod then Run cavity tutorial using icoFoamMod But the solution is the same for icoFoam 
Quote:
Hi ata yes, I placed a copy of icoFoam to my FOAM_USER_APPBIN and replaced icoFoam to icoFoamMod in directory name, .C file and in Make/files then run the wclean then I comment the // solve(UEqn == fvc::grad(p)); at the end I run wmake and successfully compile icoFoamMod then Run cavity tutorial using icoFoamMod But the solution is the same for icoFoam 
Quote:

Hi
Bernhard is right. 
Quote:
Hi Dear Bernhard I check the UEqn.H() and UEqn.A() before and after the solve(UEqn == fvc::grad(p)); the H is changed but A is not changed. if A and H are functions of U why A is not changed ? also can you tell me what functions , terms and matrices are create during bellow terms ? fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U)  fvm::laplacian(nu, U) best regards 
Hi
As you know U.A() is the matrix of coefficient and it changes if phi or nu changes or you use a different scheme for temporal discretization. Good luck 
Algorithm
Dear Foamers,
I would like to know which algorithm the following code represents. Is it PISO or SIMPLE algorithm. Kindly let me know and also the reason for the same. for (int corr = 0; corr < nCorr; corr++) { tmp<fvVectorMatrix> UEqn ( fvm::ddt(U) + fvm::div(phi, U)  fvm::laplacian(nu, U) ); UEqn().relax(); eqnResidualU = solve ( UEqn() == fvc::grad(p) ).initialResidual(); maxResidual_U = max(eqnResidualU, maxResidual_U); p.boundaryField().updateCoeffs(); volScalarField rUA = 1.0/UEqn().A(); U = rUA*UEqn().H(); UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); adjustPhi(phi, U, p); p.storePrevIter(); // Nonorthogonal pressure corrector loop for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pEqn ( fvm::laplacian(rUA, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); pEqn.solve(); if (nonOrth == nNonOrthCorr) { phi = pEqn.flux(); } } p.relax(); U = rUA*fvc::grad(p); U.correctBoundaryConditions(); Info << eqnResidualU << endl; } Thanks Regards Vishal 
Quote:
this is the SIMPLE algorithm because it has only one pressure correction during each time step 
Thanks for the reply. In that case I have two queries.
1. SIMPLE algorithm can be used to solve unsteady problems right !! 2. I couldn't understand regarding one pressure correction during each time step you had mentioned. As I saw the PISO algorithm in icoFoam and found almost the same code, except the momentum equation is solved before the " for (int corr=0; corr<nCorr; corr++) loop" Could you clarify what exactly is happening in these algorithms as I couldnt follow from the wikilinks provided to explain these algoritms. Thanks Regards Vishal Nandigana 
All times are GMT 4. The time now is 03:19. 