Overview
BoundaryLayerConductanceModel provides boundary layer conductance calculations for heat and mass transfer across primitive boundaries. This plugin enables accurate modeling of convective transport in plant-atmosphere interactions and surface energy balance studies.
The plugin implements four different boundary-layer conductance models:
- Pohlhausen: Laminar flat plate, forced convection (default)
- InclinedPlate: Mixed free-forced convection for inclined surfaces
- Sphere: Laminar flow around spherical objects
- Ground: Convective transfer over bare ground surfaces
System Requirements
- Platforms: Windows, Linux, macOS
- Dependencies: None (pure computational plugin)
- GPU: Not required
- Memory: Minimal overhead
Input Primitive Data
The boundary layer conductance calculation uses the following primitive data:
Primitive Data | Units | Type | Description | Default Value |
wind_speed | m/s | float | Air wind speed outside boundary layer | 1.0 m/s |
object_length | m | float | Characteristic dimension of object | sqrt(area) |
air_temperature | K | float | Ambient air temperature | 290 K |
surface_temperature | K | float | Surface temperature | 300 K |
twosided_flag | - | uint | Number of faces (1 or 2) | 2 |
Set input data using:
context.setPrimitiveData(uuid, "wind_speed", 2.5)
context.setPrimitiveData(uuid, "air_temperature", 298.0)
Output Primitive Data
Results are stored as primitive data:
Primitive Data | Units | Type | Description |
boundarylayer_conductance | mol air/m²/s | float | Calculated boundary-layer conductance |
Access results using:
gH = context.getPrimitiveData(uuid, "boundarylayer_conductance")
Quick Start
from pyhelios import Context, BoundaryLayerConductanceModel
with Context() as context:
leaf_uuid = context.addPatch(center=vec3(0, 0, 1), size=[0.1, 0.1])
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.setBoundaryLayerModel("InclinedPlate")
bl_model.run()
Boundary Layer Models
1. Pohlhausen (Laminar Flat Plate)
Classical solution for laminar forced convection over a flat plate parallel to flow direction.
Use Cases:
- Flat leaves in steady wind
- Laminar boundary layers
- Forced convection dominant
Formula:
gH = 0.135 * ns * sqrt(U / L)
where:
gH
= boundary-layer conductance (mol air/m²/s)
ns
= number of primitive sides (1 or 2)
U
= wind speed (m/s)
L
= characteristic length (m)
Example:
bl_model.setBoundaryLayerModel("Pohlhausen")
bl_model.run()
2. InclinedPlate (Mixed Convection)
Correlation for plates inclined to flow direction, accounting for both forced and free convection.
Use Cases:
- Angled leaves
- Mixed convection scenarios
- Temperature-dependent buoyancy effects
Formula (simplified):
Based on Chen et al. (1986) correlation incorporating:
- Reynolds number (Re)
- Grashof number (Gr)
- Plate inclination angle (θ)
Example:
bl_model.setBoundaryLayerModel("InclinedPlate", uuids=leaf_uuids)
bl_model.run()
3. Sphere (Laminar Sphere)
Correlation for forced convection around a sphere.
Use Cases:
- Fruits (apples, oranges, grapes)
- Spherical objects
- Low Reynolds number flow
Formula:
gH = 0.00164/D + 0.110*sqrt(U/D)
where:
D
= sphere diameter (m)
U
= wind speed (m/s)
Example:
bl_model.setBoundaryLayerModel("Sphere", uuids=fruit_uuids)
bl_model.run()
4. Ground (Bare Soil Surface)
Simplified relationship for convective transfer over flat, bare ground.
Use Cases:
- Soil surfaces
- Ground patches
- Horizontal surfaces
Formula:
where:
U
= wind speed at reference height (m/s)
Example:
bl_model.setBoundaryLayerModel("Ground", uuids=ground_uuids)
bl_model.run()
Examples
Basic Usage
from pyhelios import Context, BoundaryLayerConductanceModel
with Context() as context:
leaf = context.addPatch(center=vec3(0, 0, 1), size=[0.1, 0.1])
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.run()
Setting Different Models
from pyhelios import Context, BoundaryLayerConductanceModel
with Context() as context:
leaves = []
for i in range(5):
uuid = context.addPatch(center=vec3(i*0.2, 0, 1), size=[0.05, 0.05])
leaves.append(uuid)
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.setBoundaryLayerModel("Pohlhausen", uuids=[leaves[0]])
bl_model.setBoundaryLayerModel("InclinedPlate", uuids=[leaves[1]])
bl_model.setBoundaryLayerModel("Sphere", uuids=[leaves[2]])
bl_model.setBoundaryLayerModel("Ground", uuids=[leaves[3]])
bl_model.run()
Application-Specific Models
from pyhelios import Context, BoundaryLayerConductanceModel
with Context() as context:
leaf_uuids = []
for i in range(10):
uuid = context.addPatch(center=vec3(i*0.1, 0, 1.5), size=[0.05, 0.05])
leaf_uuids.append(uuid)
fruit_uuids = []
for i in range(3):
uuid = context.addPatch(center=vec3(i*0.3, 0.5, 1.5), size=[0.08, 0.08])
fruit_uuids.append(uuid)
ground_uuids = []
for i in range(5):
uuid = context.addPatch(center=vec3(i*0.5, 0, 0), size=[0.5, 0.5])
ground_uuids.append(uuid)
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.setBoundaryLayerModel("InclinedPlate", uuids=leaf_uuids)
bl_model.setBoundaryLayerModel("Sphere", uuids=fruit_uuids)
bl_model.setBoundaryLayerModel("Ground", uuids=ground_uuids)
bl_model.run()
Selective Calculation
from pyhelios import Context, BoundaryLayerConductanceModel
with Context() as context:
all_uuids = []
for i in range(20):
uuid = context.addPatch(center=vec3(i*0.1, 0, 1), size=[0.05, 0.05])
all_uuids.append(uuid)
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.setBoundaryLayerModel("InclinedPlate")
subset = all_uuids[5:15]
bl_model.run(uuids=subset)
Error Handling
from pyhelios import Context, BoundaryLayerConductanceModel, BoundaryLayerConductanceModelError
with Context() as context:
leaf_uuid = context.addPatch(center=vec3(0, 0, 1), size=[0.1, 0.1])
try:
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.setBoundaryLayerModel("InvalidModel")
except ValueError as e:
print(f"Invalid model name: {e}")
except BoundaryLayerConductanceModelError as e:
print(f"Plugin error: {e}")
Message Control
Control console output:
with BoundaryLayerConductanceModel(context) as bl_model:
bl_model.enableMessages()
bl_model.disableMessages()