×
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

Use of *Parameter card and subroutines

Use of *Parameter card and subroutines

Use of *Parameter card and subroutines

(OP)
I am still playing with subroutines in Abaqus 6.13 and I was trying to obtain the most from them.

I am using the *Parameter card to obtain a standard code which can be used for different studies, just changing the parameters at the beginning.
My problem is that these parameters are not passed in the subroutine, as far as I have seen.

Here you are my example:

CODE --> MainFile

*PARAMETER
TIME_LOAD = 0.04
N = 2.
h = 0.1 

CODE --> Subroutine

do 100 k = 1, nblock
		X = coordMp(k,1)
		Y = coordMp(k,2)
		Z = coordMp(k,3)
c
        FIELD(k,1) = Z
		stateNew(k,1)= Z
		stateNew(k,2)=(Z+h)**N 

My SDV_2 is always equal to 0 and when I print h or N, they are equal to 0.

What can I do in order to add them?
Do I have to redefine them in the subroutine in this way:

CODE --> Subroutine

parameter(N=2.d0, h=0.1d0, TIME_LOAD=0.04d0) 
?

Is there another method?
I defined many different parameters and I would prefer to avoid to repeat them.

Thank you very much

RE: Use of *Parameter card and subroutines

Parameters do not interact with subroutine. These are two completely separate things.

RE: Use of *Parameter card and subroutines

(OP)
I know I can use Python for writing some scripts and do parametric analyses and the fortran subroutines have a different scope.

However, I would like to change the declaration vusdfld() at the beginning of the code to say I am adding also parameters from the INP file.

Or add some lines in the subroutine to recall the parameters I have already calculated in my INP file.

Is it possible?
In this way I would be able to have much more possibilities in my work (parametric analyses with subroutines).

RE: Use of *Parameter card and subroutines

You could run a script that manipulates the .inp and the subroutine code prior submitting the analysis.

But without knowing the overall thing you try to do, it is hard to recommend something.

RE: Use of *Parameter card and subroutines

Hi,

To pass any value from inputdeck to VUSDFLD subroutine you can use PROPERTIES option and props array.

CODE

**
*PARAMETER
myPar1 = 1.0 # 1st parameter value
myPar2 = 2.0 # 2nd parameter value
myPar3 = 3.0 # 3rd parameter value
**
*MATERIAL, NAME=myMaterial
*USER DEFINED FIELD, PROPERTIES=3
** props(1),  props(2),  props(3)
   <myPar1>,  <myPar2>,  <myPar3>
** 

CODE

subroutine VUSDFLD ( ... )

! get values from inputdeck
rMyInpVal1 = props(1) ! here I got value of 1.0
rMyInpVal2 = props(2) ! here I got value of 2.0
rMyInpVal3 = props(3) ! here I got value of 3.0

end subroutine 

Remember to have always enough PROPERTIES size to pass all values you need.

CODE

**
*PARAMETER
myPar1 = 1.0 # 1st parameter value
myPar2 = 2.0 # 2nd parameter value
myPar3 = 3.0 # 3rd parameter value
**
*MATERIAL, NAME=myMaterial
*USER DEFINED FIELD, PROPERTIES=2
** props(1),  props(2),  props(3)
   <myPar1>,  <myPar2>,  <myPar3>
** 

CODE

subroutine VUSDFLD ( ... )

! get values from inputdeck
rMyInpVal1 = props(1) ! here I got value of 1.0
rMyInpVal2 = props(2) ! here I got value of 2.0
rMyInpVal3 = props(3) ! here I will get numerical garbage since PROPERTIES is set to 2 !!!

end subroutine 

Since props array is declared as real all values from inputdeck will be real as well.

Regards,
Bartosz

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