|
[Sponsors] |
Strange results from interFoam solution converges but sum of all forces not equal to zero |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 15, 2008, 02:01 |
Dear users of OpenFOAM, the be
|
#1 |
New Member
nicasch
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Dear users of OpenFOAM, the best CFD-software in the world,
I have a "simple" question. While calculating the standard damBreak case from the tutorial, I want to compute various forces acting on fluids in each cell. After adding volumetric fields to the solver for every force separately, I noticed a very big disagreement in their sum. What I mean is the following: When the momentum equation converges in every time step, it means that the left hand side of the equation is equal to the right hand side, up to the residual level, i.e.: (inertial force) = (all acting forces) + (small residual). Now, if I want to compute the difference of these forces, it should be like this: (inertial force) - (all acting forces) = (small residual). After I added the following code to the interFoam solver, just before the end of the time loop: volVectorField sumAllForces ( IOobject ( "sumAllForces", runTime.timeName(), mesh, IOobject::NO_READ ), fvc::ddt(rho, U) + fvc::div(rhoPhi, U) - fvc::laplacian(muf, U) - (fvc::grad(U) & fvc::grad(muf)) - fvc::reconstruct ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() ) ); sumAllForces.write(); the problem is that I obtain very high values for sumAllForces, in some cells on the order of 100, although the value for sumAllForces should be very small?! How can this be?! Something in the above field seems to be calculated wrong. But the field sumAllForces is practically nothing else but the difference of the terms from the momentum equation. I also tried this after the solution was obtained, by writing a post-processing utility, and I obtained values which were even greater (on the order of 10000!?) Why is this happening? Every term in the code above is discretized using the same schemes from the case as in the momentum equation itself. Yet the sum of all forces is never nearly equal to zero?! I would be very very grateful if someone of you would have a solution for this. Many thanks in advance and Best Regards. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Newton Raphson - strange results | Bren | Main CFD Forum | 5 | February 11, 2009 10:47 |
[blockMesh] Strange Block Mesh results | ivan_cozza | OpenFOAM Meshing & Mesh Conversion | 1 | December 4, 2008 08:24 |
[OpenFOAM] Is that a circle Results from interFoam | sega | ParaView | 2 | May 8, 2008 02:49 |
UDS transport: strange results | Ale | FLUENT | 1 | November 6, 2003 06:28 |
Strange results ! | Dimitri | FLUENT | 1 | August 8, 2002 11:07 |