0% found this document useful (0 votes)
69 views10 pages

JFT132HybridOptimization e

This document describes how to perform simultaneous parameter and topology optimization in JMAG. It discusses preparing an XML parameter file to specify minimum, maximum, and name for each design parameter. The parameter file path is then set as an environment variable. The document provides steps to parameterize relevant settings in JMAG, such as creating design variables and setting components to reference the variables. Executing the optimization will change parameter values as recorded in output CSV files.

Uploaded by

Huynh Thanh Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views10 pages

JFT132HybridOptimization e

This document describes how to perform simultaneous parameter and topology optimization in JMAG. It discusses preparing an XML parameter file to specify minimum, maximum, and name for each design parameter. The parameter file path is then set as an environment variable. The document provides steps to parameterize relevant settings in JMAG, such as creating design variables and setting components to reference the variables. Executing the optimization will change parameter values as recorded in output CSV files.

Uploaded by

Huynh Thanh Anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

JMAG Function Tutorial

Simultaneous Parameter and Topology Optimization

Contents

Overview........................................................................................................................................ 2
1 Function Description ................................................................................................................... 2
2 Performing the Procedure .......................................................................................................... 3
2.1 Preparing the Parameter File............................................................................................... 4
2.2 Starting JMAG-Designer ...................................................................................................... 5
2.3 Loading the Model ............................................................................................................... 5
2.4 Parameterizing the Settings................................................................................................. 6
2.5 Deleting the Number of Calculation Cases (for Verifying Behavior) .................................... 7
2.6 Executing the Optimization and Confirming the Variable Values ........................................ 8

This document was created using the following software version.


■ Version JMAG-Designer 20.1
This document uses the following data.
■ JMAG Project File A JFT132HybridOptimization-01.jproj
■ Parameter File B JFT132HybridOptimization-01.xml
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

Overview
The design variables of optimization calculations can be broadly divided into parameters and
topologies. The former searches for combinations of parameters so that objective functions are
optimum, while the latter searches for topology (geometry). In JMAG, parameters and topology
can be handled simultaneously as design variables, and searches can be performed for
optimum design proposals.
This document describes the method for optimizing parameters and topology simultaneously.

Keywords: Parameter optimization, Topology optimization, NGnet

1 Function Description
[Topology Optimization] conditions set the parts that are to be optimized. Gaussian function
center coordinates and the function covariance matrix are additionally specified, and NGnet is
defined. Parameters related to objective functions and genetic algorithms are set with
[Optimization] which is located via [Case Control]. CSV files that record objective function
values can be specified, and execution environments can also be set.
For performing parameter optimization during topology optimization, prepare a parameter file
(*.xml) in accordance with the proper format, and specify the path to that file via environment
variables (Table 1-1). Additionally, parameterize the corresponding setting values of the study in
advance.

1 <?xml version="1.0" encoding="utf-8"?>


2 <topology>
3 <design_parameters>
4 <parameter>
5 <varmin>**</varmin> <!—Value in Minimum for Parameter -->
6 <varmax>**</varmax> <!—Value in Maximum for Parameter -->
7 <name>**</name> <!-- Variable name -->
8 </parameter>
9 <parameter>
10 <varmin>**</varmin> <!—Value in Minimum for Parameter -->
11 <varmax>**</varmax> <!—Value in Maximum for Parameter -->
12 <name>**</name> <!-- Variable name -->
13 </parameter>
14 </design_parameters>
15 </topology>
16
Fig. 1-1 Parameter file format (when there are two variables)
Locations marked "**" are set in accordance with content

Table 1-1 Environment variable settings


Environment variable Variable value

JMAG_TOPOLOGY_WITH_PARAMETER Full path to the parameter file (*.xml)

2
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2 Performing the Procedure


This document describes the procedure using IPM motor optimization as an example (Fig. 2-
1). The topology and the current phase of the design region in the diagram are optimized
simultaneously. Optimization settings are shown in Table 2-1.
Settings related to topology optimization have already been configured for the sample data.
Only the xml file positioning, environment variable settings, and parameterization are carried
out. Execute the calculation and confirm that the parameter numerical values that have been
parameterized have undergone changes in the output csv file.

Design

Fig. 2-1 IPM motor

Table 2-1 Optimization settings


Item Settings

Average torque: Maximize


Objective Functions
Torque ripple: Minimize

Optimization Engine Multi-Objective Genetic Algorithm

Number of Generations 500

Population Size 500

Number of Children 100

3
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2.1 Preparing the Parameter File


Register Parameter File B to the environment variable.

1. Open Parameter File B in a text editor and confirm the content (Fig. 2-1-1).
2. Save Parameter File B in an arbitrary folder.
3. From the Windows Start menu, click [Control Panel] > [System] > [Advanced system
settings].
The [System Properties] dialog box appears.
4. Click [Environment Variables].
The [Environment Variables] dialog box appears.
5. Click the [New] button for [User variables for **].
The username of the user will occupy the portion denoted by "**".
The [New User Variable] dialog box appears.
6. Click the [Browse File] button.
The [Open file] dialog box appears.
7. Select the positioned Parameter File B, and click [OK].
The [Open file] dialog box closes, and the full path for Parameter File B is displayed in
[Variable Value].
8. Enter the name of the environment variable in [Variable Name] (Table 2-1-1).
9. Click [OK].
The [New User Variable] dialog box closes.
10. Click [OK].
The [Environment Variables] dialog box closes.

1 <?xml version="1.0" encoding="utf-8"?>


2 <topology>
3 <design_parameters>
4 <parameter>
5 <varmin>0</varmin> <!—Value in Minimum for Parameter -->
6 <varmax>60</varmax> <!—Value in Maximum for Parameter -->
7 <name>Beta</name> <!-- Variable name -->
8 </parameter>
9 </design_parameters>
10 </topology>
Fig. 2-1-1 Parameter File B content

Table 2-1-1 Environment variable settings


Variable Variable value

JMAG_TOPOLOGY_WITH_PARAMETER Full path to Parameter File B

4
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2.2 Starting JMAG-Designer


Start JMAG-Designer.

1. Start JMAG-Designer.

2.3 Loading the Model


Open Project File A in JMAG-Designer.

1. Select [File] > [Open] from the JMAG-Designer menu bar.


The [Open File] dialog box appears.
2. Select Project File A (*.jproj).
3. Click [Open].
Project File A opens.

5
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2.4 Parameterizing the Settings


Create the variables and parameterize the current phase of the circuit three-phase current
source component.

1. Right-click [Case Control] under [Study] in the [Project Manager] tree.


2. Select [Equations] from the context menu.
The [Equations] dialog box appears.
3. Select [Add].
The [Edit Equation] dialog box appears.
4. Set the parameters (Table 2-4-1).
5. Click [OK].
The [Edit Equation] dialog box closes.
6. Click [OK].
The [Equations] dialog box closes.
7. Right-click [Study] in the [Project Manager] tree.
8. Select [Edit Circuit] from the context menu.
The [Edit Circuit] window opens.
9. Double-click the [Three-phase Current Source] component.
The [Three-phase Current Source] setting panel is displayed.
10. Set the parameters (Table 2-4-2).
11. Click the [Close] button in the [Edit Circuit] setting panel.
The [Edit Circuit] setting panel closes.

Table 2-4-1 Add variable settings


Item Settings

Variable Beta

Type Value

Value 0

Table 2-4-2 Add variable settings


Item Settings

U-Phase Beta

6
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2.5 Deleting the Number of Calculation Cases (for Verifying Behavior)


The objective of this step is to confirm the operation of this function, and to configure settings
for deleting the number of calculation cases. Those that wish to execute the optimization
calculation without performing this step may proceed to Step 2.6.

1. Right-click [Topology Optimization] under [Study] > [Conditions] in the [Project Manager]
tree.
2. Select the [Edit] from the context menu.
The [Topology Optimization] setting panel is displayed.
3. Delete rows 6 to 50 from [Center Positions] under [NGnet].
4. Click [OK] in the [Topology Optimization] setting panel.
The [Topology Optimization] setting panel closes.
5. Right-click [Case Control] under [Study] in the [Project Manager] tree.
6. Select [Optimization] from the context menu.
The [Optimization] dialog box appears.
7. Select the [Options] tab and set the parameters (Table 2-5-1).
Proceed to Step 3 of section 2.6.

Table 2-5-1 Optimization settings for confirming operations


Item Settings

Optimization Engine Multi-Objective Genetic Algorithm

Number of Generations 1

Population Size 10

Number of Children 10

7
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

2.6 Executing the Optimization and Confirming the Variable Values


Execute the optimization calculation and confirm the variable values for each case.

1. Right-click [Case Control] under [Study] in the [Project Manager] tree.


2. Select [Optimization] from the context menu.
The [Optimization] dialog box appears.
3. Click [Submit].
JMAG-Scheduler starts, and the calculation is executed.
You will be asked to overwrite the JPROJ file, so select [OK].
4. After the calculation has completed, and select the job title in JMAG-Scheduler.
If the procedure described in the previous section 2.5 has not been performed, users
may cancel jobs once calculation for the initial generation has completed, then proceed
to the following steps.
5. Select the results folder hyperlink which is located at the lowest position.
The results folder opens.
6. Open the file in the results folder, "parameters.csv", in a text editor, etc.
The values of the variables for each case are displayed (Fig. 2-6-1).
The values for the variables of each case are entered, and it is understood that values
have changed within the specified region.

8
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

Fig. 2-6-1 Values of variables for each case (when performing Step 2.5)
Because random numbers are used in optimization analyses, the values of the variables displayed here

may not match exactly.

END

9
JFT132-01e
JMAG Function Tutorial - Simultaneous Parameter and Topology Optimization -

URL https://www.jmag-international.com/tutorial/

JSOL Corporation
[email protected]
Technical Support
or
A distributor in your country

JMAG Function Tutorial


Copyright(C) 2021 JSOL Corporation All Rights Reserved.

10
JFT132-01e

You might also like