Closed annatroff closed 10 months ago
I believe the output arises due to the non-uniform domain structure of your setup (a small room leading to a larger room and then back to a small room). The to_global
function creates a numpy ndarray from all sub-slices (see slice.py) However, as observed in Image 2, there are no slices on the left and right sides of your smaller "rooms".
Did you design this arrangement for performance optimization? If you aim to reduce computational costs and avoid extending your domain, you can "stitch" your arrays together. For the gaps on the left and right, you can fill them with default ambient values, such as setting the temperature to 20°C.
This should usually not be the case, to_global
should return a single array with empty (default) values at the corners (in your example). There are certain cases where a tuple is returned for cell-centered slices, but this shouldn't be the case in your example from what I can remember (it's been a while that I implemented the function).
Could you send me the fds-case as well as the script you used for plotting so that I can investigate this (potential) issue?
Thank you a lot for the fast responses. This is an simplified example. We had this problem with buildings where we modelled an atrium.
FDS-Inputfile: splitting_slicefile.txt
Script for plotting: plot_splitting_slicefile.txt
How do I "stich" my arrays back together without risking to overwrite part of the data? I can't use numpy.stack either because not all meshes are seperated right?
Whether or not it's an issue, for now I've attached a script that fills the missing parts with a default value and merges them. The resulting figure:
Edit: default_value = np.nan
, you get empty "side areas" (and vmin=np.nanmin(glued_array)
)
I managed to find the bug. It was actually quite a simple one, I was comparing two scalars (floats) using the python built-in equality operator (==
) instead of doing a proper float comparison. After fixing the bug, only a single, global slice is returned (see image below).
Please try out version 1.9.12 and tell me if that solves the issue. Feel free to reopen the issue if this didn't fully fix your problem.
I tried it just now and it worked without problems. Thank you a lot for fixing my problem.
Hi, When multiple meshes with the same cell size but different room measurements are stacked ontop of eachother, we noticed a problem using to_global. The meshes are connected and aligned so that the nodal points connect.
For slices on the x and y axis to_global returns a tuple of numpy.arrays. Depending on the geometry each numpy.array contains the data for different meshes. In some arrays there is data for multiple meshes and in some just for one mesh. It would be nice, to have the data for all meshes in one array to display it in one illustration.
Image 1: Geometry in smokeview
Image 2: Slicefile on y-axis in smokeview
Image 3: Illustration of the two arrays from to_global (y-axis)