<jupyter_start><jupyter_text>1) Block velocities as a function of the attack angle for various wind velocities<jupyter_code>wmin = 4
wmax = 25
step = 2
fig, axs = plt.subplots(1, 2, sharex=True, sharey=True, figsize=(14, 5), gridspec_kw={'wspace': 0})

for w in range(wmin, wmax): 
    
    fig.suptitle("Block velocity after " + str(time) + " sec for various wind velocities")

    wdf = cdata.loc[cdata['Wind_x'] == float(w)]
    #print(wdf.head(4))
    axs[0].plot(wdf['Alpha'], wdf['V_block_fin'], label=str(w))
    plt.grid(b=True)

    wdf = sdata.loc[sdata['Wind_x'] == float(w)]
    wdf.head(2)
    axs[1].plot(wdf['Alpha'], wdf['V_block_fin'], label=str(w))
    axs[0].grid(b=True)

    axs[0].legend(title = r'Wind (m/s)', fontsize = legend_fs, loc='upper left', prop={"size":9})
    axs[0].set_ylabel('Block velocity (m/s)')
    #axs[0].set_xlim(0,20)

    axs[0].set_title("Cartesian")
    axs[1].set_title("Polar")
    
for ax in axs.flat:
    ax.set(xlabel='Attack angle ' + r'$\alpha$')
    ax.set_xticks(alphas)
    
#plt.savefig('Images/vblock_cart-pol.png')<jupyter_output><empty_output><jupyter_text>a) Cartesian coordinates<jupyter_code>fig, axs = plt.subplots(1, 1, figsize=(11,8), gridspec_kw={'wspace': 0})

for w in range(wmin, wmax, step): 
    wdf = cdata.loc[cdata['Wind_x'] == float(w)]
    axs.plot(wdf['Alpha'], wdf['V_block_fin'], label=str(w))
    axs.set_ylabel('Block velocity (m/s)', fontsize=fs+3)
    axs.set_xlabel('Attack angle ' + r'$\alpha$', fontsize=fs+3)
    axs.set_title("Block velocity after "+ str(int(time)) + " for various wind velocities", fontsize=title_fs)
    leg = axs.legend(title = r'Wind (m/s)', fontsize = legend_fs, loc='upper left')
    axs.set_xlim(-8,20)
    axs.tick_params(axis='both', labelsize=ticks_fs)
    leg.get_title().set_fontsize(ticks_fs)
    axs.set_xticks([-8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])
    plt.grid(b=True)
    
    
#plt.savefig('Images/vblock_alpha_cartesian.png')<jupyter_output><empty_output><jupyter_text>b) Polar coordinates for w in range(wmin, wmax, step):     wdf = sdata.loc[cdata['Wind_x'] == float(w)]    plt.plot(wdf['Alpha'], wdf['V_block_fin'], label=str(w))    plt.ylabel('Block velocity (m/s)', fontsize=fs)    plt.xlabel('Attack angle ' + r'$\alpha$', fontsize=fs)    plt.title("Block velocity after 300 sec for various wind velocities")    plt.legend(title = 'Wind (m/s)', fontsize = legend_fs, loc='upper left')    plt.grid(b=True)  2) Kite relative velocity as a function of wind velocities for various alpha<jupyter_code>fig, axs = plt.subplots(1, 2, sharex=True, sharey=True, figsize=(14, 5), gridspec_kw={'wspace': 0})

for i, angle in enumerate(alphas): 
    
    fig.suptitle("Kite relative velocity after " + str(time) + " sec for various attack angles")
    
    wdfc = cdata.loc[cdata['Alpha'] == angle]

    axs[0].plot(wdfc['Wind_x'], wdfc['Vrelx'], label=r'$\alpha$='+str(angle))
    plt.grid(b=True)
    
    wdfs = sdata.loc[sdata['Alpha'] == angle]
    axs[1].plot(wdfs['Wind_x'], wdfs['Vrelx'], label=r'$\alpha$='+str(angle))
    axs[0].grid(b=True)
    
    axs[0].legend(title = r'Attack angles', fontsize = legend_fs, loc='upper left', prop={"size":9})
    axs[0].set_ylabel(r'V$_{REL}$ (m/s)')
    
    axs[0].set_title("Cartesian")
    axs[1].set_title("Polar")
    
for ax in axs.flat:
    ax.set(xlabel='Wind velocity (m/s)')
    
#plt.savefig('Images/vrel_wind_negative_pi4.png')
fig, axs = plt.subplots(1, 1, figsize=(11,8), gridspec_kw={'wspace': 0})

for i, angle in enumerate(alphas): 
    
    wdfc = cdata.loc[cdata['Alpha'] == angle]
    axs.plot(wdfc['Wind_x'], wdfc['Vrelx'], label=r'$\alpha$='+str(angle))
    axs.set_ylabel(r'V$_{REL}$ (m/s)', fontsize=fs+3)
    axs.set_xlabel('Wind velocity (m/s)', fontsize=fs+3)
    #axs.set_title("Kite relative velocity after " + str(time) + " sec for various attack angles", fontsize=title_fs)
    leg = axs.legend(title = r'Attack angles', fontsize = 12,loc='lower left',framealpha=1)
    
    axs.set_xlim(0,38)
    axs.tick_params(axis='both', labelsize=ticks_fs)
    leg.get_title().set_fontsize(ticks_fs)
    #axs.set_xticks([-8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])
    plt.grid(b=True)
    
    
plt.savefig('Images/vrel_wind_cartesian1.png', dpi=300)
fig, axs = plt.subplots(1, 2, sharex=True, sharey=True, figsize=(14, 5), gridspec_kw={'wspace': 0})

for w in range(wmin, wmax, step): 
    
    fig.suptitle("Kite relative velocity after " + str(time) + " sec for various winds and attack angles")
    
    wdfc = cdata.loc[cdata['Wind_x'] == float(w)]
    axs[0].plot(wdfc['Alpha'], wdfc['Vrelx'], label=str(w))
    plt.grid(b=True)
    
    wdfs = sdata.loc[sdata['Wind_x'] == float(w)]
    axs[1].plot(wdfs['Alpha'], wdfs['Vrelx'], label=str(w))
    axs[0].grid(b=True)
    
    axs[0].legend(title = r'Wind (m/s)', fontsize = legend_fs, loc='upper left', prop={"size":9})
    axs[0].set_ylabel(r'V$_{REL}$ (m/s)')
    
    axs[0].set_title("Cartesian")
    axs[1].set_title("Polar")
    
for ax in axs.flat:
    ax.set(xlabel='Attack angle ' + r'$\alpha$')
    
#plt.savefig('Images/vrel_alpha_negative_pi4.png')
fig, axs = plt.subplots(1, 1, figsize=(11,8), gridspec_kw={'wspace': 0})

for w in range(wmin, wmax, step): 
    
    wdfc = cdata.loc[cdata['Wind_x'] == float(w)]
    axs.plot(wdfc['Alpha'], wdfc['Vrelx'], label=str(w))
    axs.set_ylabel(r'V$_{REL}$ (m/s)', fontsize=fs)
    axs.set_xlabel('Attack angle ' + r'$\alpha$', fontsize=fs)
    axs.set_title("Kite relative velocity after " + str(time) + " sec for various winds and attack angles", fontsize=title_fs)
    leg = axs.legend(title = r'Attack angles', fontsize = legend_fs, loc='lower left', bbox_to_anchor=(1, 0))
    axs.set_xlim(-8,20)
    axs.tick_params(axis='both', labelsize=ticks_fs)
    leg.get_title().set_fontsize(ticks_fs)
    fontP = FontProperties()
    fontP.set_size('small')
    axs.set_xticks([-8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])
    plt.grid(b=True)
    
    
#plt.savefig('Images/vrel_alpha_cartesian.png')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19328284491274283, 'fraction_numerical': 0.02667105696410932, 'mean_word_length': 4.259740259740259, 'pattern_counts': {'":': 3, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '495392', 'license': 'MIT', 'n_tokens_mistral': 2643, 'n_tokens_neox': 2503, 'n_words': 458, 'path': 'Dynamics-Analysis/Motion-analysis2d.ipynb', 'repo_name': 'jb41/kite-power', 'size': '6074'}