firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
670 stars 626 forks source link

Increase length for string variables. (i.e. DEVC ID strings) #2080

Closed gforney closed 9 years ago

gforney commented 9 years ago
Please complete the following:

Application Version: FDS 6.0.1 Serial
SVN Revision Number: 17534
Compile Date: Tue, 26 Nov 2013

Preprocessing tools like PyroSim generate very explicit names for ID values based on
what the item represents.  For example, here are some DEVC lines for Statistic output.

&DEVC ID='[Species: CARBON MONOXIDE] Mass Fraction - Section 1_MIN', QUANTITY='MASS
FRACTION', SPEC_ID='CARBON MONOXIDE', STATISTICS='MIN', XB=11.75,23.75,61.5,78.25,0.0,2.75/
&DEVC ID='[Species: CARBON MONOXIDE] Mass Fraction - Section 1_MAX', QUANTITY='MASS
FRACTION', SPEC_ID='CARBON MONOXIDE', STATISTICS='MAX', XB=11.75,23.75,61.5,78.25,0.0,2.75/
&DEVC ID='[Species: CARBON MONOXIDE] Mass Fraction - Section 1_MASS MEAN', QUANTITY='MASS
FRACTION', SPEC_ID='CARBON MONOXIDE', STATISTICS='MASS MEAN', XB=11.75,23.75,61.5,78.25,0.0,2.75/
&DEVC ID='[Species: CARBON MONOXIDE] Mass Fraction - Section 1_MEAN', QUANTITY='MASS
FRACTION', SPEC_ID='CARBON MONOXIDE', STATISTICS='MEAN', XB=11.75,23.75,61.5,78.25,0.0,2.75/
&DEVC ID='[Species: CARBON MONOXIDE] Mass Fraction - Section 1_VOLUME MEAN', QUANTITY='MASS
FRACTION', SPEC_ID='CARBON MONOXIDE', STATISTICS='VOLUME MEAN', XB=11.75,23.75,61.5,78.25,0.0,2.75/

The current 30 character limit truncated the ID values for all 3 lines to '[Species:
CARBON MONOXIDE] Mas', and this is what shows up in the devc.csv file for each column
in the set.

Users of PyroSim can go back in and manually rename all of the automatically generated
names, but forcing them to come up with clever strings just to fit under 30 characters
is difficult for us to justify.  We could come up with some kind of abbreviation scheme,
but then it is another thing that users would have to learn, remember and communicate
to reviewers.

The enhancement request is to increase the character limit, for all strings that are
arbitrarily short.

Thank you

Original issue reported on code.google.com by klein@thunderheadeng.com on 2014-03-26 19:32:51

gforney commented 9 years ago
I'll see what can be done. At the moment, we have hardwired CHARACTER(30) statements
throughout the code. I will see if I can make this a parameter, and then change.

Original issue reported on code.google.com by mcgratta on 2014-03-26 20:11:57

gforney commented 9 years ago
I increased the limit to 60, using a globally defined LABEL_LENGTH that is defined in
prec.f90

Original issue reported on code.google.com by mcgratta on 2014-03-26 20:38:20

gforney commented 9 years ago
If there is a need for longer labels, is this a parameter that we can modify through
a MISC parameter?

Original issue reported on code.google.com by klein@thunderheadeng.com on 2014-03-26 20:58:59

gforney commented 9 years ago
This is Fortran. I don't know of a clever way to dynamically allocate these label strings.
I added a PARAMETER to prec.f90, the first file that is compiled. So now I can change
the length of the strings with a single line of code. But I don't know how we could
dynamically allocate each label individually.

Original issue reported on code.google.com by mcgratta on 2014-03-26 21:02:40

gforney commented 9 years ago
Sounds good.  My longest ID string so far was 56 characters.  Close to the limit but
it would work.  We will look at our ID generation code and see where we can also trim
down the length of the strings we create.

Jason F. also mentioned that there should be a note in the manual about the string
length limit.

Original issue reported on code.google.com by klein@thunderheadeng.com on 2014-03-26 21:07:10

gforney commented 9 years ago
OK, the new string limit seems to be working. It passed all tests in firebot last night.
I don't want to make this limit larger because FDS does have to set aside space for
all these long arrays. Not a big deal compared to the big arrays, but still it seems
like 60 is a reasonable limit.

I added the limit to the User Guide where the input file formatting is discussed.

Original issue reported on code.google.com by mcgratta on 2014-03-27 13:38:59