This is not an IFM question, but is the closest forum category match to post this question.
I would like to know how to determine the nodal in/out flow terms from data in an ASCII DAC file. I've already done the hard work (using Python, NumPy and HDF5 for caching), and I have structured arrays of data that I can slice and do custom budget reporting.
But the problem is that the structure in the ASCII DAC file does not match the FEFLOW 5.4 File Format document. I have tested the following with a DAC file saved as ASCII for version 5.4 and 6.0 from the Classic interface. The format for both versions appears to be almost identical.
In normal words, my FEM problem is a transient flow only, with 1 layer. A few excerpts from the FEM portion of the file is as follows:
[tt]CLASS (v.6.006)
2 1 0 3 1 0 8 8 0
DIMENS
31032 29487 6 730 2000 0 7 0 1 -1 0 1 17 0 0 0 0
...
STATELEV
3 1
[/tt]
Based on the above excerpts, the following parameters are extracted:
CLASS: ic1=2; ic2=1; proj=0; ndm=3; n_layers=1; ic0=0
DIMENS: np=31032; ne=29487; nbn=6; numb_dt=730; phreatic=1
STATELEV: slice1: 3 (Movable); slice2: 1 (Fixed)
Furthermore, several other parameters can be determined, using the logic provided in section 3.2.4.1 "General Structure of the data block":
[table]
[tr]
[td]num_slices:[/td][td]2[/td][td][tt](n_layers + 1)[/tt][/td]
[/tr]
[tr]
[td]nodes_per_slice[/td][td]15516[/td][td][tt](np/num_slices)[/tt][/td]
[/tr]
[tr]
[td]num_t:[/td][td]731[/td][td][tt](numb_dt + 1)[/tt][/td]
[/tr]
[tr]
[td]is_3D_problem:[/td][td]True[/td][td][tt](ndm == 3)[/tt][/td]
[/tr]
[tr]
[td]is_mass_transport:[/td][td]False[/td][td][tt](ic1 == 0)[/tt][/td]
[/tr]
[tr]
[td]is_thermohaline_transport:[/td][td]False[/td][td][tt](ic1 == 8 )[/tt][/td]
[/tr]
[tr]
[td]is_heat_transport:[/td][td]False[/td][td][tt](ic1 == 5)[/tt][/td]
[/tr]
[tr]
[td]is_unconfined:[/td][td]True[/td][td][tt](phreatic == 1)[/tt][/td]
[/tr]
[tr]
[td]is_slice1_free_movable:[/td][td]True[/td][td][tt](statelev[0] == 3)[/tt][/td]
[/tr]
[/table]
All of the above makes perfect sense, when looking at the problem settings in the FEFLOW 6.0 GUI. However, the table12 formatted nodal datasets in the file does not match the documentation. In total I read 7 parts (not 6, as I would have expected):
[list type=decimal]
[li][tt]head_data[/tt] with dim=31032
(min: 108.8, mean: 208.0, max: 296.6)[/li]
[li][tt]vx_data[/tt] with dim=31032
(min: -32.43, mean: -0.026, max: 22.6)[/li]
[li][tt]vy_data[/tt] with dim=31032
(min: -33.3, mean: 1.6 , max: 13.3)[/li]
[li][tt]vz_data[/tt] with dim=31032
(min: -23.5, mean: -0.011, max: 2.84)[/li]
[li][tt]slice_elevation_data[/tt] with dim=15516
(min: 108.8, mean: 193.9, max: 296.6)[/li]
[li][tt]acceleration_data_mass[/tt] with dim=31032
(min: 108.8, mean: 208.0, max: 315.8 )[/li]
[li][tt]unknown[/tt] with dim=31032
(min: -8.77, mean: 0.00182, max: 18.64)[/li]
[/list]
After [tt]unknown[/tt], the [tt]flow_cbc_data[/tt] is clearly listed to the end of each data block ([tt]FBCCEND[/tt]), so I know I've isolated the correct portion of the data block (I'm less interested in the [tt]flow_cbc_data[/tt] part, and skip past it to [tt]FBCCEND[/tt]). I've verified that parts 1 to 5 are correctly extracted, as their values can be viewed/verified in the FEFLOW 6.0 GUI for randomly selected nodes/timesteps. The remaining parts 6 and 7 I'm not certain about. The sequence of nodal data blocks are documented as follows:
[tt]if (ic2 != 2) { // True
acceleration_data_mass // Read as part 6
if (ic1 != 2) { // False
if (ic2 == 1) { // True
acceleration_data_flow // Not read
}
if (ic1 == 8 ) { // False
acceleration_data_heat // Not read
}
}
}
// Read undocumented part 7
[/tt]
What is [tt]acceleration_data_mass[/tt], and why is it being read for a flow-only problem? Why isn't [tt]acceleration_data_flow[/tt] being read? What is the 7th part (I've labeled this [tt]unknown[/tt])? It shouldn't be there, but I have 31032 values in table12 format remaining before [tt]flow_cbc_data[/tt] starts, so it is something worth storing in the DAC.
Now back to the in/out flows for budget calculation. How does FEFLOW calculate this for a given node? Is it the difference of acceleration data between two time steps? I can't seem to get the same values by doing calculations as I can see in the FEFLOW GUI for Flow > Budget.
Any help is appreciated. Let me know if more info is needed.