
Have a look here for a few details: http://opencascade.blogspot.com/2008/12 ... ow_06.html
The people at CERN have an even more complicated problem, namely that particles do not fly in straight lines, but the trajectory is determined by the interaction with magnetic and electric fields. I hate charged particle transport. And then the particles also decay while they are flying, so it is a very interesting task from the computational point of view.jriegel wrote:We had already discussions with people from CERN which do similar kind of simulation (I think for one of the detectors). Modeling your problem with cubes and cones is obvious from a algorithmic standpoint. Unfortunately its nowadays not practical anymore. You will get a lot of the 3D data nowadays as BREP (from all the CAD systems via a.g. STEP/IGES) or as a triangular mesh (from nearly all). All of the data are hull representation which are strictly 2-manifolds. Detecting intersection and inside/outside is very easy and accurate (perfect) on BREP but also very slow! If you go for millions and billions you will need bigger super-computers![]()
Using triangular meshes can do the job also and are easier to optimize. You introduce some errors (discretization) which has to be managed.
This is a very interesting comment. In traditional Monte Carlo codes, depending on the input format, there may also be "gaps" between the cells. In practice, that usually indicates an error in the geometric model (user error) but in some cases it can't be avoided. Particles that go into such undefined locations are said to be "lost". Monte Carlo codes usually abort the calculation if too many particles are lost.What we not can do (neiter OCC nor our triangular mesh data-structure) is this kind of 'cell' approach, where you describe only parting surfaces! Our data model are always a closed surface around a finite solid volume of one material or property. That mean also in BREP your parting faces are always two faces in touch. Ant they are normally don't know of each other....
In neutron transport for nuclear reactors, but also for other applications such as cancer treatment, all possible permutations have been tried. The biggest problem with triangulations (FEM-type meshes) is that in many application, the surface-to-volume ratio needs to be preserved rather accurately, which is not always possible with triangulations. Also, in nuclear reactor applications there are many cases where very small volumes occur, which are very demanding to represent with FEM-meshes; you need an excessive number of excessively small meshes to maintain accuracy.But anyway is the standard approach in such kind of simulation to use BREP and the CAD system to model and plan. But the simulation is done in a specialized data structure. Like FEM-Meshes, or Voxel data in CAM simulation or others. Which leads normally to a translator in some kind....
Sorry to butt in. Freecad doesn't work with this "cell" data structure but I believe that OCC itself does support it through the type TopAbs_COMPSOLID?WvR wrote:This is a very interesting comment. In traditional Monte Carlo codes, depending on the input format, there may also be "gaps" between the cells. In practice, that usually indicates an error in the geometric model (user error) but in some cases it can't be avoided. Particles that go into such undefined locations are said to be "lost". Monte Carlo codes usually abort the calculation if too many particles are lost.What we not can do (neiter OCC nor our triangular mesh data-structure) is this kind of 'cell' approach, where you describe only parting surfaces! Our data model are always a closed surface around a finite solid volume of one material or property. That mean also in BREP your parting faces are always two faces in touch. Ant they are normally don't know of each other....
A composite solid is a set of solids
connected by their faces. It expands the
notions of WIRE and SHELL to solids.
No, not really, its just a closed shell -> solid...Sorry to butt in. Freecad doesn't work with this "cell" data structure but I believe that OCC itself does support it through the type TopAbs_COMPSOLID?
The accuracy depends on the modeler you CAD data coming from. Nowadays around 0.0001 mm. If you design two solids touching, they are normally touching very accurate. The face of the one and the other are piece-wise coincident. But you will have the same problem as e.g. the CFD guys. Normally CAD models consist of solids arranged in 'Air'. In most modelers its a bit tricky to model a assemblies which is completely "filled". The tools are normally geared toward different things...If you know an "outgoing" intersection, you have to calculate the distance to all "next ingoing" intersections, and take the one that is nearest the present point (if there is a guaranteed precision between the outgoing and the incoming surface, the next point should be within that precision, which would make the decision more robust).
I have to say I learned also a lot from this thread! Very interesting indeed!OK. I am learning things these days. Very interesting
You do realize I said TopAbs_COMPSOLID and NOT TopAbs_COMPOUND? There is more going on than just a close shell.jriegel wrote:No, not really, its just a closed shell -> solid...Sorry to butt in. Freecad doesn't work with this "cell" data structure but I believe that OCC itself does support it through the type TopAbs_COMPSOLID?
Code: Select all
Number of shapes in mycomp
VERTEX : 8
EDGE : 16
WIRE : 10
FACE : 10
SHELL : 2
SOLID : 2
COMPSOLID : 1
COMPOUND : 0
SHAPE : 49
Indeed, the question is how to treat the fact that sometimes there is an "undefined" space between surfaces. In my opinion, these undefined spaces should be left undefined. Otherwise, there may be a genuine error in the geometry, but it will be accepted if "undefined" space is substituted automatically. In most codes for nuclear engineering, quality control is important, and it is generally unacceptable if a code will give a seemingly correct result from an erroneous input. Most codes are designed to be paranoid, i.e. they are more likely to (mistakenly) reject a correct input, than mistakenly accept an erroneous input.The accuracy depends on the modeler you CAD data coming from. Nowadays around 0.0001 mm. If you design two solids touching, they are normally touching very accurate. The face of the one and the other are piece-wise coincident. But you will have the same problem as e.g. the CFD guys. Normally CAD models consist of solids arranged in 'Air'. In most modelers its a bit tricky to model a assemblies which is completely "filled". The tools are normally geared toward different things...
What one can do anyway is to build a complex set-up and then subtract this set-up from a huge box, which generate a solid(s) which represent the rest of space (air)...