Exemple #1
0
plt.ylabel('Pressure [dB]')
plt.xlim(0, 250)
plt.grid(True)

plt.tight_layout()
plt.show()

column = 3

pressures, _, _, _ = get_acoustic_response(mesh, direct, column)

plot_results(mesh,
             pressures,
             out_OpenPulse=True,
             Acoustic=True,
             Show_nodes=True,
             Undeformed=False,
             Deformed=False,
             Animate_Mode=True,
             Save=False)

#%%
## Structural Coupled ##
mesh.set_prescribed_DOFs_BC_by_node([1136, 1236, 1086], np.zeros(6))

mesh.add_spring_to_node([427], 1 * np.array([1e9, 1e9, 1e9, 0, 0, 0]))
mesh.add_mass_to_node([204], 0 * np.array([80, 80, 80, 0, 0, 0]))
mesh.add_damper_to_node([342], 0 * np.array([1e3, 1e3, 1e3, 0, 0, 0]))

solution_structural = SolutionStructural(mesh, acoustic_solution=direct)
modes = 200
Exemple #2
0
    global_damping=global_damping)
tf = time()
print('Structural direct solution time:', (tf - t0), '[s]')
column = 50

_, coord_def, _, _ = get_structural_response(preprocessor,
                                             direct_structural,
                                             column,
                                             Normalize=False)

solution_structural.stress_calculate(global_damping,
                                     pressure_external=0,
                                     damping_flag=False)
stress_data = get_stress_data(solution_structural.preprocessor,
                              column,
                              real=True)
stress_plot = stress_data[:, [0, 2]]

print("Value min: ", np.min(stress_plot[:, 1]))
print("Value max: ", np.max(stress_plot[:, 1]))
plot_results(preprocessor,
             coord_def,
             data_stress=stress_plot,
             scf=0.20,
             out_OpenPulse=True,
             Show_nodes=False,
             Undeformed=False,
             Deformed=True,
             Animate_Mode=False,
             Save=False)