Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions mcstas-comps/misc/Shape.comp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ TRACE %{
/* component Shape does nothing */
%}

MCDISPLAY INHERIT Incoherent

MCDISPLAY
%{
if (geometry && strlen(geometry) && strcmp(geometry, "NULL") && strcmp(geometry, "0")) { /* OFF file */
off_display(offdata);
}
else
if (radius > 0 && yheight) { /* cylinder along y*/
cylinder(0,0,0,radius,yheight,thickness, nx, ny, nz);
}
else if (xwidth && yheight) { /* box/rectangle */
box(0,0,0,xwidth,yheight,zdepth,thickness, nx, ny, nz);
}
else if (radius > 0 && !yheight) { /* sphere */
sphere(0,0,0,radius);
}
%}
END
9 changes: 4 additions & 5 deletions mcstas-comps/samples/Incoherent.comp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@
DEFINE COMPONENT Incoherent

SETTING PARAMETERS (string geometry=0, radius=0, xwidth=0, yheight=0, zdepth=0,
thickness=0, nx=0, ny=1, nz=0,
target_x = 0, target_y = 0, target_z = 0, focus_r = 0,
thickness=0, target_x = 0, target_y = 0, target_z = 0, focus_r = 0,
focus_xw=0, focus_yh=0, focus_aw=0, focus_ah=0, int target_index=0,
pack = 1, p_interact=1, f_QE=0, gamma=0, Etrans=0,deltaE=0,
sigma_abs=5.08, sigma_inc=5.08, Vc=13.827, concentric=0, order=0)
Expand Down Expand Up @@ -478,11 +477,11 @@ MCDISPLAY
off_display(offdata);
}
else
if (radius > 0 && yheight) { /* cylinder */
cylinder(0,0,0,radius,yheight,thickness, nx, ny, nz);
if (radius > 0 && yheight) { /* cylinder along y*/
cylinder(0,0,0,radius,yheight,thickness, 0, 1, 0);
}
else if (xwidth && yheight) { /* box/rectangle */
box(0,0,0,xwidth,yheight,zdepth,thickness, nx, ny, nz);
box(0,0,0,xwidth,yheight,zdepth,thickness, 0, 1, 0);
}
else if (radius > 0 && !yheight) { /* sphere */
sphere(0,0,0,radius);
Expand Down
4 changes: 2 additions & 2 deletions mcstas-comps/samples/Powder1.comp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
* radius: [m] Radius of sample in (x,z) plane
* yheight: [m] Height of sample y direction
* pack: [1] Packing factor
* Vc: [AA^3] Volume of unit cell
* Vc: [AA^3] Volume of unit cell
* sigma_abs: [barns] Absorption cross section per unit cell at 2200 m/s
*
* q: Scattering vector of reflection [AA^-1]
* q: [AA^-1] Scattering vector of reflection
* d: [AA] d-spacing for sample, overrides 'q'
* j: [1] Multiplicity of reflection
* F2: [barns] Structure factor of reflection
Expand Down
2 changes: 1 addition & 1 deletion mcstas-comps/samples/PowderN.comp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
* xwidth: [m] Horiz. dimension of sample, as a width
* yheight: [m] Height of sample y direction
* zdepth: [m] Depth of box sample
* thickness: [] Thickness of hollow sample. Negative value extends the hollow volume outside of the box/cylinder.
* thickness: [m] Thickness of hollow sample. Negative value extends the hollow volume outside of the box/cylinder.
* reflections: [string] Input file for reflections (LAZ LAU CIF, FullProf, ShelX). Use only incoherent scattering if NULL or ""
* d_phi: [deg] Angle corresponding to the vertical angular range to focus to, e.g. detector height. 0 for no focusing.
* d_omega: [deg] Horizontal focus range (only for incoherent scattering), 0 for no focusing.
Expand Down
74 changes: 33 additions & 41 deletions mcstas-comps/samples/Single_magnetic_crystal.comp
Original file line number Diff line number Diff line change
Expand Up @@ -51,50 +51,42 @@
*
* %P
* INPUT PARAMETERS:
* radius: Outer radius of sample in (x,z) plane [m]
* xwidth: Width of crystal [m]
* yheight: Height of crystal [m]
* zdepth: Depth of crystal (no extinction simulated) [m]
* geometry: Name of an Object File Format (OFF) file for complex geometry.
* The OFF file may be generated from XYZ coordinates using qhull/powercrust [str]
* delta_d_d: Lattice spacing variance, gaussian RMS [1]
* mosaic: Crystal mosaic (isotropic), gaussian RMS [arc minutes]
* mosaic_h: Horizontal (rotation around Y) mosaic (anisotropic),
* gaussian RMS [arc minutes]
* mosaic_v: Vertical (rotation around Z) mosaic (anisotropic),
* gaussian RMS [arc minutes]
* mosaic_n: Out-of-plane (Rotation around X) mosaic (anisotropic),
* gaussian RMS [arc minutes]
* recip_cell: Choice of direct/reciprocal (0/1) unit cell definition [1]
* ax:
* ay: Coordinates of first (direct/recip) unit cell vector [AA or AA^-1]
* az:
* bx:
* by: Coordinates of second (direct/recip) unit cell vector [AA or AA^-1]
* bz:
* cx:
* cy: Coordinates of third (direct/recip) unit cell vector [AA or AA^-1]
* cz:
* mx:
* my: Coordinates of vector defining the SF/NSF direction [1]
* mz:
* na:
* nb: Unit cell multipliers. The specified unit cell vectors are scaled by these factors. Note that the mulitpliers are applied directly to the raw input data. I.e. if recip. cell vectors are given, multipliers should be <1 (= 1/n). F.i. used to specify a magnetic unit cell which is larger than the chemical unit cell.
* nc:
* atom_sites: File name containing the atoms present in the unit cell. Use
* empty ("") or NULL for sigma_inc scattering only [string]
* order: limit multiple scattering up to given order
* (0: all, 1: first, 2: second, ...) [1]
* q_min: [AA^-1] lower boundary of momentum transfer range to generate hkls in
* q_max: [AA^-1] upper boundary of momentum transfer range to generate hkls in
* radius: [m] Outer radius of sample in (x,z) plane
* xwidth: [m] Width of crystal
* yheight: [m] Height of crystal
* zdepth: [m] Depth of crystal (no extinction simulated)
* geometry: [str] Name of an Object File Format (OFF) file for complex geometry. The OFF file may be generated from XYZ coordinates using qhull/powercrust
* delta_d_d: [1] Lattice spacing variance, gaussian RMS
* mosaic: [arcmin] Crystal mosaic (isotropic), gaussian RMS
* mosaic_h: [arcmin] Horizontal (rotation around Y) mosaic (anisotropic), gaussian RMS
* mosaic_v: [arcmin] Vertical (rotation around Z) mosaic (anisotropic), gaussian RMS
* mosaic_n: [arcmin] Out-of-plane (Rotation around X) mosaic (anisotropic), gaussian RMS
* recip_cell: [1] Choice of direct/reciprocal (0/1) unit cell definition
* ax: [AA or AA^-1]
* ay: [AA or AA^-1] Coordinates of first (direct/recip) unit cell vector
* az: [AA or AA^-1]
* bx: [AA or AA^-1]
* by: [AA or AA^-1] Coordinates of second (direct/recip) unit cell vector
* bz: [AA or AA^-1]
* cx: [AA or AA^-1]
* cy: [AA or AA^-1] Coordinates of third (direct/recip) unit cell vector
* cz: [AA or AA^-1]
* mx: [1]
* my: [1] Coordinates of vector defining the SF/NSF direction
* mz: [1]
* na: [1]
* nb: [1] Unit cell multipliers. The specified unit cell vectors are scaled by these factors. Note that the mulitpliers are applied directly to the raw input data. I.e. if recip. cell vectors are given, multipliers should be <1 (= 1/n). F.i. used to specify a magnetic unit cell which is larger than the chemical unit cell.
* nc: [1]
* atom_sites: [str] File name containing the atoms present in the unit cell. Use empty ("") or NULL for sigma_inc scattering only
* order: [1] limit multiple scattering up to given order (0: all, 1: first, 2: second, ...)
* q_min: [AA^-1] lower boundary of momentum transfer range to generate hkls in
* q_max: [AA^-1] upper boundary of momentum transfer range to generate hkls in
*
* Optional input parameters:
*
* p_transmit: Monte Carlo probability for neutrons to be transmitted
* without any scattering. Used to improve statistics from
* weak reflections [1]
* sigma_abs: absorption cross-section per unit cell at 2200 m/s [barns]
* sigma_inc: incoherent scattering cross-section per unit cell [barns]
* p_transmit: [1] Monte Carlo probability for neutrons to be transmitted without any scattering. Used to improve statistics from weak reflections
* sigma_abs: [barns] absorption cross-section per unit cell at 2200 m/s
* sigma_inc: [barns] incoherent scattering cross-section per unit cell
*
* CALCULATED PARAMETERS:
*
Expand Down
48 changes: 24 additions & 24 deletions mcstas-comps/samples/Tunneling_sample.comp
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,33 @@
*
* %P
* INPUT PARAMETERS:
* radius: [m] Outer radius of sample in (x,z) plane
* yheight: [m] vert. dimension of sample, as a height
* thickness: [m] Thickness of cylindrical sample in (x,z) plane
* focus_r: [m] Radius of disk containing target. Use 0 for full space
* target_index: [1] relative index of component to focus at, e.g. next is +1
* xwidth: horiz. dimension of sample, as a width [m]
* zdepth: depth of sample [m]
* focus_xw: horiz. dimension of a rectangular area [m]
* focus_yh: vert. dimension of a rectangular area [m]
* focus_aw: horiz. angular dimension of a rectangular area [deg]
* focus_ah: vert. angular dimension of a rectangular area [deg]
* sigma_abs:Absorbtion cross section pr. unit cell [barns]
* sigma_inc:Total incoherent scattering cross section pr. unit cell [barns]
* Vc: Unit cell volume [AA^3]
* p_interact: MC Probability for scattering the ray; otherwise transmit [1]
* f_QE: Fraction of quasielastic scattering [1]
* f_tun: Fraction of tunneling scattering (f_QE+f_tun < 1) [1]
* gamma: Lorentzian width of quasielastic broadening (HWHM) [meV]
* E_tun: Tunneling energy [meV]
* target_x: X-position of target to focus at [m]
* target_y: Y-position of target to focus at [m]
* target_z: Z-position of target to focus at [m]
* radius: [m] Outer radius of sample in (x,z) plane
* yheight: [m] vert. dimension of sample, as a height
* thickness: [m] Thickness of cylindrical sample in (x,z) plane
* focus_r: [m] Radius of disk containing target. Use 0 for full space
* target_index: [1] relative index of component to focus at, e.g. next is +1
* xwidth: [m] horiz. dimension of sample, as a width
* zdepth: [m] depth of sample
* focus_xw: [m] horiz. dimension of a rectangular area
* focus_yh: [m] vert. dimension of a rectangular area
* focus_aw: [deg] horiz. angular dimension of a rectangular area
* focus_ah: [deg] vert. angular dimension of a rectangular area
* sigma_abs: [barns] Absorbtion cross section pr. unit cell
* sigma_inc: [barns] Total incoherent scattering cross section pr. unit cell
* Vc: [AA^3] Unit cell volume
* p_interact: [1] MC Probability for scattering the ray; otherwise transmit
* f_QE: [1] Fraction of quasielastic scattering
* f_tun: [1] Fraction of tunneling scattering (f_QE+f_tun < 1)
* gamma: [meV] Lorentzian width of quasielastic broadening (HWHM)
* E_tun: [meV] Tunneling energy
* target_x: [m] X-position of target to focus at
* target_y: [m] Y-position of target to focus at
* target_z: [m] Z-position of target to focus at
*
* Variables calculated in the component
*
* V_my_s: Attenuation factor due to scattering [m^-1]
* V_my_a: Attenuation factor due to absorbtion [m^-1]
* V_my_s: [m^-1] Attenuation factor due to scattering
* V_my_a: [m^-1] Attenuation factor due to absorbtion
*
* %L
* <A HREF="http://neutron.risoe.dk/mcstas/components/tests/v_sample/">Test
Expand Down
Loading