Extract node displacements of a named selection in Ansys Motion

computatorer
computatorer Member Posts: 2
Name Dropper First Comment
**

I want to get node displacement values from an Ansys Motion analysis and export them. I have already looked at some similar posts on this forum about this, but can't seem to make it work.

I modified the code in this discussion to successfully get displacements of a single node with mechanical scripting.

I want to use a named selection to do this for multiple nodes but I can't seem to manage to do it. I tried using dpf.operators.scoping.on_named_selection() but I get an error "
U:19<-scoping_provider_by_ns:18<-requested result not found" when trying to use this scoping in dpf.operators.result.displacement(). If I open the solution worksheet there are no named selections listed under Solver Component Names - is this the source of this issue? Is there a solution/workaround? If it's not possible to use named selection can I at least somehow export displacements of all nodes?

Is there perhaps a better way to obtain the displacements I want? Thank you!

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭

    Hi @computatorer My two cents, as I have no experience with Motion and only with Mechanical. The named selection needs to get written to the result file to be usable in DPF. That means that you'll have to click the option that the NS is sent to the solver and to re-run the model. To make sure the .rst from the previous run is deleted, you might want to close Mechanical and then reopen and clear generated data before solving again. Also, names of named selections get written to the solver with capital letters, always, so to use your NS in DPF you'll have to use capital letters too.

  • computatorer
    computatorer Member Posts: 2
    Name Dropper First Comment
    **

    @Pernelle Marone-Hitz said:
    Hi @computatorer My two cents, as I have no experience with Motion and only with Mechanical. The named selection needs to get written to the result file to be usable in DPF. That means that you'll have to click the option that the NS is sent to the solver and to re-run the model. To make sure the .rst from the previous run is deleted, you might want to close Mechanical and then reopen and clear generated data before solving again. Also, names of named selections get written to the solver with capital letters, always, so to use your NS in DPF you'll have to use capital letters too.

    Thank you for your reply! I am aware of the fact it needs to get sent to the solver and use capital letters. I have all the appropriate options set. I am relatively new to Motion too and it seems it operates differently to Mechanical in this regard