Articles on this page:
Converting ASCII outputs to binary
Problem
It is tricky to understand the format and sequencing of Bladed binary output files. A simple worked example may help. (Also there are some cases where Bladed's built-in "Copy Results" converter does not work).
Solution
This example is a 2-D mooring table; other Bladed outputs are analogous.
Here's the entire contents of the header file, which is the .%01 file and is always an ASCII file, not binary.
FILE Original_mooring.$01
ACCESS D
FORM F
RECL 8
FORMAT R*8
CONTENT 'MooringStiffness'
CONFIG ''
NDIMENS 3
DIMENS 7 3 3
GENLAB 'MooringStiffness'
VARIAB 'Force in X direction' 'Force in Z direction' 'Joint_0_angle' 'Joint_1_angle' 'Joint_2_angle' 'Joint_3_angle' 'Joint_4_angle'
VARUNIT F F A A A A A
AXISLAB 'X displ'
AXIUNIT L
AXIMETH 3
AXIVAL -2.0000000 0.0000000 2.0000000
AXISLAB 'Z displ'
AXIUNIT L
AXIMETH 3
AXIVAL -3.0000000 -1.0000000 1.0000000
NVARS 0
So here you have 7 dependent variables (listed in VARIAB), and 2 independent variables: 'X displ' and 'Z displ'. "DIMENS 7 3 3" means 7 dependent variables, plus 3 different values of X displacement, and also 3 different values of Z displacement.
The major index (i.e. the variable that changes "most slowly"), is the point ('Z displ'), followed by the first independent variable ('X displ'), and then the dependent variable. Dependent variables are referred to below as "series" (s0, s1, s2, s3, s4, s5, s6).
e.g. with DIMENS 2 3 4 we would have 2 series instead of 7, for simplicity, and the entire .$01 file would consist of 2x3x4 = 24 entries, as follows:
z0_x0_s0 z0_x0_s1 z0_x1_s0 z0_x1_s1 z0_x2_s0 z0_x2_s1
z1_x0_s0 z1_x0_s1 z1_x1_s0 z1_x1_s1 z1_x2_s0 z1_x2_s1
z2_x0_s0 z2_x0_s1 z2_x1_s0 z2_x1_s1 z2_x2_s0 z2_x2_s1
z3_x0_s0 z3_x0_s1 z3_x1_s0 z3_x1_s1 z3_x2_s0 z3_x2_s1
The sequence of variables is in normal reading order, i.e. one line at a time, reading left to right. Tabs and line breaks added for illustration. So in reality the binary file would not have any of this "punctuation", it would just be "z0x0s0z0x0s1z0x1s0...." and so on.
The solution is very basic with some hard-coded dimensions, it's meant as only a starting point - the main thing it does is illustrate the correct ordering of output values in binary files. Here is the temporary download package containing:
- A C++ Visual Studio solution that reads in the example ASCII $01 test file and writes out a binary equivalent
- The executable (in debug version) which can be run directly to test the function.
- The test file itself (test1_ASCII.$01) - expected to be in C:\Temp.
- The header file (test1_binary.%01) which is human-readable and defines the format.
Keywords
Outputs; Output files; Binary; ASCII; Format; Convert; Conversion
Back to top
Generating .IN files from .$PJ files
Bladed versions affected:All current 4.x versions
Last updated:
19 March 2024
Problem
Is is possible to generate a .IN file from a .$PJ file using the command line?
Solution
A .IN file can be generated from a .PRJ or .$PJ file using the command line, by opening a command prompt window and running the following command:
<Path to Bladed_m72.exe> -Prj <Path to the $PJ/PRJ file to convert> -RunDir <Path to directory to create .IN file in> -ResultsPath <Path to results directory including run name>- For example:
"C:\DNV\Bladed 4.18\Bladed_m72.exe" -Prj "C:\test\idling.$pj" -RunDir "C:\test" -ResultsPath "C:\test\idling" - Note that the command prompt window should be started using the "Run as administrator" option for Bladed 4.10 or older.
A .IN file can also be generated using one of the following methods:
- Open the .$PJ file in the Bladed GUI, and use the procedure described in the first part of this Knowledge Base article to obtain the generated .IN file.
- Use the "Create Jobs From Runs" functionality in the Batch client (see Section 3.5.3 in the Batch user manual) - the .IN file can then be found within a job subfolder of the Jobs folder, within the current Batch folder.
- Use the
ConvertPrjFileToDtbladedInFile()function in the Project API - see the Bladed API reference in the Bladed installation folder (e.g.C:\DNV\Bladed 4.18\Documentation\Bladed API\BladedAPIReference.chm) for more details.
Keywords
.$PJ; .IN; Command line
Back to top