i want to plot the vélocity profile of a function
i have used this code:
‘’‘ux=np.array([u([11,-0.4])[0], u([11,-0.35])[0], u([11,-0.3])[0], u([11,-0.25])[0], u([11,-0.2])[0], u([11,-0.15])[0],
u([11,-0.1])[0], u([11,-0.05])[0], u([11,0.0])[0],
u([11,0.05])[0], u([11,0.1])[0],u([11,0.15])[0], u([11,0.2])[0], u([11,0.25])[0],
u([11,0.3])[0], u([11,0.35])[0], u([11,0.4])[0]])’’’
Is there a simpliest way to write ux?
As you have created a numpy array you can use matplotlib.
However, you can export the function to paraview with XDMFFile.write_checkpoint you can visualize the velocity field at every degree of freedom.
tahnks for you answer.
everything is okay now