Creating multiple ASE programs via loops

Dear SOFiSTiK forum members!

Is it possible to create multiple instances of ASE programs with loops in Teddy?
For verification purposes I am trying to calculate multiple setups of a structure in a single SOFiSTiK file. Part of the problem requires me to calculate buckling eigenvalues for each setup. What I have tried is:

+PROG ASE
HEAD Buckling eigenvalues
    LOOP#i d
        SYST PLC 100
        GRP 1+#i
        EIGE NEIG 2 ETYP BUCK LMIN AUTO LC (#i+1)*100+1
        END
    ENDLOOP
END

But this is not possible because only one buckling analysis is allowed in a single ASE run. So I would need to create separate ASE programs for each buckling analysis. I want to do it automatically because I am trying to do some verifications for a lot of different setups. So I also tried the following

LOOP#i d
    PROG ASE
    HEAD Buckling eigenvalues
        SYST PLC 10
        GRP 1+#i
        EIGE NEIG 2 ETYP BUCK LMIN AUTO LC (#i+1)*100+1
    END
ENDLOOP

But that does not work either. Is it possible to create multiple ASE programs with loops or do I have to use API for that?

Best regards,
Martin

Yes, it is possible.
Check out the basics manual chapter 2.9.6 Iterative Analysis with Multiple Modules.

In your case it would look something like this:

$ First template to store your loop controls
+Prog Template
   Sto#nr_iter 10 $ Exit condition
   Sto#i        0 $ Counter
End

$ Programs you want to loop over
$ 30 below is the max number of iterations (fail safe), so set it to the highest nr plus some extra for "padding"
PROG ASE iter 30
   HEAD Buckling eigenvalues
   SYST PLC 10
   GRP 1+#i
   EIGE NEIG 2 ETYP BUCK LMIN AUTO LC (#i+1)*100+1
END

$ Final template to check if iterations should stop
+Prog Template  iter 30
   Sto#i #i+1 $ Count the steps
   If (#i >#nr_iter) $ Break the iteration if this condition is met
      EXIT_ITERATION
   EndIf
End
1 Like

Thank you!