Skip to content
Snippets Groups Projects
Commit bdf2f5e9 authored by imcovangent's avatar imcovangent
Browse files

Updated and tested example scripts.

Updated CMDOWS version to 0.8.
Cleaned up examples folder to reduce size of the repository.
Changed behaviour of the mode merge method.


Former-commit-id: 75f2d34f2a9d2b5e94ad375507a9b9c3675c4ec4
parent a79f9d43
No related branches found
No related tags found
No related merge requests found
Showing
with 57 additions and 48 deletions
<?xml version='1.0' encoding='UTF-8'?>
<cmdows>
<cmdows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://bitbucket.org/imcovangent/cmdows/raw/master/schema/0.8/cmdows.xsd">
<header>
<creator>I. van Gent</creator>
<description>CMDOWS file of the SSBJ database.</description>
<timestamp>2018-03-07 14:51:56.287006</timestamp>
<timestamp>2018-03-07T14:51:56.287006</timestamp>
<fileVersion>0.0</fileVersion>
<cmdowsVersion>0.7</cmdowsVersion>
</header>
......
<?xml version='1.0' encoding='UTF-8'?>
<cmdows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://bitbucket.org/imcovangent/cmdows/raw/master/schema/0.7/cmdows.xsd">
<cmdows xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://bitbucket.org/imcovangent/cmdows/raw/master/schema/0.8/cmdows.xsd">
<header>
<creator>Imco van Gent</creator>
<description>RCG CMDOWS file of the repository of aircraft design tools from Delft University of Technology</description>
......@@ -12,14 +12,14 @@
<creator>Lukas Mueller</creator>
<timestamp>2017-09-21T09:00:51.663296</timestamp>
<fileVersion>0.1</fileVersion>
<cmdowsVersion>0.7</cmdowsVersion>
<cmdowsVersion>0.8</cmdowsVersion>
</update>
<update>
<modification>Adjustments for KnowledgeBase class deprecation.</modification>
<creator>Imco van Gent</creator>
<timestamp>2017-12-03T18:56:51.663296</timestamp>
<fileVersion>0.2</fileVersion>
<cmdowsVersion>0.7</cmdowsVersion>
<cmdowsVersion>0.8</cmdowsVersion>
</update>
</updates>
<organization>
......@@ -54,7 +54,7 @@
</header>
<executableBlocks>
<designCompetences>
<designCompetence uID="MTOW[main][1][1.0]">
<designCompetence uID="MTOW">
<ID>MTOW</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
......@@ -69,7 +69,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SCAM[wing_length_morph][1][1.0]">
<designCompetence uID="SCAM[wing_length_morph]">
<ID>SCAM</ID>
<modeID>wing_length_morph</modeID>
<instanceID>1</instanceID>
......@@ -81,7 +81,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[ATR72_AGILE_Hangar][1][1.0]">
<designCompetence uID="HANGAR[ATR72_AGILE_Hangar]">
<ID>HANGAR</ID>
<modeID>ATR72_AGILE_Hangar</modeID>
<instanceID>1</instanceID>
......@@ -93,7 +93,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="PROTEUS[main][1][1.0]">
<designCompetence uID="PROTEUS">
<ID>PROTEUS</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
......@@ -105,7 +105,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[AGILE_DC1_L0_wing][1][1.0]">
<designCompetence uID="HANGAR[AGILE_DC1_L0_wing]">
<ID>HANGAR</ID>
<modeID>AGILE_DC1_L0_wing</modeID>
<instanceID>1</instanceID>
......@@ -117,7 +117,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[AGILE_DC1_L0_MDA][1][1.0]">
<designCompetence uID="HANGAR[AGILE_DC1_L0_MDA]">
<ID>HANGAR</ID>
<modeID>AGILE_DC1_L0_MDA</modeID>
<instanceID>1</instanceID>
......@@ -129,7 +129,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="GACA[mainWingRefArea][1][1.0]">
<designCompetence uID="GACA[mainWingRefArea]">
<ID>GACA</ID>
<modeID>mainWingRefArea</modeID>
<instanceID>1</instanceID>
......@@ -141,7 +141,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="GACA[mainWingFuelTankVol][1][1.0]">
<designCompetence uID="GACA[mainWingFuelTankVol]">
<ID>GACA</ID>
<modeID>mainWingFuelTankVol</modeID>
<instanceID>1</instanceID>
......@@ -153,7 +153,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[NASA_CRM_AGILE_Hangar][1][1.0]">
<designCompetence uID="HANGAR[NASA_CRM_AGILE_Hangar]">
<ID>HANGAR</ID>
<modeID>NASA_CRM_AGILE_Hangar</modeID>
<instanceID>1</instanceID>
......@@ -165,7 +165,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="Q3D[FLC][1][1.0]">
<designCompetence uID="Q3D[FLC]">
<ID>Q3D</ID>
<modeID>FLC</modeID>
<instanceID>1</instanceID>
......@@ -177,7 +177,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SMFA[main][1][1.0]">
<designCompetence uID="SMFA">
<ID>SMFA</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
......@@ -189,7 +189,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="PHALANX[Symmetric_Lookup][1][1.0]">
<designCompetence uID="PHALANX[Symmetric_Lookup]">
<ID>PHALANX</ID>
<modeID>Symmetric_Lookup</modeID>
<instanceID>1</instanceID>
......@@ -201,7 +201,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SCAM[wing_taper_morph][1][1.0]">
<designCompetence uID="SCAM[wing_taper_morph]">
<ID>SCAM</ID>
<modeID>wing_taper_morph</modeID>
<instanceID>1</instanceID>
......@@ -213,7 +213,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[AGILE_DC1_WP6_wing_startpoint][1][1.0]">
<designCompetence uID="HANGAR[AGILE_DC1_WP6_wing_startpoint]">
<ID>HANGAR</ID>
<modeID>AGILE_DC1_WP6_wing_startpoint</modeID>
<instanceID>1</instanceID>
......@@ -225,7 +225,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="Q3D[APM][1][1.0]">
<designCompetence uID="Q3D[APM]">
<ID>Q3D</ID>
<modeID>APM</modeID>
<instanceID>1</instanceID>
......@@ -237,7 +237,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="Q3D[VDE][1][1.0]">
<designCompetence uID="Q3D[VDE]">
<ID>Q3D</ID>
<modeID>VDE</modeID>
<instanceID>1</instanceID>
......@@ -249,7 +249,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="PHALANX[Full_Simple][1][1.0]">
<designCompetence uID="PHALANX[Full_Simple]">
<ID>PHALANX</ID>
<modeID>Full_Simple</modeID>
<instanceID>1</instanceID>
......@@ -261,7 +261,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SCAM[wing_dihedral_morph][1][1.0]">
<designCompetence uID="SCAM[wing_dihedral_morph]">
<ID>SCAM</ID>
<modeID>wing_dihedral_morph</modeID>
<instanceID>1</instanceID>
......@@ -273,7 +273,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="INITIATOR[main][1][1.0]">
<designCompetence uID="INITIATOR">
<ID>INITIATOR</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
......@@ -285,7 +285,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="PHALANX[Symmetric_Simple][1][1.0]">
<designCompetence uID="PHALANX[Symmetric_Simple]">
<ID>PHALANX</ID>
<modeID>Symmetric_Simple</modeID>
<instanceID>1</instanceID>
......@@ -297,7 +297,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[D150_AGILE_Hangar][1][1.0]">
<designCompetence uID="HANGAR[D150_AGILE_Hangar]">
<ID>HANGAR</ID>
<modeID>D150_AGILE_Hangar</modeID>
<instanceID>1</instanceID>
......@@ -309,7 +309,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="PHALANX[Full_Lookup][1][1.0]">
<designCompetence uID="PHALANX[Full_Lookup]">
<ID>PHALANX</ID>
<modeID>Full_Lookup</modeID>
<instanceID>1</instanceID>
......@@ -321,7 +321,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="EMWET[main][1][1.0]">
<designCompetence uID="EMWET">
<ID>EMWET</ID>
<modeID>main</modeID>
<instanceID>1</instanceID>
......@@ -333,7 +333,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="HANGAR[Boxwing_AGILE_Hangar][1][1.0]">
<designCompetence uID="HANGAR[Boxwing_AGILE_Hangar]">
<ID>HANGAR</ID>
<modeID>Boxwing_AGILE_Hangar</modeID>
<instanceID>1</instanceID>
......@@ -345,7 +345,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SCAM[wing_sweep_morph][1][1.0]">
<designCompetence uID="SCAM[wing_sweep_morph]">
<ID>SCAM</ID>
<modeID>wing_sweep_morph</modeID>
<instanceID>1</instanceID>
......@@ -357,7 +357,7 @@
</generalInfo>
</metadata>
</designCompetence>
<designCompetence uID="SCAM[wing_root_chord_morph][1][1.0]">
<designCompetence uID="SCAM[wing_root_chord_morph]">
<ID>SCAM</ID>
<modeID>wing_root_chord_morph</modeID>
<instanceID>1</instanceID>
......@@ -373,6 +373,7 @@
<mathematicalFunctions>
<mathematicalFunction uID="OBJ">
<label>OBJ</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/cpacs/vehicles[@uID="AGILE_DC1_vehicleID"]/aircraft/model[@uID="agile_v13_modelID"]/analyses/massBreakdown/designMasses/mTOM/mass</parameterUID>
......@@ -396,6 +397,7 @@
</mathematicalFunction>
<mathematicalFunction uID="CNSTRNT_wingLoading">
<label>CNSTRNT[wingLoading]</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/cpacs/vehicles[@uID="AGILE_DC1_vehicleID"]/aircraft/model[@uID="agile_v13_modelID"]/reference/area</parameterUID>
......@@ -421,6 +423,7 @@
</mathematicalFunction>
<mathematicalFunction uID="CNSTRNT_fuelTankVolume">
<label>CNSTRNT[fuelTankVolume]</label>
<functionType>regular</functionType>
<inputs>
<input>
<parameterUID>/cpacs/vehicles[@uID="AGILE_DC1_vehicleID"]/aircraft/model[@uID="agile_v13_modelID"]/analyses/massBreakdown/fuel/massDescription/mass</parameterUID>
......
# Imports
import logging
import matplotlib
from collections import OrderedDict
from kadmos.graph import RepositoryConnectivityGraph, FundamentalProblemGraph
from kadmos.utilities.general import get_mdao_setup
......@@ -28,8 +26,8 @@ mdao_definitions = ['unconverged-MDA-J', # 0
'CO'] # 13
# Settings for scripting
mdao_definitions_loop_all = True # Option for looping through all MDAO definitions
mdao_definition_id = 13 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False)
mdao_definitions_loop_all = True # Option for looping through all MDAO definitions
mdao_definition_id = 13 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False)
# Settings for saving
pdf_dir = 'sellar_problem/(X)DSM'
......@@ -37,8 +35,7 @@ cmdows_dir = 'sellar_problem/CMDOWS'
kdms_dir = 'sellar_problem/KDMS'
vistoms_dir = 'sellar_problem/VISTOMS'
print 'Scripting RCG...'
logging.info('Scripting RCG...')
# A new repository connectivity graph is defined to describe the general problem
rcg = RepositoryConnectivityGraph(name='Sellar problem graph')
......@@ -104,20 +101,25 @@ rcg.add_equation('A', 'a', 'LaTeX')
rcg.add_equation('A', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi></math>', 'MathML')
rcg.add_equation('G1', 'y1/3.16-1', 'Python')
rcg.add_equation('G1', 'y1/3.16-1', 'LaTeX')
rcg.add_equation('G1', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mn>1</mn><mo>/</mo><mn>3</mn><mo>.</mo><mn>16</mn><mo>-</mo><mn>1</mn></math>', 'MathML')
rcg.add_equation('G1', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mn>1</mn><mo>/</mo><mn>3</mn><mo>.'
'</mo><mn>16</mn><mo>-</mo><mn>1</mn></math>', 'MathML')
rcg.add_equation('G2', '1-y2/24.0', 'Python')
rcg.add_equation('G2', '1-y2/24.0', 'LaTeX')
rcg.add_equation('G2', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn><mo>-</mo><mi>y</mi><mn>2</mn><mo>/</mo><mn>24</mn><mo>.</mo><mn>0</mn></math>', 'MathML')
rcg.add_equation('G2', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>1</mn><mo>-</mo><mi>y</mi><mn>2</mn><mo>'
'/</mo><mn>24</mn><mo>.</mo><mn>0</mn></math>', 'MathML')
rcg.add_equation('F1', 'x1**2+z2+y1+exp(-y2)', 'Python')
rcg.add_equation('F1', 'x1^2+z2+y1+e^{-y2}', 'LaTeX')
rcg.add_equation('F1', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi><msup><mn>1</mn><mn>2</mn></msup><mo>+</mo><mi>z</mi><mn>2</mn><mo>+</mo><mi>y</mi><mn>1</mn><mo>+</mo><msup><mi>e</mi><mrow><mo>-</mo><mi>y</mi><mn>2</mn></mrow></msup></math>', 'MathML')
rcg.add_equation('F1', '<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>x</mi><msup><mn>1</mn><mn>2</mn></msup>'
'<mo>+</mo><mi>z</mi><mn>2</mn><mo>+</mo><mi>y</mi><mn>1</mn><mo>+</mo><msup><mi>e</mi><mrow>'
'<mo>-</mo><mi>y</mi><mn>2</mn></mrow></msup></math>', 'MathML')
# Add some (optional) organization information
rcg.add_contact('Imco van Gent','i.vangent@tudelft.nl','ivangent',company='TU Delft', roles=['architect','integrator'])
rcg.add_contact('Lukas Muller','l.muller@student.tudelft.nl','lmuller',company='TU Delft', roles='architect')
# Add some (optional) ranges
rcg.adj['/data_schema/geometry/z1']['D1']['valid_ranges'] = {'limit_range': {'minimum': -5, 'maximum': 5.},
'list_range': [('list_range_item', 7.5), ('list_range_item', 8)]}
'list_range': [('list_range_item', 7.5),
('list_range_item', 8)]}
# Add some (optional) metadata
rcg.add_dc_general_info('F2','dummy function that is not part of the original Sellar problem')
rcg.add_dc_performance_info('F2',precision=20,fidelity_level=2,run_time=1.5)
......@@ -143,7 +145,7 @@ rcg.save('RCG', file_type='cmdows', destination_folder=cmdows_dir,
integrity=True)
print 'Scripting initial FPG...'
logging.info('Scripting initial FPG...')
# A initial fundamental problem graph is created based on the rcg
fpg_initial = rcg.deepcopy_as(FundamentalProblemGraph)
......@@ -160,7 +162,7 @@ if not mdao_definitions_loop_all:
# TODO: Build and handle FPG such that it can be created outside the loop of architectures
for mdao_definition in mdao_definitions:
print 'Scripting ' + str(mdao_definition) + '...'
logging.info('Scripting ' + str(mdao_definition) + '...')
# Determine the three main settings: architecture, convergence type and unconverged coupling setting
mdao_architecture, convergence_type, allow_unconverged_couplings = get_mdao_setup(mdao_definition)
......@@ -261,4 +263,4 @@ for mdao_definition in mdao_definitions:
integrity=True,
convention=True)
print 'Done!'
logging.info('Done!')
The Sellar problem is an analytical multi-disciplinary design problem. The objective function f is to be minimized with respect to the variables z1, z2 and x1 while being subjected to g1, g2 and the disciplines y1 and y2.
The Sellar problem is an analytical multi-disciplinary design problem. The objective function f is to be minimized with
respect to the variables z1, z2 and x1 while being subjected to g1, g2 and the disciplines y1 and y2.
D1: y1 = z1^2 + x1 + z2 -0.2*y2
D2: y2 = y1^0.5 + z1 + z2
......@@ -6,11 +7,14 @@ F1: f = x1^2 + z^2 + y1 + e^(-y2)
G1: g1 = y1/3.16 - 1
G2: g2 = 1 - y2/24
More information on the Sellar problem can be found in literature, e.g. on
More information on the Sellar problem can be found in literature, e.g. on:
https://arc.aiaa.org/doi/abs/10.2514/6.1996-714,
https://www.researchgate.net/publication/2759746_Response_Surface_Based_Concurrent_Subspace_Optimization_For_Multidisciplinary_System_Design or
http://openmdao.org/releases/0.2.5/docs/mdao/intro.html
The files in the subdirectories represent and illustrate Repository Connectivity Graphs (RCGs), Fundmental Problem Graphs (FPGs) and MDO Data/Process Graphs (MDG/MPG). These graphs were developed for a new software system called KADMOS which will be released in near future.
The files in the subdirectories represent and illustrate Repository Connectivity Graphs (RCGs), Fundmental Problem
Graphs (FPGs) and MDO Data/Process Graphs (MDG/MPG). These graphs were developed for a new software system called
KADMOS.
In the RCG files two additional tools, D3 and G3, are present. They are consequently removed for the FPG files and demonstrate the KADMOS capabilities of tailoring a larger database down to a specific problem.
\ No newline at end of file
In the RCG files two additional tools, D3 and G3, are present. They are consequently removed for the FPG files and
demonstrate the KADMOS capabilities of tailoring a larger database down to a specific problem.
\ No newline at end of file
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment