Closed angzzz closed 1 year ago
Hi, I am certain we will find a solution to your problem. Could you please show me the python script you ran until the error occurred or the commands you entered into your interactive python console?
Thank you for your reply. And these are my codes.
`from matplotlib import cm, pyplot as plt import numpy as np import fdsreader as fds
sim = fds.Simulation("C:\Loc_101_A_a-HRR_5_9")
print('slices', sim.slices)
slc = sim.slices[4]
data, coordinates = slc.to_global(masked=True, fill=np.nan, return_coordinates=True)`
data, coordinates = slc.to_global(masked=True, fill=np.nan, return_coordinates=True)
The last line of code reports the error
And my numpy version == 1.21.4
If I see it correctly, you try to access the fifth (index 4) slice:
slc = sim.slices[4]
Yet, if I'm not wrong, there are only four slices. Could you give it a try and access e.g. the first one
slc = sim.slices[0]
?
If I see it correctly, you try to access the fifth (index 4) slice:
slc = sim.slices[4]
Yet, if I'm not wrong, there are only four slices. Could you give it a try and access e.g. the first oneslc = sim.slices[0]
?
Thank you for your reply. As you said I tried to access the first sliceslc = sim.slices[0]
. But it still reports the same error just like slc = sim.slices[4]
. Do you have any other solutions, thank you.
Could you share the FDS or SMV file?
Loc_101_A_a-HRR_5_9.zip The relevant documents are as follows. You can try exporting slices. Thanks again.
Unfortunately, I can't open the file. When trying to download the file, it simply tells me 'Not found'. Can you verify the upload actually succeeded, and if not try to upload it again or use another way to provide the zip-file?
You could also paste the content of the FDS file within tripple `.
Loc_101_A_a-HRR_5_9.txt Sorry, I don't know what is tripple. But I pasted the fds contents into the txt file.
Thanks, this worked.
Btw, this is what I meant: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks
Ok, somehow the masking does not work. So, if you do not explicitly need it, please use
data, coordinates = slc.to_global(return_coordinates=True)
Does this work?
For further documentation, this is the error message, if masking is turned on:
Unfortunately, it doesn't work. And it it still reports the same error.
AND thank you for github docs about 'create code blocks'.
Which version of numpy do you use?
My numpy ==1.21.4
I try to run the example which is you provided' fds_multimesh'. And it also reports the same error. Maybe my packages are inconformity the requirements docs of version. I'm going to keep trying. THANKS!
Another question. Which version of FDS do you use?
FDS6. Maybe this error is due to my failure to install several packages such as 'mkL-fft' successfully. And I haven't installed it yet. That's my fault.
Please be more specific with the FDS version. The mentioned package should have no impact.
FDS6.7.9
Actually I also run files in PyroSim.
Last try, could you please send me your smv file?
Here is my .smv file. https://github.com/angzzz/fds_files Could you send me the file that you can run without problems? I would like to try it out. Thank you so much!
Github limits the size of upload files. Would you mind giving me your email address?? I will send you the all relevant documents by email. Thanks.
You are running a three years old version of FDS, the smv file indicates, that it is not 6.7.9 as you stated above:
TITLE
FDSVERSION
FDS6.7.1-0-g14cc738-HEAD
ENDF
Loc_101_A_a-HRR_5_9.end
INPF
C:\zzz\pyrosim\demo\Loc_101_A_a-HRR_5_9\Loc_101_A_a-HRR_5_9.fds
REVISION
Revisio
Please update to the recent FDS version and rerun your case. I assume, that since three years things have changed in the output format.
I will close the issue. If you still see problems with the newest version of FDS, please reopen it. Good luck.
Thank you so much!
Hi, I'm not much of a programmer and want to use the fdsreader to export slice files. A mistake was made. I don't know what's wrong. Could someone help me, please.
Traceback (most recent call last): File "C:\Users\11734\AppData\Roaming\Python\Python39\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-5-264501c9f462>", line 1, in <module> data = slc.to_global(masked=True, fill=np.nan) File "C:\Anaconda3\envs\pytorch\lib\site-packages\fdsreader\slcf\slice.py", line 531, in to_global grid = np.full((self.n_t, steps['x'], steps['y'], steps['z']), np.nan) File "C:\Users\11734\AppData\Roaming\Python\Python39\site-packages\numpy\core\numeric.py", line 343, in full a = empty(shape, dtype, order) ValueError: negative dimensions are not allowed