CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Strange results from interFoam solution converges but sum of all forces not equal to zero

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2008, 02:01
Default Dear users of OpenFOAM, the be
  #1
New Member
 
nicasch
Join Date: Mar 2009
Posts: 23
Rep Power: 17
nicasch is on a distinguished road
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.
nicasch is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 06:26.