Beispiel #1
0
ax.grid()
if I > 1:
    ax.set_xscale('log')
    ax.set_yscale('log')

if I == 0:
    # x = We ** aWe / Ca ** aCa
    ax.set_xlabel(r'$We^{{{0:0.3f}}} Ca^{{{1:0.3f}}}$'.format(aWe, -aCa))
if I == 1:
    # x = We ** aWe * Re ** aRe
    ax.set_xlabel(r'$We^{{{0:0.3f}}} We^{{{1:0.3f}}}$'.format(aWe, aRe))
elif I == 2:
    # x = St ** aSt * (Ca ** aCa * c1 + c2)
    ax.set_xlabel(r'$St^{{{0:0.3f}}} Ca^{{{1:0.3f}}}$'.format(aSt, aCa))
elif I == 3:
    # x = Re * St ** aSt / We ** aWe
    ax.set_xlabel(r'$St^{{{0:0.3f}}} We^{{{1:0.3f}}} Re$'.format(aSt, -aWe))

fig.suptitle('C' + repr(I + 1))
plt.subplots_adjust(top=0.8)
ax.plot(x, y, color='black')
plt.savefig('validationData/plots/C' + repr(I + 1) + '.pgf',
            bbox_inches='tight')

figLegend = pylab.figure(figsize=(1.8, 0.3))
pylab.figlegend(*ax.get_legend_handles_labels(), loc='upper left')
plt.savefig('validationData/plots/legend.pgf', bbox_inches='tight')

plt.show()
Beispiel #2
0
coalBreak = np.where(abs(Q - gamma) == coalBreak_val)
x[0] = v[coalBreak]
y[0] = Q[coalBreak]

escapeBreak_val = min(abs(escape - gamma)[:-1])
escapeBreak = np.where(abs(escape - gamma) == escapeBreak_val)
x[1] = v[escapeBreak]
y[1] = gamma[escapeBreak]

escapeCoal_val = min(abs(escape - Q)[:-1])
escapeCoal = np.where(abs(escape - Q) == escapeCoal_val)
x[2] = v[escapeCoal]
y[2] = Q[escapeCoal]

ax.plot(
    x / v0, y, 's', color='black')
ax.text(x[0] / v0, y[0] * 1.15, '3')
ax.text(x[1] / v0, y[1] * 1.15, '1')
ax.text(x[2] / v0, y[2] * 1.15, '2')

ax.legend(loc='best')
ax.set_xlim(0.5, 1.7)
ax.set_ylim(0.0, 0.013)
ax.set_xlabel(r'$v/v_0$')
ax.set_ylabel('rate [1/s]')
plt.yticks([one_over_theta], [r"$\frac{1}{\theta}$"])
plt.tick_params(
    axis='x', which='both', bottom='off', top='off', labelbottom='off')
plt.savefig('validationData/plots/rates.pgf', bbox_inches='tight')
plt.show()
Beispiel #3
0
import numpy as np
from aux import plt, set_plt_params

set_plt_params()
fig = plt.figure()
ax = fig.gca()


dExp = np.loadtxt('validationData/comparison/dExp.txt') * 1e03
dNum = np.loadtxt('validationData/comparison/dNum.txt') * 1e03
x = np.linspace(0, 10)

ax.plot(dExp, dNum, 'ok')

line, = ax.plot(x, 1.1 * x, '--k', linewidth=0.5)
line, = ax.plot(x, 0.9 * x, '--k', linewidth=0.5)

line, = ax.plot(x, 1.2 * x, ':k', linewidth=0.25)
line, = ax.plot(x, 0.8 * x, ':k', linewidth=0.25)

line, = ax.plot(dExp, dExp, 'k')

ax.set_xlim(0, 1.5)
ax.set_ylim(0, 1.5)
ax.set_ylabel('d (numerical) [mm]')
ax.set_xlabel('d (experimental) [mm]')
fig.patch.set_alpha(0)
plt.savefig('validationData/plots/comparison.pgf', bbox_inches='tight')
Beispiel #4
0
import numpy as np
from aux import plt, set_plt_params

set_plt_params()
fig = plt.figure()
ax = fig.gca()

dExp = np.loadtxt('validationData/comparison/dExp.txt') * 1e03
dNum = np.loadtxt('validationData/comparison/dNum.txt') * 1e03
x = np.linspace(0, 10)

ax.plot(dExp, dNum, 'ok')

line, = ax.plot(x, 1.1 * x, '--k', linewidth=0.5)
line, = ax.plot(x, 0.9 * x, '--k', linewidth=0.5)

line, = ax.plot(x, 1.2 * x, ':k', linewidth=0.25)
line, = ax.plot(x, 0.8 * x, ':k', linewidth=0.25)

line, = ax.plot(dExp, dExp, 'k')

ax.set_xlim(0, 1.5)
ax.set_ylim(0, 1.5)
ax.set_ylabel('d (numerical) [mm]')
ax.set_xlabel('d (experimental) [mm]')
fig.patch.set_alpha(0)
plt.savefig('validationData/plots/comparison.pgf', bbox_inches='tight')
Beispiel #5
0
if I == 0:
    # x = We ** aWe / Ca ** aCa
    ax.set_xlabel(
        r'$We^{{{0:0.3f}}} Ca^{{{1:0.3f}}}$'.format(aWe, -aCa))
if I == 1:
    # x = We ** aWe * Re ** aRe
    ax.set_xlabel(
        r'$We^{{{0:0.3f}}} We^{{{1:0.3f}}}$'.format(aWe, aRe))
elif I == 2:
    # x = St ** aSt * (Ca ** aCa * c1 + c2)
    ax.set_xlabel(
        r'$St^{{{0:0.3f}}} Ca^{{{1:0.3f}}}$'.format(aSt, aCa))
elif I == 3:
    # x = Re * St ** aSt / We ** aWe
    ax.set_xlabel(
        r'$St^{{{0:0.3f}}} We^{{{1:0.3f}}} Re$'.format(aSt, -aWe))


fig.suptitle('C' + repr(I + 1))
plt.subplots_adjust(top=0.8)
ax.plot(x, y, color='black')
plt.savefig(
    'validationData/plots/C' + repr(I + 1) + '.pgf', bbox_inches='tight')

figLegend = pylab.figure(figsize=(1.8, 0.3))
pylab.figlegend(*ax.get_legend_handles_labels(), loc='upper left')
plt.savefig('validationData/plots/legend.pgf', bbox_inches='tight')

plt.show()
Beispiel #6
0
ct_data = dict([(
    c, genfromtxt(
        '../kernel_identification/validationData/coulaloglou/d32_N_alpha{0}.txt'.format(c)))
    for c in concentrations])

set_plt_params(relative_fig_width=0.8)
fig = plt.figure()
ax = fig.gca()
ax.set_xlabel(r'$N^*$ [rpm]')
ax.set_ylabel(r'$d_{32}$ [mm]')

marker = itertools.cycle(('s', 'v', 'o'))
for c in concentrations:
    plt.plot(
        ct_data[c][:, 0], ct_data[c][:, 1],
        marker=next(marker), linestyle='',
        label=r'C\&T $\phi={0:0.2f}$'.format(c / 100.))

for c in concentrations:
    plt.plot(
        Ns * 60, [cts.d32 * 10 for cts in ct_solutions[c]],
        label=r'Num. $\phi={0:0.2f}$'.format(c / 100.))

handles, labels = ax.get_legend_handles_labels()
first_legend = plt.legend(handles[3:], labels[3:], loc='upper right')
ax = plt.gca().add_artist(first_legend)
plt.legend(handles[:3], labels[:3], loc='lower left')
fig.patch.set_alpha(0)
plt.savefig("ct-fig3.pgf", bbox_inches='tight')