bird.preprocess.dynamic_mixer package
The dynamic_mixer package generates mixer momentum sources as OpenFOAM coded
fvModels (see
write_fvModel()). Two mixer
families share the same ball deposition:
Dynamic (
ActuatorMixer, themixerslist) – an active actuator disk driven by a power numberNpand tip speedVtip; it adds axial thrust and swirl.Static (
StaticMixer, thestatic_mixerslist) – a passive obstacle with no power input: the swirl is an energy-neutral axial-to-azimuthal redirection (swirl numberS) and the axial drag is a pure viscous loss (loss coefficientK). It is inactive when the inflow opposes the mixer orientation. The momentum source follows the energy-neutral swirler model of Kiesewetter (2005).
Static mixer JSON schema
Each entry of the static_mixers list accepts:
S– swirl number (default0.35).K– loss coefficient / velocity heads (default0.5).radius– mixer radius; a fraction of the tube in loop mode (0.5spans the whole tube) or an absolute radius in metres in explicit mode.normal_dir– mixer axis (0/1/2for x/y/z).sign– mixer orientation along that axis ("+"/"-").swirl_sign– rotation orientation ("+"/"-").start_time– time after which the source is active.
Placement is either explicit (x, y, z) or on a loop branch
(branch_id plus frac_space, the fraction along the branch), exactly as
for the dynamic mixer.
bird.preprocess.dynamic_mixer.io_fvModels module
- bird.preprocess.dynamic_mixer.io_fvModels.write_end(output_folder)
- bird.preprocess.dynamic_mixer.io_fvModels.write_mixer(mixer, output_folder)
- bird.preprocess.dynamic_mixer.io_fvModels.write_mixer_ball(mixer, output_folder, power_mode='from_Np_Vtip', momentum_mode='axial')
Append one
ballmixer block tofvModels.- Parameters:
mixer (ActuatorMixer) – A ready
ActuatorMixer.power_mode (str) –
"from_P"(drive bymixer.power) or"from_Np_Vtip"(drive bymixer.Npandmixer.Vtip).momentum_mode (str) –
"axial"(thrust only) or"axial_and_swirl"(thrust + tangential source usingmixer.sigma).
- bird.preprocess.dynamic_mixer.io_fvModels.write_mixer_force_sign(mixer, output_folder)
- bird.preprocess.dynamic_mixer.io_fvModels.write_preamble(output_folder)
- bird.preprocess.dynamic_mixer.io_fvModels.write_preamble_ball(output_folder)
Write the FoamFile header + codedSource preamble for the
ballsource.The Newton solve is inlined in each mixer block (see
write_mixer_ball), so no externaldynamicMix_util.His needed.
- bird.preprocess.dynamic_mixer.io_fvModels.write_static_mixer_ball(mixer, output_folder)
Append one passive
ballstatic-mixer block tofvModels.The swirl is imposed as an azimuthal body force proportional to the local axial dynamic pressure (Kiesewetter), balanced cell-by-cell by an energy-neutral axial reaction; a lumped axial drag adds the viscous loss. The source is inactive when the inflow opposes the mixer orientation.
- Parameters:
mixer (StaticMixer) – A ready
StaticMixer.
bird.preprocess.dynamic_mixer.mixer module
- class bird.preprocess.dynamic_mixer.mixer.ActuatorMixer
Bases:
objectActuator-disk mixer with optional swirl, used by the
ballsource.Unlike
Mixer(the legacypancakesource), momentum is deposited over a ball of physical radiusRand the drive is set by a power numberNpand tip speedVtiprather than a raw power.sigmais the swirl fraction;signis the axial push direction andswirl_signthe (independent) rotation sense.- update_from_expl_dict(mixer_dict: dict) None
Populate from an explicit mixer dict (absolute position and radius).
- class bird.preprocess.dynamic_mixer.mixer.Mixer
Bases:
object- check_status(blocks=None)
- update_from_expl_dict(mixer_dict)
- update_from_loop_dict(mixer_dict, geom_dict, mesh_dict=None)
- class bird.preprocess.dynamic_mixer.mixer.StaticMixer
Bases:
objectPassive (unpowered) momentum-source mixer used by the
ballsource.Unlike
ActuatorMixer, no power is injected: the swirl is imposed as an energy-neutral axial-to-azimuthal redirection and the axial drag is a pure loss. The drive is a swirl numberSand a loss coefficientKrather thanNp/Vtip;signis the mixer orientation (the source is inactive when the inflow opposes it) andswirl_signthe rotation sense.- update_from_expl_dict(mixer_dict: dict) None
Populate from an explicit mixer dict (absolute position and radius).
- bird.preprocess.dynamic_mixer.mixer.actuator_disk_power(Np: float, Vtip: float, R: float, rho: float = 1000.0) float
Power [W] drawn by a
from_Np_Vtipactuator-disk mixer.P = Np * rho * Vtip**3 * D**2 / pi**3withD = 2R(see the ball mixer derivation). Used at case-generation time to record the derived power for the efficiency QoI.
bird.preprocess.dynamic_mixer.mixing_fvModels module
- bird.preprocess.dynamic_mixer.mixing_fvModels.check_input(input_dict)
- bird.preprocess.dynamic_mixer.mixing_fvModels.check_static_input(input_dict)
Return the expl/loop type of each entry in the
static_mixerslist.
- bird.preprocess.dynamic_mixer.mixing_fvModels.write_fvModel(input_dict, output_folder='.', force_sign=False)
- bird.preprocess.dynamic_mixer.mixing_fvModels.write_fvModel_ball(input_dict, output_folder='.')
Write the
ball(actuator-disk) fvModels.Reads the top-level
power(from_P/from_Np_Vtip) andmomentum_source(axial/axial_and_swirl) modes; both default to the new full model. Each dynamic mixer is anActuatorMixer; each entry of the optionalstatic_mixerslist is aStaticMixerappended to the same codedSource.