Closed zhang-zhen-project closed 5 months ago
Yes, t represents time and the first dimension of data
is indeed the time dimension. Calling data = sim.data_3d.get_by_quantity("Temparature").to_global()
returns a four-dimensional array with time on the first dimension. data[-1]
or data[-1, :, :, :]
(which is equivalent in this case) should give the three-dimensional data output at the very last timestep. As long as there is any data output by your simulation, an "Out of bounds"-Exception should never occur.
Please send me the stacktrace (detailed error message) so I can see at which location your error occurred. In case this is a bug in the fdsreader, I will also need your FDS-case (probably my_vort_3d.fds), as this helps me to fix the bug.
"I encountered a system problem, 'cannot reshape array of size 185920 into shape (10, 176, 14, 8),' in 'plot3D.py' when using my fds file. After investigating, I found that the following code is intended to combine the data and its coordinates. However, it confuses me as it doesn't seem to be for each mesh group. I have attached my fds file. I'm looking forward to your response. Thank you very much!"
if `masked:`
subplot_data = np.where(mask, subplot_data, fill)
grid[:, start_idx['x']: end_idx['x'], start_idx['y']: end_idx['y'],
start_idx['z']: end_idx['z']] = subplot_data.reshape(
(self.n_t, end_idx['x'] - start_idx['x'], end_idx['y'] - start_idx['y'],
end_idx['z'] - start_idx['z']))
[Uploading bls_no_sf.zip…]()
[Uploading bls_no_sf.zip…]()
@zhang-zhen-project It doesn't seem like the upload worked, it's just a link to this page with no file attached.
Which version of the FDSreader are you using and which FDS version?
Does pl3 currently only support 3d temperature data export? as follow:
quantity = "CARBON MONOXIDE"
pl_t1 = sim.data_3d.get_by_quantity(quantity)
My personal understanding is that for example, CARBON MONOXIDE concentration, write the following in the dump line of fds:
&DUMP DT_PL3D=10, PLOT3D_QUANTITY(1:3)='TEMPERATURE', 'VOLUME FRACTION', 'HRRPUV' PLOT3D_SPEC_ID(2)='CARBON MONOXIDE' /
I noticed that if we want to derive 3d data of co concentration, the quantity here should be two parameters, namely 'VOLUME FRACTION' and 'CARBON MONOXIDE',
Thanks for your guidance!
Dear @zhang-zhen-project. Please as that question in the FDS-forum, as this question is not related to the fdsreader directly.
Closing this issue as no further help seems to be required.
Dear Author: I'm very appreciate your program, and I'm sorry bother you, but this question confuzed me a while, which located follwing code, "# Select the last available timestep t = -1", does t represent the time dimension? If I want to read all the plot3d data, do I have to change the source code because I tried to set t for more than 5 seconds, and the index out of bounds exception was displayed. Thank you~Here is original code: