User initial conditions with sdvini.f

Hello,

for a user material, I need to be able to pass an initial condition for an internal parameter to the subroutine.
How do I use the subroutine sdvini.f for that? I don’t realy understand the explanation in the user manual.
For example, I have the internal scalar field variable, which should take anything between 1 and 0 initially, dependent on the simulation that is run. But how do I tell the sdvini routine, which variable I want to manually be able to edit? The template is as follows:

implicit none
!
      integer nstatv,ncrds,noel,npt,layer,kspt,i
!
      real*8 statev(nstatv),coords(ncrds)
!
!     code for retrieving the internal state variables
!
c      do i=1,13
      do i=1,nstatv
         statev(i)=1.d0
      enddo
      return
      end

As it looks to me, it simply sets every internal variable initially to 1?

Then, I will set the initial condition. The Documentation says:

Following line for TYPE=SOLUTION if USER is not specified:

Element number.
Integration point number.
Value of first internal variable.
Value of second internal variable.

There is no line following the first one for TYPE=SOLUTION,USER.

But how do I set it then? The following seems incorrect to me.

*INITIAL CONDITION,TYPE=SOLUTION,USER
elall,
nall,
0.0,
0.5,
...

As for my case, I want to set it on every integration point of my mesh. Do I even need to edit the sdvini routine?

Thanks for your time!

It should be just:

*INITIAL CONDITIONS, TYPE=SOLUTION, USER

without data lines. Here you can find an example from Abaqus documentation (of course, it’s not the same but can be a good starting point): http://130.149.89.49:2080/v2016/books/ver/default.htm?startat=ch04s01abv285.html

1 Like

Thanks, that was what I wanted to know. So for an initial condition, editing the sdvini routine is not necessary, depending on what I want to archive.