McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


McStas: Union_mesh

[ Identification | Description | Input parameters | Links ]

The Union_mesh Component

Component for including 3D mesh in Union geometry

Identification

  • Site:
  • Author: Martin Olsen, and expanded upon by Daniel Lomholt Christensen
  • Origin: University of Copenhagen / ACTNXT project
  • Date: 17.09.18

Description

Part of the Union components, a set of components that work together and thus
separates geometry and physics within McStas.
The use of this component requires other components to be used.

1) One specifies a number of processes using process components
2) These are gathered into material definitions using Union_make_material
3) Geometries are placed using Union_box/cylinder/sphere/mesh, assigned a material
4) A Union_master component placed after all the above

Only in step 4 will any simulation happen, and per default all geometries
defined before this master, but after the previous will be simulated here.

There is a dedicated manual available for the Union_components

The mesh component loads a 3D off or stl files as the geometry.
The mesh geometry that is loaded must be a watertight mesh.
In order to check this, the component implements a simple Euler Pointcare value,
To check if the given geometry is watertight. This check is sometimes too rigid,
so a user can set the skip_convex_check parameter in order to not have this
check performed.


If you load an off file, we currently only support rank 3 polygons, i.e
triangular meshes.

It is allowed to overlap components, but it is not allowed to have two
parallel planes that coincides. This will crash the code on run time.

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
filenamestrName of file that contains the 3D geometry. Can be either .OFF, .off, .STL, or .stl0
material_stringstringmaterial name of this volume, defined using Union_make_material0
priority1priotiry of the volume (can not be the same as another volume) A high priority is on top of low.
visualize1set to 0 if you wish to hide this geometry in mcdisplay1
all_surfaces0
cut_surface0
target_index1Focuses on component a component this many steps further in the component sequence0
target_xm0
target_ymPosition of target to focus at0
target_zm0
focus_awdeghoriz. angular dimension of a rectangular area0
focus_ahdegvert. angular dimension of a rectangular area0
focus_xwmhoriz. dimension of a rectangular area0
focus_xhmvert. dimension of a rectangular area0
focus_rmfocusing on circle with this radius0
p_interact1probability to interact with this geometry [0-1]0
mask_stringstringComma seperated list of geometry names which this geometry should mask0
mask_settingstring"All" or "Any", should the masked volume be simulated when the ray is in just one mask, or all.0
number_of_activations1Number of subsequent Union_master components that will simulate this geometry1
skip_convex_check1when set to 1, skips the check for whether input .off file is convex.0
coordinate_scale1e-3Multiplier that the vertex positions are multiplied by. Set to 1 for input coordinates in meters. Set to 1e-3 for input coordinates in mm.1e-3
initstringname of Union_init component (typically "init", default)"init"
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links


[ Identification | Description | Input parameters | Links ]

Generated on mcstas 3.6.1


Last Modified: Friday, 12-Dec-2025 12:58:06 CET
Search website mailinglist archive GitHub repos