Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

HETVAL & USDFLD: subroutine

Status
Not open for further replies.

p282h

Mechanical
Aug 18, 2009
39
Hi:

I understand that HETVAL and USDFLD can be used to study phase transformations. Can someone explain some terms which I am unable to understand:

1. like how to update STATEV in HETVAL suboutine (what does STAEV mean?)

2. In USDFLD can say STATEV(1) =Austenite, when Temp(1)g.e. 750, makes STATEV(1)=Field(1), (where field(1) is the temperature dependant properties given in material module for austenite), is this a proper command.

3. If the above statement is true, which suboutine will be called first USDFLD or HETVAL. Because I am interested in calculating the volume fraction of phases formed from the temperature data (laser deposition: previous posts) from the conduction problem.

4. In HETVAL: Flux(1) = H*Ek(Time(2)), where H is the enthalpy of phase trf, Ek is fraction of the phase formed. I want to apply this logic which I am very confused whether my approach is correct or not: Once I know the temperatures after element activation (laser on), I want USDLFD to find out at what temp it is and assign like STATEV(1)=AUSTENITE, and follow point 2 above. Once it knows the corresponding Field(1) given in the material data, it should use the material values like conductivity, specific heat etc. to calculate volume of phase transformed and then the FLUX(1).


I want the subroutine to show the resulting phase and Volume from the temperature. Please tell me whether my approach is correct or not. Any inputs will be greatly appreciated.

Thanks
 
Replies continue below

Recommended for you

1. STATEV is the array of state variables you are calculating. State variables are usually defined with respect to existing ABAQUS variables, like stress, strain, temperature, or even time. HETVAL cannot update the state variables (STATEV). Only USDFLD can do that.

2 No, that is not the case. Field variables in your material data are an alternative means of varying the material parameters to the default temperature variation. If you are using field variable(s) in this way you can use
USDFLD to update the field variable(s), which in turn will change the relevant material properties. Your point 2 suggests that the process is the reverse.

Presumably your HETVAL provides the internal heat generated depending on the volume fraction of each phase?

I'm no expert on phase transformations, so here are some simple questions.

Do your material properties (modulus, conductivity etc) depend only on current temperature, or do they depend on temperature history or current volume fraction of phases so you need several field variables in order to define them?

Are your state variables the volume fraction of each phase and how do these depend on current temperature or temperature history?
 
Apologies, you can update STATEV in HETVAL. I've never used this subroutine before. I can understand your confusion though.

As the manual states : "In an uncoupled heat transfer analysis STATEV is passed into subroutine HETVAL as the values of these variables at the beginning of the increment. However, any updating of STATEV in user subroutine USDFLD will be included in the values passed into subroutine HETVAL since this routine is called before HETVAL."
 
Hi mrgoldthorpe:

1. Thanks for responding. I finally understood STATEV which in phase transformation is the volume fraction of each phase calculated at the current temperature or time.

2. I understand that field variables in material property window can be used to differentiate phases. For ex: can I assign
Elasticity TEMP FIELD1 FIELD2 FIELD3...
2000 300 1 0 0
1000 500 0 1 0
600 700 0 0 1

where FIELD1 =Martensite, FIELD2=Bainite, FIELD3=Austenite
If this method is correct than all I want Field variables to do is whenever during simulation at the current temp which forex: is 300K, take the values if necessary and use them for any material dependant calculations.

3. But in isothermal transformations: where volume fraction of phase depends only on current time and some constants obtained from experiments, So I used FIELD(1)=calculated VOF and FIELD(1)=STATEV(1) if the temp condition is met.

4. In HETVAL, I again checked for the TEMP condition and calculate Flux()= enthalpy*FIELD(1)..

5. If my approach 3. is correct, than subroutine for just phase transformations does not require any assigning FIELD Var in the material module of ABAQUS as shown in 2. .

6. If residual stress/mechanical properties are concerned, then more field variables need to be calculated.

Please tell me if my thinking is sane.

 
Presumably the volume fraction of each phase varies between zero and one, and the sum of the volume fractions is equal to one?

So it seems to me that you assign a state variable to prove the vvf for each of your phases and, when you have worked out that, you assign the value of the field variable equal to the state variable.

If that's the case, your USDFLD should assign STATEV(1), STATEV(2) etc. in accord with the current temperature. Furthermore, you should set the field variables accordingly:

FIELD(1) = STATEV(1)
FIELD(2) = STATEV(2)
FIELD(3) = STATEV(3)
etc.

This will enable ABAQUS to assign material properties at each point and time in accord with the local temperature and the local mix of phases (contrary to what you say in 5 above).

Presumably, there is internal heat associated with each phase and perhaps the current temperature? If that's the case, FLUX(1) will be the sum of the contributions from each phase.

Have you changed the USDFLD and HETVAL you sent me off-board? I suggest you attach these and your current .inp file for consideration by others.

Time for me to sign off: it's 7.40 pm here in UK.
 
Thanks mrgoldthorpe. A lot of things got cleared to me today with your suggestions. I will include your suggestions and work on the earlier codes and attach them soon for more input.
 
Hi mrgoldthorpe/corus

I have finally figured out the conduction problems in my previous posts. Your suggestions helped a lot. Now I have started to work on the HETVAL and USDFLD subroutine. The subroutine compiles with no errors but does not calculate any values.

The subroutine goes like this:

subroutine usdfld(field,statev,pnewdt,direct,t,celent,time,dtime,
1 cmname,orname,nfield,nstatv,noel,npt,layer,kspt,kstep,kinc,
2 ndi,nshr,coord,jmac,jmtyp,matlayo,laccflg)
c
Include 'aba_param.inc'
c
character*80 cmname,orname
character*3 flgray(15)
dimension field(nfield),statev(nstatv),direct(3,3),t(3,3),time(2),
* coord(*),jmac(*),jmtyp(*)
dimension array(15),jarray(15)
c
c Get temperatures from previous increment
call getvrm('TEMP',array,jarray,flgray,jrcd,
$ jmac, jmtyp, matlayo, laccflg)
TEMP= array(1)
STATEV(1)=TEMP

[NOTE: In this I did not assign any field variables in the property module because my conductivity and specific heat values as a function of temperature are not needed in calculation of volume fraction of phases.]


C calculated the volumefraction of A a function of temp
A = f(TEMP)
STATEV(2)=A
Return
end


SUBROUTINE HETVAL(CMNAME,TEMP,TIME,DTIME,STATEV,FLUX,PREDEF,
1 DPRED)
C
INCLUDE 'ABA_PARAM.INC'
C
CHARACTER*80 CMNAME
DIMENSION TEMP(2),STATEV(*),PREDEF(*),TIME(2),FLUX(2),DPRED(*)

If STATEV(1).lt.400 then
STATEV(2)=A
B=1-A
STATEV(3)=B

end if

If STATEV(1).gt.400 then

STATEV(2)=A
B=0
STATEV(3)=B

end if

S =statev(2)+statev(3)

if s.le.1

than flux(1)=2*statev(2)+3*stave(3)

end if

return
end


NOTE:

1. I have called USDLFD in property module and used depvar 3

2. Used *HEAT GENERATION in input file


PROBLEMS i am facing:

1. It give SDV1, which is the current temperature but gives no values or ZERO for SDV2 and SDV3. Can you tell me if there is a problem in my logic or where i am going wrong?.


Thanks
 
With regard to the following in USDFLD:

A = f(TEMP)
STATEV(2)=A

you presumbly have a function f() which does the job? Do you also set the other volume fraction and so the remaining state variable?

In HETVAL:

If STATEV(1).lt.400 then
STATEV(2)=A
B=1-A
STATEV(3)=B

but the variable 'A' is not set to anything, so state variables 2 and 3 will be undetermined. The same applies to the next IF statement.

Perhaps you need to set A and B at the start of the routine for the present element integration point*:

A = STATEV(2)
B = STATEV(3)

It seems that perhaps you don't need USDFLD since you aren't using field variables - all the work could be done in HETVAL?

* USDFLD and HETVAL are called for each successive integration point. You can't assume that a variable such as A has any meaningful value until you have set it in the subroutine.
 
Hi mrglodlthorpe:

I have removed USDFLD from my subroutine, as my field variables are not a function of temperature. I used your inputs and set the following subroutine with initial statements as:
STATEV(1)=T
STATEV(2)=A
STATEV(3)=B



If T.lt.400 then
A=f(T)
B=1-A

endif

and the above statments from my previous post.

It only give STATEV(1) but does not calculate STATEV(2) or (3). I used A=f(T) instead of A=f(STATEV(1)). I hope this should not make such a difference.


Thanks

 
Hi mrgoldthorpe:

I think your suggestion seem to work for the time I ran my simulation but a totally interesting problem came up.

my commands in the HETVAL: Statev(1)=Temp(1) contains the temperature history of the activated set and substrate elements. That is, if I have total of 400 elements in the substrate (300K) and 6 elements per set (1700K), the above program makes the whole 406 elements to become 1700K when the set is activated and calculates the corresponding volume fraction and assigns contours.

I want the commands to calculate VOF only for the set activated and only those elements in the substrate which receive heat from the activated set.


Can you suggest any commands I can use to overcome this problem?.

 
I'm not entirely sure what you mean.

HETVAL should only generate heat for a specific material. If you only want to generate heat in the top layer of the substrate ("...which receive heat from the activated set...") then make the other elements in the substrate a different material - the same material name but having no HETVAL command.

I presume by "activated set" you mean elements currently activated by *MODEL CHANGE, as I suggested to you in another thread? If that's the case, I'm not sure why the inactive elements are being dealt with by HETVAL, if that's what you are suggesting. You could use separate materials for the different 'active sets' and undertake a check in HETVAL according to the material name (CMNAME) and TIME. You only set heat generation for a particular 'active set' according to the time step. That is Element Set 1 is only assigned heat when the time lies between 1 and 2, Element Set 2 is only assigned heat when the time lies between 2 and 3, and so on.

If you read the description of USDFLD, you'll see it is called before HETVAL, and that field variables (presumably including *INITIAL CONDITIONS, TYPE= TEMPERATURE) are interpolated from nodes to the material points at which USEFLD and HETVAL are called.

So perhaps you should re-instate USDFLD to first define the state variables, which are then used by HETVAL.
 
Thanks mrgoldthorpe: the subroutine now calculates phase fractions as a function of temperature.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor