Hi,
I've prepared a pack for you with my solution. The pack includes *.inp and *.for files.
This is your model with small modification (new step, new definition for field variable in *ELASTIC section).
Please take a look for it since I put some explanations in comments.
This is how I changed your USDFLD subroutine:
Code:
c first inc. of first step ?
if (kstep .eq. 1 .and. kinc .eq. 1) then
c read y-coordinate
y = coord(2)
c calculate Young module
E = 69600.d0 * (1.d0 + y / 2.5d0)
c define depend state variable (E(y))
field(1) = E
c save E value for state dependend variable
statev(1) = E
c do it for all others inc. and steps
else
c assign initial values calculated in first inc.
field(1) = statev(1)
end if
The main idea is to:
1. define field variable as E instead thickness as in your case.
2. point 1 allow us to calculate E respect to your equation.
3. thickness (y-coordinate) I read for material points not for nodes. It easier since coordinates for material points are pass into subroutine
with dummy arguments lists (coord array) and we do not have to use GETVRM routine to read node coordinates.
4. E is calculated only for first increment when all elements are in initial positions, for all others increment I assign initial values.
So I have no influence of element deformation for my material data during solution.
It is true only if in first increment of my analysis I have no loads which could deform geometry.
5. remember that USDFLD subroutine is call at the end of an increment, it means E values assign for elements are not correct for first increment.
To solve it I see two possibilities:
a) add one artificial step with one increment where we do not generate any stress/strains at the beginning of the analysis.
b) set initial values for field variable.
Take a look for abaqus documentation 30.2.1 Initial conditions in Abaqus/Standard and Abaqus/Explicit (Defining initial values of predefined field variables).
I think the best is to use external odb file to read initial field variables values. In this case You do not need USDFLD subroutine for other runs with the same part.
You need to only run one analysis with subroutine to set field variables.
Value of E assigned for each element you can plot in Viewer with FV1 field output.
If the case of any doubts please let me know.
Regards,
Bartosz