Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Difference Between Field Variable and State Variable 2

Status
Not open for further replies.

khoobani

Civil/Environmental
Feb 22, 2011
7
0
0
Hi everyone;
I'm writing a subroutine to change Young Modulus with changes in both stress and strain. I think stress and strain are field variables but what is state variable here? Is it necessary to define state variable?
 
Replies continue below

Recommended for you

Hello,

State variable is an array which is passed between subroutine calls.
You need state variable in the case when You want to remember some information in one increment and use it in next increment.
For instance if your "law" which You use to set Young module depend on maximal stress which occurred during analysis You can use state variable to save that max. value.
Each element has his own state variable array.

So it depend on You do you need to define state variable or not.

Regards,
Bartosz
 
Thank you for answering my question.
I've defined stress and strain as state variables. Now, I should provide tabular data to define Young Modulus changes with stress and strain, but in fact I have a function that relates Young Modulus to stress and strain. Is there any alternative method to define a function instead of providing tabular data?
Regards,
 
Hi,

please take a look for following thread:
It should be helpful for you.

Is there any alternative method to define a function instead of providing tabular data?
I use following workaround:

In inputdeck you can set first field variable as Young module.

Code:
**
*ELASTIC, DEPENDENCIES=1
**     E,   v, temp,     FV1
 1.0e+00, 0.3,     , 1.0e+00
 1.0e+06, 0.3,     , 1.0e+06
**

Next use subroutine to evaluate your function (Young module) respect to stress and strains and assign that value for first field variable.
Because the FV values and E values are the same in our *ELASTIC definition Abaqus will always use the same value for E as subroutine set to field variable.

Let me know if you have any questions respect to my answer.

Regards,
Bartosz
 
Hi Bartosz,
I have one another question. When we use "getvrm" or "vgetvrm" in user subroutine, it stores all desired output components in an array. So, is it correct to say if there are 100 elements and there are 6 stress components, the dimension of this array will be (600,1)?
I want to sum S11, S22 and S33 so I want to know the location of these stress components in the array.

Thanks in advance,
 
Hello khobani,

GETVRM routine is used in Abaqus/Standard with USDFLD subroutine.
VGETVRM routine is used in Abaqus/Explicit with VUSDFLF subroutine.
Both routines are used to get results data from element's integration points,
unfortunately they work in different way, data read by these routines are stored in different way.

1. Abaqus/Standard

Abaqus calls GETVRM routine separately for each integration point (or section point).
With "noel", "npt", "kspt" dummy arguments you can control for which element/integration point/section point Abaqus read material data.
The routine saves all data after one call into "array" table. The components for a request are written as follows:
Single index components (and requests without components) are returned in positions 1, 2, 3, etc.
Double index components are returned in the order 11, 22, 33, 12, 13, 23 for symmetric tensors,
followed by 21, 31, 32 for unsymmetric tensors (deformation gradient).

For instance with 3d stress symmetric tensor we get:
array(1) - S11, array(2) - S22, array(3) - S33
array(4) - S12, array(5) - S13, array(6) - S23

What about rest of the "array" table?
We have 15 elements there (for default declaration). If not used other elements are set to zero.
These "array" positions can be use for different outputs, for instance if we will use GETVRM routine with "PE" output keyword in position 1-6
we get plastic strain tensor and array(7) will be use to save equivalent plastic strain (PEEQ).
As you can see order of results in "array" table depend on results data (stress, strains, ...) and elements types (3d or 2d).

Please remember whole "array" table will be lost between subroutine calls.
Abaqus will get data for one integration point and during next GETVRM call all previous data stored in "array" will be lost.
You can save these data between calls if necessary. With state variables.

2. Abaqus/Explicit

VGETVRM routine works in different way. All results data from integration points are save into "rData" table.

Abaqus/Explicit call VGETVRM routine for whole block of elements (not for one element like Abaqus/Standard) and save all requested data in one "rData" table.
Abaqus save one component for whole block and after it next component for the same elements block.
Data in "rData" table are saved in following way:

rData(1) - S11 for element 1, rData(4) - S22 for element 1, rData(7) - S33 for element 1
rData(2) - S11 for element 2, rData(5) - S22 for element 2, rData(8) - S33 for element 2
rData(3) - S11 for element 3, rData(6) - S22 for element 3, rData(9) - S33 for element 3
...
rData(10) - S12 for element 1, rData(13) - S13 for element 1, rData(16) - S23 for element 1
rData(11) - S12 for element 2, rData(14) - S13 for element 2, rData(17) - S23 for element 2
rData(12) - S12 for element 3, rData(15) - S13 for element 3, rData(18) - S23 for element 3

So, is it correct to say if there are 100 elements and there are 6 stress components, the dimension of this array will be (600,1)?

It is not true for Abaqus/Standard since we have "one" array for each integration point.
I am not sure for Abaqus/Explicit. With default declaration "rData" size is (maxblk*nrData) where maxblk=544 (it comes from vaba_param.inc file) so in this case your idea sounds resonable.
But the table is one dimension not two as in your post.

I will try get more information about this.
If you already checkd this please let me know.

Thanks and Regards,
Bartosz
 
Hi Bartosz;
You siad maxblk=544, is this the default value? or vaba_param.inc automatically determines maxblk's value according to the number of integration points in the model,because the number of integration points in my model is more than 544. Moreover, if I want to sum S11,S22 and S33 for each element, is it correct to use the following command:
DO k=1,nblock
Pressure=(array(k)+array(maxblk+k)+array(maxblk*2+k))/3
...
END DO

I'm a little confused about "nblock" and "maxblk". I think both of them have the same value.According to the Abaqus manual:
"nblock" is Number of material points to be processed in this call to VUSDFLD and "maxblk" is the maximum block size.

Regards,

 
Hello Khoobani,
maxblk=544, is this the default value?
Yes, it is default value.
vaba_param.inc automatically determines maxblk's value according to the number of integration points in the model
Abaqus cannot do such thing. "maxblk" is just fortran parameter set in vaba_param.inc file.
Since the file is ASCII you can change this value if you want, but I believe global parameters should not not change by a user.

I've build up simply model with more then 544 integration points to get better understanding how it works. This is what I found out.

VUSDFLD subroutine is called by Abaqus/Explicit for block of integration points. The block size is passed with "nblock" variale and is limited to 136.
If a model includes more then 136 integration points the subroutine is calling second time.
For model with 600 integration points Abaqus calls the subroutine five times (136 + 136 + 136 + 136 + 56).

Now lets think about "rData" table. The size of the table with default declaration is 3264 (544*6). To find out how many data for one integration point we can save inside the table lets split 3264/136=24.
For one integration point we can save 24 output variables.
Since we are reading 6 components stress tensor, we have enough space to save all results for one subroutine call.

I believe there is no reason to change any table size declaration.

I would use folowing code for sum S11, S22 and S33 for each integration point:

Code:
c     get stress tensor
      call vgetvrm( 'S', rData, jData, cData, jStatus)

c     loop over integration points for current subroutine call
      do k = 1, nblock, 1

c       sum stresses
        sumS11S22S33 = rData(k) + rData(nblock+k) + rData(2*nblock+k)

c       calc. pressure
        pressure = sumS11S22S33 / 3.d0

      end do

Regards,
Bartosz
 
Hi khoobani and akabarten,

sorry to jump in on your discussion but this is the most in-depth discussion I have found on the web about vusdfld and vgetvrm etc.

I'm having problems implementing vgetvrm in my subroutine. Everything runs fine if I use just one element, or even two. but when I introduce three or more I get a system error code 5. Have you any ideas where the problem could be?

The only thing I have noticed is that my field and state variable (stress11) has 12 members each (one for each node - element C3D8R), whereas nblock=2 (one for each integration point). but maybe that's normal? I appreciate any advice, I don't even know where to start looking for the problem...
 
Hi,

Could You attach your subroutine and model (it can be the small one with one element) to the post, please.
I would like take a look for it.

Regards,
Bartosz
 
Hi,

Thank you for the files. I took quick look on it.
Your subroutine is quite complicated I expected something simpler :).

I notice one think which can be explanation for your error.
You are calling VUSDFLD subroutine from VUANISOHYPER subroutine. Respect to documentation (15.1.1 User subroutines: overview) you cannot do it.
VUSDFLD is already called by Abaqus for all elements with material definition used field variables and you do not have to do it yourself with CALL routine.
To get access to all data from VGETVRM routine you can save them into state variable (you have access to that table from VUANISOHYPER) or you can use common block to save data.
It can be important for you which subroutine is called first, so please check it.

Regards,
Bartosz
 
Hi Bartosz,

Thanks for your input. Don't be impressed about the complexity of the subroutine, it is based on an example from the abaqus documentation, I just added a couple of lines of code, really I'm a novice!

What makes you think you can call vgetvrm directly from vuanisohyper? I couldn't find that written anywhere in the documentation. I thought vgetvrm was only available when called from vusdfld.

When I tried calling vgetvrm directly from vuanisohyper I get an error: no vusdfld subroutine was supplied for the user material named: vuaniso_HGO.

I'm using v6.9. does 6.10 have this extra capability? Again I checked documentation for 6.9 and 6.10 but no mention of it.

There must be many people who have had this problem before. I wonder why it is not discussed in the forums?

All the best,

Aisling

Aisling
 
I should also point out that only the first third or so of that .for file is being used since there are different material definitions in there that I'm not using.
 
Hello,

This is some kind of misunderstanding. You are right, VGETVRM routine can be used only with VUSDFLD subroutine.
I wanted to say You cannot call VUSDFLD subroutine from VUANISOHYPER subroutine.

Lets take a look at following code:
Code:
subroutine VUANISOHYPER (...)
...
c vusdfld subroutine cannot be call from vuanisohyper subroutine
c the line is incorect
call VUSDFLD (...)
...
end subroutine VUANISOHYPER

subroutine VUSDFLD (..)
...
call VGETVRM (...)
...
end subroutine VUSDFLD
It is enough if you do it as follow:
Code:
subroutine VUANISOHYPER (...)
...

...
end subroutine VUANISOHYPER

subroutine VUSDFLD (..)
...
call VGETVRM (...)
...
end subroutine VUSDFLD
Abaqus will call both subroutines, you do not have to do it.
The question is which subroutine will be first.

As I understand you are using VGETVRM routine to read some data from
material point and next you are using them in VUANISOHYPER subroutine.
So in this case we need to pass somehow the information from VUSDFLD into VUANISOHYPER since after VUSDFLD all date from VGETVRM routine will be lost.
You can use state variable table or common block to exchage date between VUSDFLD and VUANISOHYPER.

Regards,
Bartosz
 
Dear Bartosz,

you were right! The problem was that I was calling vusdfld inside vuanisohyper. I'm glad it was not a very complicated problem to solve :) I'm really grateful for your advice.

Kind Regards,

Aisling
 
Hello Everyone

Greetings!

I have used USDFLD subroutine in order to implement latham's macroscopic damage in abaqus standard.

The aim is to integrate principal stress at each material point with respect to equivalent plastic strain at each step of calculation. I applied trapezoidal rule for numerical integration.

The same thing i want to apply in VUSDFLD with same formula but it is not working.

Can someone find my mistake please.(attached vusdfld file)

Thank you
 
Status
Not open for further replies.
Back
Top