PARADISCYL:Test-Run: Difference between revisions
No edit summary |
|||
| (30 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<H1 ALIGN="CENTER"><FONT SIZE="-1">Manual 02 for ParaDiS Cylinder Codes</FONT> |
<H1 ALIGN="CENTER"><FONT SIZE="-1">Manual 02 for ParaDiS Cylinder Codes</FONT> |
||
< |
<br><br> |
||
How to run test simulations</H1> |
How to run test simulations</H1> |
||
<DIV> |
<DIV> |
||
This document describes the extension of the ParaDiS program that implements the cylindrical free surface boundary condition. This extension is based on Weinberger and Cai, J. Mech. Phys. Solids, 55, 2027 (2007)([http://micro.stanford.edu/~caiwei/papers/Weinberger07jmps-image.pdf PDF]). The code is written by Chris Weinberger and Wei Cai and is not included in the standard distribution of ParaDiS. Keonwook Kang wrote the first draft of this document, which was later revised by Chris Weinberger and Wei Cai. Questions on this document should be addressed to [[Chris Weinberger]]. Please read the manual of ParaDiS before reading this document. |
|||
<P ALIGN="CENTER"><STRONG>Keonwook Kang and Wei Cai</STRONG></P> |
|||
</DIV> |
|||
<P ALIGN="CENTER">Original date : [[ Oct 2 ]], [[2008]]</P> |
|||
<P ALIGN="CENTER">Latest update on [[ Oct 2 ]], [[2008]]</P> |
|||
<P> |
|||
<BR><HR> |
|||
<!--Table of Child-Links--> |
|||
== Run a Test Case == |
|||
The command line to run the ParaDiS Cylinder code is the same as that of the original ParaDiS code. See [[Overview of ParaDiS 2.2#Executing ParaDiS|ParaDiS manual]] for details. The command line format is: |
|||
== Run command == |
|||
The ParaDis Cylinder command line format is exactly same with that of the original ParaDiS codes. Refer the [[Overview of ParaDiS 2.2#Executing ParaDiS|ParaDiS manual]] for detail. |
|||
The line format is: |
|||
paradiscyl [-r <numCycles>] [-d dataFile] <controlFile> |
paradiscyl [-r <numCycles>] [-d dataFile] <controlFile> |
||
| Line 47: | Line 38: | ||
</TABLE> |
</TABLE> |
||
Run the following control file, which simulates a dislocation loop inside a cylinder. You will need two input files: one is control file ('''concentric_loop_test.ctrl''') and the other is data file ('''concentric_loop_test.data'''). Both files are shown below. See [[Overview of ParaDiS 2.2#Inputs|here]] for details about input files. |
|||
=== Examples === |
|||
Run the following control file, which simulates a dislocation loop inside a cylinder. If you see a new pop-up window shown in image, you are ready to exploit this tool. |
|||
$ bin/paradiscyl runs/concentric_loop_test.ctrl |
$ bin/paradiscyl runs/concentric_loop_test.ctrl |
||
This run requires the following two input files. |
|||
[[media:concentric_loop_test.ctrl.txt | concentric_loop_test.ctrl]] |
|||
[[media:concentric_loop_test.data.txt | concentric_loop_test.data]] |
|||
If your run is successful, you should see a pop-up window as shown below. |
|||
<gallery widths="300px" heights="300px" perrow="1"> |
<gallery widths="300px" heights="300px" perrow="1"> |
||
Image:Paradis-cyl-testrun.jpg |Fig.1 ParaDiS Cylinder Codes Test Run |
Image:Paradis-cyl-testrun.jpg |Fig.1 ParaDiS Cylinder Codes Test Run. A dislocation loop in a cylinder |
||
</gallery> |
</gallery> |
||
-------- |
-------- |
||
== |
== X Window Control == |
||
Download the latest ParaDiS codes from micro repository site using subversion checkout command. |
|||
Default X Window '''control parameters''' are given in the file '''inputs/paradis.xdefaults'''. |
|||
<pre> |
|||
You can change window size, line width, rotation of angles, ''etc'' by modifying this file. |
|||
$ mkdir ParaDiS |
|||
$ svn co https://micro.stanford.edu/svn/ParaDiS ./ParaDiS |
|||
</pre> |
|||
The '''3D View''' in the X Window can be manipulated by both mouse and keyboard. For example, press r (default) and then move mouse to rotate the object, press s and then move mouse to scale the object. A complete list of hot keys are given below. |
|||
Note that this version of ParaDiS has branched out from the public ParaDiS codes v.2.2 downloadable from the |
|||
[http://paradis.stanford.edu official site]. You see there are extra subdirectories such as '''aniso''', '''cylinder''', '''halfspace''', '''matlab''', '''thinfilm''' and '''fem''' in this version of ParaDiS codes. Each subdirectory contains additional source codes for its own purpose. For example, source codes in '''cylinder''' directory enable to run ParaDiS simulation of dislocations inside cylindrical geometry taking account of the image stress and Yoffe stress. |
|||
<pre> |
<pre> |
||
| Line 100: | Line 92: | ||
---- |
---- |
||
== Tcl script to generate input data == |
|||
== MAKE == |
|||
Move into '''cylinder''' subdirectory. |
|||
The input data file '''concentric_loop_test.data''' is generated by the tcl script[[media:create_loop_data.tcl.txt | create_loop_data.tcl]] in the ParaDiS/tools directory, which can run by typing |
|||
$ cd ParaDiS/cylinder |
|||
$ tools/create_loop_data.tcl |
|||
There is a make description file, '''makefile''', |
|||
at the top of which, it includes '''../makefile.sys''' and '''../makefile.setup''' from the upper directory. |
|||
You can easily modify this tcl script to change the resulting input dislocation structure, such as the radius of the dislocation loop. |
|||
'''makefile.sys''' defines system-dependent compilers and compiling options for different systems such as ''linux'', ''aix'', etc. The pre-defined system types and their descriptions are listed in the head of '''makefile.sys''' file. |
|||
---- |
|||
In '''makefile.setup''' file, you can select various 'make' settings and switches, some of which are explained below. |
|||
== Problems and solutions == |
|||
::;SYS : select system type. ''ex''. '''SYS = linux''' |
|||
::;MODE : set serial or parallel mode. ''ex''. '''MODE = SERIAL''' |
|||
::;XLIB_MODE : enable or disable xwindow plotting capability. ''ex''. '''XLIB_MODE = ON''' |
|||
::;OPT : define optimization level. ''ex''. '''OPT = -O3''' |
|||
=== Cannot open shared library libgsl === |
|||
In '''makefile''', there is important macro '''DEFS'''. The cylinder codes behave differently depending on how '''DEFS''' is defined. |
|||
Sometimes the code may compile successfully but throws the following error message when you try to run it. |
|||
::;DEFS += -D_CYL : Needs to be included for cylinder codes. |
|||
./bin/paradiscyl: error while loading shared libraries: libgsl.so.0: cannot open |
|||
::;DEFS += -D_NOBEMSTRESS : No boundary image stress will be considered. |
|||
shared object file: No such file or directory |
|||
::;DEFS += -D_NOYOFFESTRESS : No Yoffe stress will be considered. |
|||
This means you need to specify the path to the GSL libraries, which are dynamically linked to the executable. For example, if your GSL library files are located in /usr/local/lib, then you can add the following line in your '''~/.bash_profile''' file |
|||
::;DEFS += -D_NULLCYLSTRESS : Ignore all image stress. (BEM, Yoffe, Virtual seg.(??)) |
|||
::;DEFS += -D_NOVIRTUALSEG : No force contribution from virtual segments.(??) |
|||
::;DEFS += -D_CYLMETHOD1 : If defined, grid stress is used for image stress calculation. If not, Green stress is used.<ref>For details of each method, refer C. R. Weinberger and Wei Cai, '''Computing Image Stress in an Elastic Cylinder''', ''Journal of the Mechanics and Physics of Solids'','''55''' (2007) 2027--2054</ref> |
|||
::;DEFS += -D_WRITENODEFORCE : Will write nodal force data in '''force.out''' file. Each line of the file contains nodal position ''x'', ''y'', ''z'' and nodal force ''f''<sub>x</sub>, ''f''<sub>y</sub> and ''f''<sub>z</sub>. |
|||
::;DEFS += -D_PRINTCYLSTRESS : Will write nodal force in '''force.out''' and stress in '''stress.out''' files. Each line of '''stress.out''' contains grid position ''r'', ''θ'', ''z'' and stress components ''σ''<sub>11</sub>, ''σ''<sub>22</sub>, ''σ''<sub>33</sub>, ''σ''<sub>12</sub>, ''σ''<sub>23</sub>, ''σ''<sub>31</sub>. (??) |
|||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ |
|||
Depending on your need, you can selectively define '''DEFS''' macro. |
|||
and then type |
|||
You can make the executible file, '''paradiscyl''' by simply typing |
|||
source ~/.bash_profile |
|||
$ make |
|||
=== Error in opening input file === |
|||
and you will see '''paradiscyl''' in the directory ../bin/. |
|||
When ParaDiS can not locate input files, it shows the following error message. |
|||
---- |
|||
Fatal: ReadControlFile: Error 2 opening file XXXX |
|||
Check whether you gave the correct path for your input file. |
|||
<!-- |
|||
== Problems and solutions == |
|||
=== Overflow error === |
|||
./bin/paradiscyl: error while loading shared libraries: libgsl.so.0: cannot open |
|||
shared object file: No such file or directory |
|||
Fatal: ReadControlFile: Error 2 opening file XXXX |
|||
Currently, if you declare '''DEFS += -D_CYLMETHOD1''' in '''makefile''', ParaDiS issues the following error message. |
|||
gsl: bessel_In.c:202: ERROR: overflow |
gsl: bessel_In.c:202: ERROR: overflow |
||
Default GSL error handler invoked. |
Default GSL error handler invoked. |
||
Aborted |
Aborted |
||
Do not use method 1 temporarily. |
|||
THIS ISSUE IS RESOLVED. |
|||
--> |
|||
=== Underflow error === |
|||
In the old version of Cylinder code, you may get an underflow error message. This can be avoided by downloading the latest version or by inserting the following line into '''cylinder/gridstress.c''' |
|||
gsl_set_error_handler_off(); |
|||
You also need to include the following header file at the beginning of '''gridstress.c'''. |
|||
#include <gsl/gsl_errno.h> |
|||
== Notes == |
== Notes == |
||
Latest revision as of 17:02, 27 October 2008
Manual 02 for ParaDiS Cylinder Codes
How to run test simulations
This document describes the extension of the ParaDiS program that implements the cylindrical free surface boundary condition. This extension is based on Weinberger and Cai, J. Mech. Phys. Solids, 55, 2027 (2007)(PDF). The code is written by Chris Weinberger and Wei Cai and is not included in the standard distribution of ParaDiS. Keonwook Kang wrote the first draft of this document, which was later revised by Chris Weinberger and Wei Cai. Questions on this document should be addressed to Chris Weinberger. Please read the manual of ParaDiS before reading this document.
Run a Test Case
The command line to run the ParaDiS Cylinder code is the same as that of the original ParaDiS code. See ParaDiS manual for details. The command line format is:
paradiscyl [-r <numCycles>] [-d dataFile] <controlFile>
where:
| <ctrlFile> | Specifies the name of the ParaDiS control parameter file | ||
| -d <dataFile> | Specifies the base name of the file(s) containing the nodal data for the run. If this file name is not supplied, the code looks for a data file named the same as the control file with the file name suffix (if any) replaced with ".data" | ||
| -r <numCycles> | Causes the code to execute a series of <numCycles> cycles during which no force calculations or dislocation movement will occur. These cycles will be used strictly for load-balancing purposes and will be done before the normal cycles. This can be useful when a simulation is started with a uniform domain decomposition and needs time to converge on an optimal decomposition as would occur when restarting a simulation on a different number of cpus |
Run the following control file, which simulates a dislocation loop inside a cylinder. You will need two input files: one is control file (concentric_loop_test.ctrl) and the other is data file (concentric_loop_test.data). Both files are shown below. See here for details about input files.
$ bin/paradiscyl runs/concentric_loop_test.ctrl
This run requires the following two input files.
concentric_loop_test.ctrl concentric_loop_test.data
If your run is successful, you should see a pop-up window as shown below.
X Window Control
Default X Window control parameters are given in the file inputs/paradis.xdefaults. You can change window size, line width, rotation of angles, etc by modifying this file.
The 3D View in the X Window can be manipulated by both mouse and keyboard. For example, press r (default) and then move mouse to rotate the object, press s and then move mouse to scale the object. A complete list of hot keys are given below.
YWindow: yview: Mouse drag to rotate Hot Keys: F1 : display this message Up : rotate up Down : rotate down Left : rotate left Right : rotate right PgUp : rotate counterclockwise PgDn : rotate clockwise Home : back to initial viewpoint Space : stop rotate p : toggle pause t : translation s : scaling d : move projection infinity point r : rotation f : toggle pbc enableness m : toggle drawframe g : pbc glide x : pbc shift in x y : pbc shift in y z : pbc shift in z w : print window specification F9 : output gif F10 : output postscript
Tcl script to generate input data
The input data file concentric_loop_test.data is generated by the tcl script create_loop_data.tcl in the ParaDiS/tools directory, which can run by typing
$ tools/create_loop_data.tcl
You can easily modify this tcl script to change the resulting input dislocation structure, such as the radius of the dislocation loop.
Problems and solutions
Sometimes the code may compile successfully but throws the following error message when you try to run it.
./bin/paradiscyl: error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory
This means you need to specify the path to the GSL libraries, which are dynamically linked to the executable. For example, if your GSL library files are located in /usr/local/lib, then you can add the following line in your ~/.bash_profile file
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
and then type
source ~/.bash_profile
Error in opening input file
When ParaDiS can not locate input files, it shows the following error message.
Fatal: ReadControlFile: Error 2 opening file XXXX
Check whether you gave the correct path for your input file.
Underflow error
In the old version of Cylinder code, you may get an underflow error message. This can be avoided by downloading the latest version or by inserting the following line into cylinder/gridstress.c
gsl_set_error_handler_off();
You also need to include the following header file at the beginning of gridstress.c.
#include <gsl/gsl_errno.h>