|
[Sponsors] |
September 10, 2013, 07:28 |
vector plus bug
|
#1 |
Member
Yu CAO
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Hi
have you ever met a case that is when two very small negative values are plusing, the result turned out to be positive. |
|
September 10, 2013, 07:47 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
No. Give some more background and ask what you really want to ask.
Seems to be an XY problem: http://mywiki.wooledge.org/XyProblem |
|
September 10, 2013, 10:25 |
|
#3 | |
Member
Yu CAO
Join Date: May 2013
Posts: 76
Rep Power: 13 |
Quote:
In openfoam 1.6-ext. the solver interTrackFoam it has force calculating vector totalForce = interface.totalViscousForce() + interface.totalPressureForce(); vector freeSurface::totalPressureForce() const { const scalarField& S = aMesh().S(); const vectorField& n = aMesh().faceAreaNormals().internalField(); const scalarField& P = p().boundaryField()[aPatchID()]; vectorField pressureForces = S*P*n; return gSum(pressureForces); } vector freeSurface::totalViscousForce() const { const scalarField& S = aMesh().S(); const vectorField& n = aMesh().faceAreaNormals().internalField(); vectorField nGradU = U().boundaryField()[aPatchID()].snGrad(); vectorField viscousForces = - muFluidA().value()*S *( nGradU + (fac::grad(Us())().internalField()&n) - (n*fac::div(Us())().internalField()) ); return gSum(viscousForces); } but in some cases, when these two force is very small, its result turned out to be very big. and sometimes printed out -nan. I do not know why. |
||
September 10, 2013, 10:28 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
Can you give a simple example, so that we can reproduce the issue? It is very difficult to tell what is going on and diagnose the problem.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dieselEngineFoam bug - OpenFOAM-1.6-ext | novakm | OpenFOAM Bugs | 1 | December 5, 2013 13:18 |
Serious bug in LES interface | fs82 | OpenFOAM Bugs | 21 | November 16, 2009 08:15 |
Please report this bug | egp | OpenFOAM Installation | 5 | December 8, 2006 12:56 |
Bug reports | Mattijs Janssens (Mattijs) | OpenFOAM | 0 | January 10, 2005 10:05 |
Forum y2k Bug | Jonas Larsson | Main CFD Forum | 1 | January 5, 2000 10:22 |