Sei sulla pagina 1di 7

8

th
International Quality Conference
May 23
th
2014
Center for Quality, Faculty of Engineering, University of Kragujevac

8
th
IQC May, 23 2014 201



Milan Blagojevi
1)
Marko Topalovi
1)

Miroslav ivkovi
1)

1) Faculty of Mechanical
Engineering, University of
Kragujevac, Serbia
{blagoje, topalovic,
zile}@kg.ac.rs,

I MPR OVE ME NT OF E ND-USE R
E XPE R I E NCE BY DE VE L OPME NT OF
PR E - AND POST -PR OCE SSI NG SOL UT I ON
FOR FE M MAGNE T OST AT I C SOL VE R
PAK -M

Abstract: For the low-frequency electromagnetic
problems, a subset of Maxwells equations (Biot-Savart
and Ampre's laws) is invoked to compute the magnetic
field and its related quantities. PAK-M performs linear
and nonlinear magnetostatic analysis over a user-
defined domain for user-defined sources and boundary
conditions. This paper presents the development of pre-
and post-processing solution, so called translator
application, for finite element solver PAK-M for
calculation of magnetostatic field based on a scalar
magnetic potential formulation. Pre- and post-
processing was done using commercial software
FEMAP, whose user interface was customized by
programmatic integration of PAK-M translator which
looks and operates as integral part FEMAP allowing
smooth usage and great functionality. As an example,
small solenoid wound around iron is observed and the
magnetic scalar potential is calculated.

Keywords: computer simulation, finite element method,
pre-processing, post-processing, magnetostatic

1. INTRODUCTION

Finite Element Method (FEM) is used
for analysis in many fields of engineering
[1-7]. A wide range of different FEM
solutions are used in industry as well as for
research and development. Commercial
solutions mainly have a good pre-
processing (geometry modeling and mesh
generation) as well as good post-
processing (visualization of results) [8, 9].
Downside of commercial software is no or
limited access to source code which hurdle
independent research of new material
models, element types or numerical
procedures. As opposed to commercial
solutions, open source software (OSS)
allows the code modifications, but the pre-
and post-processing capabilities are
generally low [9, 10].
In this paper linking of in-house solver
PAK-M with commercial software for pre
and post-processing FEMAP is described.
In the second section the current state of
implementation and methodology used to
customize FEMAP UI and create a new
C++ program that links our software
solution with FEMAP are described. In the
third section we described the new
functionality of the FEM solution
integrated in FEMAP observing
benchmark example [11, 12]. In the
conclusion we discuss the benefits of
proposed solutions.

202 M.Blagojevi, M. Topalovi, M.ivkovi
2. IMPLEMENTATION OF THE
PROPOSED SOLUTION

FEMAP is software widely used to
create FEM models for different
engineering problems and to visualize
analysis results [8, 13]. FEMAP provides
comprehensive pre- and post-processing
support for all of the major commercial
solvers on the market. FEMAP creates
input files for these solvers and reads the
result from their output files.
To use FEMAP with unsupported
solvers, such is PAK-M, users need to save
analysis model into ASCII file called
FEMAP Neutral (*.neu), which serves as a
universal data transfer interface (input and
output) between FEMAP and any other
software. Before analysis, user manually
creates a neutral file in FEMAP an after
FEM analysis in PAK-M is complete,
neutral file is generated by PAK-M, which
is also loaded manually by user into
FEMAP [13]. PAK-M uses its own input
file format, which uses data obtained from
FEMAP Neutral, supplemented with data
inputted by researcher needed for his
specific research [14, 15]. A significant
number of operations needed to perform
FEM analysis with PAK-M solver is
tedious work of FEM solver input file
preparation and generation, manual
starting of FEM analysis and loading
results. We automated all these operations.
FEMAP allows users to customize its
UI trough options accessible through the
main program menu by choosing Tools-
>Toolbars. User can create User
Commands which can be used for starting
users own program from FEMAP. Once
created, User Command can be placed in
main menu, some sub menu or any toolbar.
In our case we want to create user
command that, when clicked, starts out
FEM solution.
For programmatic customization of
FEMAP we used FEMAP Application
programming interface (API) [13] that
allows users to customize FEMAP to meet
their specific needs and contains hundreds
of methods that can be called from Visual
Basic, VBA (Excel, Word, Access, ... ), C,
or C++.
To customize FEMAP we needed
access to application object [13]. We
developed a solution that
programmatically creates FEMAP User
Command and place it in the FEMAP
main Menu Bar by calling FEMAP API
methods.
The procedure to convert FEMAP
model into PAK-M input file begins with
the creation of FEMAP neutral file.
Creation of PAK-M input file is a
relatively straightforward process in which
translator program writes data obtained
from FEMAP neutral file into solver input
file. The translator can start FEM analysis,
from within FEMAP, of the previously
generated input file. Creation of solver
input file without starting analysis is used
when researchers use one computer for
modeling in FEMAP, and server or a
cluster for FEM analysis. A batch file is
generated which is used to start PAK-M,
which is a console application
programmed in FORTRAN, and feeds it
with the previously generated input file.
To start batch file we used _spawnl
method which will start the analysis
process and pause execution of a translator
segment of our FEM solution until analysis
in PAK-M is finished. When the analysis
is finished, execution of the FEM solution
will continue and a new pop-up dialog will
be created alerting the user that analysis is
finished and that results are available for
loading.
Translator program, customization
program and PAK-M solvers are all part of
our PAK-Multiphysics FEM solution.
Windows Installer is used for FEM
solution installation. Users need to start the
setup program and if they desire, change
installation directory. Everything else is
carried out automatically and users are not
aware of the FEMAP customization
process that runs in the background. After

8
th
IQC May, 23 2014 203
the setup is complete PAK-Multiphysics
FEM solution is fully integrated into
FEMAP user interface. To start the
analysis in PAK-M user must first run the
translator program (Figure 1a), import
FEMAP neutral file by clicking on "Open
FEMAP NEU" button, chose PAK-M or
any other problem specific FEM solver
and export PAK-M input file by clicking
on button "Export to PAK". Input file
created this way is then specified and read
by PAK-M solver and FEM analysis is
performed. Contribution presented in this
paper is automation of this process, but
this requires running FEMAP on that
computer.
After the FEM solution is started from
FEMAP, there are several actions it
performs:
- connects to FEMAP using FEMAP
API,
- create FEMAP neutral file using the
API methods,
- read data from FEMAP neutral file.
Starting translator program while
FEMAP is running results in the translator
program attaching itself to FEMAP and
automatically creating a neutral file from
the currently open model in FEMAP
(Figure 1b). Users don't need to browse
directories to start translator program, they
can start FEM solution by clicking on
PAK from FEMAP Main Menu (Figure
1a). If the translator program is connected
to FEMAP it can be used to automatically
start analysis by clicking on "Analyse"
button, which starts selected FEM solver
(PAK-M) and reads results once analysis is
finished back into FEMAP.



(a) (b)
Figure 1: PAK-M translator: a) Stand-alone application, b) Application embedded in FEMAP.

3. EXAMPLE: SOLENOID

We consider a simple problem - small
solenoid (Figure 2). A solenoid is a coil,
wound around a metal like iron. When a
current is passed through the coil the metal
core acts as a magnet. The coil is sectioned
along the axial plane. Since the coil is very
thin, it is assumed that sheet in which a
current is flowing is thin and the potential
of this sheet is a constant. The potentials of
the top and bottom sheets will have equal
magnitudes and opposite signs.
Modeling in FEMAP is described in
FEMAP User Manual [13]. The first step
is definition of material with
characteristics shown on Figure 2. The
second step is property definition, in this
case users should choose Membrane Plane
Elements with Thickness T1 equal 1. Next,
geometry is created. After defining
characteristic points, users need to make a

204 M.Blagojevi, M. Topalovi, M.ivkovi
surface from them. Fourth step is mesh
generation. In this step users need to set
the mesh size for surfaces, then select
surface to mesh and finally, select property
defined in step 2. Fifth step is constraints
definition.
Unsymmetrical supports (Fig. 2.) are
modeled by constraining translation of
both lowest nodes on the left side and
inner lowest node on the right side in the X
and Y direction. Permanent constrains are
set for all nodes disabling translation in the
Z direction and rotation in all directions.


Figure 2: Solenoid axial plane cross-
section

Sixth step is the definition of load. A nodal
force of -1 in the Y direction is set on top

node. After definition of load, model is
ready for analysis (Fig. 3).
Translator program is started by clicking
on a "PAK" option that is added in
FEMAP Main Menu (Figure 4). When
started, translator attaches itself to top
leftmost panel of FEMAP. Additional
analysis parameters are set up using button
Edit Analysis Options (Figure 1).
After modeling and translating the model
into PAK-M data file, FEM analysis is
performed by clicking the Analyze button
(Figure 1). This action starts analysis in
solver PAK-M, and when the analysis is
finished users can load analysis results
(Figure 5). Results are loaded into FEMAP
and translator is closed. In order to view
values of interest, users need to select
option from FEMAP Menu View->Select
[13]. In View Select dialog users can select
Deform and Contour as a style and click
on Deformed and Contour Data... button
which opens dialog Select PostProcessing
Data in which users need to select what
data to display. For example, selection of
Magnetic Scalar Potential and click on OK
button on this and previous dialog gives
magnetic scalar potential values displayed
on modeled domain.



Figure 3: Solenoid computational mesh.

8
th
IQC May, 23 2014 205


Figure 4: PAK-M translator embedded in FEMAP.


Figure 5: Field of magnetic scalar potential in solenoid calculated by PAK-M.

4. CONCLUSION

We used a combination of researcher
developed FEM solution and commercial
program used for pre- and post-processing.
In this paper is described how we
connected pre- and post-processing
program FEMAP with PAK-M. Automatic
generation of solver input file as well as
the automation of the entire FEM analysis
process is described.
The presented methodology enables
researchers to create an analysis model in
FEMAP, perform FEM analysis in user
developed solver PAK-M and view results
back in FEMAP. Connection between
FEMAP and user developed FEM solver is
performed by automatic, programmatic
customization of FEMAP and
development of new features in FEM
solution. These new features automate
many tasks in model preparations. As a

206 M.Blagojevi, M. Topalovi, M.ivkovi
result, FEM solver looks and operates as
integral part FEMAP and its functionality
is greatly improved. Implementation of the
new translator significantly reduced
tedious workload that hurdles researchers
in their research giving them more time to
do actual research.
PAK-M, the DC magnetic (magnetostatic)
module of software PAK Multyphysics,
can perform linear and nonlinear
magnetostatic analysis for 2-D,
axisymmetric and 3D models [11]. Results
obtained by PAK-M are magnetic flux
density, field intensity, potential,
permeability, energy, magnetic forces,
torques, and other integral quantities [16,
17]. PAK-M may be used for analysis of
problems, which require calculation of
static magnetic fields caused by
combination of local and/or distributed
direct currents, permanent magnets and
also external fields defined by boundary
conditions [18-20]. The magnetic forces
can be used for stress analysis in magneto-
structural coupling [21].
PAK-M numerical results of the
previously described example are
compared with the results obtained by
pdnMesh. Comparison of the numerical
analysis results was done by the potential
values observation at the nodes marked in
Figure 3. Solution calculated by in-house
software PAK-M is equivalent to solutions
of pdnMeshs [11, 22].

REFERENCES:

[1] Bathe K. J .: Finite element procedures in engineering analysis, Prentice-Hall, Englewood
Cliffs, New J ersey, USA, 1996.
[2] Koji M, Slavkovi R, ivkovi M and Grujovi N (1998) Finite element method I
Linear analysis, Faculty of Mechanical Engineering in Kragujevac, University of
Kragujevac, Kragujevac (in Serbian).
[3] Holzapfel, G.A., (2000). Nonlinear Solid Mechanics a Continuum Approach for
Engineering, J ohn Wiley &Sons,Ltd., United Kingdom
[4] Belytschko, T., Liu, W.K., Moran, B., (2000) Nonlinear Finite Elements for Continua and
Structures, J ohn Wiley &Sons., United Kingdom
[5] ivkovi M., (2006). Nonlinear Analysis of Construction, Faculty of Mechanical
Engineering, University of Kragujevac, Serbia (in Serbian)
[6] Blagojevi M.; ivkovi M.; Slavkovi R.: Electrostatic Field Analysis Using Heat
Transfer Analogy, Third Serbian (28th Yu) Congress on Theoretical and Applied
Mechanics, Vlasina lake, Serbia, 2011.
[7] ivkovi M.; Nikoli A.; Slavkovi R.; ivi F.: Nonlinear Transient Heat Conduction
Analysis of Insulation Wall of Tank for Transportation of Liquid Aluminum, Thermal
Science, Vol.14, No. 3 (2011), pp. 00-00, ISSN 0354-9836, Doi
10.2298/TSCI100506029Z,
[8] FEMAP,
http://www.plm.automation.siemens.com/en_us/products/velocity/femap/index.shtml,
Accesed on 15. 08. 2013.
[9] QuickField, Finite Element Analysis System, Version 5.8, User's Guide, Tera Analysis
Ltd.
[10] Meeker D (2010) Finite Element Method Magnetics, Version 4.2, Users Manual.
[11] Blagojevi M., Zivkovi M., Development of Software PAK-M for Calculation of
Magnetostatic Field, IConSSM 2013 - The 4th International Congress of Serbian Society
of Mechanics, Vrnjaka Banja, Serbia, 2013, J une 4th-7th, pp. 729-734, ISBN 978-86-
909973-5-0

8
th
IQC May, 23 2014 207
[12] Koji M., Slavkovi R., ivkovi M. and Grujovi N., (1996). PAK-finite element
program for linear and nonlinear structural analysis and heat transfer, Faculty of
Mechanical Engineering, University of Kragujevac, Yugoslavia
[13] FEMAP 10.0 Online Help, Distributed with FEMAP installation
[14] Raki D.; Nikoli A.; ivkovi M.; Slavkovi R.: GID-PAK Interface, Proceedings of the
4th Conference on Advances and Applications of GiD, 2008.
[15] Raki D.; Nikoli A.; ukanovi D.: PAK-T interface for Software GID, YU INFO 2008
- 14th Conference on information and technology communications, Kopaonik, Serbia,
2008, pp. 91, ISBN 978-86-85525-03-2
[16] Rothwell J E, Cloud J M (2001) Electromagnetics, CRC Press.
[17] Hubing T, Su C, Zeng H, Ke H (2008) Survey of Current Computational
Electromagnetics Techniques and Software, Technical report: CVEL-08-011.2, Clemson
University.
[18] Nedeljkovic M, Filipovic N (2006) Biomagnetic Flow in a Straight Tube Under the
Influence of an Applied Magnetic Field, Proceedings of the 1st South-East European
Conference on Computational Mechanics, SEECCM-06, Kragujevac, Serbia, 28-30 J une
2006, M. Koji, M. Papadrakakis (Eds.), pp.365-369.
[19] Gordi D, Babi M, Jovii N, Milovanovi D, Effects of the Variation of Torque Motor
Parameters on Servovalve Performance, Strojniki vestnik - J ournal of Mechanical
Engineering 54(2008)12, 866-873
[20] Cai B, Liu Y, Abulimiti A, J i R, Zhang Y, Dong X, Zhou Y, Optimal Design Based on
Dynamic Characteristics and Experimental Implementation of Submersible
Electromagnetic Actuators, Strojniki vestnik - J ournal of Mechanical Engineering
59(2013)7-8, 473-482, DOI:10.5545/sv-jme.2012.863
[21] Herakovi N, Noe D, Analysis of the Operation of Pilot-Stage Piezo-Actuator Valves,
Strojniki vestnik - J ournal of Mechanical Engineering 52(2006)12, 835-851
[22] pdnMesh, http://pdnmesh.sourceforge.net/, Accesed on 15. 08. 2013.

Acknowledgment: Research presented in this paper was supported by the Ministry of Science
and Technological Development of Republic of Serbia, Grant TR 32036.

Potrebbero piacerti anche