Coder Social home page Coder Social logo

Cannot access BNDF data about fdsreader HOT 4 CLOSED

amarcozzi avatar amarcozzi commented on August 30, 2024
Cannot access BNDF data

from fdsreader.

Comments (4)

JanVogelsang avatar JanVogelsang commented on August 30, 2024

Hello Anthony, great to hear the reader helped you with your projects already. I am sure we will be able to easily fix your issue as well.
The solution to the problem is actually quite simple, at the moment I skipped the case when there is boundary data which does not belong to any boundary as most of the times this data is an unwanted byproduct which until now could always be ignored.
I will find a way to include the mesh-dependent data as well.

from fdsreader.

JanVogelsang avatar JanVogelsang commented on August 30, 2024

Implemented in 77f0750

To support boundary data that does not belong to any obstruction (but to a mesh instead), I simply added boundary-data support for meshes. Now the boundary data you are interested in should be accessible from the corresponding mesh.
A short example of how it works:

import fdsreader as fds

sim = fds.Simulation("./fds_simple_circles")
mesh = sim.meshes[0]  # The first mesh
bndf = mesh.get_boundary_data("mass_flux_SPEC_1")  # Get boundary data for a specific quantity
patch = bndf.data[3]  # Orientation 3 (positive z-direction)
print(patch.data)  # Numpy array with the actual data for the so called patch, with the mesh size (xy-plane) as its dimension

The code worked with FDS 6.7.6 and FDSReader 1.2.2.
@amarcozzi Please test it yourself (with the newest version of the fdsreader) and tell me if it works for you.

from fdsreader.

amarcozzi avatar amarcozzi commented on August 30, 2024

Thank you so much for your help! This worked exactly as I hoped it would. I'll keep my eye out for other open issues that pop up in this repo - I'd be happy to help contribute.

from fdsreader.

JanVogelsang avatar JanVogelsang commented on August 30, 2024

Great to hear and thanks a lot!

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.