FEAP User Forum

FEAP => Input File Issues => Topic started by: bharathn on March 11, 2019, 12:48:49 PM

Title: Display values every 'n' increments
Post by: bharathn on March 11, 2019, 12:48:49 PM
Hey guys, this is probably a really simple issue:

I currently output displacements every iteration, but I want to change this to outputting every 5 iterations for example. How would I do that?

batch
 dt,,0.1
 loop,time,11
   time
     loop,,100
        tang,,1
     next
 tang,,-1
 output TANG
 form
 disp all
 SAVE restart
 next Time
end

Regards,
Bharath
Title: Re: Display values every 'n' increments
Post by: bharathn on March 11, 2019, 01:00:26 PM
I think I have found it:
I just insert the time within another loop for say 2 increments.

It seems to work.

batch
 dt,,0.1
 loop,,6
 loop,time,2
   time
     loop,,100
        tang,,1
     next
 next
 tang,,-1
 output TANG
 form
 disp all
 SAVE restart
 next Time
end
Title: Re: Display values every 'n' increments
Post by: Prof. S. Govindjee on March 11, 2019, 01:01:19 PM
How about using a nested loop?
Some like:
Code: [Select]
loop,,100
  loop,,5
    time
    loop,,10
      tang,,1
    next
    disp,all
  next
next
This will give you 500 time steps, printing every 5 time steps.
Title: Re: Display values every 'n' increments
Post by: bharathn on March 18, 2019, 06:12:54 AM
Dear Professor,

Yes this is what I have done. I think I posted this right after I posed my question. Thanks a lot for taking the time out to respond :-)