Files
bps-schema/schema-cfd.json

735 lines
20 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bps/cfd",
"title": "CFD Wind Environment Simulation Schema",
"description": "Computational Fluid Dynamics simulation parameters for building wind environment analysis. Covers domain definition, mesh parameters, turbulence models, boundary conditions, and solver settings. Not part of HBJSON; provided as a parallel simulation domain.",
"$defs": {
"_IdentifiedObject": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^[.A-Za-z0-9_-]+$",
"minLength": 1,
"maxLength": 100
},
"display_name": {
"type": [
"string",
"null"
]
},
"user_data": {
"type": [
"object",
"null"
]
}
},
"required": [
"identifier"
]
},
"WindProfileType": {
"type": "string",
"enum": [
"power_law",
"log_law",
"uniform",
"atmospheric_boundary_layer"
]
},
"TerrainCategory": {
"type": "string",
"enum": [
"open_sea",
"open_country",
"suburban",
"urban_center",
"dense_urban"
]
},
"TurbulenceModel": {
"type": "string",
"enum": [
"k_epsilon_standard",
"k_epsilon_realizable",
"k_epsilon_RNG",
"k_omega_SST",
"LES",
"DES"
]
},
"SolverType": {
"type": "string",
"enum": [
"steady",
"transient"
]
},
"WindProfile": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "WindProfile"
},
"profile_type": {
"$ref": "#/$defs/WindProfileType",
"default": "power_law"
},
"reference_wind_speed": {
"type": "number",
"exclusiveMinimum": 0,
"description": "m/s at reference height"
},
"reference_height": {
"type": "number",
"exclusiveMinimum": 0,
"default": 10,
"description": "m"
},
"power_law_exponent": {
"type": "number",
"minimum": 0,
"description": "Alpha for power law profile, terrain-dependent"
},
"roughness_length": {
"type": "number",
"exclusiveMinimum": 0,
"description": "z0 in meters for log law profile"
},
"ground_elevation": {
"type": "number",
"default": 0,
"description": "Ground elevation in meters"
},
"terrain_category": {
"$ref": "#/$defs/TerrainCategory",
"default": "suburban"
},
"wind_direction": {
"type": "number",
"minimum": 0,
"maximum": 360,
"default": 0,
"description": "Wind direction in degrees, 0=N, 90=E"
}
},
"required": [
"type",
"reference_wind_speed"
],
"additionalProperties": false
}
]
},
"CFDDomain": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "CFDDomain"
},
"domain_size": {
"type": "object",
"properties": {
"x_min": {
"type": "number"
},
"x_max": {
"type": "number"
},
"y_min": {
"type": "number"
},
"y_max": {
"type": "number"
},
"z_min": {
"type": "number"
},
"z_max": {
"type": "number"
}
},
"required": [
"x_min",
"x_max",
"y_min",
"y_max",
"z_min",
"z_max"
],
"additionalProperties": false
},
"upstream_distance": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Distance from building to inlet, typically 5H"
},
"downstream_distance": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Distance from building to outlet, typically 15H"
},
"lateral_distance": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Distance from building to side walls, typically 5H"
},
"height_distance": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Distance from building top to domain top, typically 5H"
}
},
"required": [
"type",
"domain_size"
],
"additionalProperties": false
}
]
},
"MeshParameters": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "MeshParameters"
},
"base_cell_size": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Background mesh cell size in meters"
},
"refinement_zones": {
"type": "array",
"items": {
"type": "object",
"properties": {
"zone_name": {
"type": "string"
},
"cell_size": {
"type": "number",
"exclusiveMinimum": 0
},
"extent": {
"type": "object",
"properties": {
"x_min": {
"type": "number"
},
"x_max": {
"type": "number"
},
"y_min": {
"type": "number"
},
"y_max": {
"type": "number"
},
"z_min": {
"type": "number"
},
"z_max": {
"type": "number"
}
},
"required": [
"x_min",
"x_max",
"y_min",
"y_max",
"z_min",
"z_max"
],
"additionalProperties": false
}
},
"required": [
"zone_name",
"cell_size",
"extent"
],
"additionalProperties": false
}
},
"wall_layer_first_cell_height": {
"type": "number",
"exclusiveMinimum": 0,
"description": "First cell height at wall boundaries in meters"
},
"wall_layer_growth_rate": {
"type": "number",
"exclusiveMinimum": 1,
"maximum": 1.5,
"default": 1.2
},
"wall_layer_total_layers": {
"type": "integer",
"minimum": 3,
"default": 10
},
"mesh_type": {
"type": "string",
"enum": [
"hexahedral",
"polyhedral",
"tetrahedral",
"snappy_hex"
],
"default": "snappy_hex"
},
"total_cells_estimate": {
"type": "integer"
}
},
"required": [
"type",
"base_cell_size"
],
"additionalProperties": false
}
]
},
"TurbulenceParameters": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "TurbulenceParameters"
},
"turbulence_model": {
"$ref": "#/$defs/TurbulenceModel",
"default": "k_epsilon_RNG"
},
"turbulence_intensity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Inlet turbulence intensity (0-1)"
},
"turbulent_length_scale": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Characteristic turbulent length scale in meters"
},
"wall_function_type": {
"type": "string",
"enum": [
"standard_wall_function",
"non_equilibrium",
"enhanced_wall_treatment",
"scalable_wall_function"
],
"default": "standard_wall_function"
},
"y_plus_target": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Target y+ value for wall-adjacent cells"
}
},
"required": [
"type",
"turbulence_model"
],
"additionalProperties": false
}
]
},
"BoundaryConditions": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "BoundaryConditions"
},
"inlet_type": {
"type": "string",
"enum": [
"velocity_inlet",
"pressure_inlet"
],
"default": "velocity_inlet"
},
"outlet_type": {
"type": "string",
"enum": [
"pressure_outlet",
"outflow"
],
"default": "pressure_outlet"
},
"top_boundary_type": {
"type": "string",
"enum": [
"symmetry",
"slip_wall",
"velocity_inlet"
],
"default": "symmetry"
},
"side_boundary_type": {
"type": "string",
"enum": [
"symmetry",
"slip_wall"
],
"default": "symmetry"
},
"ground_type": {
"type": "string",
"enum": [
"no_slip_wall",
"rough_wall"
],
"default": "no_slip_wall"
},
"building_wall_type": {
"type": "string",
"enum": [
"no_slip_wall",
"rough_wall"
],
"default": "no_slip_wall"
},
"surface_roughness_height": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001,
"description": "Physical roughness height in meters for wall boundaries"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"SolverSettings": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "SolverSettings"
},
"solver_type": {
"$ref": "#/$defs/SolverType",
"default": "steady"
},
"pressure_velocity_coupling": {
"type": "string",
"enum": [
"SIMPLE",
"SIMPLEC",
"PISO",
"Coupled"
],
"default": "SIMPLE"
},
"spatial_discretization": {
"type": "string",
"enum": [
"first_order",
"second_order",
"QUICK",
"MUSCL"
],
"default": "second_order"
},
"max_iterations": {
"type": "integer",
"minimum": 100,
"default": 1000
},
"convergence_criteria": {
"type": "object",
"properties": {
"continuity": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"x_velocity": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"y_velocity": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"z_velocity": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"k": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"epsilon": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
},
"omega": {
"type": "number",
"exclusiveMinimum": 0,
"default": 0.001
}
},
"additionalProperties": false
},
"under_relaxation_factors": {
"type": "object",
"properties": {
"pressure": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1,
"default": 0.3
},
"momentum": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1,
"default": 0.7
},
"turbulent_kinetic_energy": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1,
"default": 0.8
},
"turbulent_dissipation": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1,
"default": 0.8
}
},
"additionalProperties": false
},
"time_step": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Time step in seconds (for transient only)"
},
"total_time": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Total simulation time in seconds (for transient only)"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"OutputParameters": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "OutputParameters"
},
"output_variables": {
"type": "array",
"items": {
"type": "string",
"enum": [
"velocity",
"pressure",
"turbulent_kinetic_energy",
"turbulent_dissipation",
"wall_shear_stress",
"vorticity"
]
},
"default": [
"velocity",
"pressure"
]
},
"monitoring_points": {
"type": "array",
"items": {
"type": "object",
"properties": {
"point_name": {
"type": "string"
},
"position": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
}
},
"required": [
"point_name",
"position"
],
"additionalProperties": false
}
},
"output_format": {
"type": "string",
"enum": [
"ensight",
"paraview",
"tecplot",
"csv",
"vtk"
],
"default": "vtk"
},
"output_interval": {
"type": "integer",
"minimum": 1,
"default": 100,
"description": "Write output every N iterations"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"CFDSettings": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "CFDSettings"
},
"wind_profiles": {
"type": "array",
"items": {
"$ref": "#/$defs/WindProfile"
}
},
"domain": {
"$ref": "#/$defs/CFDDomain"
},
"mesh": {
"$ref": "#/$defs/MeshParameters"
},
"turbulence": {
"$ref": "#/$defs/TurbulenceParameters"
},
"boundary_conditions": {
"$ref": "#/$defs/BoundaryConditions"
},
"solver": {
"$ref": "#/$defs/SolverSettings"
},
"output": {
"$ref": "#/$defs/OutputParameters"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"ModelCFDProperties": {
"type": "object",
"properties": {
"type": {
"const": "ModelCFDProperties"
},
"cfd_settings": {
"$ref": "#/$defs/CFDSettings"
},
"building_surfaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of building surface identifiers to be used as wall boundaries"
},
"terrain_surfaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of terrain/ground surface identifiers"
},
"porous_surfaces": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of surface identifiers treated as porous media (trees, screens)"
}
},
"required": [
"type"
],
"additionalProperties": false
}
}
}