We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cylinder_nektar_t0_vorticity.mat
I wanna to recreate the figure in: https://github.com/maziarraissi/PINNs/blob/master/main/continuous_time_identification%20(Navier-Stokes)/figures/NavierStokes_data.pdf
I can run the code to plot it successfully, the code is as follows:
###plot vorticity # Load Data data_vort = scipy.io.loadmat('../Data/cylinder_nektar_t0_vorticity.mat') x_vort = data_vort['x'] y_vort = data_vort['y'] w_vort = data_vort['w'] modes = np.asscalar(data_vort['modes']) nel = np.asscalar(data_vort['nel']) xx_vort = np.reshape(x_vort, (modes+1,modes+1,nel), order = 'F') yy_vort = np.reshape(y_vort, (modes+1,modes+1,nel), order = 'F') ww_vort = np.reshape(w_vort, (modes+1,modes+1,nel), order = 'F') box_lb = np.array([1.0, -2.0]) box_ub = np.array([8.0, 2.0]) fig, ax = newfig(1.0, 1.2) ax.axis('off') ####### Row 0: Vorticity ################## gs0 = gridspec.GridSpec(1, 2) gs0.update(top=1-0.06, bottom=1-2/4 + 0.12, left=0.0, right=1.0, wspace=0) ax = plt.subplot(gs0[:, :]) for i in range(0, nel): h = ax.pcolormesh(xx_vort[:,:,i], yy_vort[:,:,i], ww_vort[:,:,i], cmap='seismic',shading='gouraud', vmin=-3, vmax=3) divider = make_axes_locatable(ax) cax = divider.append_axes("right", size="5%", pad=0.05) fig.colorbar(h, cax=cax) ax.plot([box_lb[0],box_lb[0]],[box_lb[1],box_ub[1]],'k',linewidth = 1) ax.plot([box_ub[0],box_ub[0]],[box_lb[1],box_ub[1]],'k',linewidth = 1) ax.plot([box_lb[0],box_ub[0]],[box_lb[1],box_lb[1]],'k',linewidth = 1) ax.plot([box_lb[0],box_ub[0]],[box_ub[1],box_ub[1]],'k',linewidth = 1) ax.set_aspect('equal', 'box') ax.set_xlabel('$x$') ax.set_ylabel('$y$') ax.set_title('Vorticity', fontsize = 10) savefig("./figures/vorticity")
But the result is completely off-the-way!
Can anyone offer me some help?
The text was updated successfully, but these errors were encountered:
If I made changes in the above script:
changing
for i in range(0, nel): h = ax.pcolormesh(xx_vort[:,:,i], yy_vort[:,:,i], ww_vort[:,:,i], cmap='seismic',shading='gouraud', vmin=-3, vmax=3) divider = make_axes_locatable(ax) cax = divider.append_axes("right", size="5%", pad=0.05) fig.colorbar(h, cax=cax)
into
for i in range(0, nel): h = ax.pcolormesh(xx_vort[:,:,i], yy_vort[:,:,i], ww_vort[:,:,i], cmap='seismic',shading='gouraud', vmin=-3, vmax=3) # divider = make_axes_locatable(ax) # cax = divider.append_axes("right", size="5%", pad=0.05) fig.colorbar(h)
Then I can get the similar result, but the result is not exactly the same as the original one.
The original one:
The one made by me:
Sorry, something went wrong.
No branches or pull requests
I wanna to recreate the figure in: https://github.com/maziarraissi/PINNs/blob/master/main/continuous_time_identification%20(Navier-Stokes)/figures/NavierStokes_data.pdf
I can run the code to plot it successfully, the code is as follows:
But the result is completely off-the-way!
Can anyone offer me some help?
The text was updated successfully, but these errors were encountered: