Exemple #1
0
def plot_sector_solution():

    # creating material
    my_material = amfe.KirchhoffMaterial(E=210.0E9, nu=0.3, rho=7.86E3, plane_stress=True, thickness=1.0)

    my_system1 = amfe.MechanicalSystem()
    my_system1.set_mesh_obj(m2)
    my_system1.set_domain(1,my_material)

    my_system2 = amfe.MechanicalSystem()
    my_system2.set_mesh_obj(m3)
    my_system2.set_domain(11,my_material)

    manager = K_feti_obj.manager
    v_dict = manager.vector2localdict(Vp,manager.global2local_primal_dofs)
    p0 = 10.0
    u1=p0*v_dict[1]
    u2=p0*v_dict[2]
    my_system1.u_output = list(u1.T)
    my_system2.u_output = list(u2.T)

    fig, ax1_list = plt.subplots(3,3,figsize=(10,10))
    counter = 0
    delta_ = 1.0
    for ax_ij in ax1_list:
        for ax2 in ax_ij:
            amfe.plot_2D_system_solution(my_system1,u_id=(counter),ax=ax2)
            amfe.plot_2D_system_solution(my_system2,u_id=(counter),ax=ax2)
            ax2.set_aspect('equal')
            ax2.set_xlabel('Width [m]')
            ax2.set_ylabel('Heigh [m]')
            ax2.set_title('Mode id = %i' %(counter+1) )
            counter+=1
    plt.legend('off')
    plt.tight_layout()
Exemple #2
0
def plot6(f):
    fig1, ax1_list = plt.subplots(3,3,figsize=(10,5))
    counter = 0
    delta_ = 1.0
    for ax_ij in ax1_list:
        for ax2 in ax_ij:
            amfe.plot_2D_system_solution(my_system1,u_id=(nmodes - 1 - counter),ax=ax2,factor=f)
            ax2.set_aspect('equal')
            ax2.set_xlabel('Width [m]')
            ax2.set_ylabel('Heigh [m]')
            ax2.set_title('Mode id = %i' %(counter+1) )
            counter+=1
    plt.legend('off')
Exemple #3
0
def plot_sector_solution():
    fig, ax1_list = plt.subplots(3, 3, figsize=(10, 10))
    counter = 0
    delta_ = 1.0
    for ax_ij in ax1_list:
        for ax2 in ax_ij:
            amfe.plot_2D_system_solution(my_system1, u_id=(counter), ax=ax2)
            amfe.plot_2D_system_solution(my_system2, u_id=(counter), ax=ax2)
            ax2.set_aspect('equal')
            ax2.set_xlabel('Width [m]')
            ax2.set_ylabel('Heigh [m]')
            ax2.set_title('Mode id = %i' % (counter + 1))
            counter += 1
    plt.legend('off')
    plt.tight_layout()
Exemple #4
0
def plot_solution():
    fig, ax1_list = plt.subplots(3,3,figsize=(20,20))
    counter = 0
    delta_ = 1.0
    for ax_ij in ax1_list:
        for ax2 in ax_ij:
            for i,sys in sys_dict.items():
                amfe.plot_2D_system_solution(sys,u_id=(counter),ax=ax2,factor=20)
            
            ax2.set_aspect('equal')
            ax2.set_xlabel('Width [m]')
            ax2.set_ylabel('Heigh [m]')
            ax2.set_title('Mode id = %i' %(counter+1) )
            counter+=1
    plt.legend('off')
    plt.tight_layout()
Exemple #5
0
# In[6]:

feti_obj = SerialFETIsolver(K_dict, B_dict, f_dict, tolerance=1.0e-6)
solution_obj = feti_obj.solve()
u_dict = solution_obj.u_dict

for i, sysi in enumerate(system_list):
    sysi.u_output = [u_dict[i + 1]]

# In[7]:

p0 = 1
fig, ax2 = plt.subplots(1, 1, figsize=(10, 3))
for i, sysi in enumerate(system_list):
    amfe.plot_2D_system_solution(sysi, u_id=0, ax=ax2, factor=p0)

delta_ = 1.5
ax2.set_xlim([-delta_, (2.0 + delta_) * width])
ax2.set_ylim([-delta_ * 3, (1.0 + delta_) * heigh])
ax2.set_aspect('equal')
ax2.set_xlabel('Width [m]')
ax2.set_ylabel('Heigh [m]')
plt.title('Static Problem')
plt.legend('off')
plt.show()

# # Solving Hybrid Eigen-problem
#
# $$
# \begin{bmatrix}