Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How to get RMODIF to work in a Macro during a transient analysis

Status
Not open for further replies.

dcwnj

Mechanical
Jul 2, 2007
4
0
0
US
I can't seem to get RMODIF to work in a macro during a transient run. What I'm doing is using a macro "USSBEG.MAC" which is called by the user FORTRAN routine "USSBEG.F". USSBEG.MAC is executed before each substep in the transient run. Interestingly, I can change Loads and Boundary conditions using the macro; however, I can't change material properties. Any suggestions??? THANKS


 
Replies continue below

Recommended for you

Hi,
as far as I know, you can't change the material properties DURING a solve run.
You could run repeatedly single analyses using the RESTART option. In this way, between a run and the successive, you can change almost everything (well, again, afaik...).

Regards
 
THANKS cbrn -- I was thinking that was what I might need to do.

This leads to another issue: How do you stop a run inside a macro? The documentation indicates "The initial run should not have stopped due to a "killed" job, system break, or system crash."

My goal is to issue a change in a spring constant in the middle of a run. That new value of a spring constant is going to be calculated externally and is not a function of displacement or time.

THANKS again for your response.


 
Hi,

material properties you can change via MPCHG command (see ansys manual), real constants you can not, but what about to use some trick with EKILL/EALIVE commands - you can define two elements in coincident location with diferent real constants. On the beginning of analyses first element is alive, while second is killed. Secondly, first element is killed and the second one is activated.

Regards,
lubo
 
Hi,
1- stop a run inside a macro: I fear this is right what you mustn't do: if the current run is killed, there is no result to restart with. In this case, the "trick" is create steps for which you are sure the spring "variable constant" is... constant (excuse me for the joke... ;-) ) !
I.e., you may want to have the macro change the spring constant between a solve and another, not "during" a solve
2- MPCHG: this seems a good suggestion because the command should be able to be issued between a substep and another. The material properties among which to switch must be previously defined, however. I think it's not a problem to create the new ones "on the fly" right before the MPCHG execution.

Regards
 
Good suggestions on MPCHG......but not quite

When I issue the command from a macro -- USSBEG -- during a solve, nothing happens. I've seen this before, some commands don't seem to execute when called from the macros that are called by user fortran routines. Whenever you issue a command from a macro -- you see output. If you don't see output -- the command is simply ignored.

I tried a very simple example -- 12" beam with a constant pressure load over time. Halfway into the run I issue from USSBEG:

ESEL,ALL
MPCHG,2,ALL
MPLIST,1,2

I see output from ESEL and MPLIST -> but none from MPCHG. Weird [ponder]






 
Status
Not open for further replies.
Back
Top