Macro Deodatis 1996 Mean Wind Profile: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Macro |Name=Macro Deodatis 1996 Mean Wind Profile |Icon=Macro_Deodatis_1996_Mean_Wind_Profile.png |Description=This macro create simulation point according to G. Deodatis 1996. |Author=Koffi Daniel |Version=1.0 |Date=2024-04-15 |RPSVersion=All |SeeAlso=Macro Deodatis 1996 Mean Wind Profile }} This macro create mean wind profile according to G. Deodatis 1996. The created profile is the mean wind logarithm profile where the param...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Macro | {{Macro | ||
|Name=Macro Deodatis 1996 Mean Wind Profile | |Name=Macro Deodatis 1996 Mean Wind Profile | ||
|Description=This macro create simulation point according to G. Deodatis 1996. | |Description=This macro create simulation point according to G. Deodatis 1996. | ||
|Author=Koffi Daniel | |Author=Koffi Daniel | ||
Line 12: | Line 11: | ||
[[File:Deodatis1996MeanWindProfile.png|1024px|center]] | [[File:Deodatis1996MeanWindProfile.png|1024px|center]] | ||
{{Caption| | {{Caption|Mean wind speed values}} | ||
==Script== | ==Script== | ||
You can find the source code on the following Github repository: | You can find the source code on the following Github repository: | ||
[https://github.com/LabRPS/LabRPS-macros/blob/master/WindLab/Deodatis1996/ | [https://github.com/LabRPS/LabRPS-macros/blob/master/WindLab/Deodatis1996/Deodatis1996_MeanWind.RPSMacro Get the code here!] | ||
'''Macro Deodatis 1996 Mean Wind Profile.RPSMacro''' | '''Macro Deodatis 1996 Mean Wind Profile.RPSMacro''' | ||
Line 25: | Line 24: | ||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||
# (c) Koffi Daniel 2024 | # (c) Koffi Daniel 2024 | ||
import LabRPS | import LabRPS |
Latest revision as of 13:55, 16 April 2024
Description |
---|
This macro create simulation point according to G. Deodatis 1996. Macro version: 1.0 Last modified: 2024-04-15 LabRPS version: All Author: Koffi Daniel |
Author |
Koffi Daniel |
Download |
None |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
1.0 |
Date last modified |
2024-04-15 |
LabRPS Version(s) |
All |
Default shortcut |
None |
See also |
Macro Deodatis 1996 Mean Wind Profile |
This macro create mean wind profile according to G. Deodatis 1996. The created profile is the mean wind logarithm profile where the parameters such as terrain roughness and shear velocity of the wind flow have to be specified.
Mean wind speed values
Script
You can find the source code on the following Github repository: Get the code here!
Macro Deodatis 1996 Mean Wind Profile.RPSMacro
# -*- coding: utf-8 -*- # (c) Koffi Daniel 2024 import LabRPS from LabRPS import Vector as vec import WindLab import WindLabObjects class Deodatis1996MeanWind(): def __init__(self): #install the WindLab plugin with all its plugged features installResuslt = WindLab.installPlugin("WindLabPlugin") # create new document doc = LabRPS.newDocument() # create new simulation with default name "Simulation" in the above document sim = WindLabObjects.makeSimulation(doc) # check if the simulation is successfully created if not sim: LabRPS.Console.PrintError("The simulation does not exist.\n") return None # create new location distribution in the simulation called "Simulation". Without simulation location mean wind profile cannot run loc = WindLabObjects.makeFeature("SimulationPoints", "Simulation", "Location Distribution", "General Distribution") # check if the created location distribution feature is null if not loc: LabRPS.Console.PrintError("Error on creating the location distribution.\n") return None v1 = vec(0, 0, 35) v2 = vec(0, 0, 40) v3 = vec(0, 0, 140) loc.Locations = [v1, v2, v3] # create new mean wind profile feature in the simulation called "Simulation" mean = WindLabObjects.makeFeature("MeanSpeed", "Simulation", "Mean Wind Profile", "RPS Logarithmic Low") # check if the created mean wind feature is successuful if not mean: LabRPS.Console.PrintError("The creation of the mean wind profile was not successuful.\n") return None mean.TerrainRoughness = '0.001266 m' mean.ShearVelocity = '1.76 m/s' # wind velocity in this example is stationary. Meanning wind speed means are not varying in time # here we use time instant of 0 second. time = 0.0 # compute the mean wind speed at all simulation points at time instant of 0s meanValues = sim.computeMeanWindSpeedVectorP(time) # if we are in Gui mode, show the stored result in Alphaplot if LabRPS.GuiUp: import WindLabGui #show the mean wind speeds in Alphaplot WindLabGui.WindLabPyTool.showArray(sim.getSimulationData().numberOfSpatialPosition, 2, meanValues) doc.recompute() Deodatis1996MeanWind()