Abstract interface for turbine forcing models (actuator disc, actuator
line)
A turbine model is a backend-agnostic physics object: it samples the flow
at actuator points and accumulates a momentum source back onto the RHS
fields (du, dv, dw). It is owned and driven entirely by the flow case
(see m_case_wind_turbine) and therefore knows nothing about the solver,
the case, or the iturbine switch - the case decides which concrete model
to allocate and when to call it.
Concrete implementations:
- turbine_dummy_t (m_turbine_dummy): no-op / iturbine=0, the fallback
- alm_t (m_alm) : actuator line model
- adm_t (m_adm) : actuator disc model
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Abstract Interfaces
abstract interface
public subroutine init_iface(self, backend, mesh, host_allocator, dt)
Set up turbine geometry/state (read config files, place actuator
points, build smearing kernels, ...). Called once after the solver
exists. The model caches whatever context it needs (backend, mesh,
host_allocator) so the per-step hooks below take only fields.
public subroutine project_forces_iface(self, du, dv, dw, u, v, w)
Sample the velocity field at the actuator points and accumulate the
turbine momentum source into the RHS fields du, dv, dw. Uses the
backend/mesh cached at init.