CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Monte Carlo Packing Problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2009, 22:00
Default Monte Carlo Packing Problem
  #1
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Hi fellow Foamers,

I'm attempting to write a Monte Carlo packing algorithm that can pack particles of any shape into a simple container (box, cylinder, sphere). I am using OF's mesh handling, since I think if will be easier to manipulate complex objects with OF rather than reinvent the wheel and make my own. I have a few questions:

1. How do I grab the coordinate locations of a particular patch and then copy new point locations back to the mesh?

2. How can I tell if one patch overlaps another one after I have moved and rotated a particle?

I have implemented quaternions and septernions to handle the rotation and translation, but I'm having issues on how to extract the points of the faces and then copying new points back. Currently my domain is basically two spheres with surface meshes on them. They are floating free, with no bounding box, as I want to draw the container after the packing is finished. I have tried to use some of the dynamicFvMesh types and none of them fit my needs. Right now I am using a static mesh without the dynamicFvMesh capabilities. Thoughts?

Dan
chegdan is offline   Reply With Quote

Old   May 14, 2009, 23:33
Default Trouble Grabbing Points
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
When I try to grab the points using:
Code:
   pointField points0_
    (
        pointIOField
        (
            IOobject
            (
                "points",
                time().constant(),
                polyMesh::meshSubDir,
                mesh,
                IOobject::MUST_READ,
                IOobject::NO_WRITE,
                false
            )
        )
    );
I get the following error:
Code:
In file included from mCPFoam.C:57:
/usr/include/time.h: In function ‘int main(int, char**)’:
/usr/include/time.h:187: error: too few arguments to function ‘time_t time(time_t*)’
readPoints.H:8: error: at this point in file
I'm attempting to grab the points (similar to displacementLaplacianFvMotionSolver.C) and manipulate the points and write them to a local polyMesh folder at each time step. This is similar to how the displacementLaplacianFvMotionSolver works. I am attempting to do manipulate a field named pointMovement and then add them to the points field to move the mesh. Any ideas? I was able to move the objects by specifying a pointDisplacement and cellDisplacement and using the dynamicMotionSolverFvMesh dynamic mesh motion solver. However I need to be able to move them and check if they overlap. Help?
chegdan 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
Large problem partitioner tzy CFX 3 February 7, 2018 18:11
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source silvan CFX 3 June 16, 2014 10:49
CFX- Monte Carlo Radiation orryshamash CFX 5 April 4, 2014 03:14
Info Radiation Monte Carlo Model Matteo CFX 1 December 22, 2006 10:01
Monte Carlo vs Discrete Transfer TobiasZ CFX 5 January 25, 2006 12:11


All times are GMT -4. The time now is 08:09.