I am working on a GUI/batch processor in vb.net for the TurbSim.inp file. I was wondering how much the .inp file formatting matters. Does it matter if for example the GridHeight is 80.00 or 80? I assume it doesn’t as you use ReadRVar to read it in. So a real value is read in regardless of the formatting. But I’m asking this to be sure.
Thank you for your help in advance.
In TurbSim, some of the input values are read as strings, then later translated to a numeric type (the IncDec* input values are particularly tricky). But in general, as long as you have specified the values on the correct lines of the input file, the formatting is not too strict. We use list-directed sequential READ statements (FMT=*), which translate the input characters to the data types of the corresponding variables. Spaces, commas (,), and slashes(/) are considered record separators, so the READ statement will stop when it encounters one of those characters (unless it is part of a character string enclosed in quotation marks or apostrophes). Leading spaces are ignored.
Logicals can be entered with TRUE/FALSE or T/F (case is not sensitive). Integer input can be any numeric value, though it will get truncated. Real numbers can be input as integers or reals (you can use the E notation). Characters must have delimiting apostrophes or quotation marks if they contain spaces, commas, slashes, start with an apostrophe or quotation mark, or start with digits followed by an asterisk.
I’d just try to follow the formatting in the sample input files.
A couple of more points to make on this.
The text following input values in the sample input files is there only for the user’s benefit. TurbSim (or any of our CAE tools) ignore everything after the value.
I suspect that even the comment lines with no values can be blank if you like. I too have written a script to generate TurbSim input files, but I chose to add the comments to that I would not have to refer to any additional documentation to determine what variables the values are being assigned to.
Also, the tab and newline characters are “word” separators in Fortran.