User Guide
Introduction
AcadMesh2D is a free 2D simple CAD coupled to a mesh generator (see credits of third part codes and libraries at "A note about the licensing") developed to generate finite element model output files, containing both solid model information (materials, thicknesses and mesh) and boundary conditions data(forces, pressures and applied displacements).
The herein presented user guide/manual is just a brief description of the Graphical User Interface (GUI) commands, and we think it is sufficient to help the user building a Finite Element model and exporting the text output file containing the generated data.
The AcadMesh2D main window is presented below:
In the top of the main window several standard command buttons are available in order to allow the user to perform general tasks as starting new models, saving and opening new files; also buttons to perform move and zoom commands are available. Just below them, one find the 'Design paper', which is the space in which the user may draw the geometry of the 2D solid, generate the mesh and apply the boundary conditions to the model. Yet in the right 'part' of the top of the main window, commands to activate/deactivate a grid into the Design paper, and also to change its size, are available.
Just above the 'standard' buttons there is a input field named 'Communication dialog' in which the user may inform numeric data for some of the commands, as coordinates or angles, for instance. The 'Communication dialog' text, in front of the input field, presents information about the data or event expected depending on the task being performed.
The main window also present tabs in which several buttons and other command widgets to build the model are available. The first tab is named 'Geometry' and presents buttons to build the geometric model, by creating points, lines, areas and manipulating them.
The second one is named 'Properties', and allows the user to create new material and thicknesses, and also to apply such properties to the areas and to define the kind of element to be used in its meshing.
The third tab is named 'Mesh', and it presents buttons to generate and clear mesh in the areas, and also other tools to visualize the created elements and meshes properties.
The fourth tab is named 'Boundary Conditions' and presents command to apply forces, pressures and displacements in the created model mesh.
Also in the top of the main window, among the 'standard' command buttons, there are available two other buttons, named 'export' and 'configure', to configure the output mesh file and to export it. Their use is described latter within this manual.
Referring to mouse command, here we refer the mouse left button press as [CLICK] and the right button press as [RIGHT-CLICK]. The mouse scroll is used only to zoom in/out the design paper. The [RIGHT-CLICK] event is very important in the CAD, specially in the entities (lines, areas) creating tasks, and will be indicated along the manual by means of the [RIGHT-CLICK] notation.
In what follows, a brief description of the commands is presented.
1. The Geometry tab
The commands in this tab are divided in four groups: Insert commands, in which the use find functionalities to create points, lines and areas; Manipulate commands ,for moving, rotating and coping geometric entities; Edit line, for extending and cutting lines, and deleting them; and edit area, for including holes or inclusions inside areas.
Create point
The user may insert points in the design paper, which can be used to define lines (see line thru points command). The points can be inserted by mouse left clicks [CLICK] in the design paper, or by entering the x and y coordinates in the communication dialog.
Create line
The user may insert lines in the design paper, which can be used to define areas (see area through lines command). Lines may be straight, defined by two points, or curved, defined by three or four points (quadratic and cubic splines, respectively). For this command, temporary points (light gray aspect) are created, i.e., they are shown just while the command is being executed. The command is finished by a [RIGHT-CLICK].
So, for instance, if the user wants to include a straight line, he may [CLICK] in two different points (or enter two pairs of coordinates in the communication dialog) and then press [RIGHT-CLICK]. Note that after clicking four different points, the command ignores other [CLICKS] until the command is finished by a [RIGHT-CLICK].
Create area
The user may insert areas in the design paper. Areas may have straight lines, defined by two points, or curved, defined by three or four points (quadratic and cubic splines, respectively). For this command, temporary points and lines (light gray dashed) are created, i.e., they are shown just while the command is being executed. The command is finished by closing the area and pressing a [RIGHT-CLICK].
Create lines through points
The user may create a line by selecting existing points (two for straight lines; three or four for curved lines). The selected points area shown in red while they are being selected. The command is finished by a [RIGHT-CLICK].
Create area through lines
The user may create an area by selecting existing lines. The lines must define an closed area, i.e, all lines must start in the ending of another line and defined a closed region in space. The lines may be selected in any sequence (it is not necessary to select then in a clockwise or counter clockwise order. If it is not possible to build an area by the selected lines, a message is shown and the command is stopped.
Predefined shape area
It is also possible to generate rectangles, arcs (for arcs here we mean lines enclosing a ellipse shaped area), ellipses and crack shaped regions by using the create rectangle, arc, ellipse and crack buttons (see figures above). Pressing such buttons opens a pop window in which the user may inform the coordinates (x, y) of the center of the area, its width (W) and height (H) and the angle (a) in degrees, as depicted in the illustrative figure in the opened window.
Move
Points, lines and areas can be moved after they were created by means of this button command. Once the move command is started, one can select a group of entities to be moved. The selection step finishes with a [RIGHT-CLICK]. Then the user must inform the displacement he wants to apply over such entities in the communication dialog, given by a pair o number presenting the components of the displacement. For instance, if one wants to move the selected entities 2 units in the x (horizontal) direction, he must enter "2,0" in the communication dialog. Notice that meshed areas can not be moved in the current version of AcadMesh2D.
Rotate
The geometric entities can also be rotated after they have been created by means of the rotation command. As the move command, in the first step one must select the entities to be rotated, and finish such step by a [RIGHT-CLICK]. Then one must inform the rotation point, by clicking (left click) in the design paper or informing its coordinate in the communication dialog. Then one must inform the rotaion angle (in degrees) in the communication dialog. Notice that meshed areas cannot be rotated in the current version of AcadMesh2D.
Copy
The copy command sequence is very close to the one of the move command. First one may select the entities to be copied. This selection step is also finished by a [RIGHT- CLICK]. Then the user must inform the displacement to be applied to the copied entities, in the communication dialog. Notice that meshed areas or areas with holes or inclusions cannot be copied in the current version of AcadMesh2D.
Extend line
'Extend line' is a command which present several steps until it is concluded. The first of then starts when the user selects a line or a group of lines which must be extended. Once these lines are selected (represented in red color), this step is finished by a [RIGHT- CLICK]. The second step then starts, in which the user must click the line which is going to be the reference for extending the previously select lines. This second line is represented in blue once it is selected. Then the command is finished by a [RIGHT- CLICK].
Cut line
'Cut line' is a command which present several steps until it is concluded. The first of then starts when the user selects a line or a group of lines which must be cut. Once these lines are selected (represented in red color), this step is finished by a [RIGHT-CLICK].
The second step then starts, in which the user must click the line which may be the reference for cutting the previously select lines. This second line is represented in blue once it is selected. Then the command is finished by a [RIGHT-CLICK]. Notice that at this point the lines are cut, but the user must delete the pieces he wants to eliminate using delete command (see next command description).
Delete
The delete command is very simple to be used. Once the user clicks its button, he may select the geometric entities (points, lines, areas) he wants to delete and then [RIGHT- CLICK] to finish the command. Notice that meshed areas cannot be deleted, i.e., if one wants to delete them he first must clear these areas' meshes.
Insert hole
One can insert holes in an area by using this command. The first step is to select the area in in which the hole will be inserted. The selected area is indicated by a blue line boundary. After selecting it, this step must be finished with a [RIGHT-CLICK]. Then the areas that represents the holes to be included must be selected. These areas area indicated by red line in their boundaries. Then one must finish the command by a [RIGHT-CLICK].
WARNING: It is important to comment that holes that intercepts (or event 'touches') the main area, other holes or inclusions will cause the program to crash.
Insert inclusion
The insert inclusion is very similar to the insert hole command. Of course, in this case, a inclusion is inserted in the main area, instead of a hole. Notice that one must have previously attributed the properties to the main and inclusion area(s).
WARNING: It is important to comment that inclusions of areas that intercepts (or event 'touches') the main area, other holes or inclusions will cause the program to crash.
2. The Properties tab
In this tab one can create materials and thicknesses and apply then to the model areas. In the top of it there are three buttons.
Create material
The first of them opens a frame in which the user can define material objects, setting its id number, Young modulus, Poisson coefficient and density. Just below such frame, there is another frame in which the created materials can be viewed by selecting them in a comboBox. Also one can delete the select material by pressing the 'Delete material' button.
Create thickness
The second button opens a frame to define, view and delete thicknesses to be applied to the areas. The thicknesses frames are very close to the ones of the material, just
described above.
Apply properties
The third button in this tab opens a frame in which the user can choose the defined material and thickness. Three different elements (T3, T6 and T10) also can be selected.
When this frame is opened, the design paper is set to a 'select area mode', so the user can select several areas. Once such areas are selected, the materials, thicknesses and element properties can be applied to them by pressing the 'Apply' button. Notice that one cannot apply properties to meshed areas, and in such case, must clear the mesh before applying new properties to the area.
3. The Mesh tab
In this tab the meshing is performed. In the top of it there are three buttons.
The meshing tool
The first button opens the meshing tool frame. When this frame is open, the design paper enters in a 'select area mode', in which the user can select the areas to be meshed (or cleared). The properties to be used in the meshing are the ones defined in the
previous tab. There is also a slider in which the user can set the level o refinement to be used in the meshing. After selecting the area(s), then one just need to press the mesh button to generate the mesh. One also can clear a mesh by selecting it and pressing the clear area button.
The element properties viewer
The second button opens a frame in which the user can view the element's properties (material, thickness, connectivity...) by selecting them in the design paper.
The mesh properties viewer
The third button opens a frame in which the user can view the meshes properties (type and number of elements, nodes, aspect ratio distribution, angles...)
These frames are depicted below.
4. The Boundary Conditions tab
This tab presents functionalities in order to apply boundary condition to the model. In the top of it there are three buttons.
Apply force
The first button opens a frame in which one can apply forces to the meshed solid. The design paper is set in a node 'selection mode', so the user can select the nodes in which the force must by applied. The force is applied by pressing the 'Insert force' button. Just below such frame there is another frame in which the applied forces properties can be viewed by selecting then in a comboBox. The corresponding force is also represented in red in the design paper. Also one can delete the selected force by pressing the 'Delete force' button.
Apply pressure
The second button opens a frame in which one can apply pressures to the meshed solid.
The design paper can be set into a 'line' or 'element facet' selection mode, depending on the selected option, so the user can select where the pressure must by applied. When applied over a line, the program will apply the pressure for each element facet over such line. The pressure is applied by pressing the 'Insert pressure' button. Just below such frame there is another frame in which the applied pressure properties can be viewed by selecting then in a comboBox. The corresponding pressure is also represented in red in the design paper. Also one can delete the selected pressure by pressing the 'Delete pressure' button.
Apply displacement
The Third button opens a frame in which one can apply displacements to the meshed solid. The design paper can be set into a 'line' or 'node' selection mode, depending on the select option, so the user can select where the displacement must by applied. When applied over a line, the program will apply the displacement for each node over such
line. The displacement is applied by pressing the 'Insert displacement' button. Just below such frame there is another frame in which the applied displacement properties can be viewed by selecting then in a comboBox. The corresponding applied displacement is also represented in red in the design paper. Also one can delete the selected
displacement by pressing the 'Delete displacement' button.
5. Configuring the output file
In the top of the main window, among the other standard command buttons (save, open, ...) the user find two buttons related to the output file export.
The button in the right is the configure button in which the user may choose the text format for the mesh file to be exported. There are two regular formats named 'Fortran- like style' and 'Python-like style', and a 'User-defined style', for which the user can set several options to the output file.
The other button is the export button, and when pressed it opens a window in which the user can see the generated file data, and if it is OK, it can be saved into a text file by pressing the 'export' button.
6. Examples Screenshots
(Note: the FEM results were obtained by mean of another program)
a) Linear, quadratic and cubic element meshes
b) Square with circular hole
c) Half an arc
d) Reinforced beam (inclusion)
e) Smiley
A note about the licensing
AcadMesh2D is developed in Python programming language.
http://www.python.org/
The 'design paper', i.e., the visual model of the geometric entities, meshes, boundary conditions, is developed using matplotlib.
http://matplotlib.org/
Both matplotlib, and other parts of the computational geometry function uses some NumPy functions.
http://numpy.scipy.org
The Graphical User Interface (GUI) is developed using pyQT.
http://www.riverbankcomputing.com/software/pyqt/intro The unstructured mesh is computed using meshpy
http://mathema.tician.de/software/meshpy
Meshpy is a Python interface to Triangle (A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator)
http://www.cs.cmu.edu/~quake/triangle.html.
Finnaly, the Windows Operating System Binearies were created using PyInstaller http://www.pyinstaller.org
AcadMesh2D is only in 0.1 beta version, and the licensing is not defined yet, as many other functionalities and possible bug fixes. We plan soon to release the 0.1 stable version, in which we will have the licensing trully defined (probably a GPL compatible license), but we have not yet had time to study all the used libraries license details in order to define a feasible license for AcadMesh2D. For the momemt, any person can freely download and use AcadMesh2D, and anyone who needs the code can contact us to obtain it.