General Mechanical

General Mechanical

Accessing nodal displacement information of previous sub-steps in Mechanical using APDL snippets.

    • kishenharidas
      Subscriber

      Hello,

      i am working on a transient cutting simulation of a tooltip of a where the cutting force is input as a function using APDL command block. My current transient simulation setting are as follows:

      1. Total number of loadsteps = 3
      2. Time at the end of load step = 1s
      3. time step = 0.1 s
      4. Total number of substeps for each load steps = 10

      Now, the issue I have here is that, I have a condition where a constant load is applied for the first 3 substeps of the simulation and I am plotting the nodal displacements at the named -selection 'cutting point' as my solution results. And for the subsequent application of force from substep number 4, I have to use the solved nodal displacements of those previous 3 substeps. Below are the following commands I have used to call and store the nodal displacement of the previous substeps. However, with these set of commands, the first load step is being solved properly, but for the calculation of the subsequent load steps are not happening. The solver is going back to load step 1 and starting the solution again.


      Commands used.

      {

      *GET,cut_deformation,node,226,U,Y ! get node displacement - Calling and storing the nodal displacement of the current substep

      *GET,timeident,active,0,set,time ! get solution time

      *Get,time_step,active,0,solu,dtime ! get time step size

      /Post1

      !!! To retrieve nodal displacement of the substep n-1

      SET,,,,,timeident-time_step

      *GET,cutdeform1,node,226,U,Y

      !!! To retrieve nodal displacement of the substep n-2

      SET,,,,,timeident-(2*time_step)

      *GET,cutdeform2,node,226,U,Y

      !!! To retrieve nodal displacement of the substep n-3

      SET,,,,,timeident-(3*time_step)

      *GET,cutdeform3,node,226,U,Y

      }

      Is the above usage of SET command right? And I also would like to know if using /POST26 instead of /POST1 will be helpful in this situation.

      Below are some images for model, analysis settings and solution information data for reference.

    • Sean Harvey
      Ansys Employee
      Hello,nThe coordination of the commands with mechanical command object are important to understand as mechanical will not be leaving the solution, so once you leave the solution and say go to /post1 or post26, when you command object is executed again in the next solve, it will start back at load step 1.nThe key is to not leave solution, so do not go to /post1. The results after each load step can be saved in the database for access without the need to go back to /post1. Many results are available, but I have found not all. The key to making this work is the very first command object you have you need to put in these commands nfinin/config,noeldb,0n/solunnThis command object will just run once in the 1st load step. It tells the solver to keep the calculated results in the MAPDL database after each substep so they will be available for the *get command.nPlease first try with a single loadstep that you are able to get the results. I believe then in your next command object that runs, you can request the *get command and it will retrieve the last results available. So you will not be using the *set command since that is only valid in /post1nPlease try these suggestions to retrieve the data.nAnother way to do this is using usrcal user defined subroutine and then we can extract during the solution, during iteration, etc. But for this you need a compiler, etc.nnNow there is yet another way that may be useful for this or in the future. Just pointing this capability out. You can use the command dcum to tell the solver that displacements specified are incremental, so say you push a beam with 1000 lbf, but then want to add .5 in UZ from wherever that beam deflected with the force loading. you can use this so the solver increments by .5 nSo in this case you can havenload step 1 - apply force on beam in uznload step 2 fix the displacement using this command nd,node_to_fix,UZ,%_FIX%nload step 3 ndcum,addttt! this option applies to selected nodesnd,disp,UZ,.5nnHope these tips helpnnRegards,nSea
    • Sean Harvey
      Ansys Employee
      Hello,nI forgot to specify that you have to uncheck the distributed solution if you will use the /config,noeldb,0 nRegards,nSeann
Viewing 2 reply threads
  • You must be logged in to reply to this topic.