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

bugs in moleculeDynamics model?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2009, 20:33
Default bugs in moleculeDynamics model?
  #1
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Dear foamers
there seems two bugs in the following two files

(1)file : moleculeCloudBuildDirectInteractionList.H: line 13
location: src/lagrangian/molecularDynamics/molecule/moleculeCloud

if face f is a boundary face, it hasn't a neighbour face and the operation of mesh_.faceNeighbour()[f] will exceed the array bound.
A possible solution is moving this line of code to line 40 in that file.

(2) file: pairPotential.C : line 148 and line 111
location: /src/lagrangian/molecularDynamics/potential/pairPotential/basic/

In function of forceLookup, if r=rCut, k=N-1;
and energyLookup[k+1] or will exceed the array bound.

It seems that the size of lookupTable definition is wrong.

In line pairPotential.C:82
label N = label((rCut_ - rMin_)/dr_) + 1;
should be changed to
label N = label((rCut_ - rMin_)/dr_) + 2;

Junwei
su_junwei is offline   Reply With Quote

Old   May 18, 2009, 10:00
Default
  #2
New Member
 
Graham Macpherson
Join Date: Mar 2009
Posts: 8
Rep Power: 17
gmacpherson is on a distinguished road
Hi Junwei,

Thanks for spotting these. Both fixes have been made in 1.5.x.

1) Correct, I've moved the the neighbour cell label declaration within

if (mesh.isInternalFace(f))
{
...

as you suggest.

2) This has been fixed in pairPotentialList.C by making the cut-off radius test

if (rIJMagSqr < rCutSqr(a, b))

instead of

if (rIJMagSqr <= rCutSqr(a, b))

so it is not possible for r=rCut when the potential is evaluated. This is now in line with what's in the MD books by Allen & Tildesley and Rapaport who use U(r) = 0 when r >= rCut.

Regards,

Graham
gmacpherson 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
references about the fan/radiator model Mihai ARGHIR Main CFD Forum 1 January 8, 2001 16:49
references about the fan/radiator model Mihai ARGHIR FLUENT 0 December 21, 2000 04:07
references about the fan/radiator model Mihai ARGHIR Main CFD Forum 0 December 21, 2000 04:06
references about the fan/radiator model Mihai ARGHIR Main CFD Forum 1 December 17, 2000 08:01
references about the fan/radiator model Mihai ARGHIR FLUENT 0 December 17, 2000 07:40


All times are GMT -4. The time now is 22:15.