Coder Social home page Coder Social logo

Comments (6)

Haukiy avatar Haukiy commented on August 30, 2024

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.

from fdsreader.

JanVogelsang avatar JanVogelsang commented on August 30, 2024

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?

from fdsreader.

annatroff avatar annatroff commented on August 30, 2024

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?

from fdsreader.

Haukiy avatar Haukiy commented on August 30, 2024

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:

merged_sliceTEMPERATURE_t40

FILE

Edit: default_value = np.nan, you get empty "side areas" (and vmin=np.nanmin(glued_array))

from fdsreader.

JanVogelsang avatar JanVogelsang commented on August 30, 2024

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.

global slice

from fdsreader.

annatroff avatar annatroff commented on August 30, 2024

I tried it just now and it worked without problems. Thank you a lot for fixing my problem.

from fdsreader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.