Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
LS Dyna

LS Dyna

Topics related to LS-DYNA, Autodyn, Explicit STR and more.

Optimizing time stepping in EM keywords to manage simulation length

    • troy.baker
      Subscriber

      I have seen examples that use *CONTROL_TIMESTEP to set the length of each step in the mechanical solver of the simulation. There is also *EM_CONTROL_TIMESTEP, which sets the time of each magnetic step. Do these magnetic steps fit within the mechanical steps, or are they run in parallel?

      *EM_CONTROL has ncylfem and ncylbem, which it defines as number of magnetic cycles before recalculating fem and bem matricies.  By increasing this value, do you decrease the frequency at which fem/bem matricies are rebuilt, also decreasing the simulation time.

      *EM_CONTROL_MAGNET uses ncycm to recalculate the magnetic vectors after a certain number of EM cycles. This should follow the same logic, where increasing the value would decrease because the magnetic vectors are recalculated less frequently.  

       

      In a simplified example, lets say *CONTROL_TIMESTEP is set to 1 second. So each step of the simulation is 1 second.  If *EM_CONTROL_TIMESTEP is set to 0.25 seconds, there would be four EM cycles per mechanical step. If the ncycfem/bem are set to 2, fem/bem matricies would be recalculated every 2 magnetic cycles, or 0.5 seconds/ every 0.5 mechanical steps.  With *EM_CONTROL_MAGNET setting ncycm to 4, the magnetic vectors would be recalculated every 4 EM cycles or every second/ every mechanical step.  Is this a correct intrepertation of how the keywords define properties?

    • ErKo
      Ansys Employee

      Hello

       

      Can we ask what type of application this is?

      All the best

      Erko

      Introducing Ansys Assistant a 24/7 AI-powered virtual assistant for active Ansys academic customers.

      Have a look at our public help documentation website: Ansys Help

      For more exciting courses and certifications, hit this link: Ansys Innovation Courses | ANSYS Innovation Space

      Guidelines for Posting on Ansys Learning Forum

      • troy.baker
        Subscriber

        I am trying to model the deflection of a flexible permanent magnetic beam in an external field

        • ErKo
          Ansys Employee

          so it is not an impct or some other extreme event?

          in that case I would suggest to use the implicit solver also (EM uses implicit) for the structural problem as that can have large time steps.

    • troy.baker
      Subscriber

      If I use:
      *CONTROL_IMPLICIT_GENERAL
      $#  imflag       dto    imform      nsbs       igs     cnstn      form    zero_v
               1      0.01                                                                
      *CONTROL_IMPLICIT_AUTO
      $#   iauto    iteopt    itewin     dtmin     dtmax     dtexp     kfail    kcycle
               1        20         8     1e-08       0.5                                   
      That would mean the initial time step is 0.01, the solver tries to optimize for 20 iterations per step with a 8 iteration window.  And the time step can move between 1e-08 and 0.5 seconds.  I made these values up, but I have no sense of how effective they would actually be.  Do you know what common values for an implicit solver usually are?

      Also, from what I understand, EM solver runs within each structural solver time step.  If i define implicit solution, i assume it connects to the structural solver.  Do i need to use a *EM_CONTROL_TIMESTEP
      keyword to set the time step for the em solver (which would make the EM an explicit time step), or will LS Dyna automatically apply the implicit timing to both structural and magnetic solvers?

    • ErKo
      Ansys Employee

       

       

      Hi

      As I said the EM solver is an implicit solver (not explicit).

      Now I would suggest to use implicit mechanical solver also in your scenario (set IMFLAG=1).

      See here for some info on implicit solution:

      https://www.dynasupport.com/howtos/implicit/implicit-checklist

      In general, the mechanical and EM timesteps are independent (different solvers). Since the mechanical solver is the main driver or the LS-DYNA solving scheme, it is highly recommended to make sure the mechanical timesteps remains lower than EM timestep (same as for thermal or other solvers). 

      You do not need to set up your case to do the scenario described by “you do four EM cycles per mechanical step”. 

       

      Other than that ncyclefem/ncyclebem follow the number of EM solve increments. It is worth setting ncyclefem/bem to something different than 1 mainly in Eddy current cases. Otherwise, for resistive heat cases or magnetosatic cases, it is often best to leave ncyclefem/bem to 1 and simply adjust the EM timestep as needed (this is ok in your case since it is magnetism).


      All the best

       

      Erko

      Introducing Ansys Assistant a 24/7 AI-powered virtual assistant for active Ansys academic customers.

      Have a look at our public help documentation website: Ansys Help

      For more exciting courses and certifications, hit this link: Ansys Innovation Courses | ANSYS Innovation Space

      Guidelines for Posting on Ansys Learning Forum

       

       

    • troy.baker
      Subscriber

      Oh sorry, i missread Em being implicit vs explit iicit.  Also thank you for clarifying that the em/ thermal/ structural solvers are all independent of eachother.  The control for the implicit EM can be set by EM_SOLVER_FEMBEM_MONOLITHIC.  Where the MAXIT sets the iterations it takes to find the equilibrium position and the absolute/relative tolerance set how close those iterations to be to eachother to say equilibrium has been reached.  Is that correct?  If so, then I should be able to reduce the MAXIT and open the tolerances a bit to help reduce the number of em iterations per timestep and this would reduce simulation time.


      If I do not use the *EM_CONTROL_TIMESTEP keyword, I assume the solver will automatically define a timestep.  However we want to insure that the EM timestep is larger than the structural timestep.  EM timestep can be run by TSTYPE 1, which just uses a constant timestep through DTCONST.  Setting this larger than the max structural timestep should insure EM>structural timestep.  But this does not allow the solver to adapt.  There is also TSTYPE 3, which automatically calculates the timestep, and we can further use the FACTOR, and TSMIN/MAX to make sure that the Em timestep doesn't go below the max structural timestep.  Is this a valid use for the TSTYPE 3 command?

       

      Thank you for the continued support

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]