KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | Variables
GenerateWind Namespace Reference

Classes

class  GenerateWind
 

Variables

bool normalize = True
 
float friction_velocity = 2.683479938442173
 
float reference_height = 180.0
 
float roughness_height = 0.75
 
 grid_dimensions = np.array([1200.0, 864.0, 576.0])
 
 grid_levels = np.array([7, 7, 7])
 
int seed = 9000
 
 wind = GenerateWind(friction_velocity, reference_height, grid_dimensions, grid_levels, seed)
 
 wind_field = wind.total_wind
 
 sd = np.sqrt(np.mean(wind_field**2))
 
float JCSS_law = lambda z, z_0, delta, u_ast: u_ast/0.41 * ( np.log(z/z_0+1.0) + 5.57*z/delta - 1.87*(z/delta)**2 - 1.33*(z/delta)**3 + 0.25*(z/delta)**4 )
 
float log_law = lambda z, z_0, u_ast: u_ast * np.log(z/z_0+1.0)/0.41
 
 z = np.linspace(0.0,grid_dimensions[2], 2**(grid_levels[2])+1)
 
float mean_profile_z = log_law(z, roughness_height, friction_velocity)
 
 mean_profile = np.zeros_like(wind_field)
 
string FileName = 'OntheFlyWindField'
 Export to vtk. More...
 
 spacing = tuple(grid_dimensions/(2.0**grid_levels + 1))
 
 wind_field_vtk = tuple([np.copy(wind_field[...,i], order='C') for i in range(3)])
 
dictionary cellData = {'grid': np.zeros_like(wind_field[...,0]), 'wind': wind_field_vtk}
 

Variable Documentation

◆ cellData

GenerateWind.cellData = {'grid': np.zeros_like(wind_field[...,0]), 'wind': wind_field_vtk}

◆ FileName

GenerateWind.FileName = 'OntheFlyWindField'

Export to vtk.

◆ friction_velocity

float GenerateWind.friction_velocity = 2.683479938442173

◆ grid_dimensions

GenerateWind.grid_dimensions = np.array([1200.0, 864.0, 576.0])

◆ grid_levels

GenerateWind.grid_levels = np.array([7, 7, 7])

◆ JCSS_law

float GenerateWind.JCSS_law = lambda z, z_0, delta, u_ast: u_ast/0.41 * ( np.log(z/z_0+1.0) + 5.57*z/delta - 1.87*(z/delta)**2 - 1.33*(z/delta)**3 + 0.25*(z/delta)**4 )

◆ log_law

float GenerateWind.log_law = lambda z, z_0, u_ast: u_ast * np.log(z/z_0+1.0)/0.41

◆ mean_profile

GenerateWind.mean_profile = np.zeros_like(wind_field)

◆ mean_profile_z

float GenerateWind.mean_profile_z = log_law(z, roughness_height, friction_velocity)

◆ normalize

bool GenerateWind.normalize = True

◆ reference_height

float GenerateWind.reference_height = 180.0

◆ roughness_height

float GenerateWind.roughness_height = 0.75

◆ sd

GenerateWind.sd = np.sqrt(np.mean(wind_field**2))

◆ seed

int GenerateWind.seed = 9000

◆ spacing

GenerateWind.spacing = tuple(grid_dimensions/(2.0**grid_levels + 1))

◆ wind

◆ wind_field

GenerateWind.wind_field = wind.total_wind

◆ wind_field_vtk

GenerateWind.wind_field_vtk = tuple([np.copy(wind_field[...,i], order='C') for i in range(3)])

◆ z

GenerateWind.z = np.linspace(0.0,grid_dimensions[2], 2**(grid_levels[2])+1)