Inclined heavy jet¶
An inclined jet of salty water enters an environment of
stagnant freshwater.
The config.toml file looks like this:
# Characteristics of the pipe and the effluent flow
[pipe]
time = [1970-01-01]
flow = [0.2]
temp = [10]
salt = [34]
diam = [0.5]
depth = [100]
decline = [-45]
# Characteristics of the ambient water masses
[ambient]
time = [1970-01-01]
depth = [100]
coflow = [[0]]
crossflow = [[0]]
temp = [[10]]
salt = [[0]]
# Output options
[output]
csv.file = "out.csv"
csv.float_format = "%.5g"
trajectory.step = 5 # Time between trajectory points [s]
trajectory.stop = 30 # Time of final trajectory point [s]
release.start = 1970-01-01 # Time of first release [date]
release.stop = 1970-01-01 # 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,salt,temp,dilution
1970-01-01,0,0,0,100,0.72025,0,-0.72025,1026.6,0.25,34,10,1
1970-01-01,5,2.1376,0,98.862,0.32122,0,-0.00070463,1011.8,0.67232,14.945,10,2.2807
1970-01-01,10,3.4306,0,99.418,0.19847,0,0.19757,1007.3,0.9181,9.1932,10,3.7079
1970-01-01,15,4.1982,0,100.62,0.11772,0,0.27197,1004.4,1.1626,5.4368,10,6.2919
1970-01-01,20,4.6772,0,102.05,0.078137,0,0.29239,1003,1.4181,3.6034,10,9.5607
1970-01-01,25,5.0094,0,103.52,0.056756,0,0.29447,1002.2,1.6745,2.6155,10,13.208
1970-01-01,30,5.2581,0,104.99,0.043701,0,0.29094,1001.7,1.9271,2.0129,10,17.162
We plot the centerline and plume boundary using matplotlib
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv("out.csv")
# Compute tangent vector
vel = np.sqrt(df.u.values**2 + df.w.values**2)
tx = df.u.values / vel
tz = df.w.values / vel
# Compute plume boundaries
x1 = df.x.values - df.radius.values * tz
x2 = df.x.values + df.radius.values * tz
z1 = -df.z.values - df.radius.values * tx
z2 = -df.z.values + df.radius.values * tx
x = np.concatenate([x1, np.flip(x2)])
z = np.concatenate([z1, np.flip(z2)])
# Generate figure
plt.plot(df.x.values, -df.z.values, color='k', linewidth=2, label='Centerline')
plt.fill(x, z, edgecolor='k', linewidth=.5, facecolor="#e0e0e0", label='Plume extent')
plt.xlabel('Distance from pipe outlet (m)')
plt.ylabel('Depth below surface (m)')
plt.gca().set_aspect('equal')
plt.legend(loc='lower left')
plt.tight_layout()