This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:gsvit_inputs [2015/07/17 21:23] pklapetek |
docs:gsvit_inputs [2023/08/06 15:05] (current) pklapetek |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | ===== GSvit input files ===== | ||
+ | |||
+ | As an input for GSvit, plain text files are used. The most important one | ||
+ | is the parameter file (*.par) which controls all the calculation (number of steps, | ||
+ | computational domain sources, etc.). Some additional files can be used e.g. for | ||
+ | specifying the geometry of material inside computational domain. | ||
+ | |||
+ | Here follows the documentation for last stable release: | ||
+ | |||
<html> | <html> | ||
<h3>Parameter file description</h3> | <h3>Parameter file description</h3> | ||
Line 15: | Line 25: | ||
200 200 200 1e-6 1e-6 1e-6 | 200 200 200 1e-6 1e-6 1e-6 | ||
</tt> | </tt> | ||
+ | <br><br> | ||
<p><b>COMP</b><br> | <p><b>COMP</b><br> | ||
Line 24: | Line 35: | ||
</tt> | </tt> | ||
+ | <br><br> | ||
<p><b>THREADS</b><br> | <p><b>THREADS</b><br> | ||
<i>nthreads</i><br> | <i>nthreads</i><br> | ||
Line 36: | Line 48: | ||
</tt> | </tt> | ||
+ | <br><br> | ||
<p><b>MATMODE_CHECK</b><br> | <p><b>MATMODE_CHECK</b><br> | ||
<i>0/1</i><br> | <i>0/1</i><br> | ||
Line 49: | Line 62: | ||
</tt> | </tt> | ||
+ | <br><br> | ||
<p><b>MEDIUM_LINEAR</b><br> | <p><b>MEDIUM_LINEAR</b><br> | ||
<i>filename</i><br> | <i>filename</i><br> | ||
Line 59: | Line 73: | ||
</p> | </p> | ||
+ | <br><br> | ||
<p><b>MEDIUM_VECTOR</b><br> | <p><b>MEDIUM_VECTOR</b><br> | ||
<i>filename</i><br> | <i>filename</i><br> | ||
Line 117: | Line 132: | ||
<tt><br><br> | <tt><br><br> | ||
5 0.89583 0 13.8737e15 0.0207332e15 1.3735 -0.504659 7.59914e15 4.28431e15 0.304478 -1.48944 6.15009e15 0.659262e15 (silver)<br> | 5 0.89583 0 13.8737e15 0.0207332e15 1.3735 -0.504659 7.59914e15 4.28431e15 0.304478 -1.48944 6.15009e15 0.659262e15 (silver)<br> | ||
- | 5 1.11683 0 13.1839e15 0.0207332e15 3.04155 -1.09115 4.20737e15 2.35409e15 0.273221 -1.18299 3.88123e15 0.452005e15 (gold)<br> | + | 5 1.11683 0 13.1839e15 0.109173e15 3.04155 -1.09115 4.20737e15 2.35409e15 0.273221 -1.18299 3.88123e15 0.452005e15 (gold)<br> |
5 1.82307 0 13.3846e15 0.163439e15 2.57278 -1.56922e-8 6.65296e15 3.80643e15 0.638294 -1.22019 3.39199e15 0.472389e15 (copper)<br> | 5 1.82307 0 13.3846e15 0.163439e15 2.57278 -1.56922e-8 6.65296e15 3.80643e15 0.638294 -1.22019 3.39199e15 0.472389e15 (copper)<br> | ||
<br> | <br> | ||
Line 261: | Line 276: | ||
</ul> | </ul> | ||
+ | <br><br> | ||
<p><b>BOUNDARY_X0/BOUNDARY_XN/BOUNDARY_Y0/BOUNDARY_YN/BOUNDARY_Z0/BOUNDARY_ZN</b><br> | <p><b>BOUNDARY_X0/BOUNDARY_XN/BOUNDARY_Y0/BOUNDARY_YN/BOUNDARY_Z0/BOUNDARY_ZN</b><br> | ||
<i>type</i><br> | <i>type</i><br> | ||
Line 266: | Line 282: | ||
Some combinations may lead to instabilities, e.g. corner of cpml and liao region. | Some combinations may lead to instabilities, e.g. corner of cpml and liao region. | ||
+ | <br><br> | ||
<p><b>MBOUNDARY_X0/MBOUNDARY_XN/MBOUNDARY_Y0/MBOUNDARY_YN/MBOUNDARY_Z0/MBOUNDARY_ZN</b><br> | <p><b>MBOUNDARY_X0/MBOUNDARY_XN/MBOUNDARY_Y0/MBOUNDARY_YN/MBOUNDARY_Z0/MBOUNDARY_ZN</b><br> | ||
<i>type position</i><br> | <i>type position</i><br> | ||
Line 284: | Line 301: | ||
<b>Medium modifiers</b> | <b>Medium modifiers</b> | ||
- | |||
- | <p><b>MEDIUM_ROUGHEN</b><br> | ||
- | <i>radius_peak radius_span iterations probability material_index void_index random_seed</i><br> | ||
- | Adds roughness to objects consisting of defined tabulated material (parameter material_index) adding this | ||
- | material and void or any other material (parameter void_index) to the object randomly. | ||
- | Roughness is controlled by parameter radius_peak and radius_span (both in voxel coordinates) that | ||
- | control radius and dispersion of spheres that are added. Parameter probability controls amount of spheres | ||
- | added in every point. Random seed can be any integer to get same result or -1 to generate seed automatically. | ||
- | Note that materials (parameter material index) are counted from 1 as they are loaded from vector material | ||
- | file (so the first material listed there has index of 1). Material with index=0 is vacuum by default | ||
- | As an example, to add roughness to a sphere (the only object in material file), using 20 iterations | ||
- | of adding and removing spheres of radius 5+-2 voxels, add this: | ||
- | <tt><br><br> | ||
- | MEDIUM_ROUGHEN<br> | ||
- | 5 2 20 0.01 1 0 1<br> | ||
- | </tt> | ||
- | </p> | ||
- | <p><i>Note that this option is not supported for direct editing by XSvit in this version</i></p> | ||
<p><b>MEDIUM_GROW</b><br> | <p><b>MEDIUM_GROW</b><br> | ||
Line 326: | Line 325: | ||
<p><i>Note that this option is not supported for direct editing by XSvit in this version</i></p> | <p><i>Note that this option is not supported for direct editing by XSvit in this version</i></p> | ||
+ | <p><b>MEDIUM_ROUGHEN</b><br> | ||
+ | <i>radius_peak radius_span iterations probability material_index void_index random_seed</i><br> | ||
+ | Adds roughness to objects consisting of defined tabulated material (parameter material_index) adding this | ||
+ | material and void or any other material (parameter void_index) to the object randomly. | ||
+ | Roughness is controlled by parameter radius_peak and radius_span (both in voxel coordinates) that | ||
+ | control radius and dispersion of spheres that are added. Parameter probability controls amount of spheres | ||
+ | added in every point. Random seed can be any integer to get same result or -1 to generate seed automatically. | ||
+ | Note that materials (parameter material index) are counted from 1 as they are loaded from vector material | ||
+ | file (so the first material listed there has index of 1). Material with index=0 is vacuum by default | ||
+ | As an example, to add roughness to a sphere (the only object in material file), using 20 iterations | ||
+ | of adding and removing spheres of radius 5+-2 voxels, add this: | ||
+ | <tt><br><br> | ||
+ | MEDIUM_ROUGHEN<br> | ||
+ | 5 2 20 0.01 1 0 1<br> | ||
+ | </tt> | ||
+ | </p> | ||
+ | <p><i>Note that this option is not supported for direct editing by XSvit in this version</i></p> | ||
+ | |||
+ | <p><b>MEDIUM_SPECTRAL</b><br> | ||
+ | <i>sigma T material_index random_seed</i><br> | ||
+ | Adds roughness to objects consisting of all tabulated materials (parameter material_index is only reserved for future use) using spectral synthesis and vector displacement method. Roughness parameters sigma and T controlling variance and correlation length are given in voxels. | ||
+ | Random seed can be -1 to get it randomly. | ||
+ | |||
+ | <p><b>MEDIUM_EXPRESSION</b><br> | ||
+ | <i>i_start j_start k_start i_end j_end k_end material_index void_index max_distance distance_mode expression</i><br> | ||
+ | Alters object boundary using some analytical expression. In the expression, x, y and z mean the voxel coordinates. Basic mathematical functions and constants (pi) can be used. | ||
+ | As an example, this combination of sine functions can create quite chaotic surface shape: | ||
+ | <tt><br><br> | ||
+ | MEDIUM_EXPRESSION<br> | ||
+ | 10 10 10 290 290 290 1 0 10 1 0.5+0.08*sin(x/2)+0.08*sin(y/3)+0.08*sin(z/3.8)+0.08*sin((x+y)/5)+0.08*sin((y+z)/2.5)+0.08*sin((x+z)/4.2)<br> | ||
+ | </tt> | ||
+ | |||
+ | |||
+ | <br><br> | ||
<p><b>MEDIUM_SMOOTH</b><br> | <p><b>MEDIUM_SMOOTH</b><br> | ||
<i>unused_integer_parameter</i><br> | <i>unused_integer_parameter</i><br> | ||
Line 352: | Line 385: | ||
Theta and phi equal to zero correspond to x-direction electric field point source.</p> | Theta and phi equal to zero correspond to x-direction electric field point source.</p> | ||
+ | <br><br> | ||
<p><b>SOURCE_TSF</b><br> | <p><b>SOURCE_TSF</b><br> | ||
<i>i_start j_start k_start i_end j_end k_end theta phi psi mode (filename, values)</i><br> | <i>i_start j_start k_start i_end j_end k_end theta phi psi mode (filename, values)</i><br> | ||
Line 370: | Line 404: | ||
some typical useful values of parameters:</p> | some typical useful values of parameters:</p> | ||
<table border="1"> | <table border="1"> | ||
- | <tr><th>direction</th><th>polarisation</th><th>theta [deg]</th><th>phi [deg]</th><th>psi [deg]</th><th rowspan=7><img src="images/tsf.png"></th></tr> | + | <tr><th>direction</th><th>polarisation</th><th>theta [deg]</th><th>phi [deg]</th><th>psi [deg]</th><th rowspan=7><img src="http://gsvit.net/images/tsf.png"></th></tr> |
<tr><td>x axis</td><td>y</td><td>90</td><td>0</td><td>0</td></tr> | <tr><td>x axis</td><td>y</td><td>90</td><td>0</td><td>0</td></tr> | ||
<tr><td>x axis</td><td>z</td><td>90</td><td>0</td><td>90</td></tr> | <tr><td>x axis</td><td>z</td><td>90</td><td>0</td><td>90</td></tr> | ||
Line 383: | Line 417: | ||
<i>boundary</i><br> | <i>boundary</i><br> | ||
Specifies boundary that should be excluded from TSF application. Parameter "boundary" | Specifies boundary that should be excluded from TSF application. Parameter "boundary" | ||
- | is string denoting which boundary is being set (i0, j0, k0, in, jn, kn). Note that | + | is string denoting which boundary is being set (i0, j0, k0, in, jn, kn, depth N). Note that |
in principle TSF should be applied on all the boundaries to work properly, but in case | in principle TSF should be applied on all the boundaries to work properly, but in case | ||
of special materials or boundary conditions some boundary skipping can make sense. | of special materials or boundary conditions some boundary skipping can make sense. | ||
+ | The special boundary setting "depth" followed by a positive integer number, e.g. "depth 5" | ||
+ | causes solver to skip the TSF application in all the places with some material (not vacuum) | ||
+ | and even some number of voxels (parameter depth) close to it. This is useful to remove only some area where material is traversing the TSF boundary from the TSF application. | ||
</p> | </p> | ||
Line 461: | Line 498: | ||
parameter "mode" is therefore followed by wavelength and by gaussian envelope width, | parameter "mode" is therefore followed by wavelength and by gaussian envelope width, | ||
given in integer steps of the simulation (e.g. 20), and finally electric field amplitude. | given in integer steps of the simulation (e.g. 20), and finally electric field amplitude. | ||
+ | </p> | ||
+ | |||
+ | |||
+ | <p><b>TSFF_EXPORT</b><br> | ||
+ | <i>filebase_e filebase_h</i><br> | ||
+ | Saves the calculated focused source boundary data for further use by SOURCE_TSFF_EXT. Only top z plane is used. Files contain both ex, ey and hx, hy components, for each step one file is created. | ||
+ | </p> | ||
+ | |||
+ | <p><b>SOURCE_TSFF_EXT</b><br> | ||
+ | <i>i_start j_start k_start i_end j_end k_end filebase_e filebase_h</i><br> | ||
+ | Uses pre-calculated focused source boundary data as a source. Only top z plane is used. Settings should be same as in SOURCE_TSFF_EXPORT. | ||
</p> | </p> | ||
Line 511: | Line 559: | ||
<p><b>OUT_IMAGE</b><br> | <p><b>OUT_IMAGE</b><br> | ||
- | <i>Ex/Ey/Ez/Hx/Hy/Hz/All/Epsilon/Sigma/Mu/Sigast nskip i j k description</i><br> | + | <i>Ex/Ey/Ez/Hx/Hy/Hz/All/Epsilon/Sigma/Mu/Sigast/Material nskip i j k description</i><br> |
Output image of plane cross-section. Which plane is used is determined | Output image of plane cross-section. Which plane is used is determined | ||
by indices i j k; two of them must be -1. All results are saved to a .gwy file, skipping given | by indices i j k; two of them must be -1. All results are saved to a .gwy file, skipping given | ||
Line 519: | Line 567: | ||
<p>Note that Gwyddion shows data with top-left corner being center of coordinates, | <p>Note that Gwyddion shows data with top-left corner being center of coordinates, | ||
orientation of axes on what is seen in Gwyddion is show below</p> | orientation of axes on what is seen in Gwyddion is show below</p> | ||
- | <img src="images/out.png"> | + | <img src="http://gsvit.net/images/out.png"> |
<p><b>OUT_SUM</b><br> | <p><b>OUT_SUM</b><br> | ||
Line 554: | Line 602: | ||
directly by e.g. <a href="http://paraview.org">Paraview</a> as shown below where a slice of absorption | directly by e.g. <a href="http://paraview.org">Paraview</a> as shown below where a slice of absorption | ||
volume of 100x100x100 voxels is visualised (here you can check also data loading parameters for Paraview).<br> | volume of 100x100x100 voxels is visualised (here you can check also data loading parameters for Paraview).<br> | ||
- | <a href="images/sv_paraview.png"><img src="images/sv_paraview.png" width="500"></a> | + | <a href="images/sv_paraview.png"><img src="http://gsvit.net/images/sv_paraview.png" width="500"></a> |
</p> | </p> | ||