Exemple #1
0
# In[3]:

f = sa.fluid(option)
f.diff_matrix()
f.set_couette()
f.integ_matrix()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum('cont')
f.solve_eig_adj()

f.save_sim('cou_cont')

# In[4]:

v = po.viz('cou_cont.npz')
v.plot_velocity()
v.plot_spectrum()

# In[5]:
# 56 62 73
om = sn.sensitivity('cou_cont.npz', 73)
a, b, c, d = om.c_per(obj='norm')
print(a, b, c, d)

#om.sens_spectrum('ke_cd_N001_puv.png', 1e-7, 1e-4, 189, obj='u', shape='gauss') # eps, gamma
om.validation(1, 1e-7, 1e-4, 69, 'gauss')
Exemple #2
0
#f.interpolate()

# f.infinite_mapping()
# f.set_hyptan()
# f.set_poiseuille()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum_v_eta('disc')
f.solve_eig_adj()

f.save_sim('200_puv_disc')
#f.check_adj()

v = po.viz('200_puv_disc.npz')
v.plot_velocity()
v.plot_spectrum()
#  f.omega_alpha_curves(0.0001,2,5

idx = np.argmax(np.imag(f.eigv))
om = sn.sensitivity('200_puv_disc.npz', idx)
om.c_per(obj='norm')

#om.sens_spectrum('ke_cd_N001_puv.png', 1e-3, 1e-2, obj='u', shape='sin') # eps, gamma
#om.validation(1, 1e-2, 1, 17, 'tanh')
"""
# PROCEDURE TO ANALYZE THE SINGLE MODES IN THE SPECTRUM
# it needs to be implemented in the "fluid" class and generalyzed in the
# interface
f = sa.fluid(option)
f.diff_matrix()
f.set_couette()
f.integ_matrix()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum('cont')
f.solve_eig_adj()

f.save_sim('cou_cont')


# In[4]:

v = po.viz('cou_cont.npz')
v.plot_velocity()
v.plot_spectrum()


# In[5]:
# 56 62 73
om = sn.sensitivity('cou_cont.npz', 73)
a, b, c, d = om.c_per(obj='norm')
print (a, b, c,d)

#om.sens_spectrum('ke_cd_N001_puv.png', 1e-7, 1e-4, 189, obj='u', shape='gauss') # eps, gamma
om.validation(1, 1e-7, 1e-4, 69, 'gauss')
Exemple #4
0
# f.set_hyptan()
# f.set_poiseuille()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum('cont')
f.solve_eig_adj()


file_name = option['flow'][-5]+"_"+str(option['Re'])

f.save_sim(file_name)
#f.check_adj()


v = po.viz(file_name)
v.plot_velocity()
v.plot_spectrum()

#f.omega_alpha_curves(0.1, 1, 20, 0.9, 1.1, 'G_RE_1e5')

idx = np.argmax(np.imag(f.eigv))
om = sn.sensitivity(file_name, idx, show_f=False)
a, b, c, d, e, g= om.c_per(obj='norm')
print (a, b, c,d, e, g)

f.omega_alpha_curves(0.1, 1, 20, 0.5, 1.4, name_file=file_name)
#om.sens_spectrum('ke_cd_N001_puv.png', 1e-7, 1e-4, 189, obj='u', shape='gauss') # eps, gamma
#om.validation(1, 1e-7, 1e-4, idx, 'gauss')
Exemple #5
0
f = sa.fluid(option)
f.diff_matrix()
f.set_couette()
f.integ_matrix()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum_v_eta('disc')
f.solve_eig_adj()

f.save_sim('cou_disc')
f.check_adj()

# In[13]:

v = po.viz('cou_disc.npz')
v.plot_velocity()
v.plot_spectrum()

# In[14]:

om = sn.sensitivity(0.00001, 'cou_disc.npz', 378)
#om.u_pert(0.4, 0.2)
#om.cd_pert(0.5, 0.1)
#om.c_per()

#om.sens_spectrum('ke_u_N01_ve.png', per_variab='u')
om.validation(0, 0.01, 378)
Exemple #6
0
f.diff_matrix()
f.set_couette()
f.integ_matrix()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum_v_eta('disc')
f.solve_eig_adj()

f.save_sim('cou_disc')
f.check_adj()


# In[13]:

v = po.viz('cou_disc.npz')
v.plot_velocity()
v.plot_spectrum()


# In[14]:

om = sn.sensitivity(0.00001, 'cou_disc.npz', 378)
#om.u_pert(0.4, 0.2)
#om.cd_pert(0.5, 0.1)
#om.c_per()

#om.sens_spectrum('ke_u_N01_ve.png', per_variab='u')
om.validation(0, 0.01, 378)
Exemple #7
0
# f.infinite_mapping()
# f.set_hyptan()
# f.set_poiseuille()

f.set_operator_variables()

f.solve_eig()
f.adjoint_spectrum_v_eta('disc')
f.solve_eig_adj()

f.save_sim('200_puv_disc')
#f.check_adj()


v = po.viz('200_puv_disc.npz')
v.plot_velocity()
v.plot_spectrum()
#  f.omega_alpha_curves(0.0001,2,5

idx = np.argmax(np.imag(f.eigv))
om = sn.sensitivity('200_puv_disc.npz', idx)
om.c_per(obj='norm')

#om.sens_spectrum('ke_cd_N001_puv.png', 1e-3, 1e-2, obj='u', shape='sin') # eps, gamma
#om.validation(1, 1e-2, 1, 17, 'tanh')




"""