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
start:first_simulation [2018/09/04 15:20]
pgrolich
start:first_simulation [2019/01/14 07:58] (current)
pgrolich
Line 27: Line 27:
 {{:​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 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.+It is reasonable to save your parameter file at this stage using //File->​Save/​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.
  
 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 41: 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 [[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.+Next we will add **point and image outputs**. 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.
  
-{{:​start:​first-simulation-image-output.png?​400|}}+{{:start:​screenshots:​first-simulation-image-output.png?​400|}}
  
-Similarily we will add point output as shown below.+Similarily we will add **point output** as shown below.
  
-<img src="​http://​gsvit.net/​images_v18/​ex1_pout.png">+{{:start:​screenshots:​first-simulation-point-output.png?400|}}
  
-<p>Note that all the outputs can be also seen in 3D view window. We can adjust some more computational parameters,​ +Note that all the outputs can be also seen in 3D view window. We can adjust some more computational parameters,​ 
-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). +here namely we will increase ​**number of steps** 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>​ +Physical length of the time step is calculated automatically on the basis of space discretisation.
-<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-basic-parameters.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>​Hintif we don't want to use +
-the GUI for starting the computation we can always run GSvit manually on our parameter file.</​i></​p>​ +
-<a href="​http://​gsvit.net/​images_v18/​ex1_nonebcout.png"><​img src="​http://​gsvit.net/​images_v18/​ex1_nonebcout.png" width="​800"></​a>​+
  
-<​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 +Finally ​we need to save the parameter file if we haven'​t done it at beginningas 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  
-to be visualised in the graph window. You can also watch preview of last saved images - slices through the computational volume - directly in 3D view. +**start ​the computation** clicking ​on the arrow in the toolbar or using //Execute->Run// menu command.
-The GSvit output is directly what you would see if you run it at console, with no GUI. +
-Note that graph is updated at maximum ​as often as the data are saved, so if we skip every 100 points +
-while setting ​the output we will see the graph updated only e.g. every few seconds (depending ​on computational volume size, etc.). +
-Similarily, ​the images ​in the 3D view are updated when these are saved by the computational core (so you can affect the update frequency +
-by image output skipping parameter).<​/p>+
  
-<​p>​When computation is finished or killed by the Stop command (again via toolbar or menu), we can <​b>​open the output</b> file. As most of the +//Hint: if we don't want to use the GUI for starting ​the computation ​we can always run GSvit manually ​on our parameter file.//
-data are output in Gwyddion file we can directly open it using Gwyddion called from the menu or toolbar. Gwyddion is a powerfull 2D/3D data +
-processing software, however ​we will only use it to see the images in this example. As image outputs are saved succesively as the GSvit +
-is running, we will be probably having more channels to see in Gwyddion, so we pick what is interesting ​for us in the Gwyddion Data Browser.</​p>​ +
-<a href="​http://​gsvit.net/​images_v18/​ex1_shortwrong.png"><​img src="​http://​gsvit.net/​images_v18/​ex1_shortwrong.png"​ width="​800"></​a>​ +
-<​p>​Note that in this example ​we have clicked ​on <​i>​Data Process->​Presentation->​Logscale<​/i> for every displayed output to see the data in +
-better scale. We can see that in different cross-sections of the computational space there is a wave similar to a dipole output.</p>+
  
-<p>If we check the data in further time steps, we can see that they look much worse.</​p>​ +{{:start:screenshots:​first-simulation-run.png?400|}}
-<a href="​http://​gsvit.net/​images_v18/​ex1_longwrong.png"><​img src="​http://​gsvit.net/​images_v18/​ex1_longwrong.png" width="​800"></​a>​+
  
-<​p>​This behavior ​is caused by unset <​b>​boundary conditions</​b>​ that behave like mirrors here.  +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 ​to be visualised in the graph window. You can also watch preview ​of last saved images - slices through ​the computational ​volume - directly in 3D view. The GSvit output is directly what you would see if you run it at console, with no GUI. Note that graph is updated at maximum as often as the data are saved, so if we skip every 100 points while setting the output we will see the graph updated only e.g. every few seconds (depending ​on computational volume size, etc.). Similarily, the images ​in the 3D view are updated when these are saved by the computational core (so you can affect the update frequency by image output skipping parameter).
-In order to let the wave go out of the computational +
-space we need to apply an absorbing boundary condition, so we click on any entry in "​Boundary conditions"​ set to change ​the boundary conditions +
-on all the faces to a simple absorbing condition ​(Liao).</​p>​ +
-<img src="​http://​gsvit.net/​images_v18/​ex1_bcs.png">​+
  
-<p>After that (and saving the file, running computation and redisplaying data again) we can see that the output is already propagating +When computation is finished or killed by the Stop command (again via toolbar or menu), we can **open the output file**. As most of the data are output in Gwyddion file we can directly open it using Gwyddion called from the menu or toolbar. Gwyddion is a powerfull 2D/3D data processing software, however we will only use it to see the images in this example. As image outputs are saved succesively as the GSvit is running, we will be probably having more channels to see in Gwyddion, so we pick what is interesting for us in the Gwyddion Data Browser. 
-freely outside of the computation volume.</p> + 
-<a href="​http://​gsvit.net/​images_v18/​ex1_longok.png"><​img src="​http://​gsvit.net/​images_v18/​ex1_longok.png" width="​800"></​a>​+{{:​start:​first-simulation-shortwrong.png?​400|}} 
 + 
 +Note that in this example we have clicked on //Data Process->Presentation->​Logscale//​ for every displayed output to see the data in better scale. We can see that in different cross-sections of the computational space there is a wave similar to a dipole output. 
 + 
 +If we check the data in further time steps, we can see that they look much worse. 
 + 
 +{{:​start:​screenshots:​first-simulation-longwrong.png?​400|}} 
 + 
 +This behavior is caused by unset **boundary conditions** that behave like mirrors here. In order to let the wave go out of the computational space we need to apply an absorbing boundary condition, so we click on any entry in "​Boundary conditions"​ set to change the boundary conditions on all the faces to a simple absorbing condition (Liao). 
 + 
 +{{:​start:​first-simulation-boundary-conditions.png?​400|}} 
 + 
 +After that (and saving the file, running computation and redisplaying data again) we can see that the output is already propagating freely outside of the computation volume. 
 + 
 +{{:start:screenshots:​first-simulation-longok.png?400|}}
  
  
start/first_simulation.1536067255.txt.gz · Last modified: 2018/09/04 15:20 by pgrolich