#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import FUSELAGES_XPATH # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = False # ----- Input ----- # * In the following example we add three (!) new entries to 'cpacs_inout' # * Try to use (readable) loops instead of copy-pasting three almost same entries :) for direction in ["x", "y", "z"]: cpacs_inout.add_input( var_name=direction, var_type=float, default_value=None, unit="1", descr=f"Fuselage scaling on {direction} axis", xpath=FUSELAGES_XPATH + f"/fuselage/transformation/scaling/{direction}", gui=include_gui, gui_name=f"{direction.capitalize()} scaling", gui_group="Fuselage scaling", ) cpacs_inout.add_input(
"name": "Range", "description": "Module to calculate the rage of an aircraft", "exec": "pwd\npython rangemain.py", "author": "Stefano Piccini", "email": "*****@*****.**", } CEASIOMPY_XPATH = '/cpacs/toolspecific/CEASIOMpy' WEIGHT_XPATH = '/cpacs/toolspecific/CEASIOMpy/weight' RANGE_XPATH = '/cpacs/toolspecific/CEASIOMpy/ranges' FUEL_CONSUMPTION_XPATH = '/cpacs/toolspecific/CEASIOMpy/fuelConsumption' MASSBREAKDOWN_XPATH = '/cpacs/vehicles/aircraft/model/analyses/massBreakdown' # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- ### Masses cpacs_inout.add_input( var_name='maximum_take_off_mass', var_type=float, default_value=None, unit='kg', descr='Maximum take off mass (MTOM)', xpath=MASSBREAKDOWN_XPATH + '/designMasses/mTOM/mass', gui=False, gui_name=None, gui_group=None,
# -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import REF_XPATH, WINGS_XPATH, PYTORNADO_XPATH, AEROPERFORMANCE_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "PyTornado") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name="", var_type=list, default_value=None, unit=None, descr="Name of the aero map to evaluate", xpath=PYTORNADO_XPATH + "/aeroMapUID", gui=True, gui_name="__AEROMAP_SELECTION", gui_group=None, )
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "Optimisation module", "description": "This module implements the optimization routine for a workflow", "exec": "pwd\npython optimisation.py", "author": "Vivien Riolo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name='Objective function', var_type=str, default_value='cl', unit='-', descr="""Objective function of the optimisation problem. \n Warning ! The parameters name must match the ones in the CSV file !""", xpath=CEASIOM_XPATH + '/Optimisation/objective', gui=include_gui, gui_name='Objective',
from ceasiompy.utils.moduleinterfaces import CPACSInOut, CEASIOM_XPATH, AIRCRAFT_XPATH # ===== RCE integration ===== RCE = { "name": "CLCalculator", "description": "Calculate required Lift coefficient to fly", "exec": "pwd\npython clcalculator.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name='mtom', var_type=float, default_value=None, unit='kg', descr='Maximum take off mass (MTOM)', xpath=AIRCRAFT_XPATH + '/model/analyses/massBreakdown/designMasses/mTOM/mass', gui=False, gui_name=None, gui_group=None, )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import REF_XPATH, CLCALC_XPATH, SU2_XPATH # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name="mass_type", var_type=list, default_value=["mTOM", "mZFM", "Custom", "% fuel mass"], unit=None, descr="Type of mass to use for CL calculation", xpath=CLCALC_XPATH + "/massType", gui=True, gui_name="Type", gui_group="Mass", ) cpacs_inout.add_input( var_name="custom_mass", var_type=float, default_value=0.0, unit="kg", descr="Mass value if Custom is selected",
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import OPTIM_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "Optimisation") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name="Objective function", var_type=str, default_value="cl", unit="-", descr="""Objective function of the optimisation problem. \n Warning ! The parameters name must match the ones in the CSV file !""", xpath=OPTIM_XPATH + "/objective", gui=include_gui, gui_name="Objective", gui_group="Global settings", )
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "SMUse module", "description": "This module uses a surrogate model to make predictions on data", "exec": "pwd\npython smuse.py", "author": "Vivien Riolo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input(var_name='model_file', var_type='pathtype', default_value='-', descr='File that contains a trained model', xpath=CEASIOM_XPATH + '/surrogateModelUse/modelFile', gui=include_gui, gui_name='Model to use', gui_group='Prediction options') cpacs_inout.add_input(
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "SMTrain module", "description": "This module generates a surrogate model", "exec": "pwd\npython smtrain.py", "author": "Vivien Riolo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name='Objectives', var_type=str, default_value='cl', unit='-', descr="""Objective function list for the surrogate model to predict \n Warning ! The parameters name must match the ones in the CSV file !""", xpath=CEASIOM_XPATH+'/surrogateModel/objective', gui=include_gui, gui_name='Objective',
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import SMTRAIN_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "SurrogateModels") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name="Objectives", var_type=str, default_value="cl", unit="-", descr= """Objective function list for the surrogate model to predict \n Warning ! The parameters name must match the ones in the CSV file !""", xpath=SMTRAIN_XPATH + "/objective", gui=include_gui, gui_name="Objective", gui_group="Global settings",
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH # ===== RCE integration ===== RCE = { "name": "ModuleTemplate", "description": "This is a template module", "exec": "pwd\npython moduletemplate.py", "author": "Neil Armstrong", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = False # ----- Input ----- # * In the following example we add three (!) new entries to 'cpacs_inout' # * Try to use (readable) loops instead of copy-pasting three almost same entries :) for direction in ['x', 'y', 'z']: cpacs_inout.add_input( var_name=direction, var_type=float, default_value=None, unit='1', descr=f"Fuselage scaling on {direction} axis", xpath=AIRCRAFT_XPATH + f'/model/fuselages/fuselage/transformation/scaling/{direction}',
PLOT_XPATH = '/cpacs/toolspecific/CEASIOMpy/aerodynamics/plotAeroCoefficient' # ===== RCE integration ===== RCE = { "name": "PlotAeroCoef", "description": "Plot aerodynamic coefficient from a CPACS file", "exec": "pwd\npython plotaerocoef.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() #===== Input ===== cpacs_inout.add_input( var_name='', var_type=list, default_value=None, descr='List of aeroMap to plot', xpath=PLOT_XPATH + '/aeroMapToPlot', gui=True, gui_name='__AEROMAP_CHECHBOX', # gui_group='Multipe aeromap' ) cpacs_inout.add_input(var_name='alt_crit',
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import CEASIOMPY_XPATH, GEOM_XPATH, RANGE_XPATH, REF_XPATH, SU2_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "SU2") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- cpacs_inout.add_input( var_name="aeromap_uid", var_type=list, default_value=None, unit=None, descr="Name of the aero map to calculate", xpath=SU2_XPATH + "/aeroMapUID", gui=True, gui_name="__AEROMAP_SELECTION", gui_group=None, ) cpacs_inout.add_input( var_name="ref_len",
from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import ( CAB_CREW_XPATH, FUEL_XPATH, GEOM_XPATH, MASSBREAKDOWN_XPATH, ML_XPATH, PASS_XPATH, PILOTS_XPATH, PROP_XPATH, ) # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- # User inputs ---- cpacs_inout.add_input( var_name="IS_DOUBLE_FLOOR", var_type=list, default_value=[0, 1, 2], unit=None, descr="0: no 2nd floor, 1: full 2nd floor (A380), 2: half 2nd floor (B747)", xpath=GEOM_XPATH + "/isDoubleFloor", gui=True, gui_name="Double deck", gui_group="User inputs",
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH # ===== RCE integration ===== RCE = { "name": "PlotAeroCoef", "description": "Plot aerodynamic coefficient from a CPACS file", "exec": "pwd\npython plotaerocoef.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() #===== Input ===== cpacs_inout.add_input( var_name='', var_type=list, default_value=None, descr='To which aeroMap the skin priction coef shoud be added', xpath='/cpacs/toolspecific/CEASIOMpy/aerodynamics/plotAeroCoefficient/aeroMapToPlot', gui=True, gui_name='__AEROMAP_CHECHBOX', )
# ===== RCE integration ===== RCE = { "name": "StabilityStatic", "description": "Determine if a vehicle is statically stable or not ", "exec": "pwd\npython staticstability.py", "author": "Loïc Verdier", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name='', var_type=list, default_value=None, unit=None, descr="Name of the aero map to evaluate", xpath=STABILITY_STATIC_XPATH + '/aeroMapUid', gui=True, gui_name='__AEROMAP_SELECTION', gui_group='Inputs', )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH cpacs_inout = CPACSInOut() #===== Input ===== cpacs_inout.add_input( var_name='x', default_value=None, unit='1', descr='Fuselage scalingo on x axis', cpacs_path=AIRCRAFT_XPATH + '/model/fuselages/fuselage/transformation \ /scaling/x', ) cpacs_inout.add_input( var_name='y', default_value=None, unit='1', descr='Fuselage scalingo on x axis', cpacs_path=AIRCRAFT_XPATH + '/model/fuselages/fuselage/transformation \ /scaling/y', ) cpacs_inout.add_input( var_name='z', default_value=None, unit='1',
from ceasiompy.utils.moduleinterfaces import CPACSInOut, CEASIOM_XPATH SKINFRICTION_PATH = CEASIOM_XPATH + '/aerodynamics/skinFriction' # ===== RCE ===== RCE = { "name": "SkinFriction", "description": "Calculate skin friction drag coefficent", "exec": "pwd\npython skinfriction.py", "author": "Aidan Jungo", "email": "*****@*****.**", } cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name='', var_type=list, default_value=None, descr='To which aeroMap the skin priction coef shoud be added', xpath=SKINFRICTION_PATH + '/aeroMapToCalculate', gui=True, gui_name='__AEROMAP_CHECHBOX', ) cpacs_inout.add_input( var_name='wetted_area',
SU2_XPATH = '/cpacs/toolspecific/CEASIOMpy/aerodynamics/su2' # ===== RCE integration ===== RCE = { "name": "SU2Run", "description": "Moudule to run SU2 calculation", "exec": "pwd\npython su2run.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- cpacs_inout.add_input( var_name='aeromap_uid', var_type=list, default_value=None, unit=None, descr="Name of the aero map to calculate", xpath=CEASIOM_XPATH + '/aerodynamics/su2/aeroMapUID', gui=True, gui_name='__AEROMAP_SELECTION', gui_group=None, )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH cpacs_inout = CPACSInOut() #===== Input ===== cpacs_inout.add_input( var_name='ref_len', default_value=None, unit='m', descr='Reference length of the aircraft', cpacs_path=AIRCRAFT_XPATH + '/model/reference/length', ) cpacs_inout.add_input( var_name='ref_area', default_value=None, unit='m^2', descr='Reference area of the aircraft', cpacs_path=AIRCRAFT_XPATH + '/model/reference/area', ) cpacs_inout.add_input( var_name='cruise_alt', default_value=12000, unit='m', descr='Aircraft cruise altitude', cpacs_path=CEASIOM_XPATH + '/aerodynamics/su2/cruise_alt',
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import EXPORT_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "Aeromaps") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = False # ----- Input ----- cpacs_inout.add_input( var_name="", var_type=list, default_value=None, descr="List of aeroMap to plot", xpath=EXPORT_XPATH + "/aeroMapToExport", gui=True, gui_name="__AEROMAP_CHECHBOX", # gui_group='Multipe aeromap' ) # ----- Output -----
from ceasiompy.utils.moduleinterfaces import CPACSInOut, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "CPACS2SUMO", "description": "Convert CPACS .xml file into SUMO .smx file", "exec": "pwd\npython cpacs2sumo.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- cpacs_inout.add_input( var_name='include_engine', var_type=bool, default_value=False, unit='1', descr='Convert engine from CEASIOMpy', xpath=CEASIOM_XPATH + '/engine/includeEngine', gui=True, gui_name='Include engine', gui_group='Option', )
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "WeightUnconventional", "description": "Estimate weights of unconventional aircraft", "exec": "pwd\npython weightuncmain.py", #Change this name "author": "Stefano Piccini", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- # User inputs cpacs_inout.add_input( var_name='IS_DOUBLE_FLOOR', var_type=list, default_value=[0, 1, 2], unit=None, descr='0: no 2nd floor, 1: full 2nd floor (A380), 2: half 2nd floor (B747)', xpath=CEASIOM_XPATH + '/geometry/isDoubleFloor', gui=True, gui_name='Double deck', gui_group='Cabin', )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import STABILITY_STATIC_XPATH # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ===== Input ===== cpacs_inout.add_input( var_name="", var_type=list, default_value=None, unit=None, descr="Name of the aero map to evaluate", xpath=STABILITY_STATIC_XPATH + "/aeroMapUid", gui=True, gui_name="__AEROMAP_SELECTION", gui_group="Inputs", ) cpacs_inout.add_input( var_name="MassConfig", var_type=list, default_value=["mMLM", "mMRM", "mTOM", "mZFM"], unit="[unit]",
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "WeightConventional", "description": "Estimate weights of conventional aircraft", "exec": "pwd\npython weightconventional.py", "author": "Stefano Piccini", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- # User inputs ---- cpacs_inout.add_input( var_name='IS_DOUBLE_FLOOR', var_type=list, default_value=[0, 1, 2], unit=None, descr='0: no 2nd floor, 1: full 2nd floor (A380), 2: half 2nd floor (B747)', xpath=CEASIOM_XPATH + '/geometry/isDoubleFloor', gui=True, gui_name='Double deck', gui_group='User inputs', )
# -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH # ===== RCE integration ===== RCE = { "name": "PlotAeroCoef", "description": "Plot aerodynamic coefficient from a CPACS file", "exec": "pwd\npython plotaerocoef.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() #===== Input ===== cpacs_inout.add_input( var_name='', var_type=list, default_value=None, descr='List of aeroMap to plot', xpath= '/cpacs/toolspecific/CEASIOMpy/aerodynamics/plotAeroCoefficient/aeroMapToPlot', gui=True, gui_name='__AEROMAP_CHECHBOX', )
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from ceasiompy.utils.moduleinterfaces import CPACSInOut cpacs_inout = CPACSInOut() # There is are no strictly required CPACS nodes, so do not add anything to 'CPACSInOut'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from ceasiompy.utils.moduleinterfaces import CPACSInOut from ceasiompy.utils.xpath import SMUSE_XPATH # ===== Results directory path ===== RESULTS_DIR = Path("Results", "SurrogateModels") # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name="model_file", var_type="pathtype", default_value="-", descr="File that contains a trained model", xpath=SMUSE_XPATH + "/modelFile", gui=include_gui, gui_name="Model to use", gui_group="Prediction options", ) cpacs_inout.add_input(
from ceasiompy.utils.moduleinterfaces import CPACSInOut, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "SUMOAutoMesh", "description": "Module to generate a SUMO mesh automatically", "exec": "pwd\npython sumoautomesh.py", "author": "Aidan Jungo", "email": "*****@*****.**", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() # ----- Input ----- cpacs_inout.add_input( var_name='sumo_file_path', var_type='pathtype', default_value='-', unit='1', descr='Absolute path to the SUMO file', xpath=CEASIOM_XPATH + '/filesPath/sumoFilePath', gui=True, gui_name='SUMO File path', gui_group='Inputs', )
from ceasiompy.utils.moduleinterfaces import CPACSInOut, AIRCRAFT_XPATH, CEASIOM_XPATH # ===== RCE integration ===== RCE = { "name": "Predictive tool module", "description": "This module builds a surrogate model to make predictions on data", "exec": "pwd\npython prediction.py", "author": "Vivien Riolo", "email": "-", } # ===== CPACS inputs and outputs ===== cpacs_inout = CPACSInOut() include_gui = True # ----- Input ----- cpacs_inout.add_input( var_name='Objectives', var_type=str, default_value='cl/cd,cl', unit='-', descr= """Objective function list for the surrogate model to predict \n Warning ! The parameters name must match the ones in the CSV file !""", xpath=CEASIOM_XPATH + '/SurrogateModel/objective', gui=include_gui,