Skip to content

Commit

Permalink
adding default aeromap to ThermoData module
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco-Marcucci committed Mar 20, 2024
1 parent 2ac0da9 commit dd968dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ceasiompy/ThermoData/thermodata.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,21 @@ def thermo_data_run(cpacs_path, cpacs_out_path, wkdir):

Fn = get_value_or_default(tixi, RANGE_XPATH + "/NetForce", 2000)

"""Creating a default Aeromap to be used when one is not defined"""
default_aeromap = cpacs.create_aeromap("DefaultAeromap")
default_aeromap.description = "AeroMap created automatically"
mach = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseMach", 0.3)
alt = get_value_or_default(cpacs.tixi, RANGE_XPATH + "/cruiseAltitude", 10000)
default_aeromap.add_row(alt=alt, mach=mach, aos=0.0, aoa=0.0)
default_aeromap.save()
alt_list = [alt]
mach_list = [mach]
aeromap_uid = get_value_or_default(cpacs.tixi, SU2_AEROMAP_UID_XPATH, "DefaultAeromap")
log.info(f"{aeromap_uid} has been created")

aeromap_list = cpacs.get_aeromap_uid_list()

"""Executing the code by taking the correct Aeromap"""
if aeromap_list:
aeromap_default = aeromap_list[0]
log.info(f"The aeromap is {aeromap_default}")
Expand Down

0 comments on commit dd968dd

Please sign in to comment.