pheromone_dispersion.diffusion_tensor module
- class pheromone_dispersion.diffusion_tensor.DiffusionTensor(U, K_u, K_u_t)[source]
Bases:
objectClass containing the anisotropic and inhomogeneous diffusion tensor \(\mathbf{K}(x,y,t)\).
The diffusion tensor is given by a diffusion coefficient \(K_u\) in the wind direction and a diffusion coefficient \(K_{u^\perp}\) in the crosswind direction. Hence, the anistropic diffusion tensor is given by \(\mathbf{K} = R(\vec{u})diag(K_u,K_{u^\perp})R(\vec{u})^T\) with \(R(\vec{u})\) the rotation matrice of angle \(\theta\) between the wind field and the cartesian frame.
- K_u
The diffusion coefficient in the wind direction \(K_u\).
- Type:
float
- K_u_t
The diffusion coefficient in the crosswind direction \(K_{u^\perp}\).
- Type:
float
- at_vertical_interface
The diffusion tensor \(\mathbf{K}(x,y)\) at the vertical interfaces of each cells of the mesh at the current time \(t\).
- Type:
- at_horizontal_interface
The diffusion tensor \(\mathbf{K}(x,y)\) at the horizontal interfaces of each cells of the mesh at the current time \(t\).
- Type:
- __init__(U, K_u, K_u_t)[source]
Constructor method
- Parameters:
U (
Velocity) – The wind field \(\vec{u}(x,y,t)\).K_u (
float) – The diffusion coefficient in the wind direction \(K_u\).K_u_t (
float) – The diffusion coefficient in the crosswind direction \(K_{u^\perp}\).
- at_current_time(tc)[source]
Update all the attributes at a given time.
- Parameters:
tc (
floatorinteger) – The current time.
Notes
Updates the velocity field
Uand its own attributes using the methodat_current_time()of the classVelocity. Then, recomputes the attributesat_vertical_interfaceandat_horizontal_interfacefrom the updated velocity field using the methoddiffusion_tensor_from_velocity_field().
- diffusion_tensor_from_velocity_field()[source]
Compute the attributes
at_vertical_interfaceandat_horizontal_interfacefrom the attributesU,K_uandK_u_tusing the rotation formula given above.