Hi Niccolò,
SAM's battery thermal model makes a simplifying assumption that the battery shape is a cube, so the battery area can be determined from its volume. That calculation is performed (internally) by the SAM user interface to calculate values of batt_length, batt_width, and batt_height as follows:
Note that we are making changes to the battery code, so in the next version of SAM (Fall 2020), batt_area will replace the length/width/height variables.
The code for the battery thermal model is in this file on GitHub.com (search "thermal"):
github.com/NREL/ssc/blob/develop/shared/lib_battery.cpp
Best regards,
Paul.