Chapter P48 - Q3. Temperature fluctuation at ground surface

A sinuoidal temp. variation at ground surface given as

$$temp = A e^{-a x} sin(\omega t - a x )$$

Given the envelopes of this fluctuation and show the wave in the aquifer at a number of times using the following variable values:

$\lambda_w = 0.6 \, W/m/K$

$\lambda_g = 3.0 \, W/m/K$

$\epsilon = 0.35$

$A = 10 \, ^oC$

$\omega = 365 / (2 \pi) \, d^{-1}$

$ c_w = 4.2\times 10^3 \, J/kg$

$ c_g = 0.8\times 10^3 \, J/kg$

$ \rho_w = 1000\, kg/m^3$

$ \rho_g = 2650\, kg/m^3$


In [1]:
import numpy as np
import matplotlib.pyplot as plt

In [32]:
# define the variables and their values
T        =  360 # [d] cycle time
secperday= 3600 * 24
omega    = 2 * np.pi / T  # [1/d]
lambda_w =  0.6 * secperday # J/day/m/K
lambda_g =  3.0 * secperday # J/day/m/K
eps      = 0.35 # [-]
rho_w    = 1000 # kg/m3
rho_g    = 2650 # kg/m3
c_w      = 4200 # J/kg
c_g      =  800 # J/kg
A        = 10  # K

z    = np.linspace(0, 30, 301)  # m, choose values to compute and show
time = np.linspace(0, 360, 13)

In [33]:
lamb = lambda_w * eps + lambda_g * (1 - eps)           # [-]
rhoc = rho_w * c_w * eps + rho_g * c_g * (1 - eps)
a     = np.sqrt(omega / 2 * rhoc / lamb)

env1  = +A * np.exp(-a * z)  # top envelope
env2  = -A * np.exp(-a * z)  # bottom envelop

# Setting up a nice plot
plt.title('Temperature fluctation at z=0')
plt.xlabel('$Temp$ [m]')
plt.ylabel('$z$ [m]')
plt.ylim((15, 0))
plt.grid()


# plot the envelopes
plt.plot(env1, z, 'b', label='top envelope')
plt.plot(env2, z, 'b', label='botom envelope')

# do for each time, plot a wave
for t in time:
    temp = A * np.exp(-a * z) * np.sin(omega * t - a * z)
    plt.plot(temp, z, label='t = {:.2f}'.format(t))

plt.legend(loc='best')
plt.show()



In [22]:
time


Out[22]:
array([   0.,   30.,   60.,   90.,  120.,  150.,  180.,  210.,  240.,
        270.,  300.,  330.,  360.])

In [ ]: