Horizontal jet in crossflow

A horizontal jet is released into a current, which is in the direction normal to the pipe outlet. The ambient current velocity is zero initially, but increases to 0.1 m/s after one hour. The config.toml file looks like this:

# Characteristics of the pipe and the effluent flow
[pipe]
time = [1970-01-01]
flow = [0.2]
dens = [1000]
diam = [0.5]
depth = [100]
decline = [0]

# Characteristics of the ambient water masses
[ambient]
time = [1970-01-01T01:00:00, 1970-01-01T02:00:00]
depth = [100]
coflow = [[0], [0]]
crossflow = [[0], [0.2]]
dens = [[1000], [1000]]

# Output options
[output]
csv.file = "out.csv"
csv.float_format = "%.6g"
trajectory.step = 5           # Time between trajectory points [s]
trajectory.stop = 30          # Time of final trajectory point [s]
release.start = 1970-01-01T01:00:00    # Time of first release [date]
release.stop = 1970-01-01T02:00:00     # Time of final release [date]
release.step = 3600           # Time between releases [s]

The contents of the output file out.csv is:

release_time,t,x,y,z,u,v,w,density,radius,dilution
1970-01-01 01:00:00,0,0,0,100,1.01859,0,0,1000,0.25,1
1970-01-01 01:00:00,5,2.67114,0,100,0.362106,0,0,1000,0.704095,2.81979
1970-01-01 01:00:00,10,4.20059,0,100,0.264651,0,0,1000,0.964101,3.864
1970-01-01 01:00:00,15,5.39823,0,100,0.218734,0,0,1000,1.1677,4.68487
1970-01-01 01:00:00,20,6.41637,0,100,0.190506,0,0,1000,1.34078,5.37954
1970-01-01 01:00:00,25,7.31774,0,100,0.171126,0,0,1000,1.49402,5.99992
1970-01-01 01:00:00,30,8.13534,0,100,0.156561,0,0,1000,1.63301,6.55811
1970-01-01 02:00:00,0,0,0,100,1.01859,0,0,1000,0.25,1
1970-01-01 02:00:00,5,2.21294,0.565491,100,0.259377,0.149071,0,1000,0.914758,3.93225
1970-01-01 02:00:00,10,3.2337,1.36506,100,0.164573,0.167686,0,1000,1.29656,6.20424
1970-01-01 02:00:00,15,3.94149,2.22609,100,0.123018,0.175845,0,1000,1.57056,8.3151
1970-01-01 02:00:00,20,4.49279,3.11784,100,0.0994742,0.180468,0,1000,1.78291,10.2894
1970-01-01 02:00:00,25,4.95003,4.02806,100,0.0844098,0.183426,0,1000,1.95678,12.1444
1970-01-01 02:00:00,30,5.34411,4.95069,100,0.073801,0.185509,0,1000,2.10456,13.8903

To visualize the effect of the ambient crossflow, we plot a horizontal cross-section of the plume at two points in time: Both initially (when the ambient is stagnant) and after one hour (when there is an ambient current).

import matplotlib.pyplot as plt
import pandas as pd
import numpy as np

df_all = pd.read_csv("out.csv").groupby('release_time')
dates = ['1970-01-01 01:00:00', '1970-01-01 02:00:00']
fcolors = ["#e0707070", "#7070e070"]
ecolors = ["#a00000", "#0000a0"]

for date, fcolor, ecolor in zip(dates, fcolors, ecolors):
    df = df_all.get_group(date)

    # Compute unit tangent vector
    velocity = np.sqrt(df.u.values**2 + df.v.values**2)
    tx = df.u.values / velocity
    ty = df.v.values / velocity

    # Compute trajectory of centerline and plume edges
    r = df.radius.values
    x = df.x.values
    y = df.y.values
    x1 = x + r * ty
    y1 = y - r * tx
    x2 = x - r * ty
    y2 = y + r * tx

    plt.plot(
        x, y,
        color=ecolor,
        linewidth=2,
        label=f'{date[-8:-3]} Centerline',
    )
    plt.fill(
        list(x1) + list(reversed(x2)),
        list(y1) + list(reversed(y2)),
        color=fcolor,
        label=f'{date[-8:-3]} Extent',
    )

plt.xlabel('X distance from pipe outlet (m)')
plt.ylabel('Y distance from pipe outlet (m)')
plt.gca().set_aspect('equal')
plt.legend()
plt.tight_layout()
../../_images/main-12.png