Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

parametrical simulation

Status
Not open for further replies.

izyk

Mechanical
Dec 4, 2006
21
I would like to perform one simulation which has a few steps:
- one load is changing and after each step result from one node i stored in file
How to do this using loops?
thx
 
Replies continue below

Recommended for you

1. Define vector with length number of steps.

*dim,result,array,steps

2. Start a do loop:

*do,i,1,steps

3. Solve and get the nodal result

/solu
solve
/post1
*get,result(i),node,....

4. End do loop

*enddo

5. Write vector to file

*mwrite,result(1),result,dat
(1F20.6)
 
I would like to store Z displacement of node 30
each time in results2.dat only FINISH line is stored (amount correspond to steps value)

---------

steps=2
*dim,result,array,steps - two steps
*dim,volts,array,3 - array with different load values

volts(1)=10
volts(2)=100
volts(3)=1000

*do,i,1,steps

/PREP7
NSEL,S,LOC,Z,dif+h
D,ALL,VOLT,volts(2)
NSEL,ALL

/SOLU
ANTYPE,STATIC
SOLVE

/POST1
*get,result(i),node,30,u,z

*enddo

*mwrite,result,result2,dat

------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor