4.14. Regions or Cells
Region/Cell editing is one of the most important action in flair geometry editor. The region expression is described as CSG (Constructive Solid Geometry) combinatorial boolean expression using the following operators:
Operator |
Description |
---|---|
|
FLUKA/Moira: intersection of a body, inside of a body
+sphere Mcnp/Phits: intersection with the positive-sense=outside of a surface
+5 |
|
FLUKA/Moira: subtraction (intersection with the complement) of a body,
outside of a body
-cylinder Mcnp/Phits: intersection with the negative-sense=inside of a surface
-7 |
|
FLUKA/Moira: logical union |
|
Mcnp/Phits: logical union |
|
FLUKA/Moira: complement operator, equivalent to subtract a REGION
#REGA WARNING: Only exist for
flair . When saving the .inp file it
will be expanded to -(region-expression) Mcnp/Phits: complement operator, equivalent to subtract a CELL or an
expression
#(expr) = -(expr) |
|
FLUKA/Moira: parenthesis for nested operations
+sphere -(bodyA|bodyB) Mcnp/Phits: parenthesis for nested operations
+5 -6 (+7 : +8) #(9 -10) |
4.14.1. Adding New Region
- Shortcuts:
Menu → Insert →
REGION
Right-mouse-click to open popup menu
[Ctrl] + Right-mouse-click to open the insert dialog
[Spacebar] or [Ins] or [Ctrl-Enter] to open the insert dialog
[R] to open directly the bodies insert dialog
Note
Immediately the properties listbox will be activated to edit the name.
Renaming a region will automatically rename any reference to it without asking the user.
REGIONs and Zones are displayed according to their position in the input. If you want to visually see the result during the editing is better to start from inside to outside, and leave the space surrounding the working region as undefined.
When changing the material or transformation of a region flair will automatically add the appropriate
ASSIGNMAT
and/orLATTICE
cards.Deleting a REGION will not delete the associated
ASSIGNMAT
and/orLATTICE
cards
4.14.2. Region Editing
The most import action of editing a region is to define its mathematical expression. flair in the geometry editor will split the region expression into a list of zones. If parenthesis are used they will be treated as one zone. The user can manipulate the zones either with the keyboard or graphically
e.g. +a +b | +c | +e -(+f -g | +h)
will be split into 3 zones zone01: +a +b zone02: +c zone03: +e -(+f -g | +h)
Keyboard:
To add a new zone enter the appropriate expression in the “+zone” field
To modify an existing zone, click with the mouse the appropriate zone##
To delete a zone select with the mouse or keyboard the zone## rows and either hit the [Del]ete key inside the listbox or with the mouse Right-Click → Delete
Graphically:
The recipe is the following:
Select the desired REGION. If a new region is to be created do not select anything
During the following process maintain the REGION selected. In case of accidental unselection of the REGION, press [Ctrl] and reselect the REGION
Add a new zone:
Verify that there is no zone selected in the property listbox.
If there is any hit [Esc]ape to unselect them
Add onto the selection ONLY the bodies representing the borders of the zone (Holding [Ctrl], select by clicking on the desired bodies)
Right-click or [Space]→Zone
or with the shortcut [d]efine. Note: [D]efine (capital D) will first unselect any zone)
Move the mouse and click in any of the viewports, a point that belong to the wished zone
Automatically the zone expression will be created
Modify/Edit an existing zone:
IMPORTANT: Select the zone## either on the property listbox or graphically in any viewport clicking a point that belongs to it.
Automatically ALL bodies involved in the zone expression will be selected
With the zone selected, select or unselect additional bodies if needed
Then like in the “Add a new zone” click on “Zone” or with shortcut [d]efine (small)
Move the mouse and click in any of the viewports, a point that belong to the wished zone
Automatically the zone expression will be replaced
Note
DO NOT select bodies that you don’t need
There is an automatic optimization of unwanted bodies but is far from perfect.
Verify if you don’t have accidentally locked some bodies.
Step by step example:
In this example we will create a sphere with a cylindrical hole cut with a tilted plane.


First we have to create all necessary bodies
sphere
infinite cylinder
tilted plane
Select the sphere body The sphere outline will be highlighted.
Each selected body divides the space into 2 zones
- 1:
- +sphere
inside the sphere
- 2:
- -sphere
outside the sphere
Add to the selection the infinite cylinder with [Ctrl] + Left mouse click
The 2 selected bodies divides the space into 4 zones
- 1:
+sphere +cylinder
- 2:
+sphere -cylinder
- 3:
-sphere +cylinder
- 4:
-sphere -cylinder
Add to the selection with [Ctrl]+left-click on the tilted plane.
- Now the space is divided into 8 zones
- 1:
+sphere +cylinder +plane
- 2:
+sphere +cylinder -plane
- 3:
+sphere -cylinder +plane
- 4:
+sphere -cylinder -plane
- 5:
-sphere +cylinder +plane
- 6:
-sphere +cylinder -plane
- 7:
-sphere -cylinder +plane
- 8:
-sphere -cylinder -plane
Tip
The number of valid zones <= 2^bodies
Press [Spacebar] and select the action Zone
or with the shortcut [d]efine.
Moving the mouse, flair shows the various subdivisions of space with their optimized expression.
Point and click with the mouse somewhere inside zone 4
A new REGION will be created
Automatically the zone expression
zone01: +sphere -cylinder -plane
will be added to the REGION as a new zone
all bodies will be automatically unselected
the new REGION will remain selected.
Press [F2] or use the mouse to change the name of the region
Press [m] or use the mouse to change the material of the region
Finally we have to add as second zone the lower half of the sphere. Select again the sphere and the plane (pressing [Ctrl]) (NOT the infinite cylinder this time)
- Again the space is divided into 4 zones
- 1:
+sphere +plane
- 2:
+sphere -plane
- 3:
-sphere +plane
- 4:
-sphere -plane
Press [Spacebar] and select the action Zone
or with the shortcut [d]efine.
Point and click with the mouse somewhere inside zone 1
Automatically the zone expression
zone02: +sphere +plane
will be added to the REGION as a new zone.
ESCape and DELete ————————-~~~~
[Esc]ape: to stop/unselect [Del]ete or [Baskspace]: to delete objects
Both [Del]ete/[BackSpace] perform their action in the following order one item at each time the key is pressed:
- [Esc]ape:
Stop the current action e.g. during selection, rotation or panning…
If a zone is selected unselected the zone
Unselect any selected bodies
Unselect any selected region
- [Del]ete:
If any zone is selected, delete ONLY the zone
Delete any selected bodies
Delete any selected region