Tips and Tricks

The purpose of this section is to share tips and hints for Opera.

General

Transfer user strings from Post to Modeller and vice versa

There is a section in the Opera Manager Help how to start the Modeller and the Post-Processor via a script. If you want to transfer a string for e.g. a filename that has to be opened in the Post-Processor within a script, you have to do it like that:

stringtransfer.comi
$exec '%ENV(VFDIR)\bin\post.exe' arguments='/c$string filename 'test.txt''' arguments+='/c$cominput runMe.comi' -Wait

If you add the runMe.comi just as a script without the /c$cominput, the Post-Processor will first run the script and then define the string variable or other /c commands. So this will not work, because the string will be defined after the script was started.

Timer

To measure the time of a script being executed, you can use the system variable cpseconds:

timer.comi
/Start the timer
$const #time cpsecond
 
/Your code
/...
 
/Stop the timer
$const #time cpsecond-#time

License Server

* On a typical Windows 7 installation, your license file, the license server log file and the configuration file is located in C:\ProgramData\OperaFEA. If you can't see this folder make sure that in Windows Explorer hidden files are visible.

* Also check that there is a default program for opening the lmx-serv.cfg file, i.e if you double-click on the lmx-serv.cfg file, for example Notepad is opened.

* If you can't get a license from a network license server, please make sure that your firewall has port 6200 TCP open.

* Since V16R1 it is possible to remotely check and configure the license server. Open a web browser and enter the name of your license server followed by :6200. e.g. 192.168.1.1:6200. The password for the Administration Tab can be found in the configuration file mentioned above (the default is “MyPassword123”).

Opera2d

RM

  • The maximum timestep for a 2d RM solution is dependent on the rotational speed. There is a hard coded limit of 0.1 radiants of maximum angle per timestep. If the rotation is bigger than this 5.71 mechanical degree the solver will abort.

Opera3d

Meshing

  • The ACIS kernel in the Modeller generates an initial coarse surface mesh before the Opera mesh. This can give you hints where something might go wrong. You can display it by setting a negative value to the Maximum angle between elements in the surface mesh generation.
Initial ACIS Mesh
  • If you get an error message that an element in the mesh is corrupt, you can use the THREED command in the modeller to locate the wrong element by entering the coordinates in the XORIGIN, YORIGIN, ZORIGIN parameters.

Convergence

  • If you are using anisotropic materials, make sure to set #usefullmatrix to 1 before writing out the database.

Field Patches, Iso Lines and Interpolation

Cartesian or Polar Patches are used in the Opera 3d Post-Processor to visualize field values e.g. contourplots or isolines of magnets. The user has to specify the number of points on the patch. On these points the required field values are evaluated and then interpolated in between. The pdf below describes how the interpolation is done on the grid and the difference in modelling thin shielding walls as a volume or with the help ot the thin plate boundary condition.

Above is a very coarse grid to visualize the interpolation for isoline patches. Each black rectangle of the user defined grid will be subdivided into four triangles. On the edges of these triangles the software will interpolate the field values from the four corners and then look on the edges for the required field value for the iso plot. The purple line is the required isoline and the red circles indicate where the Post-Processor found the isoline value. The Post-Processor will connect these points with straight lines.

Transient Command File Control

The control is achieved through use of a command script. A specific name for this file is derived from the name of the op3 database being solved. Since version 15, if the specific file does not exist, a generic file will be used instead allowing for a common control file for all databases in the same folder. For a database file, filename.op3, the following table lists the names of the specific and generic control command files for the different analysis programs.

Program Specific command file Generic command file
CARMEN filename_carmen.comi control_carmen.comi
DEMAG filename_demag.comi control_demag.comi
ELEKTRA/TR filename_elektratr.comi control_elektratr.comi
QUENCH filename_quench.comi control_quench.comi
TEMPO/TR filename_tempotr.comi control_tempotr.comi

CARMEN LM

The GAP Region of CARMEN LM needs to consist of one cell. This GAP cell is not allowed to touch the outer boundary, so there needs to be an additional layer of not GAP cells around it. The GAP cell will be meshed for all 360 degrees even if the model has a rotational symmetry for the stationary and moving parts.

Python

Reset, Clear and Reload

There are two ways to reset Python:

  • $python option=reset
  • clear python=yes

Both will delete all variables that were created in Python. But they will not clear all imported modules. So if you want to debug a python module that you are writing, you have to reload the module each time you changed something:

pythonrelaod.comi
#previous instance of imported module
$python command=import extr
…
…
$python command=import importlib
$python command=importlib.reload(extr)
tips/start.txt · Last modified: 2016/08/08 16:42 by kjh
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0