Documente Academic
Documente Profesional
Documente Cultură
FLUX® 10
User’s guide
volume 1
General tools
Ref.: K101-10-EN-06/09
CEDRAT
15 Chemin de Malacher - Inovallée
38246 MEYLAN Cedex
France
Email: cedrat@cedrat.com
Web: http://www.cedrat.com
FLUX® 10 TABLE OF CONTENTS VOLUME 1
TABLE OF CONTENTS
Flux 2D application
Volume 4: Solving and results post-processing
Flux 3D application
Volume 4: General tools (3D environment)
Solving and results post-processing
Volume 5: Physical applications
(complements for advanced user)
1. Foreword ................................................................................................................................1
1.1. Version 10 and the 2D/3D unification project .................................................................3
1.2. Software documentation.................................................................................................5
1.2.1. Software documentation: whatever is available so far .....................................................6
1.2.2. User’s guide and the 2D/3D unification project ................................................................7
1.2.3. User’s guide: versions (on paper and on line)..................................................................8
1.2.4. Tutorials and technical papers for 2D applications ..........................................................9
1.2.5. Tutorials and technical papers for 3D applications ........................................................10
2. Supervisor ............................................................................................................................11
2.1. General presentation ....................................................................................................13
2.1.1. Start the Flux Supervisor ................................................................................................14
2.1.2. Appearance of the Flux Supervisor: Display menu ........................................................16
2.1.3. My programs...................................................................................................................18
2.2. Flux modules ................................................................................................................19
2.2.1. Program manager: overview ..........................................................................................20
2.2.2. Flux 2D modules.............................................................................................................22
2.2.3. Flux 3D modules.............................................................................................................25
2.2.4. Flux Skewed modules.....................................................................................................26
2.2.5. Open a module ...............................................................................................................27
2.3. Standard or user version ..............................................................................................29
2.3.1. Concept of a user version...............................................................................................30
2.3.2. Choose the working version ...........................................................................................31
2.3.3. User version manager ....................................................................................................32
2.3.4. Edit a user version ..........................................................................................................34
2.3.5. Create a new user version..............................................................................................35
2.3.6. Modify a user version......................................................................................................38
2.3.7. Delete a user version......................................................................................................39
2.3.8. Options for user version .................................................................................................40
1. Foreword
History and To place version 10 within the Flux project, we present the main phases of
perspectives this project in the table below:
Phase Description
Version 8 2D/3D unification of geometrical preprocessor
Version 9 2D/3D unification of physical preprocessor
Version 10 Carrying out of a modern interface for
the 3D solver and the 3D postprocessor
Version 11 General unification of the 2D and 3D applications
Today … Flux occurs in two main applications (2D application and 3D application), as
can be seen from the table below.
Flux
Flux
3D application /
2D application
Skewed
Geometrical and physical
Windows 2D/3D
preprocessor
unified interface
(Preflux)
Where can the The documents are available (in pdf format):
documents be • on your working post in the installation folder
found? C:\Cedrat\DocExamples\Documentation\…
* Caution: Volume 5 is an old document (for advanced user), which is not updated
any more (the information is not confirmed). However it comprises relevant
information, which was not transferred into another document. It is available (in pdf
format) on the CDROM of documentation.
Why two The two versions of the user’s guide are not identical:
versions? • The document on paper comprises the necessary information in order to
understand well what can be carried out with Flux (pre-required
knowledge)
• The online help includes the information mentioned above, to which the
necessary information is added in order to make a good use of the
software tools.
In order to For each important description stage of a finite elements project, the
identify information has been therefore split into two:
information
• the ‘theoretical’ aspects (or principles)
easily …
• the ‘practical’ aspects (or implemented at the level of the software)
The two aspects are described in different chapters, as presented in the table
below.
The chapters headed … comprise information as follows …
• general information, reminder on physics
Geometry: principles • modeling principle (with Flux)
Mesh: principles
• software operation (its strengths and limits)
Physics: principles
… • advice in modeling: strategy, choice, …
• general steps, flowcharts
Geometry: software aspects • structure of Flux objects
Mesh: software aspects
Physics: software aspects • handling of Flux objects
… • description of commands for specific actions
Concretely … The contents of the two versions of the user’s guide are presented in the table
below.
Document on paper Online help
The theoretical aspects: The theoretical aspects:
Chapters headed: Chapters headed:
” …: principles” ” …: principles“
The practical aspects:
Chapters headed:
” …: software aspects”
Definition A tutorial has the objective to show how to use the software by means of a
simple example. This type of document is useful for self-formation as regards
the software. All the commands are described.
A technical paper has the objective to demonstrate the features of the
software on a realistic technical example (emphasizing the interesting results
which can thus be obtained). All the technical data are presented in the
document, but the commands are not described in details.
Tutorials (2D) The available tutorials for the 2D applications are listed in the table below.
Technical The technical papers available for the 2D applications are listed in the table
papers (2D) below.
Definition The objective of a tutorial is to show how to utilize the software by means of
a simple example. This type of document is useful for self-formation as
regards the software. All the commands are described.
A technical paper is meant to show the software features on a realistic
technical example (emphasizing the interesting results which can thus be
obtained). All the technical data are presented in the document, but the
commands are not described in details.
Tutorials (3D) The available tutorials for the 3D applications are listed in the table below.
Technical The technical papers available for the 3D applications are listed in the table
papers (3D) below.
2. Supervisor
Introduction This section describes the Flux Supervisor, with which you can run Flux
modules and manage your Flux project files and directories.
Start the Flux To start the Flux Supervisor from the Windows taskbar, proceed as follows:
Supervisor • point on Start/ Programs/ Cedrat (or your installation directory) and
click on Flux
The Supervisor The Flux Supervisor window is divided into several zones. The different
Window zones are identified in the figure below and then detailed in following blocks.
Menu bar
Tool bar
Program Directory
manager manager
Project
files
Geometry
My programs view
Zones of the The different zones of the Flux Supervisor and their functions are presented in
Supervisor the table below.
Zone Function
Menu bar Windows commands for Flux
• File
• Display
• Versions
• Tools
• Help
Tool bar Icons for common tasks in Flux
• User version
• Compression / Decompression of a project
• Options (language, memory, etc.)
• License manager
• Help (link to online User’s Guide for Flux)
Zone Function
Program manager Displays the Flux modules
The modules are grouped by “family”
in different folders. Each module is
shown as an item in the tree.
You can expand a folder by clicking on
the sign.
You can start a module by double-
clicking on its name, e.g., Geometry &
Physics.
My programs Links to other programs, such as:
• DOS Shell
• Windows Explorer
You can add links to other programs
here, as you wish.
Directory manager Displays computer directories.
Introduction You can change the appearance of the Flux Supervisor screen, e.g.:
• show or hide zones of the Flux Supervisor
• resize or move zones of the Flux Supervisor
Displaying The following figure illustrates the zones of the Flux Supervisor window that
different zones are affected by the Display commands:
of the Flux • the Tool bar
Supervisor
• the Program manager
• the Geometry view (for Flux 2D)
Tool bar
Program
manager
Geometry
view
Effect on the The following figure shows the Supervisor when Display geometry is not
Supervisor: selected:
example
Resizing
handle
2.1.3. My programs
Principle In the My programs area, you will find links to two programs:
• Windows Explorer
• DOS window
You can add or remove links to other programs.
Add a program To add a program, use the context menu (right click in the concerned zone)
Step Action
1 Click on Add a program ...
2 Select the program to add
Remove a To remove a program, use the context menu (right click in the concerned
program zone)
Step Action
1 Select the program to delete
2 Click on Delete …
Introduction This section describes the program manager, which contains links /
commands to run Flux (2D, 3D or Skewed) modules.
Program The program manager of the Flux Supervisor contains folders (in the form of
manager a tree structure) in which you can find each of the main modules of Flux (2D,
3D or Skewed).
The program managers for Flux 2D, Flux 3D and Flux Skewed tabs are
presented in the figures below and detailed in the following blocs:
Flux 2D module The folders of the Flux 2D program manager are described in the table below:
folders
Folder Function
Construction • Create a geometric model, mesh, electrical circuit, and
materials
• Assign material and source properties to different
components, to assign boundary conditions, link an
external circuit, etc.
Solving process Solve a problem (direct or batch mode)
Analysis Compute various quantities, create displays and
animations of results
Compatibility Settings for use with modules from previous Flux
versions
Flux 3D / Flux The folders of the Flux 3D / Flux Skewed program manager are described in
Skewed module the table below:
folders
Folder Function
Flux 3D / • Create a geometric model, mesh, electrical circuit, and
Flux Skewed materials
• Assign material and source properties to different
components, assign boundary conditions, link an external
circuit, etc.
• Solve a problem in direct mode
• Compute various quantities, create displays and
animations of results
Tools • Draw and define electric circuits with ElectriFlux
• Add material models with Cslmat
• Solve a problem in batch mode
Compatibility Settings for use with modules from previous Flux versions
Contents of the When you expand the folders, you will see icons and labels representing the
module folders Flux modules (2D, 3D or Skewed) contained in the folder.
Module Function
Geometry & Physics • Build a geometric model and mesh
• Create and assign physical and material properties
to components of a modeled device
Circuit Draw and define electric circuits
Materials database Add material models to the database
Solving process The Solving process folder comprises the following modules:
Module Function
Direct Solve a model (perform the FEM computations) in
interactive mode; the user can see the progress of the
computation on screen and if necessary, stop the
computation
Batch Solve a model in batch mode (e.g., to reduce
computation time for complex models)
Transient start-up Solve a model beginning with results from a previous
solution (e.g., with a modified time step)
Stop solve Stop a calculation before it is completed
Delete results Delete results from a previous calculation
Convert results Convert results from versions older than 7.50
Metal 7 Start Metal 7 (metallurgical calculations)
Simulink Start a co-simulation with Matlab Simulink
Module Function
Results Display results, create animations, etc.
Coupling Create new Flux 2D problems from extracted values
(e.g., create a thermal problem from a magnetic
application using the power density as thermal source)
Module Function
Solve with Solve a model in interactive mode with Resgen
Resgen (original Flux 2D solver).
Result with Analyse results with Expgen
Expgen (original Flux 2D postprocessor).
Module Function
Flux 3D • Create a geometric model, mesh, electrical circuit,
and materials
• Assign material and source properties to different
components, assign boundary conditions, link an
external circuit, etc.
• Solve a problem in direct mode
• Compute various quantities, create displays and
animations of results
Module Function
Circuit Draw and define electric circuits
Materials database Add material models to the database
Solve in batch Solve a model in batch mode (e.g., to reduce
computation time for complex models)
Module Function
Circuit with Cirflu Draw and define electric circuits with Cirflu
(circuit tool from previous Flux versions)
Preflux / Flux 3D Convert the files preceding the 8.10 version
Convertor
Flux Skewed The Flux Skewed modules are represented in the following figure:
modules:
details
Flux Skewed The Flux Skewed folder comprises the following module:
Module Function
Flux Skewed • Create a geometric model, mesh, electrical circuit,
and materials
• Assign material and source properties to different
components, assign boundary conditions, link an
external circuit, etc.
• Solve a problem in direct mode
• Compute various quantities, create displays and
animations of results
Module Function
Circuit Draw and define electric circuits
Materials database Add material models to the database
Solve in batch Solve a model in batch mode (e.g., to reduce
computation time for complex models)
Module Function
Circuit with Cirflu Draw and define electric circuits with Cirflu
(circuit tool from previous Flux versions)
Preflux / Flux 3D Convert the files preceding the 8.10 version
Convertor
Open a module If you want to open a module and a selected project at the same time
with a selected (see § “General options: language, database”):
project file
• click on Options in the Tools menu or click on the icon
• select the General tab
• under Other at the bottom of the dialog, check the box next to Open the
program with the selected project
Introduction This section presents information about selecting and managing user versions
of Flux 2D or Flux 3D.
The Standard version is selected by default.
A user version is a version that extends the software’s basic modeling
capabilities.
For example, with a user version you can define non-standard physical
properties (voltage or current source, material characteristics, etc.) as a
function of criteria you choose yourself (time, space, variable, etc.).
Reading advice In the chapter entitled “User subroutines” (for Flux 2D) the user will find
information pertaining to:
• description of the user versions provided with the software
• available possibilities of user versions: choice and writing of user
subroutines, etc.
Flux versions There are two separate versions in Flux 2D / Flux 3D:
• standard version
• user versions
User version: A user version of Flux 2D / Flux 3D is a version that extends the software
definition basic modeling capabilities.
User version: From the point of view of its structure, a user version is a version that
structure includes both:
• the standard version of Flux 2D / Flux 3D and
• a specified number of user subroutines.
Default location User versions are located by default in the following directories:
for user • C:\Cedrat\User\User2d for 2D user versions
versions • C:\Cedrat\User\User3d for 3D user versions
User versions Predefined user versions are provided with the Flux software. They are listed
provided with in the following table:
the software
Documentation Informations about user versions included with the Flux software are
on user available in the following directories:
versions • C:\Cedrat\User\User2d\Brushlike_101.f2d_usr (brushlike_readme.pdf)
• C:\Cedrat\User\User2d\Table_101.f2d_usr (table_readme.pdf)
• C:\Cedrat\User\User3d\lamination_101.f3d_usr (lamination_readme.pdf)
Version by By default the user will be working with the standard version of Flux 2D /
default Flux 3D.
To work with a standard or user version, it is necessary to specify the desired
version.
Introduction The available user versions are listed in the Versions menu.
You can edit a predefined user version, create new user versions, and modify
or delete user versions.
The various operations to manage user versions are performed through the
User version manager.
Date of compilation
Flux version number
Location of In the Mode area, you can select the location of the directory for the user
user versions versions.
The two main locations are shown in the table below.
The User The user version toolbar provides shortcuts to the most common functions to
version toolbar work with user versions.
The icons and their functions are explained in the following figure:
Create a new Add sub- Edit the Display the
user version routines subroutine options
Introduction This section describes the creation and management of new user versions.
You should read the part concerning “User subroutines” (Flux 2D) before
beginning this section.
Note In order to create a user version, a Fortran compiler must be installed on your
computer.
Process The different steps to create a user version are shown in the table below and
detailed in following blocks:
Step Action
1 Define the location of the directory for the new user version
(optional) (in the local mode)
2 Create the new version:
• enter a name
• load the reference files that will serve as a basis for writing
the user subroutines
3 Edit the user subroutine(s)
4 Compile the new user version
Step 1: Define To define the location of a new user version, choose the directory in which it
the location will be placed (operating in Local mode):
Step Action
1 Click on Options in the Tools menu or on the icon
2 Choose the User version tab
3 Enter the name of the directory to place the new user version
• in the field Flux2D user version directory (for the local mode)
• or in the field Flux3D user version directory (for the local
mode)
Step 3: Edit the See the documentation concerned the writing of user subroutines in the user’s
user subroutine guide (chapter 3 volume 4 for Flux 2D).
Step Action
1 In the User version manager:
The changes These are the modifications you can make to a current user version:
you can make • Add user subroutines
• Remove user subroutines from the current version (saving them in the
designated directory without compiling them with the current version)
• Delete user subroutines from the current version
Modify a user To modify a user version (add or delete user subroutines), in the User version
version manager, proceed as follows:
Step Action
1 Choose the name of the user version you want to modify
2 In the tool bar of the User version manager:
To add a subroutine:
Delete a user To delete a user version, in the User version manager, proceed as follows:
version
Step Action
1 In the User version manager:
• choose the name of the user version you want to delete
2 In the User version toolbar:
Different parts The User version tab is divided into the following areas, as shown in the
previous figure.
Part Function
User version To choose the directory for user version (in local mode)
Compiler To choose
• the version of the Fortran compiler
• the path for location of the initialization file of the
Fortran compiler
Introduction This section presents information about file compression and archive
management.
File The files of a complete project may become large (for example, for a complex
compression: geometry, or a fine mesh; during a multi-solving process that generates a
benefits large number of result files, etc.).
Therefore, it may be helpful to compress these files to facilitate the transfer or
storage of the project.
Archive file: The archive file (*.tar.bz file) can contain various files:
contents • the set of files comprising the entire project, or only specified files
(geometry description, etc.)
• other files such as Python files (*.py), etc.
For archiving Flux project files, several options are available as explained
below.
Flux 2D options Flux 2D options allow the user to choose the project files to be archived:
Option Files
Whole project Entire set of project files from the project
Without results Project files without results
Flux 3D options Flux 3D options allow the user to choose the project files to be archived:
Option Files
Whole project All files from the “*.FLU” directory:
PROBLEM_FLU.PFL,
GEOM_FLU.PFL, MESH_FLU.PFL,
SOLVE_i_j
Without finite Problem description files only:
element solution PROBLEM_FLU.PFL,
GEOM_FLU.PFL, MESH_FLU.PFL
Without mesh Problem description files without mesh:
PROBLEM_FLU.PFL,
GEOM_FLU.PFL
Introduction The various operations for managing archives (creation and restoration) are
carried out through the archive manager.
Stage Description
Initialization The user must choose:
• the project to archive (and the compression option)
• the name of the archive file and its place on the disk
Creation The user must choose:
• files to include in the archive file
and create the archive
archive
Î The Create a Flux 2D /3D project archive dialog is open.
2 Fill in the fields in the dialog window:
• Project name
• Directory where the archive will be created
• Archive name
3 Choose the compression options
4 Click on Next
Î The next Create a Flux 2D /3D project archive dialog is open.
5 Add files to the archive file:
• click on Add new files… and
select the files you want to add to the archive file.
6 Create the archive:
• click on Finish
Î The Archive created with success message appears.
Introduction This section contains the information relating to the memory requirements
and its management.
Memory From a point of view of computer science, Flux has two major components:
requirements • one ”computation” component (invisible part), in Fortran language
• one “GUI” component (visible part), in Java language,
and one connection between these two components, in Java.
A memory is allocated for each component.
• As far as the computation part is concerned, Flux employs a pseudo-
dynamic* management system for the memory. This system manages a
global memory volume comprising two Fortran components, one for the
numerical memory and the other for the character memory. The size of
each of these components is controlled by means of a Fortran parameter
included in the main program.
*
Definitions:
Dynamic allocation: the allocated memory size is set by the user (it is therefore
modifiable).
Pseudo-dynamic allocation: Flux uses numerical and character tables and
dynamically allocated to emulate a dynamic memory.
Character memory:
Character memory is the memory used for storage of entity names
(parameters/transformations/regions/…) and of project names presented in the
directory.
GUI memory:
GUI memory is the memory used for everything concerning the graphical user
interface (graphic display, etc.)
In the graphic window, the flag located bottom left gives an image of the
utilization of the graphic memory. When it is red, you can double-click on it
to force the process to release the memory.
Allocated The allocated memory size is defined for each open module (Preflux 3D /
memory size Flux 3D) (Preflux2D / Solver 2D / PostPro2D).
The values are defined by means of the memory manager.
By default Standard values are assigned by default. These values are presented in the
table below.
2D Memory Numerical … Character … GUI …
Preflux 2D 32 bits 200 Mo 10 Mo 200 Mo
Preflux 2D 64 bits 400 Mo 10 Mo 400 Mo
Solver 2D 600 Mo 10 Mo 50 Mo
PostPro 2D 200 Mo 10 Mo
3D / Skew Memory Numerical … Character … GUI …
Flux 32 bits 700 Mo 10 Mo 300 Mo
Flux 32 bits (3GB)* 1700 Mo 10 Mo 300 Mo
Flux 64 bits 4000 Mo 20 Mo 500 Mo
*
Complementary information on memory size management for 32-bit and 64-bit
operating systems and about the 3GB mode is presented in the following paragraph
(see § 2.5.3).
32-bit processor With 32-bit processors, the program has maximum 2 GB distributed as
follows:
• numerical memory => set at start
• character memory => set at start
• Java memory => set at start
• executable memory => of the 250 MB order
• cache memory (transfer Fortran / Java) => depends on the geometry, etc.
This memory is difficult to quantify, it can generate errors during the
recovery of data.
3GB mode On specific Windows 32-bit systems the 3GB mode can increase the available
memory up to 3GB. The use of the 3GB mode is explained in the installation
guide (see Installation guide § 2.4 “3GB mode (4GT RAM tuning mode of
Windows) with Flux”).
64-bit processor Theoretically, the program has 264 Bytes of memory on the 64-bit processors,
which is much less limiting (practically, the current operating systems are
limited to 128 GB).
Introduction This section presents information regarding additional tools and options
available to the user.
Flux online When you click on the Help icon, you are linked to the online version of the
help Flux User’s guide.
Click on hyperlinks to open the corresponding section of the Flux User’s
Guide.
Introduction In the Tools menu there is a calculator specifically for computing the skin
depth.
Reading advice The user will find more information in the “Installation guide” on:
• installation of the license
• configuration of the license
Overview The General tab of the Option dialog is presented in the figure below.
Reading advice All aspects related to the data organization, manipulation and display are
treated in the chapter “General operation: data management”.
Flux window The general Flux window consists of several zones. These zones are
identified in the figure below.
Graphic
zone
Transparency
scale
Role of zones The zones and their principal roles are briefly described below:
Element Function
Title bar General information:
• Software name, version number
• Application (Magneto Static 3D)
• Project name (CASE1.FLU)
Menus bar Access to the different menus:
• Project, Application, Geometry,
Mesh, Physics
• Parameter/Quantity, Solving
process, Post-processing
• Display, View, Select, Tools,
Extensions, Help
Context icons Access to the toolbars corresponding
to the contexts:
• Geometry, Mesh, Physics, Solving
process, Post-processing
Element Function
Menus Toolbars
Project Commands of the Project menu:
• New, Open a project
• Execute a command file, Save,
Close, Exit
Tools Commands of the Tools menu:
Undo, Close all open dialog boxes
Element Function
Contexts toolbars:
Geometry context Commands of the Geometry context:
• Create geometric entities
• Propagate / Extrude
• Build faces / volumes
• Measure
• Check of the geometry, Healing
context of CAD geometry
Element Function
Contexts toolbars:
Mesh context Commands of the Mesh context:
• Create mesh entities
• Mesh domain, lines / faces / volumes,
Generate 2nd order elements
• Delete the mesh
• Assign mesh information
• Structure the mesh
• Check the mesh
Physics context Commands of Physics context:
• Create physical entities
• Create I/O parameters / spatial
quantities
• Import materials, Orient a material,
Assign regions, Import a circuit
• Check physics
Solving process context Commands of Solving process context:
• Create a scenario,
Solving process options
• Check the project
• Solve a scenario,
Continue the solving process
• Delete results
Post-processing context* Commands of Post-processing context:
• Create post-processing entities
• Curves
• Isovalues
• Arrows
• Compute quantities on points /
predefined quantities
• Evaluate sensors
Element Function
Menus Toolbars (in the graphic zone):
View Commands of the View menu:
• Refresh view, Zoom all, Zoom region
• Standard view 1, Standard view 2, X plane
view, Y plane view, Z plane view,
Opposite view, Four-view mode
• View direction,
Save / Restore graphics properties
Display Commands of the Display menu:
• Display geometric entities
• Display point numbers / line numbers
• Display mesh entities
• Display physical entities
• Display post-processing entities
Selection Commands of the Select menu:
• No selection, Free selection
• Select geometric entities
• Select physical entities
• Select solving process entities
Element Function
Data tree Entities tree of the Flux project
History zone
Command zone
Echo zone
Introduction It is possible to modify the look of the Flux window on the screen, i.e.:
• modify the background color
• display / hide certain zones
• resize (reduce / enlarge) zones
Display To display the Command and Echo zones (enabling input and output of
Command and commands in the Python / PyFlux languages):
Echo zones
• click on the arrow located on the bottom of the History zone as shown in
the figure below.
Arrow to display
the Python
command zone
⇒
Resizing
handle
Introduction This section concerns the graphic representation of the modeled device.
When referring to the graphic representation of a device, we are interested:
• on one hand, in the different entities and their appearance: points and their
visibility, lines and their color, faces, surface elements….
• on the other hand, in the type of displayed view: side view, top view,
bottom view, global view, … in its position and dimensions in the graphic
display zone.
The first aspect of the graphic representation (called visualization of entities)
is treated in chapter “General operation: data management”.
The second aspect (called graphic view) is treated in this chapter.
This section presents the following:
• concepts of graphic view
• possibilities to modify the view (displacement, rotation, zoom, etc.)
• presentation of predefined views (standard view, base plane views, opposite
view, etc.)
The graphic The graphic zone is a zone where a graphic representation of the modeled
zone device is displayed.
Scale of
transparency
The coordinate system displayed in the left bottom of the zone gives the principal
axes direction to orient the figure.
Concept of view The 2D or 3D view of a device in the graphic zone is called graphic view.
View The graphic view of the device can be displayed with more or less clear faces
transparency and volumes. This functionality controls the level of transparency of faces
and volumes. It gives the possibility to visualize the inside of the device
geometry, without setting faces and volumes invisible.
Scale of The transparency level of faces and volumes can be set using a scale of
transparency transparency located on the right bottom of the graphic zone.
Transparent Opaque
Command Icon
Zoom all Total view
Zoom in - Enlarge the view
Zoom out - Reduce the view
This option enables the user to set with the
Zoom region
mouse the rectangular zone to enlarge.
Options It is possible to choose one (more) view(s) from a list of predefined views:
• standard view 1 and 2
• views on the reference planes X, Y, Z
• opposite view
Standard views The standard views 1 and 2 are presented in the figures below.
Views on the The views on the reference planes X, Y, Z are presented in the figures below.
reference
planes
Y plane view
Command Icon
Standard view 1
Standard view 2
Opposite view
X plane view
Y plane view
Z plane view
Options The views on the reference planes X, Y, Z and also the standard view 1 can
be displayed in four independent windows. Only one window is active
(surrounded by a border of different color).
You can also display two windows from the four proposed.
Swap one view / To swap one-view mode to four-view mode / four-view mode to one-view
four views mode:
• click on Four-view mode in the View menu
or on the icon .
Introduction The user will find in this section the definition of a Flux project, and the
description of commands of project management (New, Open, Save, Close).
Flux project: A Flux project is the data ensemble corresponding to a Flux study.
definition
Storage type From the storage point of view, a Flux project consists in:
• a repertory, which includes the project name completed by the suffix
“.FLU".
• a files ensemble, whose names are fixed and whose content is explained in
the table below.
Flux 3D For a FLUX3D study, the repertory corresponding to the project contains also
features a file(s) that contains the result(s).
Project Menu Creating, opening and saving projects are carried out by usual commands for
file management. These commands are available by Project menu or by
Project toolbar.
The operation of these commands is briefly pointed out below.
Result: Flux recovers a lot of information from the database model, in order to build
the proper database of the new project. The new project is temporarily named
ANONYMOUS.
Result: When a project built with an old version is opening, Flux performs the update
of the database.
Flux 2D The .TRA file is automatically created for the surface meshed regions.
features
Introduction The user will find in this section the definition of a Flux object, the operation
modes of Flux objects and the use of the importation object command.
Overview Before begin the description of a device, it is possible to appear the following
question:
Portions of this device can be used for the modeling of others devices?
Basic idea If the answer is yes, the geometric building of a device can be considered as a
structure in lego.
Then, the general principle of construction is as follows:
• Description of different pieces of the structure in the independent Flux
projects (base lego or Flux objects).
• Construction of the complete device in a new Flux project, by means of
already built bricks (Flux objects).
Example Geometric construction of a motor performed importing stator and rotor parts
already build.
New object:
motor geometry
(MOTOR.FLU project)
Main interest: This type of construction presents certain constraints, but also offers the
bank of objects possibility to realize a bank of objects that can be used for different studies.
Step Action
1 From the Project menu:
• point on Import and click on Import Flux object
2 In the Import Flux object box:
• choose the file name to import
• choose the filter
Introduction A finite element project contains a great volume of data, diverse and
interrelated.
In terms of Flux software, these data (points, lines, …) are called entities and
depend on project context (geometry, mesh, …).
This chapter presents the mode of general operations of Flux software
(independent of context), i.e.:
• the general organization of data (Flux database)
• the data presentation (dialog boxes)
• management of the entities
(handling, information, export and selection of entities)
• the tools of graphic entities visualization
(display and appearance of graphic entities in the graphic zone)
Reading advice This chapter presents the mode of general operation of Flux software
(independently of context). For specific detail of geometry, mesh, physics,
solver and post-processing modules refer to the corresponding chapters.
Introduction This section presents the general information on data structure in the Flux
database.
Data and data The Flux database makes a logical distinction between data structure (or
structure data type) and data themselves (see blocks below).
Definitions The principal terms, used in this document to make a distinction between
data and data structure, are presented in the table below.
Term Definition
Entity-type an entity-type is a logical data structure defined by a name
and a certain number of fields (attributes, relations, cases)
Entity an entity is an object corresponding to an entity-type
characterized by an identifier (number/name) and fields
(attributes, relations, case)
Caution on the vocabulary: the terms “entity” and “occurrence of entity” can be also
used instead of “entity-type” and “entity”.
Introduction This section treats the data and the data presentation, i.e. dialog boxes:
specialized box and data array.
What are the The handled data (entities) depend on the phase of the finite elements project
handled data? description: geometry, mesh, physics.
They are listed in the data tree (figure below) and are detailed in the different
corresponding chapters: Geometry / Mesh / Physics / Solver / Post-
processing.
How are the The interaction with the database is done using specific dialog boxes:
data? specialized box, data array.
This paragraph presents an example of specialized box.
Specialized box In this box the user can enter/check/modify information relating to the data.
A specialized box is presented in the figure below.
Entity-type:
Coordinate system Entity:
[CORE]
Title
bar Name
Tag: Comment
Definition
Type (1)
Type (2)
Characteristics
Buttons
bar
The required fields (necessary and sufficient for the definition of the entity) are
marked by an asterisk *.
General tools The general tools - available to carry out the data entry - are presented in the
table below.
Button Function
allow the direct access to the non-filled required fields
OK validate information and close the dialog box
Apply validate information without closing the dialog box
Cancel close the dialog box
access to the online help concerning the entity
Specific tools The user can create a missing entity using the button in a specialized box.
How are the The interaction with the database is done using dialog boxes: specialized box,
data? data array.
This paragraph presents an example of data array.
Entity-type :
Coord. Syst. Entities :
[CORE], [MAIN]
Title
bar
Name
Comment
Structure
(Database) Type (2)
Characteristics
Type (1)
Buttons
bar
The boxes clear gray are active boxes (data entry fields).
The boxes dark gray are inactive boxes (general information).
General tools The general tools - available to carry out the data entry - are presented in the
table below (idem specialized box).
Button Function
allow the direct access to the non-filled required fields
OK validate information and close the dialog box
Apply validate information without closing the dialog box
Cancel close the dialog box
access to the online help concerning the entity
Specific tools The specific tools, available in a data array are presented in the table below.
Introduction This paragraph presents the commands for manipulation of the entities:
New / Edit / Edit array / Delete / Force delete.
Commands of The basic procedures required to manipulate the entities are the operations of
data creating, editing/modification and deletion of data.
manipulation
These operations are carried out by means of the commands presented in the
table below.
Modes of To build the Flux project, the user must create the entities corresponding to
creating the project data.
Giving consideration to a chronological order of entity creation generally
facilitates the description process: points before lines, materials before
regions … Consequently, if some entities have been ‘forgotten’, it is
beneficial to have the option of creating them a posteriori.
Therefore, there are two modes of creation:
• the direct creation is the « standard » mode of creation (the most natural)
• the indirect creation is a mode of creation a posteriori. This is carried out
in a specialized dialog box by means of a button that facilitates the
creation of a supporting entity.
Modes of To check the data, the user must edit (and modify if necessary) the entities
editing that he has created.
There are two modes of editing:
• editing in a Specialized box (generally), used to modify the characteristics
of one* entity
• editing in a Table of data is used (in general) in order to verify the
characteristics of an array of entities
*
it is equally possible to edit several entities in a specialized box (then only
the common characteristics are edited)
Modes of The user may have to delete entities. He can easily destroy an independent
deletion entity. It is often the case that the entity is related to other entities. The
deletion of the original entity can result in the deletion of all related entities.
Therefore, there are two destruction modes:
• the simple deletion:
is carried out on independent entities (not related to other entities)
• the force deletion :
is carried out on an entity and on all other related entities.
These two modes are described in the table below:
Access to the For the command Create, which does not require selection of entities, the
Create access to the command can be carried out:
command • from the menu bar (1)
• from the tool bar (2)
• from the data tree* (3)
The command activations options are presented in the figure below.
* The creation of graphic entities can also be carried out from the graphic
zone. The corresponding selection filter must be activated previous to the
creation command (see § « Entities selection: selection filter »).
Access to other For the commands Edit/Edit array and Delete/Force delete, which require
commands selection of entities, the access to the command can be carried out:
• from the menu bar (1) :
- activation of the command then selection via a drop down menu (1)
• from the data tree * (2 et 2’) :
- activation of the command then selection via a drop down menu(2)
- direct selection then activation of the command (2’)
The command activation options are presented in the figure below .
Selection
via
1 a drop down
menu
2 Selection
via
a drop down
menu
2’
* The editing can equally be carried out from the graphic zone for the graphic
entities. The corresponding selection filter must be activated preceding the
edit (see §Entities selection: selection filter).
Introduction This paragraph presents the different commands that equip the user to display
information regarding the entities: Displaying the PyFlux expression, Listing
and Using by.
Command Function/Use
Display PyFlux This command permits the display of the Pyflux
command expression associated with an entity.
The user can recover it to use in a python sequence.
List This command permits the list of the contents of an
entity type to be displayed.
This command is accessible only starting from the
contextual menu of an entity type.
Entity used by This command permits the user to know all the entities
related to an entity
Access to entity The information commands are accessible starting from the contextual menu
information of each entity or entity-type.
commands
Introduction This paragraph presents different formats for the export of entities.
Interest The export permits the user to extract information related to an entity. This
information is an image of the contents of the database.
Once exported the information may be used outside the FLUX software.
Export The export formats and their applications are presented in the table below:
formats
Format Applications
Export XML
Programming
Export python
Export TXT
Presentation, storage, information,
Export Excel
administration of results
Export Clipboard
Example The results for the export of a point, under two different formats, are
presented in the table below:
Writing mode In the dialog box corresponding to the export of an entity the user can choose
between different modes of writing in a file:
Export to
Writing mode
an existent file a new file
Adding values The values are added
(by default) following the contents
The values are added
The file contents is
Replacing file
replaced
Access to The export commands are accessible from the contextual menu of each entity
export or entity-type.
commands Starting from the contextual menu of an entity type, the user must choose the
entity which he wants to export by means of a dialog box.
Step Action
1 In the data tree, select the entity to be exported and activate the
command Export format XXX in the contextual menu
Î A dialog box is open.
2 In the box Export format XXX
• Choose the path and the file name for the export
3 Choose one of the following actions:
• If the file is existent:
pass to step 4
• If not:
pass to step 5
4 Choose the writing mode: add value or replace file
5 Validate the export
• Click on OK
Î The export has been carried out to the specified file.
Introduction The most part of actions for handling the entities require the selection of
entities.
Indeed:
• to modify the coordinates of a point, you should select the corresponding
point
• to add a line (segment), you should define extremity points and then select
starting point and ending point
•…
The different selection circumstances and selection modes are presented in
this paragraph.
Selection Selection of entities can be done before or after the activation of a command;
circumstances: it can also be done, during an operation of creation.
overview
These selection scenarios are presented through examples in the table below.
Activation of a command:
• New
Selection by number
(choice in the list)
or by other mode
Selection Selection of entities could be done with the following different selection
modes: modes:
overview
• graphic selection (directly with the mouse)
- in the data tree for all entities
- in the graphic area for graphic entities
• identifier selection (by name / by number)
• advanced selection* (by criterion / by …choice)
Selection filter: During the selection of entities, only one entity-type is identified as being
definition selectable:
• it is possible
to select the points 1 and 2
or to select the lines 4 and 5
• it is not possible
to select the points 1 and the line 5
A selection filter makes it consistently possible to identify the selectable
entity-type.
For the graphic entities, the selection filter can be activated directly by the
user with the commands in the menu Selection or in the toolbar Selection.
Menu Selection The proposed choices in the menu Selection or in the toolbar Selection, relate
to the graphic entities; they are presented in the figure and the table below.
No Selection
selection Point / Line / Face / Volume
Free Selection
selection Face region / Volume region
Choice Description
No selection nothing selectable
all is selectable
Free selection The first entity which will be selected by the user will
determine the entity-type selectable
Select points the points are selectable
… …
Definition / use One speaks about selection by criterion when the selection is carried out by:
• the intermediary of the existing relations between the various entities
(points belonging to a line...)
• or the intermediary of characteristics common to several entities (faces
with the same color, faces on the same surface...)
•…
Operation The selection by criterion is available to the level of selection boxes and is
mode carried out in three phases as that is presented in the table below (and on the
example presented in the following block).
Stage Description
0 From a selection box …
1 The user :
• open the criteria list (with the button )
• and select a criterion to carry out his selection
Î The specific selection box (with logical operators) is open
2 Then, he selects the entities which interested him
(He chooses one of the proposed selection modes:
graphic selection, by identifier or criterion)
3 And applies the selection operator to the group of entities
1a. Click on
1b. Click on
Selection by face
3. Click on Union
The stages of selection and management of the entities can be overlapped and
reiterated.
Selection To manage the logical operations on the groups of the selected entities, the
operators user disposes the selection operators introduced in the table below.
Operator Function
Exclude to remove entities from the list
Union to add entities in the list
Intersect to carry out the intersection of two groups of selection
Introduction This section deals with the graphic representation of the modeled device.
When referring to the graphic representation of a device, we are interested:
• in the type of displayed view: side view, top view, bottom view, global
view, … in its position and dimensions in the graphic display zone
• in the different entities and their appearance: points and their visibility, lines
and their color, faces, surface elements….
The first aspect of the graphic representation (called graphic view) is treated
in chapter “Environment and graphic representation”
The second aspect of the graphic representation (called visualization of
entities) is treated in this chapter.
Introduction The graphic representation of different objects is not the same during the
different steps of building the numerical model of the device.
From a step to another, we are interested in one kind of representation, or
another:
• representation of points and lines during the geometry building
• representation of nodes and surface elements during the mesh building, ….
Examples
Possibilities to To control the graphic representation, Flux provides default settings, but the
modify the user has the option to modify this representation.
visualization
User options are:
• option one, use the display filters in order to decide what entity types he
wishes to see in the graphic zone: the assembly of points, or the points and
the lines, or only the faces, … (see §5.4.2 «Visualization of entities:
displaying the entities and displaying filter»)
• option two, modify, in a selective manner, the graphic appearance (namely
the visibility and/or colour) of certain entities (see § 5.4.3 Visualization of
entities: graphic appearance)
Problem How to make the desired image of the device, in terms of displayed entities,
appear in the graphic zone on screen: the assembly of points, or the points and
the lines, or only the faces, …
Displaying
filter
The display filters categorize the entity types displayed in the graphic zone:
the points, or the points and the lines, or only the faces, …
The display filters are accessible by means of the Display menu (or the tools
bar Display)
Displaying The list of the display filters available in the Display menu are presented
menu below. The filters present the working context (geometry, meshing, physical,
exploitation).
Subject How to make appear the desired representation of the device in the graphic
window, in terms of graphic appearance of entities: visibility, color.
Appearance Characteristics
color white, cyan, yellow, magenta, black, red, turquoise and green
visibility visible or invisible
Appearance in The entities in the graphic window are displayed according to their
the specialized appearance characteristics (visibility and color)
box
For each entity, the characteristics are saved in the Appearance tab of the
specialized box.
Remark The function of saving and restoring of the graphic properties exclusively
takes into consideration the display filter.
Consequently, the position of the view and the zoom performed are not taken
into consideration by this function.
Introduction PyFlux is a Flux specific language, which can be defined in the following
manner:
PyFlux =
Python programming language +
Flux command language
PyFlux is therefore an overload of Python to which Flux commands are
inserted.
This section refers to information covering the PyFlux and Python languages,
which should be reviewed before going over the various examples.
PyFlux: what is PyFlux is a Flux specific language, which can be defined in the following
it? manner:
PyFlux =
Python programming language +
Flux command language
PyFlux is therefore an overload of Python into which Flux commands are
added.
Example: Point The structure of the Flux entity in the PyFlux language is presented in the
type example of the Point entity.
uvw point
coordSys transf
Flux entities / Some examples of the Flux type-entity and its corresponding PyFlux type are
PyFlux types presented in the table below.
Other PyFlux The PyFlux types corresponding to the basic data types are presented in the
types table below.
File File
Python: what is “Python is a portable, dynamic, extensible, free language, which allows a
it? modular and object-oriented approach to programming. Python has been
developed since 1989 by Guido van Rossum and several voluntary
contributors” (Gerard Swinnen “Learn to program with Python”, pg. 6,
2005).
All the information about this language is accessible on the Python site:
http://www.python.org.
The Python language is interpreted in Flux by Jython.
Additional information about this interpreter is available on the Jython
website: http://www.jython.org.
Comparison The condition after the if statement can contain the following comparison
operators operators:
Element Function
x == y x is equal to y
x != y x is not equal to y
x>y x is greater than y
x<y x is less than y
x >= y x is greater than or equal to y
x <= y x is less than or equal to y
range() fonction The range() function turns out to be very useful to manage iterations in loops.
It generates a list of integers
>>> range(8)
[0, 1, 2, 3, 4, 5, 6, 7]
Example :
Error handling The Python language has built-in system for exception handling. The program
can contain various types of errors: syntax errors, semantic errors (of logic)
and errors of execution (exceptions). When an exception occurs, the program
execution is stopped and the exception is handled.
To handle syntax errors and exceptions, Python uses the following statement:
try :
# instructions to execute (to raise exceptions)
except exception_class :
# instructions to execute if the exception of the above class occurs
else :
# instructions to execute if there is no exception
finally :
# instructions to execute in all the cases
Python enables:
• to catch several types of exceptions in same treatment
• to raise the exceptions with the keyword raise
Different zones The Flux main window consists of several zones (graphic zone, data tree,
etc.). The principal zones are presented in § 3.1 “Working environment: role
of different zones”.
The zones concerning the use of PyFlux in interactive mode are the zones
presented in the figure below.
History zone
Command zone
Echo zone
Zone Function
History result of the Pyflux command
Command* input of the command in the PyFlux language
Echo* echo of the command in the PyFlux language
*
The Command and Echo zones are zones masked by default. To display / mask
them use the arrows located above the zone.
Example You can enter a line of PyFlux / Python command directly into the
Command zone, the answer is then displayed in the History zone.
An example of use of the Command zone as calculator is presented below.
History
zone
Result
Command
(Python)
⇒
Command
zone
Attention The variables, Python functions, etc. are preserved as long as the Flux module
is opened.
Introduction To write in PyFlux language, the user needs to know the syntax of the PyFlux
expressions (Flux commands in the PyFlux language).
How to find out There are five methods to find out the syntax of the PyFlux expressions.
the PyFlux These methods are presented in the table below and explained in the
syntax following blocks.
Method Description
1 recover the syntax in a command file
2 recover the syntax in the Echo zone
3 activate the entity command Display PyFlux command
(contextual menu, right click on item in the menu tree)
3’ apply the Python type() method to the entity (Command zone)
4 apply the Python help() method to the entity (Command zone)
(1) …in a To recover the PyFlux expression of a Flux command applied during the
command file session:
• use the command file*to save the Flux commands** while the Flux
program is running
Example:
Echo of the command Open project / CASE1.FLU:
loadProject('case1.flu')
(3) Command In order to find out the PyFlux expression of a Flux entity (the type and
Display the attributes):
PyFlux • in the contextual menu of the Flux entity, click on the Display PyFlux
expression command
• recover the syntax within the History zone
Example:
Display of the PyFlux expression of the command Point[1]:
Typing Point[1]
PointCoordinates(color=Color['White'],
visibility=Visibility['VISIBLE'],
coordSys=CoordSys['CENTER'],
uvw=['-60',
'0',
'0'],
nature=Nature['STANDARD'],
mesh=MeshPoint['E_SHAPE'])
End typing Point[1]
(3’) type() In order to find out the PyFlux expression of a Flux entity (the type and
method attributes):
• in the Command zone, apply the Python type() method to the Flux entity
• recover the syntax within the History zone
The Python type() method is equivalent to the Flux command Display
PyFlux command
Example:
Result of the command Point[1].type():
PointCoordinates(color=Color['White'],
visibility=Visibility['VISIBLE'],
coordSys=CoordSys['CENTER'],
uvw=['-60',
'0',
'0'],
nature=Nature['STANDARD'],
mesh=MeshPoint['E_SHAPE'])
(4) help() In order to find out the PyFlux syntax of the complete structure of a Flux
method type-entity (its attributes, sub-types, methods, selection method):
• in the Command zone, apply the Python help() method to the Flux type-
entity (type PyFlux).
• recover the syntax within the History zone
Example:
Result of the command ParameterGeom.help():
ParameterGeom (Entity for parametrizing a geometry) : Type
Entity (read write)
Fields :
- ParameterGeom[id name].expression (Expression for the
parameter) : [1...1] of C80 (read write)
- ParameterGeom[id name].name (Name of Parameter)
: [1...1] of C80 (read write)
- ParameterGeom[id name].value (parameter value)
: [1...1] of R08 (read)
Introduction The user can activate or inactivate the writing of graphic commands. The
commands called ‘graphic’ are associated with various display filters as
described in section: § 5.4.
Writing the Activation of the writing of graphic commands ensures that the graphic
graphic commands corresponding to the graphic operations will be written in the
commands History zone and in the PyFlux command file created automatically.
Transparency Bar
Icon state
activated inactivated
Introduction There are additional commands available to the user that are not accessible by
recopying a sequence of PyFlux.
startMacroTra The description and applications of this command are explained in the table
nsaction()/end below.
MacroTransact
ion()
getProjectNam The description and applications of this command are explained in the table
e() below.
Command getProjectName()
Function Permits the recovery of the name of the project open in Flux
Use Name=getProjectName() permits the storage of the project
name in the ‘Name’ variable
Example : Display of the Flux project name in a file :
PyFlux file = open("Name of project","a")
file.write("Name of project :")
sequence file.write(getProjectName())
file.flush()
file.close()
[ALL] The description and applications of this command are explained in the table
below.
Command [ALL]
Function Creates a the list of all entities of the same type which
facilitates the storage of this list in a ‘Flux variable’
Use Points = Point[ALL] creates a list of all entities of the point
type and enables the storage of this list in the « Points »
variables.
Reminder / The command List_instance(typeId='Point')* results in the
Comparison display of all entities of the point type displayed in the
History zone.
* syntax equivalent to the command List described under § 5.3.2
Information on the entities: Display Pyflux, list, and entitiy used by.
Example : Display of a detailed list of entities belonging to the same
PyFlux entity type in a file:
sequence file = open("List of entities", "a")
file.write("Detailed list of points")
for I in Point[ALL] :
file.write("\n\nInstance : ")
file.write(repr(I))
for field in Point.__fields.keys() :
file.write("\n")
file.write(field)
file.write(" : ")
file.write(repr(I.__getattr__(field)))
file.flush()
file.close()
Example : Content of the created file:
result Detailed list of points:
Instance : PointCoordinates[1]
visibility : 'VISIBLE'
surface : None
color : 'White'
domain : 'DOMAIN1 : Domain.'
nature : 'STANDARD : Topologie standard'
inAirPointFaceLocation : None
region : None
globalCoordinates : [-0.06, 0.0, -0.05]
ETAT : 0
mesh : 'E_SHAPE : E_SHAPE VOLUMES'
inAirPointVolumeLocation : None
Instance : PointCoordinates[2]
visibility : 'VISIBLE'
surface : None
color : 'White'
domain : 'DOMAIN1 : Domain.'
nature : 'STANDARD : Topologie standard'
inAirPointFaceLocation : None
region : None
globalCoordinates : [-0.04, 0.02, -0.05]
ETAT : 0
mesh : 'E_SHAPE : E_SHAPE VOLUMES'
inAirPointVolumeLocation : None
…
…
getHelp() The description and applications of this command are explained in the table
below.
Command getHelp()
Function Permits to stor the help text dealing with an entity type in a
« Flux variable ».
Use Point = Point.getHelp() retrieves the syntax describing the
« Point » entity type in order to support storage in the
« Point » variable.
Reminder / The command Point.help() permits the display of the support
Comparison storage of the Point entity in the history zone.
Example : Display of support related to an entity type in a file:
PyFlux file = open("Aid PyFlux","a")
file.write("Aid on the point :")
sequence file.write(Point.getHelp())
file.flush()
file.close()
Example : File created comprising all of the supporting Pyflux
result command syntax associated with the « Point. » entity type.
getPyFluxCom The description and applications of this command are explained in the table
mand() below.
Command getPyFluxCommand()
Function Permits the storage of ann entity in a « Flux variable ».
Use P1=Point[1].getPyFluxCommand() permits the storage of
the Point[1] entity in the « P1 » variable
Reminder / The command Point[1].type() permits the display of the
Comparison entity Point[1] in the history zone
Example : Display of an entity in a file:
PyFlux file = open("Entities of the Flux project ","a")
file.write("Point P1 :")
sequence file.write(Point[1].getPyFluxCommand())
file.flush()
file.close()
Example : Content of created file:
result Point P1:PointCoordinates(color=Color['White'],
visibility=Visibility['VISIBLE'],
coordSys=CoordSys['CENTER'],
uvw=['-60',
'0',
'0'],
nature=Nature['STANDARD'],
mesh=MeshPoint['E_SHAPE'])
Introduction The command files, also called command programs or scripts, make possible
the automation of a certain number of specific actions.
Instead of manually executing a series of actions within Flux, you can save
the sequences of commands, which you can later replay.
The saved sequences can be improved due to the Python language which
authorizes the utilization of variables, the implementation of loops,
conditional or unconditional connections, …
A command file is therefore of interest as it can:
• accelerate the most frequent operations
• automate a series of complex tasks
Example The command files for the tutorials / technical papers are provided on the
CDROM with the software. By executing these command files, the user can
quickly build the Flux projects described in the tutorials / technical papers.
For example, the command file GeoMeshPhys.py builds the whole geometry,
generates the mesh of the computation domain and describes the physical
properties for the technical paper “Rotating Motion”.
6.2.1. Overview
Definition A Flux command file is a text file, which contains one or more commands in
the PyFlux language. It uses the filename extension *.py.
General The more general operating mode is presented in the table below.
operation
Location The command files can be stored in any directory chosen by the user. The
default command file created when the Flux program running (see § 6.2.3) is
stored in the directory of current project.
Structure The structure of a command file (*.py) is presented in the example below.
Part Description
1 Header of an executable Flux program
2 One or more commands in a programming language
(1) Program The Flux program header is compulsory. It specifies which Flux program (2D
header and/or 3D) will execute the command file and its version*.
(2) Sequence of The sequence of commands can comprise four types of principal instructions:
commands assignment, loops, conditional statements, and statements without condition.
Note: A command file can contain the instructions to open another command file and
so on up to 15 levels.
Automated A command file is automatically created / closed by Flux upon the initiation /
management closing of the Flux session. Default files (*_log.py) are presented in the table
below.
Flux module Current session file Previous session file*
2D Preflu2D_log.py Preflu2D_log_bak.py
3D Preflu3D_log.py Preflu3D_log_bak.py
* In order that the file *_log.py should not be reinitialized (rewritten) upon the
opening of a new session, the file is renamed by Flux (*_log_bak.py).
User The user can manage command files by means of the Flux commands from
management the Project \ Command file menu.
Flux command Function
New creation / opening of a file
Interrupt break of the sequence saving
Resume resumption of the sequence saving
Close end of the sequence saving / closing the file
Note: It is unable to open two command files at the same time for a Flux session.
Modes of There are two modes to execute a command file. These two modes are
execution presented in the table below.
Mode Description
direct mode with graphic refreshment
batch mode without graphic refreshment (faster execution)
Execute a To execute a command file, you can use one of the two following methods.
command file
Method 1: from the supervisor (only batch mode):
• double-click on the file name
Method 2: from the Flux window (batch mode or direct mode):
• in the Project menu, point on Command file and click on Execute in
batch mode or Execute in direct mode
• in the dialog box, enter the file name
All the PyFlux instructions from the command file are executed.
Warning: For a correct process of operations, it is necessary to execute the command
file in the appropriate context (expected by the command file).
Objective The objective is to show, in a simple example, how to write a command file
to automatically create a series of mesh lines.
Example The command file allows the creation of eight Mesh lines A1, …, A8 of the
description arithmetic type with 1, …, 8 elements for different Flux projects (2D / 3D).
• click on OK
• in the new dialog box, click on Cancel
3 Save and close the command file:
• in the Project menu, point on Command file and click on Close
Stage 1: file The command file CreateMeshLine.py containing the saved sequence is
explanation presented as follows:
Element Function
#! Preflu3D 9.33 indication on the executable program (the #! symbol)
this file was saved by
MeshLineArithmetic creation of a Mesh Line with the following
(name=A1, characteristics of the Flux command:
color=Color['White'],
number=1) • name = A1;
• color = white;
• number = 1
Stage 2 To modify the previous command file using the PyFlux syntax:
Step Action
1 Rewrite the command file CreateMeshLine.py by using a for
loop and a variable
2 Save the file
Stage 2: file The command file CreateMeshLine.py containing the new instructions is
explanation presented as follows:
Element Function
#! Preflu2D 10.3 indication of the two programs in which the file
#! Flux3D 10.3 can be executed
(the Preflu2D program is added in order to use this
command file in Flux 2D)
for i in range(8) : carrying out a for loop to reiterate on the values
of the sequence [0, …, 7]
name = 'A' + str(i+1) creation of a variable name which takes for
successive values the strings:
A1, A2, …, A8
(the method str() converts the numerical type in
string)
MeshLineArithmetic creation of a series of Mesh lines with the
(name=name, following characteristics:
color=Color[i+1],
number=i+1) • name = A1; A2; A3; A4; A5; A6; A7; A8
• color = black; white; yellow; blue; turquoise;
magenta; red; green
• number = 1; 2; 3; 4; 5; 6; 7; 8
Stage 3: final After executing the command file, the user will have 8 mesh line entities
result available in the current Flux project: A1 = 1, A2 = 2, …, A8 = 8
Example The studied device is a simple geometrical figure (quadrilateral) defined using
description 6 parameters: X1, Y1, X2, Y2, X3, Y3.
This command file could be used to create different Flux projects in 2D.
Stage 1 To build the basic geometrical figure on which the modifications will be
carried out, follow the following procedure:
Step Action
1 Open a new Flux project
2 Build the geometry:
• create the following 6 geometric parameters:
X1 = 20, Y1 = 0, X2 = 0, Y2 = 10, X3 = 20, Y3 = 10
• create the following 4 points:
(0, 0); (X1, Y1); (X2, Y2); (X3, Y3);
• create the 4 lines to close a rectangle with these 4 points
• build the faces
3 Mesh the device:
• modify the value of the MEDIUM Mesh line (value: 1 mm)
• assign the MEDIUM Mesh line to the 4 points
• mesh the faces
4 Save the project under the name BASE.FLU
Step Action
1 Create a command file ModifParam.py
2 Carry out the modification actions:
• delete the mesh (to enable the geometrical modification)
• modify the value of a geometric parameter
• mesh the faces
• save the project under another name
3 Close the command file
Stage 2: final The command file ModifParam.py containing the saved sequence is
result presented as follows:
Stage 3 To modify the previous command file using the PyFlux syntax:
Step Action
1 Write a function in the PyFlux language, which enables the
automatic creation of a Flux project (corresponding to a set of
parameters) starting from a base project BASE.FLU.
2 Write the calls of the previous function to create the 3 desired
cases
3 Save the command file
Stage 3: file The command file ModifParam.py containing the modify() function and the
explanation calls of this function is presented as follows:
Element Function
#! Preflu2D 9.33 indication on the executable program
def modify(VX1,VY1,VX2,VY2, definition of the modify() function having as
VX3,VY3,case) : input 7 parameters
(6 numerical values to define the geometric
parameters X1, Y1, X2, Y2, X3, Y3 and 1 string
to define the name of the project)
deleteMesh() deletion of the mesh
ParameterGeom['X1'].expression=str(VX1) modification of geometric parameter
… (X1 takes the value VX1, converted into string by
the method str(),
…)
meshFaces() meshing faces
saveProjectAs(case) saving the project under the name defined by
the input parameter case
modify(10,0,0,10,20,10,"Case1") call of the function to build the first case,
… …
Stage 4: final After executing the command file, the user has in his/her working directory 4
result Flux projects, whose characteristics are given in the table below.
BASE.FLU CASE1.FLU CASE2.FLU CASE3.FLU
P3 P4
P1 P2
P1: ( 0, 0) P1: ( 0, 0) P1: ( 0, 0) P1: ( 0, 0)
P2: (20, 0) P2: (10, 0) P2: (10, 0) P2: (10, 0)
P3: ( 0, 10) P3: ( 0, 10) P3: (10, 10) P3: ( 0, 10)
P4: (20, 10) P4: (20, 10) P4: (20, 10) P4: (15, 5)
6.3. Macros
Introduction The macros enable the user to regroup the frequently used commands in an
extension integrated into the software.
You can build up a macro instead of manually executing a series of repetitive
actions in Flux, which you will then be able to call regularly.
A macro is interesting because it can encapsulate within a new command a
series of repetitive operations and thus improve the quality and efficiency of
the user-software interaction.
6.3.1. Overview
Use A macro improves the quality and efficiency of the user-software interaction
due to:
• the regrouping of the repetitive commands
• its dialog box especially designed for the entrance of the parameters
General The operation mode of the most general type is presented in the table below.
operation
Some rules Within the storage on the disk, a macro corresponds to a directory which
includes:
• a file of the macro
• a file of the associated icon (optional)
The directory, the file of macro and the icon must be named after the macro-
function.
Example:
• Name of the function: Polypoint3D
• Name of the directory of macro: Polypoint3D.PFM
• Name of the file of macro: Polypoint3D.py
• Name of the file of the associated icon: Polypoint3D.gif
Location The macros can be stored in any directory chosen by the user. The macros
provided by Flux are stored within the specific directory extensions.
Structure The structure of a file defining the macro (*.py) is presented in the example
below.
1
Part Description
1 Header of an executable Flux program
2 Description of input parameters of the macro
3 Definition of a parameterized function in the PyFlux language
(1) Program The Flux program header is compulsory. It specifies which Flux program (2D
header and/or 3D) will execute the macro and its version*.
* The indicated version can correspond to the current software version or be of a
previous version.
(2) Description This second part deals with the description of the input parameters of the
of parameters macro.
For each parameter it is necessary to define:
• a parameter name
• a PyFlux type (see § 6.1.1)
• minimal and maximal cardinalities (numbers of minimal and maximal
values corresponding to the data structure)
• a default value or a keyword None
• a label associated to the parameter
(this label appears in the dialogue box for the running macro, see § 6.3.3)
(3) This second part deals with the description of the parameterized function.
Parameterized
function For this function it is necessary to define:
• a function name (= name of the macro)
• input parameters of the de function
• a body of the function (PyFlux instructions)
Management of The user can load or unload macros within the project. The macro can be
macros reloaded into the project, if the file of the macro loaded into the project has
been modified for example.
The Flux commands for the management of macros are located in the
Extensions menu.
Integration All the macros loaded into the Flux project appear:
within Flux • in the Extensions/ Macros node of the data tree
• in the toolbar (icons)
The loaded macros are saved with the project.
Run a macro The user can run a macro by using the Run command from the macro
contextual menu or by clicking on the corresponding icon. The dialog box
associated to the types of parameters is then displayed.
Objective The objective is to show on a simple example how to write and use a macro.
This macro makes the repetitive tasks to enter the coordinates during the
creation of points easier.
* The definition of macro requires good knowledge of the Flux database structure
and concepts of programming.
Step Action
1 Type a header of executable Flux program
2 Describe input parameters of the macro
3 Define the Polypoint3D parameterized function in the PyFlux
language
4 Save the file of the macro under the name Polypoint3D.py in the
Polypoint3D.PFM directory.
Element Function
#! Preflu3D 9.33 indication on the executable program
@param parameter statement using the keyword @param
filename parameter names: filename, coordSys
coordSys
File PyFlux types: File, CoordSys
CoordSys
1 1 minimal and maximal cardinalities
points.txt default value points.txt
None keyword None
File of points coordinates labels of parameters
Coordinate system for definition
def Polypoint3D(filename,coordSys) : definition of the Polypoint3D function with 2
parameters
(parameters to define the file name and the
coordinate system)
f = file(filename) creation of a variable f which takes for values
the data of the filename file
for line in f : realization of a for loop to reiterate on the file
lines
coords = line.split() creation of a variable coords which takes for
values the list of strings for each file line
PointCoordinates creation of the points with the following
(color=Color['White'], characteristics:
visibility=Visibility['VISIBLE'],
coordSys=coordSys, • color = white
uvw=coords, • visibility = visible
nature=Nature['STANDARD']) • coordinates = (0, 0, 0); (3, 0, 0); (3, 2, 0);
(2, 2, 0); (2, 1, 0); (1, 1, 0); (1, 2, 0); (0, 2, 0)
• nature = standard
Stage 4: final After running the Polypoint3D macro, the user has the following 8 points in
result his Flux project:
(0, 0, 0), (3, 0, 0), (3, 2, 0), (2, 2, 0), (2, 1, 0), (1, 1, 0), (1, 2, 0), (0, 2, 0).
7. Geometry: principles
Introduction This chapter gives the necessary knowledge to describe the geometry: study
domain definition and symmetry or periodicity use, Flux geometry building
module, geometry building tools, …
This chapter also presents the general principles of geometry building and
some considerations on the modeling strategy.
2D plane study: It is possible to carry out a 2D plane study if the device is supposed infinitely
characteristics long in one direction.
The geometric representation of the device is carried out in a cross section
plane (normal to this direction).
The device depth is taken into account (at physical level) to compute the
global quantities (force, energy, …)
Example
y
y
x
x
z
real object 2D plane geometry
Example: 2D Two devices are represented in the figure below. These two devices are built
plane study or on the same support (from the geometric point of view), but they do not
3D study? function in the same way (from physical point of view).
3D study In this type of study any geometry can be represented, but within the software
possibilities limits.
Example
y
Z
x
R
z
Choice of The choice of the application (2D or 3D) is carried out at supervisor level
the application (Flux 2D or Flux 3D tabs).
Realized study The study proposed in the 2D Generic Tutorial of Geometry and Mesh is the
study of a variable reluctance speed sensor. Only the geometry model and
mesh of the device are studied in this tutorial.
Studied device The variable reluctance speed sensor consists of a cogged wheel, a magnet
and a coil connected to a measuring resistance.
Functionality The rotation of the target wheel near the tip of the sensor changes the
magnetic flux, creating an analog voltage signal that can be recovered in
probes.
COIL 1+
MAGNET 1 PROBE 1
WHEEL
COIL 1-
COIL 2+
MAGNET 2 PROBE 2
COIL 2-
Realized study The study proposed in the 3D Generic Tutorial of Geometry and Mesh is the
study of a variable reluctance speed sensor. Only the geometry model and
mesh of the device are studied in this tutorial.
Studied device The variable reluctance speed sensor consists of a cogged wheel, a magnet
and a coil connected to a measuring resistance.
Functionality The rotation of the target wheel near the tip of the sensor changes the
magnetic flux, creating an analog voltage signal that can be recovered in
probes.
WHEEL
COIL 1
PROBE 1
MAGNET 1
COIL 2
PROBE 2
MAGNET 2
Introduction This section refers to the definition of the study domain, i.e.:
• the definition of the study domain limits (device model)
• the possibilities of reduction the study domain with respect to the real
device by taking into account the repetitive patterns like periodicities and/or
symmetry planes of the studied device.
Finite element The finite element method is based on the subdivision of the entire study
method domain in a finite number of sub domains of finite size.
Thus, to solve a problem with the finite element method, it is necessary to:
• set limits on the device model, i.e. to define the limits or boundaries of the
domain,
• impose boundary conditions on the edges, i.e., to define the values of the
state variable (potential, temperature) on the boundaries of the domain.
Apparent The finite element method requires limits on the problem region, while the
contradiction electromagnetic phenomena are unlimited.
In other words, open domains cannot be modeled by the finite element
method, because it is impossible to subdivide an infinite domain into a finite
number of finite sub-domains.
Study domain The truncation method consists of closing the study domain with an outer
limits: boundary sufficiently far away from the device so as not to interfere with
truncation the results.
method
The device is placed inside an air–filled box, and infinity is approximated by
a closed and remote truncation boundary. The size of the air-filled box is
adjusted so that the effects of the truncation boundary approximation can be
neglected.
The user must determine the quantity of air to model around the device, i.e.,
he or she must evaluate the distance at which the computed fields become
negligible.
m ( x, y, z ) M ( X, Y, Z )
Eext
Eext_image
Eint
Eint
Use of a To take into account the transformations in the equations, we suppose that :
transformation,
• the finite elements formulations are not modified (the state variable of the
principle
(continued)
initial domain and the state variable of the image domain are equal)
• new types of finite elements (transformed finite elements) are able to model
infinity.
Illustration Transformation
T
M ( X, Y, Z )
Representation m ( x, y, z )
of the exterior
domain
y Inverse Y
transformation
T-1
M (x, y) M (X, Y)
x X
Choice of the Theoretically several space transformations can be used. The transformation
transformation of the real space into an image space must be bijective. It must also have
properties of continuity and derivability on and between the elements, etc.
In practice, the transformations used in the software take into account various
efficiency criteria: quality of the solution obtained for a number of elements
or unknown factors, simplicity of implementation and so on.
Introduction The truncation method consists of closing the study domain with an outer
boundary sufficiently far away from the device so as not to interfere with
the most important results.
At what To evaluate at what distance one should place the boundary, it is necessary to
distance should take into account the studied phenomena.
be placed the Generally we can say that:
border ?
• when the field is strongly confined within the structure (flux directed by
flux concentrators, Faraday cages, capacitor, etc.), a small quantity of air is
sufficient. The boundary can be placed directly on the device outline or near
it.
• when the field spreads strongly outside the structure (EMC, etc.), a large
quantity of air is necessary. The difficulty consists in the estimation of this
quantity.
Example Some rules for the positioning of the boundary for an open boundary
magnetic problem (device surrounded by air) are as follows:
• for a 2D plane study or a 3D study:
the boundary should be placed at a distance ranging between 5 to 10 times
the longest dimension of the device.
• for a 2D axi-symmetric study:
in the direction normal to the revolution axis, the boundary should be
placed at a distance ranging between 10 to 20 times the longest dimension
of the device, the variable r*AZ decreasing slowly in this direction.
Boundary The user must impose boundary conditions on the external boundaries of the
conditions study domain.
Infinite box: In the terminology of the software, using a transformation to model an infinite
definition domain is called the infinite box technique or method.
The exterior domain (infinite) is linked to an image domain (called the
infinite box) through a space transformation.
The use of the infinite box implicitly assumes a null field at infinity.
Infinite box, The transformation used in Flux 3D, said to be in a parallelipipedic layer (not
Flux 3D a skewed surface), is described by two superimposed parallelepipeds or
cylinders. The faces of the exterior parallelepiped or cylinder are the image of
the infinite, where the potential and field are equal to zero.
Infinite box, For Flux 2D, the infinite box is described by two superimposed discs (crown
Flux 2D shaped). The external circle is the image of the infinite.
How to The dimensions of the infinite box are defined by the user. This requires a
choose the certain experience because there is no general rule.
dimensions ?
We can, however, give some advice:
• the distance between the device and the interior surface of the infinite box is
at least equal to the dimension of the device in this direction
• the dimensions of the infinite box are related to the mesh. In Flux 3D, the
number of elements on the thickness of the box must be roughly equal (at
least) to two (second-order elements) or to three (first-order elements).
The mesh and the size of the infinite box must take into account the
phenomena studied, and the computations to be performed as follows:
• if one is interested in computing a global or a local quantity inside the
device, it is unnecessary to refine the mesh of the infinite box;
• if on the contrary, one is interested in computing the field created outside
the device, one should define a box of more significant size and refine the
mesh inside.
The main ideas: In most cases, a preliminary analysis of the device highlights the presence of
decrease the repetitive patterns (periodicities) or symmetry planes.
study domain
Under these conditions, it is possible to reduce the study domain as follows:
• representation of a fraction of the device
• assignment of appropriate boundary conditions on the model boundaries
that reflect the periodicity property or symmetry conditions.
Reduction of It is possible to simplify the device model if it has geometrical and physical
study domain periodicities and/or symmetries at the same time.
and boundary
conditions In other words, it is possible to simplify the device model, when specific
conditions applied on the state variable (potential) allow the representation of
a fraction of the device.
The boundary conditions are physical concepts. These concepts are briefly
illustrated through a magnetic example (magneto-static, transient magnetic or
magneto-harmonic application).
Example: The authorized subdivisions of the model depend on the various types of
different boundary conditions set on the model boundaries.
models
The various possible models are shown in the figures below. The boundary
conditions set on the boundaries in these different configurations are
explained in the following paragraphs.
Periodicity When a device has repetitive patterns, it is possible to model a fraction of the
device (the basic pattern), and to impose appropriate periodicity conditions on
the periodicity planes.
From a physical point of view, periodicity boundary conditions are set via the
state variable (potential).
Introduction This section deals with the operation of the geometry building module:
principle of construction algorithms, authorized shapes, difficulties that may
occur during the construction of geometry, ...
Introduction The geometry building module of Flux is of boundary type, which means
that a volume is described by the bordering faces and a face is described by
the bordering lines and a line is described by points.
Outline of the The geometry is created in ascending way: first the points, then the lines, and
different steps finally the faces and the volumes.
The table below gives a first outline of the description mode of the device
geometry.
Step Description
1 Creation of points Manually by the user
2 Creation of lines Manually by the user
3 Identification/construction
Automatically by the software
of faces
4 Identification/construction
Automatically by the software
of volumes
Creation of The points and lines are defined manually (input of point coordinates,
points and lines selection of the ends of the lines, …).
Construction of The faces and the volumes are automatically identified and created
faces and (algorithms of automatic construction).
volumes
(new Principle of automatic construction of faces:
algorithms) • Flux computes all the existing surfaces and it determines to which surfaces
belong the points and the lines (A surface contains faces but it is not limited
and it is defined by three points linked by two lines).
• The automatic creation of faces is then realized with the aid of a technique
of identification of closed outlines.
The principle of the construction of volumes is similar, but more complex,
due to the 3D effect.
Construction of In case of difficulties at automatic construction of faces and volumes, the old
faces and algorithms of automatic construction are available.
volumes
(old algorithms) With the old algorithm, each surface is automatically meshed with very loose
meshes. By grouping the topological surface elements, the software identifies
the faces inside each surface.
The principle of the construction of volumes is similar, but more complex,
due to the 3D effect.
Lines created The shape of line depends on the tool used by Flux to build the geometry. The
by Flux lines created by Flux are as follows:
Lines imported Within the CAD file importation into Flux project, the lines of an unspecified
in Flux shape can be imported.
Faces built by The shape of face depends on the tool used by Flux to build the geometry.
Flux The faces built by Flux are as follows:
Faces imported Within the CAD file importation into Flux project, the faces of an unspecified
in Flux shape can be imported.
Intersections The bordering property of the geometry building module entails the
and interdiction of the intersections of lines, of faces and of lines with faces.
superpositions
The superpositions of line/face type, i.e. lines belonging to a face, or face/face
type, i.e. faces belonging to a face, are authorized.
These different cases are presented below.
Intersections, The intersections and partial or total superpositions of the lines presented in
superpositions the figure below are not authorized and in this case the construction of faces
of lines is not possible.
Lines belonging The lines belonging to faces are authorized. An example is presented in the
to faces next figure.
L2 L6
F2 L10 L4
L8
L9 L5
L3
Intersections of The intersections of line/face type are not authorized, but they do not block
line/face type the construction of faces and volumes.
Faces belonging Faces belonging to faces are authorized. An example is presented in the figure
to faces below.
FACE 1 described by 8 lines
Intersections of The intersections of faces are not authorized and thus the construction of
faces volumes is blocked. An example is presented in the figure below.
Intersections of To avoid the previous problem, it is possible to ignore some faces in the
faces: to avoid moment of volumes building.
problems This method is presented in paragraph 7.3.5 “Another functionality: nature of
points, lines and faces”.
Available Flux owns tools to correct the intersections and superposed entities in
corrections automatic or manual manner, presented in section 9.2 “Geometry importation
(IGES, STEP, DXF, STL, FBD, INTER formats)”
Introduction The algorithms of automatic construction of faces and volumes are powerful,
but difficulties can however arise, being determined:
• either by a «bad» geometrical description: problems of intersection or
superposition of entities, …
• or by numerical problems, ….
Numerical Numerical problems of recognition of faces or volumes can also occur in the
problems of presence of faces characterized by too important numerical waves.
recognition of
faces or What is the problem ?
volumes The algorithm of automatic construction of faces identifies in the first step all
the existing surfaces, then, it determines to which surfaces belong the points
and the lines. A surface is defined by four coefficients computed from the
coordinates of three points. The test of association of points to surfaces is
defined with an error criterion (epsilon tolerance criterion) and it may occur
that the points and lines that the user consider in the same surface will not be
considered in the same surface by the software. In this case, we speak about
significant numerical waves.
This kind of situation may occur when the points are described by a "cascade"
of parameters, of local coordinate systems and of transformations. When the
point coordinates are evaluated in a global coordinate system, there is an
accumulation of numerical errors and the tolerance is then exceeded.
In spite of a very particular care taken for solving these numerical problems,
it may occur, in case of complex geometries, that the automatic construction
of faces or volumes raises difficulties.
Problems There is a certain number of situations where the user may want to modify the
consideration of the entities (points, lines, faces) during the automatic
construction of the faces and/or volumes.
Two examples are given hereafter to illustrate this type of situation.
Example 1 The first example reconsider the problem of intersection between faces
(blocking for building the volumes). This example has already been
presented.
In this example (figure to the right) the
constitutive faces of the internal
parallelepiped intersect the internal circular
face of the torus. The volume of the bar
inside the torus cannot be built.
To avoid this difficulty, it is necessary to
ignore the two circular faces during the
automatic construction of volumes.
Example 2 The second example consists in the numerical modeling of a ship (“La
Fayette” frigate of the French Marine represented in the figure below).
The ship structure is only made up of bars, which are represented and
modeled via the lines (line regions). For this type of structure that is relatively
complex, the use of the algorithm of faces and volumes construction is
expensive, it often takes a long time and it generates many useless faces and
volumes.
To avoid this difficulty, we should place the lines within an air volume
without building the group of faces and volumes that will not be used.
Solution: the To allow the user to modify the consideration of entities when building the
nature attribute faces and volumes, a specific feature (called nature) is attached to the points,
lines and faces.
Return to To ignore the annoying circular faces, the user should modify the nature of
example 1 these faces (“ignored”) and restart the automatic building of volumes. These
faces are then ignored at the geometry level (and also at the mesh level).
Note: These faces are not destroyed. They still exist and are visible on the
screen (in the visibility conditions that allow their visualization).
Return to To avoid the building of faces and volumes of the ship, the user should
example 2 modify the nature of the points and lines of the ship (“in air”) and then start
the construction of faces and volumes. Thus, a single group of faces
(boundaries of the study domain) and one volume (air volume that includes
the group of lines and faces) will be built.
The points and the lines:
• are not taken into account during the construction of faces and volumes
• are taken into account during the mesh building and assignment of line
regions
The simplified geometry in a wire-mesh shape of the “La Fayette” frigate
consists of about 3 300 points and 8 556 lines on which the (“in air”) nature
has been imposed. These points and lines are placed within an air volume
surrounded by the infinite box (24 faces and 7 volumes).
Introduction This section deals with the assisting tools for geometry building: parameter
setting, tools for rapid construction of particular patterns, ...
7.4.1. Parameterization
Introduction The parameterization of the geometry is one of the strong points of the
geometry building module.
It is possible to parameterize:
• dimensions of workpieces
• relative displacements of pieces (variable air-gap, …).
Example The example refers to the study of a contactor, concerning the force acting
on the moving part for various values of the air-gap.
The fixed part is defined in a local coordinate system REP1 of center (0, 0,
0), and the moving part in a local coordinate system REP2 of center (0, 0,
AIR-GAP). AIR-GAP is a parameter whose value is equal to the air-gap
thickness.
To study various positions of the moving part, and thus various values of
the air-gap, it is enough to modify the value of the corresponding parameter
(AIR-GAP) and to treat the corresponding case.
Principle and Each time that a geometrical entity is modified, all the entities depending on
limits this geometrical entity are automatically reevaluated through the database
tools.
Modifying a parameter or a coordinate system entails the modification of the
points, then of the lines, and then of the faces and volumes that are attached to
this parameter.
Important: the coherence of the topology (intersection, superposition, …)
is not verified by the software. This verification is a user task.
In the previous example, a null value of the AIR-GAP parameter leads to a
modification of the geometry topology that can not be realized due to
superposed points and lines. This limit case cannot be treated by
parameterization.
Advice Defining local coordinate systems using a first coordinate system allows the
user to define a "father coordinate system", to which is attached a series of
"children coordinate systems". By modifying the "father coordinate system"
the user will modify the series of "children coordinate systems" attached to
this first coordinate system and thus, the group of points, lines, …attached to
it.
The user can also define a coordinate system in another coordinate system,
and the latter defined in a third coordinate system, ... This description of
intermediary coordinate systems “in cascade” can be useful, especially in case
of multiple rotations. However, in this case, the risk of numerical problems
for the algorithms of identification and construction of faces is more
important.
Propagation, The basic idea is to automatically generate new objects, based on the objects
extrusion: already created (points, lines, faces) by using transformations; transformations
definition are geometrical functions of translation, rotation, or affinity type.
At the vocabulary level, we speak about propagation when the created objects
(images) are not connected to the basic objects (sources) and about extrusion
when these objects are connected among them by connection elements. The
connection elements can be of rectilinear or curvilinear type (straight segments
or circle arcs).
These concepts are illustrated in the example below.
Example In the figure below, the basic face, a rectangle, is propagated/extruded using a
transformation of vectorial translation type.
• The propagation automatically generates 2 new rectangles (4 points and 4
lines).
• The rectilinear extrusion automatically generates 2 new rectangles (4 points
and 4 lines) as well as 8 connection elements (8 straight lines).
Introduction This section presents the general steps for building the device geometry
Outline An outline of the geometry building process is presented in the table below.
The different steps are detailed in the following blocks.
Step Description
1 Device analysis
2 Definition of the study domain
3 Preparation of the geometric construction tools
4 Ascending construction of the geometry
5 Regrouping in regions
Device analysis The first step of the geometry building process is the device analysis:
(1)
• to define the study domain, and
• to prepare the geometric description
The questions that could arise at this level, before starting the description
itself, are grouped in the tables below (non exhaustive list).
Next steps The other steps of the geometry building process are described in the table
(2, 3, 4, 5) below.
8. Mesh: principles
Introduction This chapter gives the necessary knowledge for the mesh realization:
presentation of the different mesh generators available in Flux, meshing
strategies, …
It also presents the general operations of the mesh module (choice of mesh
generator, mesh adjustment, …) and some considerations on specific meshes
(thin regions, rotating air-gap, …)
Introduction This section refers to the mesh algorithms (mesh generators) available in
Flux.
Mesh A mesh generator is a tool to perform the subdivision into finite elements.
generator:
definition The algorithms for meshing (or mesh generators) used for subdivision are
described below.
Delaunay mesh The Delaunay or automatic mesh algorithm is fairly general: it creates
or automatic triangular elements on all the surfaces defined by their meshed outlines and
mesh tetrahedral elements on all the volumes defined by their meshed surface
contours.
Example
Triangle Tetrahedron
“Topological” This mesh generator allows the mesh of rectangular faces with rectangles (or
mesh or quadrangular elements) and volumes such as parallelepiped with “bricks” (or
mapped mesh hexahedron elements).
With the mapped mesh algorithm, the outline of a surface is divided into four
lines, each one meshed so that two opposite lines have the same number of
elements. The surface to be meshed is thus topologically equivalent to a
rectangle. For the mapped mesh of a volume, the volume is topologically
equivalent to a parallelepiped.
Exemple
“Brick”
Rectangle,
Hexahedro
Quadrangle
n
“Copy” mesh This mesh generator allows you to impose the same mesh on faces linked by
or linked mesh a geometrical transformation. This mesh generator can be used only for faces.
Example
Example
rotation of
a line
Example
rotation of
a face
“Prism” “Brick”
Pentahedron Hexahedron
The mesh on We divide the volume or surface domain to be meshed into sub-domains of
sub-domains or simpler easy-to-mesh shapes using one of the following methods. The mesh
the mixed mesh on sub-domains or the mixed mesh is therefore a combination of the
previous mesh generators.
The main difficulty with the mixed mesh is ensuring the coherence of the
mesh on the interfaces between the sub-domains: the mesh on both sides of
the sub-domain interfaces should be identical (we use the term mesh
conformity). This conformity is not easy to obtain in 3D, when different mesh
algorithms are used on neighboring sub-domains.
To ensure the coherence of the mesh on sub-domain interfaces, the 3D mixed
mesh generator creates pyramidal volume elements that ensure the proper
connection between triangular faces and rectangular faces.
Example
Finite element The finite element based computation allows the approximation of state
computation variables such as scalar or vector potentials, temperature, etc. and of derived
quantities, such as magnetic field and induction, magnetic flux density,
electric field, thermal flux density, etc.
The quality of the approximate solution depends on the mesh. Thus, the
quality of the solution depends on:
• the number and the dimensions of the finite elements
• the interpolation functions in each element, which can be 1st, 2nd… order
polynomial functions, and on the continuity conditions imposed on the sub-
domain boundaries.
A detailed presentation of the finite element based computation method goes
beyond the scope of this document.
Nodal element, In terms of the geometry, a volume element is characterized by its vertices,
edge elements edges and faces.
vertex
edge
facet
Elements of 1st Different types of finite elements are available to the user, and in Flux
and 2nd order terminology, these are called 1st order elements or 2nd order elements.
Specific information about these elements is presented in the following table.
Field Using 1st order elements: the potentials are approximated linearly and the
calculation: fields derived from the potentials are constant.
1st and 2nd order
approach Using 2nd order elements: the potentials are approximated quadratically and
the fields are approximated linearly.
Introduction Mesh construction is surely the most time consuming step in defining a
problem. To obtain a valid mesh, one needs a certain level of experience, as
well as some intuition about the computation result.
Mesh and the It is necessary to adapt the mesh to the physics of the problem, as much as
physics of the possible. The mesh refinement does in fact depend on the geometrical
problem constraints, e.g., the mesh of a very thin region, but also on the physical
constraints of the problem, such as a high variation of the permeability within
an element, skin depth, etc.
As a general rule, a more rapid variation of the state variable requires
the use of smaller elements.
When one has some idea about the final result, one can decide on a coarse mesh in
certain regions and a fine mesh in others. Analysis of the computation results may
lead one to restart the computation with a new and better-adapted mesh.
Thus, one should always consider the mesh while the geometry is being
constructed.
Examples of Different physical criteria may be used to validate a mesh One can verify the
physical following points:
criteria to • if the field lines present cracks in the same region, the neighboring
validate a mesh elements are too large
• in a rotating machine, if the reaction force is different from the action
force, the mesh on the air-gap region should be refined
• when dealing with field problems coupled with circuit equations, if the
current through a coil computed by different methods differs significantly,
the mesh on the coil region should be refined.
Introduction This section refers to the mesh strategies, i.e., the two mesh possibilities
available to the user:
• To mesh the entire study domain using only the automatic mesh generator.
• To generate a mixed mesh, using a mesh that is the best adapted to the
physics of the problem for each domain.
Managing the The mesh building process should respect the constraints presented in table
constraints below, related to the modeled device.
Automatic For an automatic mesh, the software completely ensures that the geometrical
mesh interfaces are respected.
To create the mesh of faces and volumes by respecting the geometrical
interfaces, the algorithm of the automatic mesh generator can insert
additional nodes on the faces or inside the volumes, so as to respect as much
as possible the node density information assigned to the points and lines.
Mixed mesh For a mixed mesh, the user has more options to adapt the mesh to the physics
of the problem.
However, in 3D, the user may face software limitations; the conformity of the
mesh on the interfaces between different domains may be a difficult task for
the software to achieve (see the next section).
Mixed mesh: When modeling electrotechnical devices, we mesh the air and volumes with
examples of use complex topology with the automatic mesh generator, while the more
sensitive parts (magnetic circuit, air-gap, skin depth, etc.) are generally
meshed with the mapped or the extrusive mesh generator.
When modeling rotating machines, we generate an identical mesh on the
faces (slots of machines, etc.), with the linked mesh generator.
The different A classification of different mesh generators with the type of mesh, name and
mesh advantages is presented in the table below.
generators
Introduction The use of different mesh generators in different areas is possible thanks to
the algorithms that ensure the global coherence of the mesh on the
interfaces.
There are, however, some limitations of the mixed mesh; these are detailed
below.
Constraint of The mesh must conform, i.e. there must be a “concordance” or matching of
mesh elements on the interfaces between different domains.
conformity
If it is common to mix triangular and rectangular elements in 2D, mixing
hexahedral and tetrahedral elements in 3D can pose certain problems.
Through automatic insertion of pyramidal elements Flux 3D ensures the
conformity of the mesh on the interface between domains meshed with
hexahedrons or prisms and domains meshed with tetrahedrons. An example is
shown in the figure below.
Principle of To ensure the conformity of the mesh, Flux uses an algorithm to repair non-
algorithm to conformities between hexahedrons and tetrahedrons or between rectangular
repair non- faces of prisms and tetrahedrons by inserting pyramids.
conformity
In the presence of triangular and rectangular surface elements, Flux generates
pyramids, starting from two triangular elements.
Two cases may occur:
• The two tetrahedrons attached to the two triangular surface elements have
the same vertex node. In this case, the tetrahedrons can be connected to
create a pyramid.
• If the two tetrahedrons do not have the same vertex node, Flux will insert a
new node in an appropriate position.
New node
The insertion of pyramids is not always possible, and there are a certain
number of limitations to the algorithm to repair non-conformities.
First limitation If the rectangular mesh is too distorted, the triangular elements belonging
to tetrahedrons may cut the rectangular elements. This case is illustrated in
the figure below.
Second The second limitation is less clear. To ensure the conformity of the mesh by
limitation inserting pyramids, Flux 3D adds a certain number of nodes. However, this
algorithm does not work properly in the presence of sharp angles. This
limitation is illustrated by the example below.
A simple device consisting of 3 hexahedral volumes is shown in the following
figure:
• Two external volumes are meshed using the mapped mesh generator
• An inner volume is meshed using the automatic mesh generator
Overview Mesh construction includes different steps that depend, in part, on the mesh
generators used.
Generally, it is possible to distinguish the following steps:
Step Description
1 Preliminary consideration: choice of a mesh type
• automatic mesh (single mesh generator)
• mixed mesh (multiple mesh generators)
2 If mixed mesh
Then definition of the different areas
- and use of generic mesh generator
- or creation of user mesh generator
for these different areas
3 Mesh adjustment
(adjustment of the size and number of elements)
4 Mesh construction
(creation of line, surface, volume elements)
5 Choice of the type of elements: 1st order or 2nd order
Mesh strategy The two first phases of mesh process are consideration phases on mesh types
(1 and 2) and mesh generators choice. For this consideration, see section 8.2
concerning mesh strategies.
Creation, mesh This phase concern the possible creation of user mesh generators and
generator assignment of mesh generators to the different areas.
assignment (2)
In the case of mixed mesh, the user can:
• in one hand, use the generic mesh generators (Automatic, Mapped or No
Mesh)
• in the other hand, use his own mesh generators (linked or extrusion mesh
generators)
Important:
In the geometry context, if the building options “with mesh” are activated during
propagation and/or extrusion phases, linked and/or extrusive mesh generators are
automatically created.
Adjustment Meshing and mesh adjustment are two more or less interdependent processes:
and mesh (3 • meshing (subdivision of lines, faces and volumes) is carried out by the
and 4) software
• adjustment (adjustment of the size of the elements) is performed by the user
The complete process is represented in the diagram below.
Mesh
adjustment
Mesh lines
Mesh faces
Mesh volumes
Choice of the This last phase of mesh process is specific to PreFlux 3D. With PreFlux 2D,
type of elements created are automatically 2nd order elements.
elements (5)
Adjustment: Mesh adjustment consists of adjusting the size and the number of elements.
definition
Two types of To adjust the mesh, the user should take into account the geometry being
adjustment modeled.
The user has the option to set:
• the node density around selected points,
• the number and the distribution of nodes on the lines.
Information related to the node density next to selected points is information
assigned to the points; we use the phrase “mesh adjustment via the points” or
by the intermediate of mesh points.
Information concerning the number and the distribution of nodes on the
lines is assigned to the lines; we use the phrase “mesh adjustment via the
lines” or by the intermediate of mesh lines.
Principle of The principle of mesh adjustment “via the points” is illustrated in the example
adjustment “via below.
the points”
1 mm 5 mm
Principle of The principle of mesh adjustment “via the lines” is illustrated in the example
adjustment “via below.
the lines”
10 equidistant elements
• the user imposes the number of elements and their distribution on the line:
10 line elements, equidistant nodes.
• the program divides the line according to this information.
Priorities for If both lines and points are assigned mesh information, the lines have priority
the lines and over points.
the points
Example
• Points P1, P2, P3 and P4: P4
length of line elements next to points: 2
mm
• Line Lz:
geometric progression of the line elements Lz Ly P3
on the line:
- minimum distance: 1 mm
- ratio : 1.5
• Result: P1
- on line Lx and Ly: division based on P1,
P2 and P3 points information Lx
- on line Lz: division base on the line P2
information
In this example, the user switches from geometry context to mesh context, then go
back to geometry context, …
Example 2 To facilitate the mesh of the device, the user often needs to add
supplementary points, lines, faces or volumes.
Based on these supplementary entities, the user can adjust the density of mesh
nodes and control the mesh distribution between high node density areas with
small elements and low node density areas with larger elements.
In this example, the user goes back to geometry context, …after a phase in the
mesh context…
Return to Important:
geometry To go back and forth between geometry and mesh modules are authorized for
context after non-mesh structures. If the project is meshed, geometric modifications are
mesh not allowed.
operations
To modify a meshed geometry, it’s necessary to first delete the mesh.
Introduction This section presents specificities (and limitations) of mesh generators trough
examples.
Introduction The surface mapped mesh generator is relatively powerful. However, if the
geometry of a face is very different from the square reference domain, the
mesh quality may worsen and the mesh may become incoherent.
Examples of faces meshed with the mapped mesh generator are presented
below.
Note that a degradation of the mesh can be observed under the following
conditions:
• when “the corners are no longer corners” , e.g., a circle
• on faces bordered by more than four lines, if the face concavity becomes
too large; however, an exact limit for concavity is difficult to define.
Examples Examples of faces composed of four lines that are meshed with the mapped
mesh generator:
• The first face is a quadrilateral. The top and bottom lines are geometrically
meshed and the mesh is perfectly propagated inside the face.
• The second face is a 180-degree piece of ring. A geometric line subdivision
is used in the radial direction. The mesh is perfectly propagated inside the
face.
Example The face is a disc defined by four lines. The mesh is very good except at the
four “corners” of the disc.
Examples Two examples of faces, each composed of five lines (convex face and
concave face), are presented below. For these two faces the mesh is good.
Example The face shown below is composed of twelve lines and points and it is
characterized by significant concavities. The structuration is done using the
four end points on the left and on the right. The other eight points are angular.
The resulting mesh is incorrect.
To obtain a valid mesh, this face should be subdivided, e.g., into five faces.
Example Two types of mapped mesh of a concave face bordered by six lines.
Depending on the mesh discretization, the mesh is correct or not. Subdivision
of the face into two faces is recommended.
Introduction The volume mapped mesh generator is less powerful than the surface mapped
mesh generator. To get a good quality mesh, the shape of the geometry should
be close to the cubic reference domain (see the 3D examples).
Some examples of volumes meshed with the mapped mesh generator are
presented below.
Note that a degradation of the mesh can be observed in cylindrical volumes.
The mapped mesh generator does not accept volumes having cylindrical faces
of 180 degrees or more. If the elements are too fine, the mesh may become
incoherent.
Example Mapped mesh of a hexahedron with planar faces: The elements are of good
quality.
Refined mapped mesh of a tile: elements are incorrect because they are too
distorted
Introduction Some examples of faces meshed using a linked mesh generator are presented
below.
Extrusive mesh Though developed to mesh volumes, the extrusive mesh generator can also be
of faces assigned to faces.
To obtain an extrusive mesh on faces, a prerequisite is that the face be
obtained by extrusion with an existing transformation (rectilinear extrusion by
translation, positive ratio affinity, or curvilinear extrusion by rotation) and
that this transformation exists.
Example A geometry composed of six volumes is presented below. These volumes are
meshed using three extrusions in different directions. We also imposed linear
geometric subdivisions on four lines corresponding to the four edges of the
extrusion.
Mesh of thin The mesh of a thin region can be simplified by adding supplementary points
regions and lines that are not used in the construction of regions.
This is illustrated in the figure below.
Mesh of skin To obtain accurate results in skin effect problems (eddy currents, etc.), at
depth: rules to least two elements should be used on the skin depth.
follow
The state variable actually has an exponential variation on the skin depth, but
within an element, Flux 2D uses a parabolic approximation. Thus, the size of
elements should be small enough that the arc of parabola can be assimilated
to an exponential arc.
Computation of In magneto-harmonic problems with linear materials, the skin depth for eddy
skin depth: currents can be expressed as follows:
recall
ρ
δ=
πµf
where f is the frequency, ρ the resistivity and µ the magnetic permeability.
Choosing the To mesh the skin depth, elements of rectangular or hexahedral type are
mesh generator recommended, that is:
• the mapped mesh generator (2D, 3D)
• an extruded mesh generator with a mapped base (3D)
The rest of the study domain is meshed using the automatic mesh generator.
2D Example A 2D example of mesh on the skin depth is shown in the figure below.
magnetic circuit
inductor
δ = skin depth
3D Example A 3D example of mesh on the skin depth is shown in the figure below.
The most critical volumes (the volumes corresponding to the skin depth of the
bar) are meshed using the extrusive mesh generator. The rest of the study
domain is meshed using the automatic mesh generator (inside the bar and the
surrounding air).
Principle of re- During the solving process, the mesh of the translating air-gap area is
meshing rebuilt for each change in the position of the moving part.
The re-meshing is carried out as follows.
Step Description
1 The elements of the moving part are moved by translation
2 The elements of the displacement region are either distorted or
transferred to the other end, according to the following criteria:
• for a small displacement of the moving part (smaller than half
the height of an element) the elements are flat.
• for a large displacement of the moving part (larger than half the
height of an element) the elements are transferred to the other
end.
3 The translating air gaps are re-meshed.
Translating air- Besides the usual mesh rules, some additional rules must be respected for
gap in 2D: the mesh of the translating air-gap:
additional mesh
rules The moving part can be meshed with triangular or quadrangular elements,
but there must be always the same number of nodes on the upper and lower
edges in contact with the displacement region.
The translating air-gap should contain only one layer of triangular elements
in its thickness, and these elements should have a shape as close as possible to
an equilateral triangle.
Examples of Some examples of correct and incorrect mesh of the displacement region and
mesh of the translating air-gap are illustrated in the figure below.
Principle of During the solving process, the mesh of the rotating air-gap is rebuilt at each
remeshing change in the position of the moving part.
Rotating air- In addition to the usual mesh rules, some rules must be respected for the mesh
gap: additional of the rotating air-gap:
mesh rules
The rotating air-gap should contain only a single layer of triangular
elements, and their shape must be as close as possible to an equilateral
triangle.
Some examples of correct and incorrect mesh for the rotating air-gap are
illustrated in the following figure.
Introduction FLUX software has the ability to communicate with other software packages
and to carry out the transfer of data from CAD tools to the Finite Element
(FE) analysis tools.
This chapter presents the available choices for the different processes of
importation with Flux:
• import of geometry starting from geometric files
• import of geometry starting from mesh files
• import “Advanced Mode”
• in addition, the associated tools for simplification and repair of imported
data are described
Item of Note The import of a CAD geometry file into FLUX takes into account projects
(reminder) possessing complex geometries (e.g. presenting twisted surfaces). These
types of surfaces cannot be generated directly using the available tools in
FLUX.
Introduction This section presents a general point of view concerning the authorized
formats for importation and the principle of conversion.
Mesh Import Mesh import consists of importing the mesh which results in the creation of
geometry in the FLUX environment.
Import formats The following table summarizes the different file formats accepted in Flux,
associated with the type of import.
Type of For importation Flux accepts only files in text format. The binary files are not
accepted file accepted.
Attention: It is not possible to import an assembly file consisting of several IGS files
(*_ASM.IGS).
Multiple Multiple importations are available. Flux is able to import the files with
importation different formats (DXF, STL, etc) in the same project.
Introduction This section deals with the importation of geometry starting from geometry
files.
The import of a CAD geometry in an FE (finite elements) project is an
operation consisting of turning the data from the CAD type (in a specified
format) into data of the FE type.
Note: the import selection ,“advanced mode,” integrates a certain number of repairs
before the conversion of data (see § Import of geometry called « advanced
mode » (format SAT, CATIA V4, CATIA V5, INVENTOR, PRO
ENGINEER, STEP (advanced mode) and IGES (advanced mode))
Formats
The following formats enable geometry import :
Question It is important to note that in Flux, the user should build the geometry without
defects. A defect, in the Flux sense, is an error of the geometrical construction
of intersection of lines type, of superposition of points type, etc.
If there are geometric defects in the origin file (intersection of lines,
superimposed points, etc.), these can hinder and also block the process of
geometry building: impossibility of building faces and/or volumes.
So, after the geometry importation, it is necessary that complementary actions
should be taken in order to search (identify) and correct the geometric
defects.
Importation The process of importation is a process involving the three stages briefly
process describing in the table below and detailed in the following paragraphs.
Stage Description
1 Conversion with options
2 Geometry checking / search geometric defects
3 Correction of geometric defects
and/or
geometry simplification
Introduction The first stage of importation is the stage of conversion of the imported
geometry into the Flux format.
Operation The principle of operation of the importation is as follows: all the geometric
principle entities of the initial file (specific to the standard and proper formats) are
converted into the Flux format (geometric entities of type Point, Line, Face
and Volume...) in the final file.
Conversion of The entities of the initial file are read and converted into the Flux entities. The
entities summary table is presented below.
Conversion of
entities
(continued)
Options for To perform the data conversion, different options are available to the user.
conversion
There are two types of options:
• general options, available for all formats
- choice of a coordinate system: locates the imported geometry in the Flux
project
- choice of the unit: chooses the units of the device dimensions
- choice of precision: defines the minimal distance that enables the
distinction of two points
• particular options, specific to the format
Only the general options are described in this section.
Introduction The second stage is geometry checking. This stage is the stage of research
(identification) of the geometric defects; correction will be carried out in the
following stage (stage 3).
Before describing the modes of defects search, the different defect types are
described in the following blocks.
Geometric The geometric defects can hinder or block the geometry building process.
defects
The following can be therefore discerned:
• blocking defects (intersections and superimposed entities):
these defects must be identified and corrected before building the geometry
in Flux.
• non-blocking defects (very small lines and faces, wires not closed, …):
these defects do not impede the geometry building in Flux, but they can
influence, in a negative manner, the quality of the geometry building and/or
the meshing
The geometric defects are presented in the table below.
*In the next figure, the faces building after the importation of
the geometry will generate the intersection of the faces. This
type of defect is not identified by Flux in the Geometric defect
P1
entity, but it is blocking for the further volumes building. The P2
connecting the points P1 and P2 by a new line before the faces
building enables to avoid the intersection of the faces.
Defects The research of the geometric defects can be carried out in two ways:
research modes • for the assembly of types of defects (described as global checking of the
geometry)
• by type of defect (described as research by type)
Research result Whatever the research mode, the result is the following:
• Flux creates a geometric entity of the Geometric defect type for each
defect found (this entity contains the information about the defect
localization: number of concerned points, lines or faces)
• Flux highlights this entity in a graphic window (specific display)
Introduction The third stage is the stage of correction of geometric defects and/or
geometry simplification.
Correction The principle of correction proposed by Flux for the various types of
principle geometric defects is presented in the tables below.
⇒ L1 L3
L2 P4
L2 P3
P3 P4
P1 P2
P1 P2
⇒
L2
L1
Arc of circle having the same Removal of the lines L2 and L3 and
curve angle suppression of the points P2 and P3
by fusion of the lines L1, L2 and L3
L2 L3
L1 L1
P3
P1 P2 P4 P1 P4
Note: These algorithms are planned especially for the 2D geometry, the result in 3D
is not guaranteed.
Manual To correct the other defects the user must carry out a manual correction with
correction the tools presented in the table below. The use of these various commands is
detailed in section “Correction of geometric defects” of chapter “Geometry /
mesh importation: software aspects”.
Introduction Although it is possible and necessary to correct the geometric defects after
importation, it is preferable to prepare the initial file so that the operations of
correction in Flux are minima.
The checking of the geometry and the correction of possible geometric
defects are essential.
Introduction This section refers to the import of geometry starting from geometric files in
« advanced mode».
The import of CAD geometry into an FE (finite elements) project is an
operation which consists of the conversion of the CAD data (in a specified
format) into FE type data.
The advanced mode is a method that permits a CAD geometry transfer to the
FE software in a more efficient manner while integrating repairs before the
conversion of data. These repairs simplify the work of geometry
checking/correction.
Format The formats which permit the import of geometry are as follows:
Interest The user can import a geometry in advanced import mode thereby eliminating
the need for the geometric correction phase to follow in FLUX.
Context In general, the CAD files used for the execution/ visualisation of a prototype
or device are not always adapted to finite element modelling. It is often
necessary « to facilitate» the transfer of data from the CAD format to the
finite elements analysis software format.
The advanced mode is an « optimised » mode, which, due to integrated
supplementary functions, facilitates the work of data transfer.
face/face
line/line
intersection intersection
CAD FE
Model NOT SUITABLE
for FE computation
Solution To solve the problem of adjoining geometries (parts in contact, see figure), a
number of integrated repair tools are included in the import selection called
« advanced mode ». This consists of the appropriate construction of the
interfaces (minus the intersections), respective to the contact faces between
the parts. This must be designated before carrying out the proper operation of
conversion.
Import The import is carried out in two phases, as described in the table below and
process illustrated by the following figure.
Phase Description
1 Repair:
• Detection of parts in contact
• Construction of the contact faces
• Union of solids in contact
2 Conversion:
• Choice of elements of the CAD file to convert
• Conversion of elements:
CAD type geometry -> Geometry of Finite Elements type
3 Result: the results are displayed in an import report in the History
zone.
Conversion The CAD entities of the initial file are read and converted into FLUX entities
of the type:
• points defined by parametric coordinates
• lines of type :
- segment defined by extremity points
- arch defined by the origin, intermediate and extremity points
- curve (for any kind of lines)
• volumes
Introduction This section refers to the import of a geometry and its mesh, from a mesh file.
Introduction
Mesh import enables the import of the geometry and mesh. The geometry
created is based on the imported mesh.
This approach enables the introduction in Flux projects of uneven surfaces in
the form of “cut surfaces”, but has the disadvantage of generating an
important number of geometric entities (volumes, faces, lines). As
consequence, the result of the mesh file conversion is not always compatible
with the requirements of Flux analysis (for example, the use of sliding
cylinder …).
At the moment of mesh importation (or right afterwards) additional
operations are necessary, in order to simplify and adjust the imported data.
Importation The mesh import process involves three stages, briefly described in the table
process below and detailed in the next paragraphs.
Stage Description
1 Conversion with options
2 Fusion of the multiples faces and lines coming from the mesh
importation (facets and edges)
3 Positioning of the faces on a reference plan / cylinder
Introduction The first stage is a stage of conversion of the mesh entities into geometric
entities.
Principle of The principle of conversion shown in the scheme below is the following: all
operation the vertexes, edges and facets of volume elements of initial file are converted
into points, lines and faces in the final file.
Importation in Flux
Conversion of The entities of the initial file are read and converted into Flux entities, as
entities presented in the table below.
The file in
CAD entities contained
the format Converted into Flux entities …
…
…
nodes points defined by parameterized
coordinate position
nodes
NASTRAN line elements lines of edges list type
/ PATRAN line elements
/ UNV/
face elements faces of facets list type
MED
face elements
groups: volumes
component or material
Structure of In Flux, the geometric entities resulting from the mesh importation differ
data from “standard” geometric entities:
• the faces resulting from mesh importation are faces of facets list type
• the lines resulting from mesh importation are lines of edges list type
Option To perform the data conversion, different options are available to the user.
selections for
conversion These options are of two types:
• general options, available for all formats
- choice of a coordinate system: to place the imported geometry in the Flux
project
- choice of the unit: to choose the units of the device dimensions
- choice of precision: to define the minimal distance enabling to distinguish
two points
• particular options, specific to the format
Only the general options are described in this section.
Introduction Following the importation, the geometry of the imported device has multiple
lines and faces deriving from multiple facets and edges of the initial file.
The second stage is the stage of fusion (regrouping of the entities), which
enables the reduction of number of lines and faces, and facilitates their
handling, as well as the visualization of the device.
Fusion of faces: Although strongly advised, the fusion of faces / lines is optional. This
use operation becomes compulsory for the faces in the cases presented below.
If … The fusion …
kinematic coupling of dissociation faces (sliding cylinder, boundary of
mobile mechanical set and compressible
mechanical set)
symmetry and/or
of faces located on these planes
periodicity planes
… is compulsory
Principle of The principle of fusion of faces is shown on the scheme below. During fusion
fusion of faces all faces belonging to the same surface are regrouped in one face.
and data
structure
Set of faces that results A single face that
from facets of the initial contains many
file facets
Fusion
The faces resulting from mesh importation are faces defined by a list of
facets.
• Before the fusion of faces:
every face (of facets list type) contains a single facet
• After the fusion of faces:
every face (of facets list type) contains many facets
Regrouping The surface of regrouping is defined by the user, using an angle named angle
surface and of fusion. All adjacent faces whose angle is less than the fusion angle are
angle of fusion regrouped in a single face (See figure of example below).
Example:
Angle ∈ [0°; α ]
Three adjacent faces are
regrouped in a single face
Angle ∈ [0°;α ]
with a fusion angle α
Precaution So that the simplified geometry approaches with more real geometry, it is
necessary to take some care as for the choices of an angle of fusion, the risk
being to gather faces, which should remain separate.
In general, it is advised to comply with the following rule:
• start with an angle that is inferior or equal to 1° - to identify the plane faces
• gradually increase the value of the angle - to identify the others faces
Attention The fusion process does not create even surfaces. The regrouping surface is
an uneven surface, (although this surface looks like an even one).
And for the The principle of lines fusion is the same with the one of faces fusion. It is
lines … illustrated in figure below.
Fusion
Rules of fusion Two faces (lines) can be regrouped if they belong to same volumes (faces).
The mesh importation of a quarter cylinder before and after the fusion of
faces and lines is shown in figure below.
Introduction After importation of mesh and simplification of geometry, the quality of the
faces obtained starting from mesh data can be unsatisfactory for the Flux
further operations (see examples below). In this case, it is necessary to adjust
the geometry.
Examples:
• If we want to impose the condition of periodicity on two faces which
theoretically form an angle of 60°, but in reality the imported faces form an
angle of 59.9999°, it is necessary to adjust the geometry in such way that
the real angle between the two faces to be 60°.
• If we want to use the sliding cylinder entity and if the face corresponding to
the surface of dissociation not be really carried by a cylindrical surface, it
will then be necessary to adapt the consequently geometry.
Positioning of The positioning of the faces is optional but becomes compulsory for the faces
faces: use in the following cases:
If … the positioning …
kinematics coupling of dissociation faces (sliding cylinder, boundary of
mobile mechanical set and of compressible
mechanical set)
Symmetry and/or
of faces located on these planes
periodicity planes
… is compulsory
Strategies of Previous to mesh data importation is important to choose a strategy for the
mesh importation. It is possible:
importation • to import a complete geometry of the device, i.e. all its components, the
including box and the complete mesh of the study domain
• to import the geometry and the mesh of a only one component or of a part
of the device and to complete the description of geometry and mesh in Flux.
The further steps of the project depend on the chosen strategy.
Strategy 1 The first strategy consists in importing the whole study domain. The process
of importation can be presented as follows:
Stage Description
1 Preparation of initial file in the origin software:
• full description of the device geometry
• addition of an air region or of a box including the device
• meshing of study domain
2 Data importation into Flux by using the option:
• with mesh (mesh data importation)
3 Simplification of file:
• fusion of faces / lines
4 Direct passage to physics
Strategy 2 The second strategy consists in importing a specific meshed part of the
device. The process of importation can be presented as follows:
Stage Description
1 Preparation of initial file in the origin software CAD (ex. rotor):
• description of the geometry of the device part
• mesh of this part
2 Data importation into Flux by using the option
• without mesh
3 Simplification and adjustment of file:
• fusion of faces / lines
• positioning of faces
4 Building in Flux of the rest of the device geometry (ex. stator) :
• geometrical construction of other device parts
• construction of faces and volumes
• mesh of the whole computation domain
5 Direct passage to physics
Important: The device parts, added by Flux, do not have to touch the imported
geometry (imported parts).
Attention: A non-conform mesh in the initial file may generate intersections that
cannot be removed.