×
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

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

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

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

(OP)
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




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

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

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

(OP)
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

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

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




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

(OP)
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

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

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

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

(OP)
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

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

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

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

(OP)
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!!!

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