|
|
| Generating a Wind Model |
|
Onewing
Member #6,152
August 2005
|
I don't know much about how wind currents work and there may not be a plausible way to create them with the small amount of given information I have. I'd sure appreciate any help and/or advice. Say you have an x by y graph (x amount of nodes in horizontal, y amount in vertical). Each node has a height and a temperature. From this, is it possible to create a wind current model of the entire graph? Any ideas of how one should go about that (algorithms, structure, etc.)? ------------ |
|
Don Freeman
Member #5,110
October 2004
|
Bernoulli's Theorem -- |
|
Evert
Member #794
November 2000
|
If you assume that the surface as an isobaric surface and that the gas is ideal, then an increase in temperature leads to a decrease in density. This sets up a density distribution, which can drive bulk fluid motion. Alternatively, you can treat the surface as an isodensity surface, in which case the temperature gradient induces a density gradient, which acts as a force. It should be possible to discretise the set of equations and solve them, but I think they're notorious for being sensitive to how you do the discretisation, so it may not be straightforward to get this to work as you want. EDIT: I forgot to mention: |
|
ImLeftFooted
Member #3,935
October 2003
|
Hmm.. I understood none of that post Evert |
|
Evert
Member #794
November 2000
|
What, you mean write a hydrodynamics code as a part of a forum post? I suppose I could... given at least a couple of weeks to do it properly! If you want to learn about numerical methods, you cannot easily beat Numerical Recipes (but you can beat their code), so I'd recommend reading up there. |
|
Onewing
Member #6,152
August 2005
|
Thanks Evert and Don. I'm going to fiddle with these formulas and see if I can get some currents flowing through my current model. If all goes well, I should be able to accumulate clouds and possibly storms. I'll let you know how it goes. I'm saving credits in case anybody else wants to pitch in. ********************************* [EDIT] ************************************ Okay, let's put some theory to pratice (mainly because I'm at work and bored). I haven't evaluated all the expressions too closely, see feel free to correct my logic or misunderstandings. For the purpose of this thread, I'm going to keep it relatively simply. Let's go back to the top-down view, graph-like diagram. * * * * * * X * * * * * * * * * * * * * * * * * * The *'s above represent the ground at BASE height (for simplicity, let's consider BASE height to be 0). The X represents raised ground. For now, let's assume the temperature is uniform throughout the diagram. I would assume, from what little I know, that the wind, or air particles that make up the wind, fall off the hill and spread out across the flat area: - ^ - - - < X > - - - V - - - - - - - - - - - - - The above would be my guess at the where the wind would blow, although the -'s are not necessarily uniform and would have some wind velocity (higher as you got closer to the hill). However, this would mean there's no wind on top of the hill, but that's because I'm looking at this two dimensionally, and technically there'd be many more layers of air. Here's an example of a graph where air rolls up over the X: * * * * * - ^ - ^ - * X * Y * < < < Y > * * * * * - V - V - * * * * * - - - - - * * * * * - - - - - Where Y is a spot of ground that is higher than spot X. Of course, all the above is examining a graph with no temperature differences. Going back to the original graph (with just X), let's pretend the temperature displays like this: C C C C H C C C H H C H H H H H H H H H H H H H H Where C is cold and H is hot. Now, my guess is the following wind model would be used for the graph and temperature pairing: - ^ ^ ^ < < X > < < ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ - - - - - Kind of messy, but my idea here is looking at the parts of the hill where one side is the same temperature as the top of it would act like the previous wind models. The rest is just kind of a continual flow from hot to cold. Any comments? I'm going to see what I can accomplish with this much for the time being. ------------ |
|
Arthur Kalliokoski
Second in Command
February 2005
|
How big an area are you talking about? If it's only a couple kilometers across (like in a game) I doubt convection currents etc. would affect much except for windless conditions that create tornados, it'd be more to do with high/low pressure systems and the Corealis effect that are hundreds of km across. They all watch too much MSNBC... they get ideas. |
|
Onewing
Member #6,152
August 2005
|
Actually, the area is the size of a planet. Consider each node to be a pixel of a 640X480 screen (or 307,200 nodes). If I know the direction and general velocity of wind at any given spot, I can direct clouds created by water node evaporations. This may seem like overkill, but the conditions of the planet creation are considerably flexible. ------------ |
|
ImLeftFooted
Member #3,935
October 2003
|
Evert said:
What, you mean write a hydrodynamics code as a part of a forum post? I suppose I could... given at least a couple of weeks to do it properly! If you want to learn about numerical methods, you cannot easily beat Numerical Recipes [library.cornell.edu] (but you can beat their code), so I'd recommend reading up there. Ok, you have 7 days. ready, go! [serious] |
|
Onewing
Member #6,152
August 2005
|
Quote: How about a stripped down dummy model in code? For the size of the model, I most likely will have to. I was also wondering if I need to take water into account. Doesn't water do some weird affects to wind or is it just the temperature of water? BTW, here's a screen shot of what the model (models are generated randomly at runtime) looks like. No, it doesn't look like realistic terrain, and that's okay with me. I'm not doing any advanced math (or shading), I'm just changing the rgb intensities based on height (which might be how height maps work? I don't know, never worked with one before). http://comp.uark.edu/~spsilve/terrain.JPG [EDIT] - typo and forgot some info. ------------ |
|
Evert
Member #794
November 2000
|
Quote: I was also wondering if I need to take water into account. Doesn't water do some weird affects to wind or is it just the temperature of water?
You probably get a shear at the surface. Remember that wind can blow waves onto the water, so you can loose energy from the wind in that way. |
|
|