/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
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
RE: /SOLU inside a *DO loop
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