GSvit documentation

open source FDTD solver with GPU support

User Tools

Site Tools


start:first_simulation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
start:first_simulation [2018/09/04 15:06]
pgrolich
start:first_simulation [2018/09/04 15:54]
pgrolich
Line 5: Line 5:
 ===== Summary ===== ===== Summary =====
  
-We will use cubic volume with centered point source, similar to a dipole located in center of computation space. ​ +We will use cubic volume with centered point source, similar to a dipole located in center of computation space. Outputs will be different cross-section planes to Gwyddion file and a text file (from single point).
-Outputs will be different cross-section planes to Gwyddion file and a text file (from single point).+
 Calculation will be performed on CPU or on GPU and material mode selection for speedup will be tested. Calculation will be performed on CPU or on GPU and material mode selection for speedup will be tested.
  
Line 24: Line 23:
 you will be able to use GUI only for parameter file setup. you will be able to use GUI only for parameter file setup.
  
-When you start XSvit, there is already a default parameter file loaded, using computational space of size 100x100x100 voxels. We will use this computational space and we will add point souce and point output. In the next figure you can see how the default settings look after XSvit start (you can rotate the 3D projection by mouse, so this was done to get a better view). Note the values of discretisation step (10 nm) in the list of all the entries on the left side of the window; if we work in vacuum (which is the case in this example) we should not use source with wavelength that is smaller than this step multiplied by ten. You can alter the discretisation settings and computational volume size by double clicking on its values in the list.+When you start XSvit, there is already a default parameter file loaded, using computational space of size 100x100x100 voxels. We will use this computational space and we will add **point souce** and **point output**. Save default parameter file to **first-simulation.par** file using menu entry //​File->​Save//​. In the next figure you can see how the default settings look after XSvit start (you can rotate the 3D projection by mouse, so this was done to get a better view). Note the values of discretisation step (10 nm) in the list of all the entries on the left side of the window; if we work in vacuum (which is the case in this example) we should not use source with wavelength that is smaller than this step multiplied by ten. You can alter the discretisation settings and computational volume size by double clicking on its values in the list.
  
 {{:​start:​screenshots:​first-simulation-init.png?​400|}} {{:​start:​screenshots:​first-simulation-init.png?​400|}}
  
-It is reasonable to save your parameter file at this stage using <​i>​File->​Save</​i>​ command. We can do it also later, just before running computation,​ however doing it right now will set the current directory and other input/​output files +It is reasonable to save your parameter file at this stage using <​i>​File->​Save</​i>​ command. We can do it also later, just before running computation,​ however doing it right now will set the current directory and other input/​output files set later can be referred to it (instead of using absolute path). Moreover, by saving parameter file we also set default directory for temporary files (e.g. generated sources), which is also important.
-set later can be referred to it (instead of using absolute path). Moreover, by saving parameter file we also set default directory +
-for temporary files (e.g. generated sources), which is also important.+
  
 First we will add **point source**. This can be done using menu entry //Edit parameters->​Add point source//. First we will add **point source**. This can be done using menu entry //Edit parameters->​Add point source//.
Line 44: Line 41:
 file much faster and see the position changes immediately.//​ file much faster and see the position changes immediately.//​
  
-Next we will add <​b>​point and image outputs</​b>​. This is done by menu entry //Edit parameters->​Add point output// and //Edit parameters->​Add image output// that again open dialogues for specifying how often (parameter "​skip"​) and which component should be output. Point output is collected from a single point within computational volume and is stored into a text file. Image output comes to general output file that can be opened by [[gwyddion.net|Gwyddion]] open source software. A cross section in certain normal direction is output, selected as shown below. We will add a cross section in every direction, so we will call the dialog three times. +Next we will add <​b>​point and image outputs</​b>​. This is done by menu entry //Edit parameters->​Add point output// and //Edit parameters->​Add image output// that again open dialogues for specifying how often (parameter "​skip"​) and which component should be output. Point output is collected from a single point within computational volume and is stored into a text file. Image output comes to general output file that can be opened by [[http://gwyddion.net|Gwyddion]] open source software. A cross section in certain normal direction is output, selected as shown below. We will add a cross section in every direction, so we will call the dialog three times.
-<img src="​http://​gsvit.net/​images_v18/​ex1_imout.png">​+
  
-<​p>​Similarily we will add point output as shown below.</​p>​ +{{:start:​screenshots:​first-simulation-image-output.png?400|}}
-<img src="​http://​gsvit.net/​images_v18/​ex1_pout.png">+
  
-<​p>​Note that all the outputs can be also seen in 3D view window. We can adjust some more computational parameters,​ +Similarily ​we will add **point output** as shown below.
-here namely ​we will increase <​b>​number of steps</​b>​ to be calculated to 300 (clicking to any of the entries in "Basic parameters"​ group). +
-Physical length of the time step is calculated automatically on the basis of space discretisation.</​p>​ +
-<img src="​http://​gsvit.net/​images_v18/​ex1_steps.png">​+
  
-<p>Finally we need to save the parameter file if we haven'​t done it at beginning, as since now we worked only with a temporary file or at least modified file +{{:​start:​screenshots:​first-simulation-point-output.png?​400|}} 
-(it is important to save it always before running computation which is not done automatically). This is done by <i>File->​Save</i> command as usual. Then we can  + 
-<b>start the computation</​b> ​clicking on the arrow in the toolbar or using <i>Execute->​Run</i> menu command.</p> <​p><​i>​Hint: if we don't want to use +Note that all the outputs can be also seen in 3D view window. We can adjust some more computational parameters,​ 
-the GUI for starting the computation we can always run GSvit manually on our parameter file.</i></p> +here namely we will increase **number of steps** to be calculated to 300 (clicking to any of the entries in "Basic parameters"​ group). 
-<a href="​http://​gsvit.net/​images_v18/​ex1_nonebcout.png"><​img src="​http://​gsvit.net/​images_v18/​ex1_nonebcout.png" width="​800"></​a>​+Physical length of the time step is calculated automatically on the basis of space discretisation. 
 + 
 +{{:​start:​screenshots:​first-simulation-basic-parameters.png?​400|}} 
 + 
 +Finally we need to save the parameter file if we haven'​t done it at beginning, as since now we worked only with a temporary file or at least modified file (it is important to save it always before running computation which is not done automatically). This is done by //File->​Save/​command as usual. Then we can  
 +**start the computation** clicking on the arrow in the toolbar or using //Execute->​Run/​menu command. 
 + 
 +//Hint: if we don't want to use the GUI for starting the computation we can always run GSvit manually on our parameter file.// 
 + 
 +{{:start:screenshots:​first-simulation-run.png?400|}}
  
 <​p>​While computation is running we can see the GSvit output (if the verbose level is not 0) and we can choose any text file output <​p>​While computation is running we can see the GSvit output (if the verbose level is not 0) and we can choose any text file output
start/first_simulation.txt · Last modified: 2019/01/14 07:58 by pgrolich