Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

/SOLU inside a *DO loop

Status
Not open for further replies.

fmelo88

Aerospace
Nov 12, 2008
3
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
 
Replies continue below

Recommended for you

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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor