×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Nesting do-loops

Nesting do-loops

Nesting do-loops

(OP)
Hi,

I need to nest a couple of do-loops to vary multiple parameters. It seems only 5 do-loops can be nested and I need to vary 6 parameters.

Is this correct? Are there other (better) ways of varying parameters?

Thanx in advance

RE: Nesting do-loops

Check the help file; 20 levels of nesting are allowed for the *do. What does your code look like? What are trying to do with it?

RE: Nesting do-loops

(OP)
It want to calculated the natural frequency of a single beam and varying the relevant parameters (in all combinations)

this is the code snippet in which I vary 6 parameters. However it seems to only loop through the first five, and not the sixth:

*DO,rekEmodulusTemp,Emodulus,Emodulusmax,(Emodulusmax-Emodulus)/Emodulusstap
*DO,rekAkomTemp,Akom,Akommax,(Akommax-Akom)/AkomStap
*DO,rekMassa,massa,massamax,(massamax-massa)/massaStap
*DO,rekBlength,Blength,Blengthmax,(Blengthmax-Blength)/BlengthStap
*DO,rekRotatiestijfheidLinks,RotatiestijfheidLinks,RotatiestijfheidLinksmax,(RotatiestijfheidLinksmax-RotatiestijfheidLinks)/RotatiestijfheidLinksStap
*DO,rekRotatiestijfheidRechts,RotatiestijfheidRechts,RotatiestijfheidRechts,(RotatiestijfheidRechtsmax-RotatiestijfheidRechts)/RotatiestijfheidRechtsStap

*USE,MODEL

*ENDDO
*ENDDO
*ENDDO
*ENDDO
*ENDDO
*ENDDO

RE: Nesting do-loops

Try and put the *use statement outside the looping - it will be more efficient and may also cure your problem (which you haven't described).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources