Skip to content
New issue

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

Getting the limit values from color bar in animate_nodal_displacement #133

Open
LetoTheJust opened this issue May 20, 2022 · 0 comments
Open

Comments

@LetoTheJust
Copy link

LetoTheJust commented May 20, 2022

Hello,
I am trying to automate postprocessing of cyclic model. I stumbled into following problems:

  1. I would like to animate multiple mode shapes, one after another, but each requires different displacement_factor. Can I somehow get the maximum on the colorbar so I could use that value as basis for parametric displacement factor?
  2. Some of my models are not modelled in CSYS=1. Is there some way to select CSYS when importing the model?
  3. How can I get for the plot the cpos values? I tried return_cpos=True but am getting an error: TypeError: "return_cpos" is an invalid keyword argument for add_mesh.

Example of my code:

from ansys.mapdl import reader as pymapdl_reader
example_path = 'C:/Users/212421348/Documents/modal.rst'
rst = pymapdl_reader.read_binary(example_path)

rst.plot(background="w",show_edges=False)

rst.plot_nodal_solution((1, 1), comp='norm', stitle='USUM',
                        background="w",show_edges=False, cmap='turbo',
                        text_color="k")

for i in range(0,int(rst.harmonic_indices.shape[0]/2)):
    step = 1
    substep = 2*i+1
    mode =  i+1
    rst.nodal_solution((2, 1))
    _ = rst.animate_nodal_displacement((step, substep), displacement_factor=0.25,text_color="k", cmap='turbo',
                                      n_frames=30, show_axes=True, background='w', stitle='Mode {0}'.format(mode),
                                      loop=False, add_text=False,
                                      movie_filename='EO{0}_Mode{1}.gif'.format(step,mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant