×
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

/SOLU inside a *DO loop

/SOLU inside a *DO loop

/SOLU inside a *DO loop

(OP)
Hello everybody

I would like to perform a do loop with inside a transient thermal analysis, at the end of every loop (with inside 100 seconds of transient thermal analysis) some parameters must be update for the next loop in which they will be used as input, I have written the following script but seems it´s not working. I can see the different loops running but no parameters are update at the end of every loop... where can be the mistake?

thank you very much in advance

...
...
...
*DO,n,1,iter,1
  /SOLU
  rescontrol,,all,1,
  timestep=100
  TIME,n*timestep
  NSUBST,20                
  NEQIT,20
  KBC,0
  x=(M*T(3)*lapstress(2))
  y=(M*scalarp(1))
  q=x+y
  F,4,HEAT,-q
  F,2,HEAT,+q
  OUTRES,all,all
  SOLVE
  FINISH
  
  /POST1
  set,last
  !Now I need to update temperature values
  ETABLE,TMP,TEMP
  *VGET,T,elem,1,etab,TMP          
  !here some other calculations using updated T parameter
  FINISH
  
  /SOLU
  ANTYPE,,rest
*enddo

RE: /SOLU inside a *DO loop

Here is one suggestion. Comment out the solve command and index your parameters and output them into a file. Maybe you can see where the mistake is. I understand the parameters need the solve to update, but it could be a typo elsewhere. Once this is confirmed, run a do loop for 1,2,1 and output the same parameters to make sure they are updating correctly.  

RE: /SOLU inside a *DO loop

Hi,

i think i had a similar problem some time ago, but not quite sure how i solved it. i think the problem is that you go from /solu to /post1 and back, but *vget works without need to go to /post1 i think. And i would avoid of using FINISH as well. Just try this:

...
...
...

/SOLU
ANTYPE,,rest
timestep=100

*DO,n,1,iter,1
  rescontrol,,all,1,
  TIME,n*timestep
  NSUBST,20                
  NEQIT,20
  KBC,0
  x=(M*T(3)*lapstress(2))
  y=(M*scalarp(1))
  q=x+y
  F,4,HEAT,-q
  F,2,HEAT,+q
  OUTRES,all,all
  SOLVE

  ETABLE,TMP,TEMP
  *VGET,T,elem,1,etab,TMP          
*enddo

not sure, but maybe this ETABLE will be problem. Maybe you should consider to change element type to avoid need of ETABLE.


Lubo

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