Skip to content
Snippets Groups Projects
Select Git revision
  • Topic/1125-apiTokens
  • master default protected
  • gitkeep
  • Issue/2446-responsibleOrganizations
  • dev protected
  • Issue/2309-docs
  • Issue/2355-topLevelOrg
  • Issue/2412-gitlabDuplicatesinProjectQuotas
  • Issue/2287-guestRole
  • Issue/2364-testingKpiParser
  • Issue/2102-gitLabResTypeRCV
  • Issue/2278-gitlabToS
  • Issue/2284-dbLogIndex
  • Issue/5678-addingGuestRoleToRoles
  • Issue/2265-UpdatingS3EndpointUDE
  • Issue/XXXX-testingMigrationsTimestamp
  • Issue/2101-gitLabResTypeUi
  • Issue/1788-extractionCronjob
  • Issue/2222-resourceDateCreated
  • Issue/2221-projectDateCreated
  • Issue/1321-pidEnquiryOverhaul
  • v2.20.1
  • v2.20.0
  • v2.19.0
  • v2.18.0
  • v2.17.0
  • v2.16.0
  • v2.15.0
  • v2.14.0
  • v2.13.0
  • v2.12.0
  • v2.11.0
  • v2.10.0
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.0
  • v2.4.0
  • v2.3.0
  • v2.2.1
41 results

MigrationsTests.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    VisCompressibility.py 1.91 KiB
    '''
    Jan Habscheid
    Jan.Habscheid@rwth-aachen.de
    
    This script visualizes the incompressible solutions for the charge of the systema and the double layer capacity.
    '''
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    
    # Molarity
    
    # Load data
    data = np.load('../../Data/DoubleLayerCapacity/Compressibility.npz')
    
    Q = data['Q']
    C_DL = data['C_DL']
    y_A = data['y_A']
    y_C = data['y_C']
    y_S = data['y_S']
    phi_left = data['phi_left']
    phi_left_center = data['phi_left_center']
    n_sol = data['n_sol']
    K_vec = data['K_vec']
    
    
    # Charge
    plt.figure()
    [plt.plot(phi_left, Q[i], label=f'K = {K_vec[i]}') for i in range(len(K_vec))]
    plt.grid()
    plt.legend()
    plt.xlabel('$\delta \\varphi$ [-]')
    plt.ylabel('Q $[-]$')
    plt.tight_layout()
    plt.show()   
    
    # Double layer capacity
    plt.figure()
    [plt.plot(phi_left_center, C_DL[i], label=f'K = {K_vec[i]}') for i in range(len(K_vec))]
    plt.grid()
    plt.legend()
    plt.xlabel('$\delta \\varphi$ [-]')
    plt.ylabel('$C_{dl} [-]$')
    plt.tight_layout()
    plt.show()
    
    # y_alpha_L
    y_A_np, y_C_np, y_S_np = np.array(y_A), np.array(y_C), np.array(y_S)
    markers = ['--', '-', ':']
    colors = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple']
    
    n_sol_np = np.array(n_sol)
    n_A_np, n_C_np, n_S_np = y_A_np * n_sol_np, y_C_np * n_sol_np, y_S_np * n_sol_np
    plt.figure()
    clr = colors[0]
    for i in range(len(K_vec)):
        clr = colors[i]
        plt.plot(phi_left, n_A_np[i,:,0], '--', color=clr)
        plt.plot(phi_left, n_C_np[i,:,0], '-', color=clr)
        plt.plot(phi_left, n_S_np[i,:,0], ':', color=clr)
    dummy, = plt.plot(0, 0, color='grey', linestyle='--', label='$n_A$')
    dummy, = plt.plot(0, 0, color='grey', linestyle='-', label='$n_C$')
    dummy, = plt.plot(0, 0, color='grey', linestyle=':', label='$n_S$')
    for index, K_ in enumerate(K_vec):
        dummy, = plt.plot(0, 0, color=colors[index], linestyle='-', label=f'K = {K_}')
    plt.grid()
    plt.legend()
    plt.xlabel('$\delta \\varphi$ [-]')
    plt.ylabel('$n_\\alpha^L [-]$')
    plt.tight_layout()
    plt.show()