Coder Social home page Coder Social logo

bbrangeo / urock_processing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j3r3m1/urock_processing

0.0 0.0 0.0 104.05 MB

Röckle method for fast wind speed calculation

License: GNU General Public License v3.0

Shell 0.49% Python 93.71% Makefile 2.56% QML 2.42% Batchfile 0.83%

urock_processing's Introduction

URock

Röckle method for fast wind speed calculation

What is performed ?

A 3D urban wind speed calculation is performed using a 2 steps methodology proposed by Röckle (1990):

  1. Initialization step: the wind field is initialized around buildings and within vegetation by modeling empirically the wind speed and direction using results from wind tunnel observations
  2. Solving step: the advection equation is solved from this initial wind field to balance the wind (the turbulence is supposed roughly “solved” by the initialization).
View After initialization After numerical solving
Horizontal initializedHorizontal solvedHorizontal
Sectional initializedSectional solvedSectional

Note that the terrain slope is not taken into account.

Computer requirements

Most of the vector data manipulations are performed using H2GIS which is automatically downloaded when executing URock. However, H2GIS is based on Java, thus you need to have a version of Java (>=8) installed on your computer. If you do not have, please download it here for Windows users or here for Linux users. Make sure you download the version (32 or 64 bits) consistent with your system (even though most computers are 64 bits nowaday). When you will first launch the URock library, you will be asked what is your JAVA environment path (probably looks like "C:\Program Files\Java\jre1.8.0_271" on Windows and like "/usr/lib/jvm/java-8-openjdk" on Linux).

To use such database engine in Python, you also need to install the Jaydebeapi Python library.

How to use ?

The TestFile.py file is used to set the simulation informations of a new case and to run it.

First, you need to set the following informations:

  • Geographical input data
  • Meteorological input data
  • Meshing properties
  • Other simulation parameters
  • Plotting options

Geographical input data

The geographical inputs are vector files (shapefile and geojson are supported).

First, create a folder in the "./Ressource" directory. Let's call this folder "myCase". In the test file, you should set the variable 'caseToRun' to "myCase".

Then put your building and your (optional) vegetation files into this folder and set the variable 'buildingFileName' and 'vegetationFileName' according to your file names (with the extension). If you do not have vegetation file, set 'vegetationFileName' to None

Your building file should contain:

  • a geometry field (called "THE_GEOM") containing POLYGONS,
  • an ID field (you set the name in the 'idFieldBuild' variable)
  • an building height field (you set the name in the 'buildingHeightField' variable).

Your vegetation file (if any) should contain:

  • a geometry field (called "THE_GEOM") containing POLYGONS,
  • an ID field (you set the name in the 'idVegetation' variable),
  • a vegetation base height field (you set the name in the 'vegetationBaseHeight' variable),
  • a vegetation top height field (you set the name in the 'vegetationTopHeight' variable),
  • a vegetation attenuation factor field (you set the name in the 'vegetationAttenuationFactor' variable).

Note that all fields have default values in the GlobalVariables.py file.

Meteorological input data

The wind field is simulated for a given wind direction and wind speed at a specified height. Then you should set the wind speed ('v_ref') in m/s, the wind direction ('windDirection') in degree clockwise from North and the height from ground ('z_ref') in m at which the wind speed is set.

Meshing properties

The size of the sketch and the size of the meshes are set in this section. In the initialization (step 1), we identify the 3D zones where the wind is strongly impacted by the obstacles (in what we called the "Röckle zones"). If we do not extend the simulation grid horizontally and vertically around these zones, we may clearly affect the resulting wind speed since the wind speed modification within these zones will induce a wind speed modification around these zones. Thus we set the size of the sketch as an extend in the along wind, cross wind and vertical directions (respectively 'alongWindZoneExtend', 'crossWindZoneExtend' and 'verticalExtend'). The cubic mesh sizes should then be set: the horizontal spacing is set using 'meshSize' and the vertical resolution is set using 'dz'.

Other simulation parameters

The solving (step 2) may take quite a while and the user may only want to verify that the initialization (step 1) went well. To perform only step 1, the boolean variable 'onlyInitialization' should be set to True. Intermediate results such as 2D Röckle zones and the 3D points located in the Röckle zones may be saved in the "./Ressources/Outputs" directory if you set the boolean variable 'saveRockleZones' to True. The numerical solver can stop when one of the following condition is reached: the number of iteration reaches 'maxIterations' or the relative wind field change between two consecutive iteration is lower than 'thresholdIterations'. A temporary directory is used for file exchange between H2Database and Python and to save the H2Database. You can set a specific path for this directory using the 'tempoDirectory' variable.

Plotting options

Several figures are plotted if 'plotBoolean' is set to True:

  1. the horizontal wind FIELD for a list of level ('levelList') defined by the user,
  2. the horizontal wind SPEED for the same list of level,
  3. the wind FIELD in a sectional view (YZ plan) for the median X plan

The computed wind may be the one at the end of the initialization step ('isInitialField' = True) or the one after numerical solving ('isInitialField' = False). The wind FIELDS may be a 2D vector for each mesh ('isStream' = False) or stream lines ('isStream' = True). If streams, you can set the density of streams using the 'streamDensity' variable. You may plot a limited range for axis X, Y and Z. If so you have to set respectively in 'xRange', 'yRange' and 'zRange' a list containing min and max values (if the list is empty, all the domain is plotted). The size and shape of the arrow head may be defined using the 'headwidth', 'headlength' and 'headaxislength' variables.

streamHorizontal streamSectional
Horizontal stream line plot with 'streamDensity' = 3 Sectional stream line plot with 'streamDensity' = 3

References

Röckle, R., 1990: Bestimmung der Strömungsverhältnisse im Bereich komplexer Bebauungsstruk-turen. PhD thesis Fachbereich Mechanik der Technischen Hochschule Darmstadt Darmstadt.

urock_processing's People

Contributors

biglimp avatar j3r3m1 avatar

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.