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:41] 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? ====== 
  
 ===== Preliminary remarks ===== ===== Preliminary remarks =====
  
-With Metafor, when a new calculation must be started or when an error occurs for some reason, The program must be closed and restarted+<note important>Unlike most programs, Metafor must be restarted (which means closing and re-opening the application) before running any simulation.</note> 
 + 
  
 ===== Running a test with the GUI  ===== ===== Running a test with the GUI  =====
Line 20: Line 24:
   - The output python window, which displays the text output of the program.   - The output python window, which displays the text output of the program.
   - The "Python PATH", which lists all available python modules that can be imported.   - The "Python PATH", which lists all available python modules that can be imported.
-  - The "base" folder, whch 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 "base" folder, which 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. This widget gathers the last loaded modules for faster access.   - The links. This widget gathers the last loaded modules for faster access.
   - The "workspace". This is the place where the results of a calculation are written to disk.   - The "workspace". This is the place where the results of a calculation are written to disk.
Line 30: Line 34:
 A test case of Metafor corresponds to usually one python module. A test case of Metafor corresponds to usually one python module.
  
-Therefore, the first step usually consists in loading this module into memory. 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 with the GUI, just find it in the "Python PATH" tree. then right-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".
Line 38: 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 before the beginning of the time integration. Using the command line, this can be 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 PATH" view 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 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. In command line, this is done with the command ''rebase()'' +
- +
-  rebase(r'e:\test_case\test01')+
  
 ==== Starting the time integration ==== ==== Starting the time integration ====
Line 54: Line 54:
   meta()   meta()
  
-This command calls the function ''getMetafor()'' from the module previously loaded, and starts the time integration. If no working directory was selected, the default name (''workspace/test_name'') is used. If this directory already contains older results, those files will be 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 time integration procedure opens a 3D graphics window, which will be continuously 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 69: 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 87: 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 123: 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 133: 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.1420627288.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki