Board index FlightGear Development Weather

Wildfire, volcanos - Air pollution modeling

Everything related to weather simulation, visuals should be discussed in the shader subforum.

Wildfire, volcanos - Air pollution modeling

Postby kaklik » Sat Jan 30, 2021 3:09 pm

Hello,

I am searching for a method how to model particulate matter air pollution in FlightGear. I found the wildfire simulation option and some volcano models (maybe I missed some other possibilities). But both seem to be visuals only. My requirement is an ability to read "particulate matter" concentrations from property-tree to alter the simulation behavior. Is this somewhat possible in current FlightGear (for testing at least)?


EDIT:
I found the "bombable" extension to FG (http://wiki.flightgear.org/Bombable). Is there somebody who can answer - if it allows readout of smoke or particle concentration at a certain point of aircraft location in the air?
Last edited by kaklik on Sun Jan 31, 2021 1:39 am, edited 2 times in total.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby Thorsten » Sat Jan 30, 2021 4:53 pm

My requirement is an ability to read "particulate matter" concentrations from property-tree to alter the simulation behavior. Is this somewhat possible in current FlightGear (for testing at least)?


Alter what behavior?

The ALS renderer has a simulation of air pollution in the visuals (you get bluish haze and more pronounced red in sunsets when there's dry scatterers in the air). It'd be easy (if desired) to use the property in the FDM to simulate engine degradation by volcanic dust, but I don't think any airplane developer has ever done that.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Wildfire, volcanos - Air pollution modeling

Postby kaklik » Sat Jan 30, 2021 8:40 pm

Thorsten wrote in Sat Jan 30, 2021 4:53 pm:
My requirement is an ability to read "particulate matter" concentrations from property-tree to alter the simulation behavior. Is this somewhat possible in current FlightGear (for testing at least)?


Alter what behavior?

The ALS renderer has a simulation of air pollution in the visuals (you get bluish haze and more pronounced red in sunsets when there's dry scatterers in the air). It'd be easy (if desired) to use the property in the FDM to simulate engine degradation by volcanic dust, but I don't think any airplane developer has ever done that.


Yes! That was my point! "engine degradation by volcanic dust" is one example of possible use cases. Unfortunately, I need some value of "dust intensity" at aircraft position, to calculate a total dust exposure for example.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby wlbragg » Sat Jan 30, 2021 10:18 pm

Look under /environment in the property tree an use the sliders in Environment/Environment Settings in the GUI. This should give you some of the properties you can use for your modeling needs.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Wildfire, volcanos - Air pollution modeling

Postby kaklik » Sun Jan 31, 2021 1:34 am

wlbragg wrote in Sat Jan 30, 2021 10:18 pm:Look under /environment in the property tree an use the sliders in Environment/Environment Settings in the GUI. This should give you some of the properties you can use for your modeling needs.


I think this is a misunderstanding. To make the model or AI responsive to "air pollution" I need a sample of that value ( e. g. concentration) at the coordinates of the model position. The global values configured for the atmosphere or simulated world do not solve the problem.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby wlbragg » Sun Jan 31, 2021 2:04 am

I don't know that there are any other values, especially specifically for any given location.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Wildfire, volcanos - Air pollution modeling

Postby Thorsten » Sun Jan 31, 2021 7:42 am

To make the model or AI responsive to "air pollution" I need a sample of that value ( e. g. concentration) at the coordinates of the model position. The global values configured for the atmosphere or simulated world do not solve the problem.


If you're expecting that FG contains a high-fidelity environment pollution simulation that has a time-dependent spatial distribution of volcanic dust, then you're out of luck - that's way beyond what the renderer can reasonably handle - or what would be reasonable to compute even if we had any volcanic dust engine degradation sim (which we do not).

FG primarily is a flight simulation. not a high-fidelity volcano-environment simulation, and it would be a poor use of framerate to implement such things (there's a fair chance it wouldn't even get committed, a detailed radio wave propagation model taking into account interaction with terrain never made it for instance).

If you look into the literature, books on meteorology usually supply parametrized expressions for pollutant dispersal under various environmental conditions (my introduction to the topic at least does) - you can start to implement these.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Wildfire, volcanos - Air pollution modeling

Postby erik » Sun Jan 31, 2021 9:29 am

Maybe you can get reasonably close if you can get the location of the particles used to animate the smoke. But i don't think FligthGear exposes them?

Update:
I just realized that FlightGear uses math compute the smoke particles location using wind direction and strength and starting location so you could do the same outside FlightGear.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby kaklik » Sun Jan 31, 2021 9:52 am

erik wrote in Sun Jan 31, 2021 9:29 am:Maybe you can get reasonably close if you can get the location of the particles used to animate the smoke. But i don't think FligthGear exposes them?

Update:
I just realized that FlightGear uses math compute the smoke particles location using wind direction and strength and starting location so you could do the same outside FlightGear.

Erik


Yes, the position of "animated" smoke particles exposed by FG should be the first step. I really do not look for "high-fidelity" particle simulation, but something reasonably close to having a cloud of particles detectable in the air.

In what part of FlightGear code you found wind-smoke interaction? There are at least three smoke/dust particle handling environments which I know for now - volcanos, wildfires and bombable plugin. If any of these gives the possibility to expose a particle concentration in the air it could be a good starting point.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby Thorsten » Sun Jan 31, 2021 6:44 pm

Maybe you can get reasonably close if you can get the location of the particles used to animate the smoke.


As far as volcanic dust and its interaction with aircraft is is concerned, probably no. The visible volcanic dust cloud would likeky kill you instantly (viscuous updrafts, pretty large grain size, various poisonous gases,...) - the concentration that shut down air traffic a while ago was far, far lower than the visible plume.

I just realized that FlightGear uses math compute the smoke particles location using wind direction and strength and starting location so you could do the same outside FlightGear.


Yes, except that you could do it properly outside FG easily - computing tens of thousands of particles is a very expensive technique to get a really crappy solution (particle/wind interaction in FG doesn't work as in nature, because it always uses the constant wind at aircraft position rather than the wind at particle position, so the solution you get depends on where the camera is).

In what part of FlightGear code you found wind-smoke interaction?



None. Particles are OSG, and the implementation is crap. Good luck...

(It would *really* help if you could come up with a statement what exactly you're trying to do... but hey - have it your own way :D )
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Wildfire, volcanos - Air pollution modeling

Postby kaklik » Mon Feb 01, 2021 1:28 am

Thorsten wrote in Sun Jan 31, 2021 6:44 pm:
None. Particles are OSG, and the implementation is crap. Good luck...

(It would *really* help if you could come up with a statement what exactly you're trying to do... but hey - have it your own way :D )


Ok, I need to make the aircraft model reactive to the scene. I plan to make a scene showing the possibilities of remote inspection of polluted areas. Therefore I need a scene with visually identifiable air pollution and an aircraft sensitive to the concentration of the pollutant.

I am capable to make the aircraft controlled externally outside FlightGear by this PX4-FlightGear-bridge (https://github.com/ThunderFly-aerospace ... ear-Bridge). But for effective control, the system needs feedback - e.g. concentration of air pollutant at the coordinates of the aircraft. This should be a device-tree variable, which could be read out and exposed outside of FlightGear.

Technically the pollutant does not need to be exactly volcanic ash or smoke (which I previously expected as the most useful candidate because it could improve the FlightGear simulation by degradation and failures), but it could be some other variable, which could be controlled in the FlightGear scene and is visible at the same time. (e.g. rain, hail, snow, etc.), but is needed that aircraft sensitivity should be proportional to the actual intensity at the aircraft position.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby Thorsten » Mon Feb 01, 2021 7:16 am

So actually it seems you need it the other way round - you can provide the FDM as well as the pollutant density externally and you want FG to render an approximation for that density in the scene.

Which, hands-down, is pretty easy - you prepare a few suitably diffuse cloud models and pre-run a script that executes fgcommand("add-cloud") with these distributed in the path of your externally computed pollution (assuming you're reasonably happy with a steady-state solution, the time dependent case is a bit more tricky...)

Might even look nice...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Wildfire, volcanos - Air pollution modeling

Postby kaklik » Mon Feb 01, 2021 2:00 pm

Thorsten wrote in Mon Feb 01, 2021 7:16 am:So actually it seems you need it the other way round - you can provide the FDM as well as the pollutant density externally and you want FG to render an approximation for that density in the scene.

Which, hands-down, is pretty easy - you prepare a few suitably diffuse cloud models and pre-run a script that executes fgcommand("add-cloud") with these distributed in the path of your externally computed pollution (assuming you're reasonably happy with a steady-state solution, the time dependent case is a bit more tricky...)

Might even look nice...


Hm.. it seems to be a feasible way. I do not think in this way until now, because my FDM (Yasim) runs under FlightGear for now, therefore all required physics runs in FlightGear, there were no reasons to run any physics model outside of FlightGear.

Ok, a steady-state solution should be a perfect start in this situation. I thinking about avoiding the necessity to provide an external pollutant model. The one possible solution which I thought of is to choose a variable that is already computed in the FlightGear and visualize it by the method you proposed. The visualized variable could be something that is useful for debugging - the "thermal lift" variable from property-tree seems to be a good option for me.
kaklik
 
Posts: 24
Joined: Fri Dec 27, 2019 8:07 pm

Re: Wildfire, volcanos - Air pollution modeling

Postby Thorsten » Mon Feb 01, 2021 6:27 pm

I do not think in this way until now, because my FDM (Yasim) runs under FlightGear for now, therefore all required physics runs in FlightGear, there were no reasons to run any physics model outside of FlightGear.


Well, calculating a steady-state 3d field of pollutants is a lengthy, one-time task (exactly the thing most unsuited for a flightsim to do), computing a plane reacting to a pollutant field is a relatively short task you need 30 times per second.

Just because it's physics doesn't mean it has to be computed in the same place - lightmaps computed by a raytracer are physics, but we compute them outside of FG for the same reason.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Weather

Who is online

Users browsing this forum: No registered users and 3 guests