Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

how to go from /SOLU to /PREP7 then to return in /SOLU for thenextstep

Status
Not open for further replies.

biblo

Mechanical
Apr 23, 2006
40
Hi !! help please!!!!
how to go in /PREP7 starting from the /SOLU then to return in /SOLU??
/PREP7
……..
……..
FINISH
/SOLU
ANTYPE,STATIC
......
loads
*DO,i,1,n
*IF,k,EQ,0,THEN
/PREP7
.....
/SOLU
*ENDIF
......
SOLVE
.....
*ENDDO
.....
Somebody suggested me making:

*DO,i,1,n
*IF,k,EQ,0,THEN
/PREP7
......
PARSAV,ALL,myfile,ext
/SOLU
ANTYPE,,REST,,,CONTINUE
PARRES,NEW,myfile,ext
*ENDIF
......
SOLVE
.....
*ENDDO
But it does not work!!!
Thank’s in advance!!!
Barha




 
Replies continue below

Recommended for you

You don't need to save the parameters and then resume them, if you don't use /clear in your code. Please explain, what exactly dose not work...

Alex
 
Hi Alex,
if, from one step to another in /SOLU, I change the number of material of some elements by using MPCHG, Ansys carries out the change (I can check that with ELIST), but does not hold any account of it at the time of calculation (it calculates with the values of properties of the material witch I declare at the beginning of the analysis)
*DO,i,1,n
/PREP7
ALLS,ALL,ELEM
MPCHG,2,some_elements
/SOLU
………
SOLVE
……..
*ENDDO

And i receive this error message:
“Cumulative iteration 1 may have been solved using different model or boundary condition data than currently stored. POST1 results may be erroneous unless you RESUME from a jobname.DB file for this substep”.
The change occur at step 1.
barha
 
Take a look at the Chapter 13.2.1 "What Are Nonstandard Uses?" in the Ansys Manual. It says,

"Nonstandard procedures or techniques ... have not been or cannot be fully tested by ANSYS."

"Following is a partial list of nonstandard ANSYS features and uses:
...
High-risk capabilities such as the following:

Changing element real constants during the solution phase in between load steps. Depending on the element type being used, the element may not properly use the updated real constant value."

I don't know if changing the material number has the same risk or not. But it is possible. On the other hand, I think you should provide some more detailed code, if possible.

Regards,
Alex




 
Alex : what i want to know is : from one step to another in /SOLU, how to go to /prep7 then return to /solu without changing anything. i just want to know how to do that. perhaps i have to use these commands: PARSAVE, PARRES, RESUME, SAVE, RESTART,...but the problem is that i don't know how!!!
regards
Barha
 
Like I said: "You don't need to save the parameters and then resume them", if you don't use the /clear command of course.

Restarting a analysis from previous time step (is necessary if you are doing a transient analysis for example antype,transient,resume).

Saving (save) is good if you are doing several different analysis with different model geometry. You can chage the job name (/filname) for each solve routine and the save (save,all,,db). You can define different job names by

Code:
/filname,strcat('jobname',chrval(i))

By the way, if you tried to restart the analysis after changing the materials, then it's possible that ansys uses the old model data. But if you change the material number and start a new analyses, it MUST work! See next example:

Code:
! define fe model
...
! define materials
! Material 1
...
! Material n
...
! Mesh modell with Material 1
...
*do,i,1,n

! define a jobname
fini
/filname,strcat('jobname',chrval(i))

! change material
/prep7
mpchg,i,some_elements

! solve
/solu
antype,,new
solve

! save
/post1
save,all,,db

*enddo

Hope it helps!

Alex

 
it doesn't work Alex!!
my programe is like this:
/PREP7
!Structural model
…….
FINISH
/SOLU
ANTYPE,static
SOLCONTROL,On
AUTOTS,on
NSEL,S,NODE,,1,5,2
D,ALL,UY,0
NSEL,S,NODE,,1
D,ALL,UX,0
TIME,0.0001
ALLS
SOLVE
*DO,i,1,n
tim=i*dt
*DO,k,1,ne ! ne: number of element
*IF,g(i,k),EQ,0,THEN
MPCHG,2,k
g(i,k)=1
*ENDIF
*ENDDO
!loads
………….
………….
TIME,tim
DELTIM,dt/5
OUTRES,ALL,LAST
SOLVE
*ENDDO
 
So your analysis is statical? Why must you specify the time? You could use instead several different statical analysis. That should work!

Code:
/PREP7
!Structural model
…….
FINISH

/filname,iteration_0 !!! Jobname

/SOLU
ANTYPE,static,new
SOLCONTROL,On

!!! AUTOTS,on

NSEL,S,NODE,,1,5,2
D,ALL,UY,0
NSEL,S,NODE,,1
D,ALL,UX,0

!!! TIME,0.0001

ALLS
SOLVE

save,all,,db !!! Save

*DO,i,1,n
    tim=i*dt        
    *DO,k,1,ne ! ne: number of element
        *IF,g(i,k),EQ,0,THEN
            MPCHG,2,k
            g(i,k)=1
        *ENDIF    
    *ENDDO

finish
/filname,strcat('iteration_',chrval(i)) !!! change jobname
/solu
antype,static,new !!! statical solve!?

!loads
………….
………….
    
 !!!   TIME,tim !!! not necesary!?
 !!!       DELTIM,dt/5
 !!!   OUTRES,ALL,LAST
    SOLVE

    save,all,,db !!! Save

*ENDDO
 
Hi Alex!!!
1) I know that in static analysis i don't need time but in my work i need it because my loads are temperaturs witch i obtened befor in thermal analysis. so, in structural analysis i use LDREAD,TEMP,,,time,1,my_jobname,rth.
if i want to not use time i have to put:
LDREAD,TEMP,LAST,,,1,my_jobname,rth.
2) Other thing: i need to go in /PREP7 to use MPCHG, then to return to /SOLU.i see that you use this command in /SOLU. LIKE YOU DO ANSYS WILL NOT TAKE IN ACCOUNT THIS CHANGE WHEN IT CALCULATE THE STRESSES FOR EXAMPLE.
3) When i run the programme like you show me, at the and i see that i have juste one step!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor