CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Is real time indoor airflow modeling possible?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By open_a_window

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2024, 22:52
Default Is real time indoor airflow modeling possible?
  #1
New Member
 
Nick
Join Date: Jan 2024
Posts: 3
Rep Power: 2
open_a_window is on a distinguished road
Hi All -


I am an artist wondering if it is possible to model indoor airflow in real time? I am guessing it would involve an installation of anemometers in a room sending data do a CFD program.


I have very little knowledge of CFD (I am proficient in Fusion360 drawing (not CFD) and have messed around a little bit in Simscale)


Does anyone have any experience with this? Is this even possible?



Thanks,



Nick
aerosayan likes this.
open_a_window is offline   Reply With Quote

Old   January 9, 2024, 03:35
Default
  #2
Senior Member
 
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8
aerosayan is on a distinguished road
Wow, that's very cool.

Generally fluid simulation for scientific research is extremely costly, so they're not real time.

However, in gaming industry, they've figured out some ways to approximate the fluid simulations in a way that's very easy to compute, and allow them to do realtime fluid simulations.

Unreal Engine has many examples on water simulation for oceans, rivers, waterfalls.

Recently, they've also been able to do realtime gas simulations, as seen in this video: https://youtu.be/hmO2Vvcr4JA

So, you can google more on "Unreal Engine realtime fluid and gas simulation" to learn more, and maybe that will be helpful in finding what you wanted.

But I'm not sure about the anemometer thing, because they don't provide data for the whole room.

It might be better to use motion capture, or "computer vision" methods to figure out where thet people are in the room, then ******approximiate****** how the fluid motion will look inside the room.

Best of luck.
aerosayan is offline   Reply With Quote

Old   January 9, 2024, 16:41
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Not sure about the details and how close to real time it is, but ansys discovery does something like that.

In general, conceptually, yes, it is doable. BUT, shortcuts must be taken. It is also very easy to understand why.

Take the most efficient algorithm to advance the equations of 1 time step. Say, it will need N flops per cell per time step. People from the 80s or older would be fine with 24 time steps per second, but gen z princesses seems to get eye stress for anything under 60 fps, so let's take that as measure, which puts us in need of 60N flops per cell.

Now, pick up your hardware, and you have fixed your flops, say, X. Which means that, you can respect the prescribed fps only with up to X/(60N) cells... and these are pretty much ideal and simplified conditions.

What is then the problem? There are several. First, fluid flows have cells per length requirements that are function of the problem: your given hardware will practically allow real time resolution only of problems up to a certain size.

Second, such requirements are not constant in time and/or space, so there is not an algorithmically global optimum giving you the min N. If N is too low, you are probably wasting time in a lot of cells and/or time steps, otherwise optimal resource occupation will imply a larger N. In practice, there is a barrier which can't be crossed without wasting resources

Third, the most efficient algorithms also have a link between the number of cells and number of time steps required, which means that for a given problem (number of cells) you might actually need to do much more than 60 time steps per second in order to stay real time.

Finally, the reverse reasoning might simply tell you that for a given problem size and algorithm there simply isn't any reasonable hardware to actually have the computation run in real time.

All of the above is true in general and, to the best of my knowledge, there isn't any tool out there actually capable to do real time computations for general flows on somewhat arbitrary hardware.

What video games do (when they don't annoy gen z with non stable fps lower than 60) is cutting corners on N. They take it low by opportunistically breaking the physics of the solver, so that the visual part is still convincing but there is no more a link with the number of cells (so they can be sized on the hardware) and between the latter and the number of time steps (so that you can surely stay into a certain number of time steps per second independently from the problem and number of cells).

Long story short, it can be done, but for most cases you need to either break the physics, relax what you mean by "real time" or invest on some unrealistic hardware for the purpose.
sbaffini is offline   Reply With Quote

Old   January 10, 2024, 14:14
Default
  #4
New Member
 
Nick
Join Date: Jan 2024
Posts: 3
Rep Power: 2
open_a_window is on a distinguished road
Thanks Paolo -



To be honest a lot of this goes over my head but its exciting to hear that it is theoretically/ practically possible.



I am not sure if we will have access to exceptional compute power -it is a project in collaboration with a arge university, so maybe.



If not, I am am fine to fill in gaps with algorithm.



What do you think would be the minimum spacing of anemometers in the array? 3 meters? I think a hot wire anemometer is the only type sensitive enough to detect indoor airflow. However, it does not sense direction. Does this present a problem?


Do you have recommendations for team members for a project like this? Is this within your wheelhouse?












Quote:
Originally Posted by sbaffini View Post
Not sure about the details and how close to real time it is, but ansys discovery does something like that.

In general, conceptually, yes, it is doable. BUT, shortcuts must be taken. It is also very easy to understand why.

Take the most efficient algorithm to advance the equations of 1 time step. Say, it will need N flops per cell per time step. People from the 80s or older would be fine with 24 time steps per second, but gen z princesses seems to get eye stress for anything under 60 fps, so let's take that as measure, which puts us in need of 60N flops per cell.

Now, pick up your hardware, and you have fixed your flops, say, X. Which means that, you can respect the prescribed fps only with up to X/(60N) cells... and these are pretty much ideal and simplified conditions.

What is then the problem? There are several. First, fluid flows have cells per length requirements that are function of the problem: your given hardware will practically allow real time resolution only of problems up to a certain size.

Second, such requirements are not constant in time and/or space, so there is not an algorithmically global optimum giving you the min N. If N is too low, you are probably wasting time in a lot of cells and/or time steps, otherwise optimal resource occupation will imply a larger N. In practice, there is a barrier which can't be crossed without wasting resources

Third, the most efficient algorithms also have a link between the number of cells and number of time steps required, which means that for a given problem (number of cells) you might actually need to do much more than 60 time steps per second in order to stay real time.

Finally, the reverse reasoning might simply tell you that for a given problem size and algorithm there simply isn't any reasonable hardware to actually have the computation run in real time.

All of the above is true in general and, to the best of my knowledge, there isn't any tool out there actually capable to do real time computations for general flows on somewhat arbitrary hardware.

What video games do (when they don't annoy gen z with non stable fps lower than 60) is cutting corners on N. They take it low by opportunistically breaking the physics of the solver, so that the visual part is still convincing but there is no more a link with the number of cells (so they can be sized on the hardware) and between the latter and the number of time steps (so that you can surely stay into a certain number of time steps per second independently from the problem and number of cells).

Long story short, it can be done, but for most cases you need to either break the physics, relax what you mean by "real time" or invest on some unrealistic hardware for the purpose.
open_a_window is offline   Reply With Quote

Old   January 10, 2024, 14:16
Default
  #5
New Member
 
Nick
Join Date: Jan 2024
Posts: 3
Rep Power: 2
open_a_window is on a distinguished road
Thanks Sayan - I will look further into Unreal Engine!






Quote:
Originally Posted by aerosayan View Post
Wow, that's very cool.

Generally fluid simulation for scientific research is extremely costly, so they're not real time.

However, in gaming industry, they've figured out some ways to approximate the fluid simulations in a way that's very easy to compute, and allow them to do realtime fluid simulations.

Unreal Engine has many examples on water simulation for oceans, rivers, waterfalls.

Recently, they've also been able to do realtime gas simulations, as seen in this video: https://youtu.be/hmO2Vvcr4JA

So, you can google more on "Unreal Engine realtime fluid and gas simulation" to learn more, and maybe that will be helpful in finding what you wanted.

But I'm not sure about the anemometer thing, because they don't provide data for the whole room.

It might be better to use motion capture, or "computer vision" methods to figure out where thet people are in the room, then ******approximiate****** how the fluid motion will look inside the room.

Best of luck.
open_a_window is offline   Reply With Quote

Old   January 12, 2024, 08:12
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by open_a_window View Post
Thanks Paolo -



To be honest a lot of this goes over my head but its exciting to hear that it is theoretically/ practically possible.



I am not sure if we will have access to exceptional compute power -it is a project in collaboration with a arge university, so maybe.



If not, I am am fine to fill in gaps with algorithm.



What do you think would be the minimum spacing of anemometers in the array? 3 meters? I think a hot wire anemometer is the only type sensitive enough to detect indoor airflow. However, it does not sense direction. Does this present a problem?


Do you have recommendations for team members for a project like this? Is this within your wheelhouse?
Actually, my intent was to delineate the fact that it is theoretically possible but I have doubts that something scientifically sound is feasible in practic, that's what cutting corners gets you. All the tools out there actually do that (cut corners) so, if you really need to do it, you need to know your corners very well. Even algorithmically, there isn't something out there which is ready out of the box, or even at the research level. Long story short, my argument was all hypothetical.

As for the instrumental part, it really isn't in my direct field of experience, so I can't help.
sbaffini is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
UDF for thermal conductivity relation of nano fluid ngonbadipoor@yahoo.com Fluent UDF and Scheme Programming 29 April 1, 2017 03:02
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


All times are GMT -4. The time now is 22:01.