Home
Reference Manuals
Return
Up
Hands on session: Creation of a sine-wave
- All computers should be up and running, so you can start work immediately.
(If not: start the computer and log in as user: gensys password: gensys1)
- Open the gensys file manager window by: double-clicking the
-icon on the desktop or
press Alt+F2 and write gensys
- The gensys file manager window will now start in the users home-directory.
- Please double-click on the folder course_IIT_0605, and then click the cd-button.
- Open this manual by clicking Help->Homepage in the gensys window.
- In the web-browser, click Course in the lower right corner.
- Go back to the gensys window and
create a work space for the sine-wave example
by writing the UNIX-command mkdir my_sine_wave in
the text field to the right of the cmd-button.
- Send the command to the UNIX-system by pressing the Return-key or clicking the cmd-button.
- Goto the new directory by double-clicking on its name in the
upper or lower text area, then clicking the cd-button.
- Under the pulldown menu Help press Examples Html.
- Scroll down and click on program TSIM.
- In the page "Input data examples for Program TSIM", press on the link sine.
- Press Copy in the popup-widows, in order to accept the copying the files to your
directory my_sine_wave.
Four files and three directories has now been created in your my_sine_wave-directory.
- Execute file runf/sine.tsimf by:
- Double-click directory runf in the left window under the radio-buttons
All, Input and Output.
- Double-click file runf/sine.tsimf in the right window.
- Launch the simulation by pressing the key Ctrl-r or
clicking with mouse button #3, and select open->run in the window background menu.
- A popup window pops up before launching the calculation.
Here the user has the possibility to select queue-system, priority of the job,,,etc.
The user can suppress this popup-window by pressing the Configure-button and
under calc_opts change option -addarg into -no_addarg.
- When the calculation is finished close the terminal window by
pressing the F4-key,
pressing the upper-right cross or
write the UNIX-command exit.
- Execute file mplotf/sine.mplotf by:
- Double-click directory mplotf in the left window under the radio-buttons
All, Input and Output.
- Double-click file mplotf/sine.mplotf in the right window.
- Launch the plotting activity by: pressing the key Ctrl-r, or
clicking mouse button #3, and select open->run in the window background menu.
- In the popup window please select the following:
"Use MPLOT *.mp work file" check the no button
"Select mode of operation" check the interactive button
"Select ident(s)" click on the first Browse button and select file sine.id
Close the File selection popup menu and press the OK button,
in order to launch program MPLOT.
- Regarding the "Use MPLOT *.mp work file" please look in the MPLOT
documentation.
- MPLOT will now start in interactive mode,
showing the first page defined in file mplotf/sine.mplotf
- The other pages can be shown by clicking on the different page numbers in the right end of the PullDown-MenuBar.
- The predefined pages can be modified by pressing the Edit button.
The definition of the page will appear in a text editor.
Edit the text in the text editor, save the file and press the Reload button in the MPLOT window,
and your modifications will take effect.
- New pages can be defined by pressing the New button.
- When the MPLOT-session is finished, please also close the terminal window in the background.
- Program MPLOT can be started without input data file, just press the Mplot button.
Please also run file mplotf/four.mplotf
The Fourier transformation in file mplotf/four.mplotf has been made of the variable sinus from
tstart= 0.125 until tstop=3.13, why the spectra will look as a cosinus wave.
The definition of the cosinus function is
Inspect the main memory of program CALC
- Open file runf/sine.tsimf by double-clicking its name and press Ctrl-o or
clicking Open->op with mouse button 3.
- Set input data parameter idebug = 1 in the beginning of the file.
- Rerun the case.
- Open the newly created file calc.out for editing.
- Please notice the following in the calc.out file:
- Your Gensys installation have a memory size of mvar= 100000
for storing of variables, coordinate systems, masses, couplings,,,etc.
- In current model only nvar= 67 variables has been used.
- The size of the memory capacity in Gensys can be changed in file mp_big.h, if necessary
- Compare input data file runf/sine.tsimf with calc.out
and you will find your input data file start at position 26 in the memory.
Create a sine wave with variable frequency
- Open file runf/sine.tsimf for editing
- Change input data line 11 from:
func const Frequ= 2.
to:
func operp Frequ= 0.5 * time
- Rerun the case
- Plot the result in MPLOT via the input data file mplotf/sine.mplotf
or start program MPLOT directly by pressing the Mplot button.