nasa / cape

Computational Aerosciences Productivity & Execution
Other
21 stars 9 forks source link

Bug: FUN3D Line Load Generation Fails when Ref. Dimensions Are Only Defined in NML #8

Closed vcoralic closed 1 year ago

vcoralic commented 1 year ago

When the reference length and area are defined in the FUN3D namelist file and not in the Config section of the master JSON, line loads fail to generate. The issue seems to be that CAPE simply does not look in the namelist file when it fails to grab those values from Config, and so populates those variables as None. This leads to a silent failure mode (which should probably be caught explicitly) that actually suggests the line load generation operation was carried out correctly, e.g.,

Importing module 'aero_00232_cape_srb_cfd'
Updating LineLoad component 'll_total' ...
    extracoarse/m00.900a+000.00r2.04e+07
      Adding new databook entry at iteration 10000.
    triloadCmd < triload.ll_total.i > triload.ll_total.o

However, when the user looks in the databook line load directory, it is empty.

nasa-ddalle commented 1 year ago

As of d7f7e55e, CAPE should raise an exception if reference area, reference length, or moment reference point are missing during the writing of triload.<comp>.i files

nasa-ddalle commented 1 year ago

Added support for searching namelist in 9534285. I still recommend putting these quantities in the "Config" section of the JSON file (you can put a global "RefArea": 5.0 that will apply to all components unless overwritten), but the namelist idea has been added anyway (obviously a FUN3D-only capability).