Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to call previous increment array to current increment user subroutine 2

Status
Not open for further replies.

Yannined08

Bioengineer
Oct 21, 2013
6
I am storing values in a subroutine in an array. What I'd like to be able to do is call the previous values in the next increment and do a calculation with them to update the wear equation. Does anyone know how to do this?

I'm storing Contact Slip, with respect to node id and increment number. I get CSLIP from a do loop and store for each node and increment. However, I have no idea how to call this array from the previous step.. Help!!! Thanks, Jonathan
 
Replies continue below

Recommended for you

Hi,

Abaqus way to pass data between a subroutine calls is to use special array called state-dependent array.
The name of the array is svars. You just store all necessary data into svars array and in next increment
you can read the data from svars.
Unfortunately not all subroutines have the svars array. What subroutine do you use?

Regards,
Bartosz
 
Hello Bartosz-

Thank you for your reply! I am using UMESHMOTION and I believe that svars array is not available in this user subroutine. Is there any work-around for this?

I use getvrmatnode call routine and I can write CSLIP values, however I have no idea how to store them into an array. I tried a do loop but it doesn't seem to interact well with the call routine. (The call routine does some sort of loop on its own, but it's not letting me store CSLIP values on its own.). We've tried common blocks to try to pass to UFIELD to no avail, and tried data and save statements also. I was only able to store one value for all the nodes. Perhaps there is a way to make a 3D array (increment,node id,CSLIP) and I like to be able to call previous increments and update wear based on cross shear degree in past say 4 increments (but one increment would do for now). Once I have the array, how do I call the previous increment in the current one (what's the code that's able to do this).

I've seen your posts on here and I know you have experience with UMESHMOTION. Thank you for all your help!

-Jonathan
 
Hi,

I understand you want to pass information from UMESHMOTION into UFIELD.
Since we do not have svras array in both subroutines common block seems to be a good idea.

Do you mind to share with me your subroutine and inputdeck?

Regards,
Bartosz
 
Hello Bartosz-

Sure. I thought so too.

Attached is the subroutine and input deck. Let me know if you have any questions. I've been experimenting a lot with this subroutine and wasn't entirely sure how to create to create common blocks. However, I left in the common block statements (commented out).

Thanks!

-Jonathan
 
Hi,

I updated slightly your subroutine, please find my comments:

1. To exchange data between UMESHMOTION & UFIELD I am using common block “kExchData”
2. For your information each common block name must start from k letter. See Abaqus Analysis User's Manual, 18.1.1 User subroutines: overview, Naming convention
3. Since I am using common block you must not use more than 1 CPU. In other words you cannot use memory parallel execution.
4. UFIELD is called before UMESHMOTION, it means in n increment you will always get results from n-1 increment. It can have influence for you results to avoid it cut your time step to decrease time difference between n and n-1 increment.
5. Common block has two one-dimension arrays. In one I store node ids in other contact slip values.
6. Max arrays size is set with “iNodeNum” parameter. You must always set value enough big to store all you data. It should be number of you nodes associated with UMESHMOTION or bigger.
7. Position in the array is used as reference between the arrays. If node 100 is in position 45 in first array it means cslip for this node is on position 45 in second array.
8. I do not have experience with UMESHMOTION but I noticed Abaqus call the subroutine two times for each node. Kmeshseep argument is different for these calls. I just store values for first call and do not carry about second. I do not know what exactly is difference between the calls. It looks like the results are the same (but it does not have to be true). Maybe you do not want to use only results from first call, maybe you would like use average value of cslip from all calls.
9. I have to say node number are a little bit confuse for me. It is because I never use model in term of instances and assembly. I understand that in your case node numbers in the inputdeck can be different that nodes during execution since you can have the same nodes numbers in difference instances. Nevertheless there is something I do not understand. What node should I use for GETNODETOELEMCONN & GETVRMAVGATNODE routines. Should it be global or local. Should it be “node” variable or “locnum”. The point is that I find example with UMESHMOTION in documentation and they are using “node” variable but when I am using this the routines crashed with error (JRCD is not zero). But if I use “locnum” is always ok. I do not know. And another question is does “node” in UMESHMOTION is the same as “node” in UFIELD? Maybe in one subroutine it is global id and in another is local.
10. I have to be honest I did not test the subroutine well. So please do it. My suggestion is to use simple model (4-5 elements max) and maybe do not use instances then there will be no question about nodes ids.

Please check the files, test them and if you have any questions do not hesitate to contact with me.

Regards,
Bartosz
 
 http://files.engineering.com/getfile.aspx?folder=abe43fb4-6b90-4148-8eb5-48d72749fef3&file=UMESHMOTION_UFIELD_v01.zip
Hello Bartosz,

Great work man! Thank you! It looks like the common blocks IS working and the Umeshmotion routine successfully passes the information to the Ufield subroutine. I checked the nodes and it looks like for the simple model I have created they match up between UFIELD and UMESHMOTION.

However, I am still stuck on how i can save and access the previous increment rCSLIP. I tried to sum up the values, but it only seemed to work for the first node. For another solely UFIELD model, I was able to capture the cumulative temperature value. Perhaps from cumulative I could capture the previous increment values? I'd like to be able to access the CSLIP at n, n-1, n-2, n-3 etc. where n is the increment number.

Thanks so much,

Jonathan
 
Hi Jonathan,

I'd like to be able to access the CSLIP at n, n-1, n-2, n-3 etc. where n is the increment number.
It's like you want to save whole field output for each increment.
What is a background to do this? I would like to understand what kind of operation you want to do with those data.

Regards,
Bartosz
 
Hello Bartosz,

I'd like to be able to calculate the angle that the two CSLIP vectors make, and feed that angle into a memory function that subtracts the current angle from the change in angle from previous increments. Does it make sense? This is a model that incorporates change in crossing degree(path) into the wear equation (a creation of another Kfactor parameter based on crossing degree in the final wear equation).

Regards, Jonathan
 
How about using a solution dependent variable (SDV)? For example, write in to an SDV towards the end of the code, and, if the increment number is not 1, then use that SDV for some calculation at the top of the code. Here's what I mean (in terms of a pseudo-code)

subroutine

if (KINC .GT. 1) then
angleTheta = ArcCosine of the dot product of statev(1) and statev(2)
end if
...
...
compute wear using angleTheta
...
...
statev(1) = CSLIP1
statev(2) = CSLIP2
...
end subroutine


Are you new to this forum? If so, please read these FAQ:

 
Dear community,


I am currently working on a subroutine and have read the comments and figured I have a similar problem.

I want to be able to make a contour plot in the visualisation mode in abaqus 6.12.

I have two subroutines in my .for file. VFRICTION and VUFIELD. As you can see (I added the .for and .inp files) I try to pass information (to be precise: the coefficient of friction) from VFRICTION to VUFIELD via "common block".

I get the values from my first subroutine. They differ for every node. The array per increment is as big as nBlock. That means it is as big as there are contact points. That is absolutely correct and I want theses values to be visible via contour plot!

ALAS when I try passing the values to VUFIELD
(because thats the only possible way to get contour plot as i understand. I added *FIELD, USER and the nodeset[the metal sheet] in the input file)
only the last value is transferred and I get only constant values for my coefficient for the whole metal sheet and NOT only in contacting pairs (nBlock).
Maybe someone could take a look at my files and give me suggestions as to how to change the code to be able to plot contour of friction coefficient? thanks in advance.

Regards, Paul

fortran and input file:
Link

 
 https://gigamove.rz.rwth-aachen.de/d/id/tfz2eDXy7aNNW8
IceBreakerSours:

Thank you for your reply. I have already looked at sdvs but could not find a solution. Could you please be more specific?

Regards,
Paul
 
I don't know if this will work for you but by the providing appropriate arguments to state(nStates,nNodState,nBlock) available in VFRICTION, you should be able to select your state variable from the drop down menu in Viewer. You will, however, have a *DEPVAR in the input file and request SDV in the output request(s).

Are you new to this forum? If so, please read these FAQ:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor