|
[Sponsors] |
April 1, 2013, 18:04 |
checkerboard pressure and velocity field
|
#1 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 13 |
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<fvVectorMatrix> 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; } 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, 18:13 |
|
#2 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 13 |
The mentioned checkerBoard pattern:
|
|
March 8, 2018, 05:10 |
Similar checkerboard velocity field
|
#3 |
Member
Thomas Flint
Join Date: Jan 2016
Posts: 60
Rep Power: 10 |
Hi,
I am seeing similar behaviour in my custom solver, did you ever get to the bottom of this? All the best, Tom |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get the velocity field from the pressure field | Hermano | Main CFD Forum | 2 | November 29, 2011 09:32 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |
Variables Definition in CFX Solver 5.6 | R P | CFX | 2 | October 26, 2004 03:13 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |