Author Topic: How to use FE^2 for user defined element  (Read 13073 times)

walkandthink

  • Jr. Member
  • **
  • Posts: 14
How to use FE^2 for user defined element
« on: June 15, 2017, 09:00:40 AM »
Dear FEAP administrator,
    I installed  feap8.4's fe^2 , and I can run the Iblk3 example successfully.
    Now I'm trying to write my own user element, so I'm wondering how to use FE^2
for my own subroutine.
   
   I tried the following inp file, but not success:
   **************************************************
   noprint
   mate,1
   user,1
   cc  la  la 0.0 0.0 0.0
   la  cc  la 0.0 0.0 0.0
   la  la  cc 0.0 0.0 0.0
   0.0 0.0 0.0  mu 0.0 0.0
   0.0 0.0 0.0 0.0  mu 0.0
   0.0 0.0 0.0 0.0 0.0  mu

   mate,2
   user,2
   cc  la  la 0.0 0.0 0.0
   la  cc  la 0.0 0.0 0.0
   la  la  cc 0.0 0.0 0.0
   0.0 0.0 0.0  mu 0.0 0.0
   0.0 0.0 0.0 0.0  mu 0.0
   0.0 0.0 0.0 0.0 0.0  mu

  finite
  rve,Iinpt
   ******************************************
   
   for micro's inp, I write the following line:
   **************************************
   64 27 1 3 3 8

   parameter
   mi = 3

   !noprint

   mate,2
   ...
   ***************************************

   One example I'm trying to do is: for macro scale, I have governing equations for displacement U(linear elastic problem), and
concentration C0(diffusion problem); while for the micro scale, I have a different concentration C1(micro's diffusion problem).
Macro's U and C0 will influce the flux of the micro scale's particle surface.
  My idea is, for each gauss point, compute macro scale's U and C0, and then give it as constant to micro diffusion problem, where the micro scale's diffusion equation need U and C0 to compute the flux for its boundary condition. Then we solve C1 and return it to macro scale.
  Is it possible to do it in feap? Or any other good ideas?

  Thank you!

   The attachment is my input file.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: How to use FE^2 for user defined element
« Reply #1 on: June 15, 2017, 04:14:02 PM »
The material model for the macro-scale problem in an RVE.  The material model for the RVE will be standard FEAP material  models or your user model.  You need to have at least two input files - one for the macro-scale problem and one or more for the micro-scale problem.

walkandthink

  • Jr. Member
  • **
  • Posts: 14
Re: How to use FE^2 for user defined element
« Reply #2 on: June 16, 2017, 12:26:07 AM »
The material model for the macro-scale problem in an RVE.  The material model for the RVE will be standard FEAP material  models or your user model.  You need to have at least two input files - one for the macro-scale problem and one or more for the micro-scale problem.

Thank you Professor, thank you sincerely for your reply.

Sorry, I don't understand your answer. I guess what you mean is:
   For macro problem, I should have input file IMacro and its user element elmt01.f
   For micro problem, I should have input file IMicro and its user element elmt02.f.
   
Then in IMacro, I should use the following line:
   **********************   
    mate,1
    user,1
    E1 Mu1 Diff1
   
    rve,IMicro
   *************************

For the IMicro, I should use these lines:
   ***********************************
   mate,2
   user,2
   E2 Mu2 Diff2
   ***********************************

Is it correct?

The attachment is my input file, I run it via "mpirun -np 4 feapfe2 -iIMacro",
but it didn't success.
Feap give me a warning:

"*WARNING* Length allocation for:RVESD Length =           0"



Best regards
« Last Edit: June 16, 2017, 12:33:48 AM by walkandthink »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: How to use FE^2 for user defined element
« Reply #3 on: June 16, 2017, 03:03:41 PM »
Let's start with discussing your Imacro file

The material model should just be:

mate,1
   solid
   rve, Imicro

The solid can be replaced by a user element but that element needs to have a material model
for the RVE (look at the modlsd.f or modlfd.f files in the feap program).  So for now you should use one of the standard feap elements.

The Imicro file can use your element and material models.  Be sure the type of analysis matches between the macro and micro behavior (i.e., either small strain or finite strain in both -- use standard elements as the mixe types do not converge well with RE2.

Follow how the Iblk3 set up the various files for the different processors and the 'solve' file.  If you use 4 processors you will need 3 files for the microscale analysis using the Imicro model.

Study very carefully all the steps in the Iblk3 solutions -- understand what each file does and why it is needed.

walkandthink

  • Jr. Member
  • **
  • Posts: 14
Re: How to use FE^2 for user defined element
« Reply #4 on: June 19, 2017, 02:24:27 AM »
Thank you sincerely for the reply Professor, this is really helpful!

I think I need to write my own material model for RVE.

I read the modlfd.f subroutine, feap has an interface for "user model" when
if(umat .le. 100) then
  call umodel(...)
endif
I think I should wirte my own material model in umodel subroutine.


Thank you ;D

Let's start with discussing your Imacro file

The material model should just be:

mate,1
   solid
   rve, Imicro

The solid can be replaced by a user element but that element needs to have a material model
for the RVE (look at the modlsd.f or modlfd.f files in the feap program).  So for now you should use one of the standard feap elements.

The Imicro file can use your element and material models.  Be sure the type of analysis matches between the macro and micro behavior (i.e., either small strain or finite strain in both -- use standard elements as the mixe types do not converge well with RE2.

Follow how the Iblk3 set up the various files for the different processors and the 'solve' file.  If you use 4 processors you will need 3 files for the microscale analysis using the Imicro model.

Study very carefully all the steps in the Iblk3 solutions -- understand what each file does and why it is needed.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: How to use FE^2 for user defined element
« Reply #5 on: June 19, 2017, 07:06:19 AM »
The routine 'umodel' calls 'umatl01', 'umatl02', etc.  YOu should choose one of the models -- umatl01.f to write your user model.  This also requires you to use the routine 'umati01.f' to input the parameters.  There are some examples posted - search for user models; also you can see the web site of Professor Govindjee for an example.

A user model can work in any part of FEAP:  the main program; the FE2 module; the IgA(NURBFEAP) module or the parallel module.

walkandthink

  • Jr. Member
  • **
  • Posts: 14
Re: How to use FE^2 for user defined element
« Reply #6 on: June 19, 2017, 08:54:12 AM »
The routine 'umodel' calls 'umatl01', 'umatl02', etc.  YOu should choose one of the models -- umatl01.f to write your user model.  This also requires you to use the routine 'umati01.f' to input the parameters.  There are some examples posted - search for user models; also you can see the web site of Professor Govindjee for an example.

A user model can work in any part of FEAP:  the main program; the FE2 module; the IgA(NURBFEAP) module or the parallel module.
Thank you so much professor!
I will try it and it should work.
Thank you ;D