CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

vector plus bug

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2013, 07:28
Default vector plus bug
  #1
Member
 
Yu CAO
Join Date: May 2013
Posts: 76
Rep Power: 12
cctv is on a distinguished road
Hi
have you ever met a case that is when two very small negative values are plusing, the result turned out to be positive.
cctv is offline   Reply With Quote

Old   September 10, 2013, 07:47
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
No. Give some more background and ask what you really want to ask.

Seems to be an XY problem: http://mywiki.wooledge.org/XyProblem
Bernhard is offline   Reply With Quote

Old   September 10, 2013, 10:25
Default
  #3
Member
 
Yu CAO
Join Date: May 2013
Posts: 76
Rep Power: 12
cctv is on a distinguished road
Quote:
Originally Posted by Bernhard View Post
No. Give some more background and ask what you really want to ask.

Seems to be an XY problem: http://mywiki.wooledge.org/XyProblem
Thank you for your reply.
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.
cctv is offline   Reply With Quote

Old   September 10, 2013, 10:28
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
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.
Bernhard is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 12:17.