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!

end step condition 1

Status
Not open for further replies.

ebblanco

Industrial
Jul 21, 2010
3
Hello,

I need to do something to control the end of a step, i need that the step end when temperature achive a value. Is it posible?How can i do it?
 
Replies continue below

Recommended for you

An auto shut down when a certain temperature is reached is not possible as far as I know. I think you should be able to print the temperature of a or the nodes to an output file while processing. This way you can monitor it yourself and issue the kill when you reach that point.
 
Hello,

To stop a analysis respect to your condition you can use sensor functionality and UAMP or VUAMP subroutine depend what solver you are using (Standard or Explicit).
In the subroutine you can set two variables:
1. lFlagsDefine(iConcludeStep) - if set to 1 stop current step and start next, if last step stop analysis
2. lFlagsDefine(iStopAnalysis) - if set to 1 stop analysis with error message

It can look like this:

1) inputdeck:
...
** define sensor to read temperature for selected node in model data
*NSET, NSET = temp_exit_analysis-NSET
1000,
** define amplitude with user type, we don't have to use it but we need it to execute subroutine for each increament
*AMPLITUDE, NAME=temp-XY, DEFINITION=USER, VARIABLES=1
**
** define sensor output in history data
*OUTPUT, HISTORY, SENSOR, NAME=TEMP-SENSOR, FREQUENCY=1
*NODE OUTPUT, NSET=temp_exit_analysis-NSET
NT,
...

2) subroutine
...
Subroutine vuamp(
C passed in for information and state variables
* ampName, time, ampValueOld, dt, nSvars, svars, lFlagsInfo,
* nSensor, sensorValues, sensorNames, jSensorLookUpTable,
C to be defined
* ampValueNew,
* lFlagsDefine,
* AmpDerivative, AmpSecDerivative, AmpIncIntegral)

include 'vaba_param.inc'

C svars - additional state variables, similar to (V)UEL
dimension sensorValues(nSensor), svars(nSvars)
character*80 sensorNames(nSensor)
character*80 ampName

C time indices
parameter (iStepTime = 1,
* iTotalTime = 2,
* nTime = 2)
C flags passed in for information
parameter (iInitialization = 1,
* iRegularInc = 2,
* nFlagsInfo = 2)
C optional flags to be defined
parameter (iComputeDeriv = 1,
* iComputeSecDeriv = 2,
* iComputeInteg = 3,
* iStopAnalysis = 4,
* iConcludeStep = 5,
* nFlagsDefine = 5)
dimension time(nTime), lFlagsInfo(nFlagsInfo),
* lFlagsDefine(nFlagsDefine)
dimension jSensorLookUpTable(*)
c
c Get the sensor value
iR_TEMP = ivGetSensorID('TEMP-SENSOR',jSensorLookUpTable)
temp_sensor = sensorValues(iR_TEMP)

if (lFlagsInfo(iInitialization) .eq. 1) then
ampValueNew = 0.0
lFlagsDefine(iConcludeStep) = 0
else
c check temp value, if grater then 300.0 stop analysis
if (temp_sensor .gt. 300.0) then
lFlagsDefine(iConcludeStep) = 1
end if
end if
return
end
c
...

I have tested it with displacement and it works fine.

Best Regards,
Bartosz

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor