checkerboard pressure and velocity field

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

 April 1, 2013, 17:04 checkerboard pressure and velocity field #1 New Member   Join Date: Oct 2012 Posts: 16 Rep Power: 6 Sponsored Links Hi foamers, I'm computing the periodic flow through a ribbed duct. To achieve the desired flow rate, I coupled simpleFoam and channelFoam as follows: Code: ``` Info<< "\nStarting time loop\n" << endl; while (simple.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // --- Pressure-velocity SIMPLE corrector // U equation-------------------------------------------------------------------------------------------- // Momentum predictor tmp UEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) == flowDirection*gradP ); UEqn().relax(); sources.constrain(UEqn()); solve(UEqn() == -fvc::grad(p)); // p equation --------------------------------------------------------------------------------------------- p.boundaryField().updateCoeffs(); volScalarField rAU(1.0/UEqn().A()); U = rAU*UEqn().H(); UEqn.clear(); phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf(); adjustPhi(phi, U, p); // Non-orthogonal pressure corrector loop while (simple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( fvm::laplacian(rAU, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValu pEqn.solve(); if (simple.finalNonOrthogonalIter()) { phi -= pEqn.flux(); } } #include "continuityErrs.H" // Explicitly relax pressure for momentum corrector p.relax(); // Momentum corrector U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); sources.correct(U); turbulence->correct(); // Correct driving force for a constant mass flow rate // Extract the velocity in the flow direction dimensionedScalar magUbarStar = (flowDirection & U)().weightedAverage(mesh.V()); // Calculate the pressure gradient increment needed to // adjust the average flow-rate to the correct value dimensionedScalar gragPplus = (magUbar - magUbarStar)/rAU.weightedAverage(mesh.V()); U += flowDirection*rAU*gragPplus; gradP += gragPplus; Info<< "Uncorrected Ubar = " << magUbarStar.value() << tab << "pressure gradient = " << gradP.value() << endl; runTime.write(); #include "writeGradP.H" Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; }``` The code works, but I get a strange checkerboard pattern. Has anybody an idea where it may come from and how I could remedy this issue? I already tried different meshes. Any help appreciated!!! Best, Pascal

April 1, 2013, 17:13
#2
New Member

Join Date: Oct 2012
Posts: 16
Rep Power: 6
The mentioned checkerBoard pattern:
Attached Images
 checkerBoard.jpg (37.6 KB, 133 views)

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Hermano Main CFD Forum 2 November 29, 2011 09:32 Antech Main CFD Forum 0 April 25, 2006 02:15 R P CFX 2 October 26, 2004 02:13 Abhi Main CFD Forum 12 July 8, 2002 09:11 chong chee nan FLUENT 0 December 29, 2001 06:13