Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:tutorials:premiertest

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:user:tutorials:premiertest [2015/01/07 11:21] bomandoc:user:tutorials:premiertest [2016/07/11 15:04] (current) – [Making a film with the results] boemer
Line 1: Line 1:
-====== Graphical User Interface (GUI) ======+~~NOTOC~~ 
 +====== How to run an existing test? ======
  
-===== Introduction ===== 
  
-When an error occurs while reading a module, Metafor MUST be restarted. Therefore, developing a test case is most often done by clicking on the icon then using the up arrow to recall the last command again and again.+===== Preliminary remarks ===== 
 + 
 +<note important>Unlike most programs, Metafor must be restarted (which means closing and re-opening the application) before running any simulation.</note>
  
-When the data set is not in the same directory as Metafor (or one of its   * subdirectories) and the console mode is used, the environment variable ''PATH'' must be defined (On Windows: Right click on "computer" - properties - "advanced" tab - "environment variables") and the path to directory containing Metafor must be specified (''c:\Progra~1\Metafor'' for example). This allows Metafor to be started without having to type the full path. 
  
  
 ===== Running a test with the GUI  ===== ===== Running a test with the GUI  =====
  
-==== Description ==== +==== Description of the main window ====
- +
-To check that all is going well, a first test should be run using the GUI.+
  
 Double-click the "Run Metafor" icon on your desktop. The GUI is displayed: Double-click the "Run Metafor" icon on your desktop. The GUI is displayed:
Line 18: Line 17:
 {{ doc:user:desc-gui.png |}} {{ doc:user:desc-gui.png |}}
  
-  - The title bar. It contains the version number of your executable Metafor.+  - The title bar. It contains the version number of your Metafor executable.
   - The menu bar. It is useful for managing interface options (File menu / GUI Options) and 3D active display windows (Windows menu).   - The menu bar. It is useful for managing interface options (File menu / GUI Options) and 3D active display windows (Windows menu).
-  - The toolbar. It gathers the most commonly used commands, such as the "meta ()button (blue PLAY button) which initiates a Metafor integration+  - The toolbar. It gathers the most commonly used commands, such as the ''meta()'' button (blue PLAY button) which initiates a Metafor calculation
-  - The python command line : it allows the user to enter Metafor commands by hand or to use Metafor as a simple python interpreter. +  - The python command line: it allows the user to enter Metafor commands by hand or to use Metafor as a simple python interpreter. 
-  - The history command window : it allows a quick access to past commands. A contextual menu allows the user to manage the history. +  - The history command window: quick access to copy/paste older commands. A contextual menu allows the user to manage the history. 
-  - The output python window. It is a contextual menu which allows to print or set different layout options+  - The output python windowwhich displays the text output of the program
-  - The "python path". It lists all available python modules that can be imported. +  - The "Python PATH", which lists all available python modules that can be imported. 
-  - The "base", main Metafor directory. It can be changed to add a new directory to the "python path". This is very useful to run a test located on a nonstandard path (on another disk for example). +  - The "base" folderwhich is the current folder at startup. It can be changed to a new folder which will be added to the "Python PATH". This is very useful to run a test located on a non-standard path (e.g. on another hard disk partition). 
-  - The links. It gathers the last loaded modules for faster access. +  - The links. This widget gathers the last loaded modules for faster access. 
-  - The "workspace"It displays the current directory (workspace). This tab allows, for example, to go search results in nonstandard location. +  - The "workspace"This is the place where the results of calculation are written to disk.
- +
- +
- +
  
 ==== Loading a Module ==== ==== Loading a Module ====
Line 37: Line 32:
 {{ doc:user:loadmodule.png|}}  {{ doc:user:loadmodule.png|}} 
  
-Each Metafor test case corresponds to python module.+test case of Metafor corresponds to usually one python module.
  
-Therefore, the first step usually consists in loading the right module with the "''load()''" command. This command tells the program that you wish to work with this file, whether for running an integration or viewing results.+Therefore, the first step usually consists in loading this module into memory. This operation tells the program that you wish to work with this file, whether for running an integration or viewing results.
  
-To load a module in the GUI, just get it in the "Python Path" treeright-click on it and choose "Load".+To load a module with the GUI, just find it in the "Python PATH" tree. then right-click on it and choose "Load".
  
 Alternatively, use the command Alternatively, use the command
Line 47: Line 42:
   load('apps.ale.angleReZoner'   load('apps.ale.angleReZoner'
  
-in the python command line. This command loads the module ''angleReZoner.py'', located in ''apps/ale''.+in the python command line. This command loads the module ''angleReZoner.py'', located in ''c:\Program Files\Metafor\apps\ale''.
  
-This command "imports" the module and keeps a pointer to it for subsequent orders. The interface also switches from "Python Path" to "Workspace". In this view, a working directory (in which the results of the integration are/will be stored) can be chosen. By default, its name is ''workspace/module_name''. If it already exists, this directory is selected by the interface. If not, it will be created at the start of integration. In command line, this is done with the command ''setDir()''+Metafor "imports" the module and keeps a pointer to it for subsequent commands. The interface on the right switches from "Python PATHview to "Workspace" view. In this view, a working directory (in which the results of the simulation will be stored) can be chosen. By default, its name is ''workspace/module_name''. If it already exists, this directory is selected by the interface. If not, it will be created before the beginning of the time integration. 
  
-  setDir(r'e:\results\angleReZoner')+If the module to be loaded is not in the "Python PATH", a ''rebase'' must be performed. To do so, the directory which contains the test case is chosen using the button on the "Base" line of the "Python Path" tab. Doing so, this directory is added to the "Python path". It is equivalent to starting Metafor from this directory. 
  
-If the module to load is not in the "Python Path", a ''rebase'' must be performed. To do so, the directory which contains the test case is chosen using the button on the "Base" line of the "Python Path" tab. Doing so, this directory is added to the "Python path". It is equivalent to starting Metafor from this directory. In command line, this is done with the command ''rebase()''+==== Starting the time integration ====
  
-  rebase(r'e:\test_case\test01'+Click on the blue "PLAY" button in the toolbar. You can also type the command:
- +
-==== Starting the integration ==== +
- +
-It is very easy to start an integration, just click on the blue "PLAY" button in the toolbar. You can also type the command :+
  
   meta()   meta()
  
-This command calls the function ''getMetafor()'' from the module previously loaded, and starts the integration. If no working directory was selected, the default name (''workspace/test_name'') is used. If this directory is not empty, those files are first deleted (a windows will appear to warn you).+This command calls the function ''getMetafor()'' defined in the module previously loaded, and starts the time integration. If no working directory was explicitly selected, the default name (''workspace/test_name'') is used. If this directory already contains older results, those files will be first deleted (after user's approval).
  
-Then, the integration opens a 3D graphics window, which will be refreshed during computation. Most display options can be changed using the "Config" button.+Then, the time integration procedure opens a 3D graphics window, which will be continuously refreshed during computation displaying the current resultsThe display options can be modified using the "Config" button of this window.
  
 It is possible to close the display windows, and reopen them using the "Windows" menu. It is possible to close the display windows, and reopen them using the "Windows" menu.
  
-When the integration is finished, you MUST restart Metafor to run another test ! +When the time integration finishes, you MUST restart Metafor to run another test !
- +
  
  
Line 78: Line 67:
 {{ doc:user:loadfac.png|}} {{ doc:user:loadfac.png|}}
  
-To load results, the corresponding module must be loaded first, as was done before starting the integration. +To load previously-computed results, the corresponding module must be loaded first, as was done before starting the time integration. 
 Then, if the workspace used is the default one, Metafor automatically sets its working directory to it. Otherwise, it must be changed manually, using the workspace window. Then, if the workspace used is the default one, Metafor automatically sets its working directory to it. Otherwise, it must be changed manually, using the workspace window.
  
-Once the right folder is selected, simply locate the FAC files (extension ''.bfac.gz''), choose one and load it with the context menu ("Load Fac"). A viewing window opens and displays the results+Once the right folder is selected, simply locate the "FACfiles (extension ''.bfac.gz''), choose one and load it with the context menu ("Load Fac"). The results are displayed in a graphical window. 
  
-To load other results, repeat the operation with another FAC file. The display window is updated automatically.+To load other results, repeat the operation with other FAC files. The display window is updated automatically.
 \\ \\
 \\ \\
Line 96: Line 85:
 {{ doc:user:restartmodule.png|}} {{ doc:user:restartmodule.png|}}
  
-For various reasons (power cut, abrupt closure of Metafore...), a simulation may have ended earlier than expected. However, it can be restarted from an intermediate FAC, usually the last one that was written before the breakdown (therefore, several saving points should be planned before running long computations).+For various reasons (power cut, abrupt closure of Metafor...), a simulation may have ended earlier than expected. However, it can be restarted from an intermediate FAC, usually the last one that was written before the breakdown (therefore, several saving points should be planned before running long computations).
  
 This is rather straightforward : This is rather straightforward :
Line 132: Line 121:
 To show results in a pleasant way, an ".avi" file, showing the integration over time, can be created. To show results in a pleasant way, an ".avi" file, showing the integration over time, can be created.
  
-  * First, increase the number of times that results will be saved on disk. (command ''setNextTime'' of ''TimeStepManager'', see [[doc:user:integration:general:time_step]])+  * First, increase the number of times that results will be saved to disk. (command ''setNextTime'' of ''TimeStepManager'', see [[doc:user:integration:general:time_step]])
   * Run the test.   * Run the test.
   * Load the last FAC file. Set up the scale of displayed scalar values according to their final value. Do the same for vectors, if needed. Then save the graphical options ("Save" button).   * Load the last FAC file. Set up the scale of displayed scalar values according to their final value. Do the same for vectors, if needed. Then save the graphical options ("Save" button).
Line 142: Line 131:
  
 ===== Metafor in command line ===== ===== Metafor in command line =====
-{{:doc:user:geometry:user:ico-avanced.png?40 |}}+{{:doc:user:ico-advanced.png?40 |}}
  
 Should you need to run Metafor in command line, open a command line (''cmd.exe'', or a Unix shell). Then : Should you need to run Metafor in command line, open a command line (''cmd.exe'', or a Unix shell). Then :
doc/user/tutorials/premiertest.1420626076.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki