
support
Public
5  Blocker
5  Normal
Configuration avec mingw
0
None
Bonjour,
J'ai installé la dernière version de msys and mingw. "configure" n'arrive pas à s'exécuter normalement car il rencontre un problème pour l'interface entre C/C++ et Fortran. Je joins le config.log généré.
Merci d'avance pour votre aide
1776
None
1191663678
Microsoft Windows
Open
Unlocked
None
1581
0
1191663678

Added config.log, #3036
ducreux

support
riturajtiwari@rediffmail.com
Public
3  Normal
5  Normal
getFEM Matlab Interface  Import from Gmsh  Error : error in getfem_import.cc, line 113: the GMSH element type is unk
0
None
Hello,
I am learner for finite element methods. Just wanted to simulate some physical (thermal heat transfer) problem for hollow at center concentric solid cylinders.
I faced two problems.
1) When I am importing a structured 3d mesh created from GMSH and plotting the mesh file in getFEMMatlab interface the plot is of unstructured type. So it looks like getFEM is not able to know the 3d strutured meshing.
2) When I am importing a 3d mesh (2nd order) created from Gmsh and trying importing it throws an error. But same works for 2D 2nd order structured meshing.
Below is the error log :

logic_error exception caught
??? Error using ==> gf_matlab
Error in getfem_import.cc, line 113 :
the gmsh element type 16is unknown..
Error in ==> gf_mesh at 76
[varargout{1:nargout}]=gf_matlab('mesh',varargin{:});

Please help.
Thanks & Regards
Rituraj
2393
None
1248757115
GNU/Linux
Open
Unlocked
None
1581
0
1248757115

Added example_2nd_Order.msh, #6279
None

support
bouke_1@zonnet.nl
Public
3  Normal
5  Normal
Error compiling on MinGW
1274298302
None
I am compiling GetFEM on MinGW (gcc 4.4.0) and I encountered a problem compiling src/getfem_interpolated_fem.cc: it complains that 'uint' is not defined in this scope on line 260 and 295.
As a workaround I changed 'uint' to 'gmm:uint16_type' and that seems to solve it. Still you may want to look what's going on...
2546
None
1274272469
Microsoft Windows
Closed
Locked
None
1581
0
1274298302
Open/Closed
Open
Closed
renard
Original_Submission
Already fixed in svn version.
renard
Discussion_Lock
Unlocked
Locked
renard

support
Public
4  Important
5  Normal
Wrong order of libs when building python interface
1284377483
Done
I'm trying to build getfem with the Python interface on windows with the mingw compiler. It works fine all the way up to the Python interface where I get link errors.
I closer study of the link call (see below) reveals that the libraries are listed in the wrong order. lstdc++ is listed before lgetfem. Hence symbols needed by getfem fails as undefined reference.
I tried to reverse the order of those two libraries and call the compiler/linker directly, and then it worked, but a subsequent call to 'make' did a rebuild and the failures were back.
Any obvious way to get around this? Is it a bug in getfem configuration or in the autogenerated interface/src/python/setup.py? I've uploaded setup.py for your inspection.
Here's the call to the linker:
C:\Develop\opt\Qt\mingw\bin\gcc.exe mnocygwin shared s .\Release\getfem_python_c.o .\Release\_getfem.def L../.libs L../../../src/.libs L../../../src/.libs Lc:\Develop\Python26\libs Lc:\Develop\Python26\PCbuild lgetfemint lstdc++ lm lgetfem lpython26 lmsvcr90 o .\_getfem.pyd
2607
None
1284101792
Microsoft Windows
Closed
Unlocked
None
1581
0
1284101792

Added setup.py, #10281
sigurds
1284128535
Original_Submission
In the file interface/src/python/setup.py.in, line 42 I exchanged
"libraries = libnames" with "libraries = ['getfemint','getfem','stdc++','m']" (actually the code commented out behind. Then I can build all of getfem without problems. With the original line in place I get wrong order of libstdc++ and libgetfem.
Why was the line that works for me commented out?
sigurds
1284233098
Original_Submission
I really don't know. Can you verify that is works also when you replace the line
libnames += ['getfemint','stdc++','m']
by
libnames += ['getfemint','getfem', 'stdc++','m']
(and still using "libraries = libnames" of course)
In that case, I will valid this modification in setup.py.in.
renard
1284363036
Original_Submission
Yes, it works as you suggested. It you want to, I can test your final edit of setup.py.in.
I did the following changes:
cclibopts = ' '.split() # getfem is explicitly added below
cclibopts += '@LIBS@'.split()
[..]
libnames += ['getfemint','getfem','stdc++','m']
[..]
libraries = libnames, #as before
sigurds
1284377483
Open/Closed
Open
Closed
renard

Added setup.py.in, #10334
renard
Status
None
Done
renard
Original_Submission
Ok, I commited the corresponding setup.py.in (I attached it also).
(file #10334)
renard
1284377874
Original_Submission
The new setup.py.in works fine for me. Thanks for the followup.
sigurds

support
Public
3  Normal
5  Normal
Problem with class gmm::unsorted_sub_index
1300119248
Done
Hi, I would like to know why this code fails:
#include <iostream>
#include <gmm/gmm.h>
int main(int argc, char* argv[]) {
try {
gmm::dense_matrix<double> m(4,4), c(2,2);
m(1,1) = 1;m(1,2) = 2;m(2,1) = 3;m(2,2) = 4;
std::vector<int> indx;
indx.push_back(2);
indx.push_back(1);
gmm::copy(gmm::sub_matrix(m,gmm::unsorted_sub_index(indx)),c);
std::cout << c;
} GMM_STANDARD_CATCH_ERROR;
}
I think maybe there is a problem in the class
gmm::unsorted_sub_index
because other (gmm::sub_index, gmm::sub_interval, gmm::slice) classes works.
Thanks for your help.
2714
None
1299871513
None
Closed
Unlocked
None
1581
0
1299871513

Added jacastillol
jacastillol
1300119248
Status
None
Done
renard
Open/Closed
Open
Closed
renard
Original_Submission
Thank you for this bug report.
The error ius in the file
gmm_sub_index.h
line 115 is
unsorted_sub_index(const unsorted_sub_index &si) : sub_index(si) { }
and should be
unsorted_sub_index(const unsorted_sub_index &si) : sub_index((sub_index &)(si)) { }
I made the correction in the svn version.
renard

support
paolo.greppi@libpf.com
Public
3  Normal
5  Normal
compile error in gmm_interface.h
1333808559
Done
on osx lion with Xcode 4.3 using Apple LLVM compiler 3.1, there is an error on lines 834,835,960,961 of gmm_interface.h version 4.1
"Reference to nonstatic member function must be called"
I patch it with:
834,835c834,835
< std::fill(begin_, end+nbc*nbl, b);
< iterator p = begin_, e = end+nbc*nbl;

> std::fill(begin_, end()+nbc*nbl, b);
> iterator p = begin_, e = end()+nbc*nbl;
960,961c960,961
< std::fill(begin_, end+nbc*nbl, b);
< iterator p = begin_, e = end+nbc*nbl;

> std::fill(begin_, end()+nbc*nbl, b);
> iterator p = begin_, e = end()+nbc*nbl;
2892
None
1333006462
Mac OS
Closed
Unlocked
None
1581
0
1333808559
Status
None
Done
renard
Open/Closed
Open
Closed
renard
Original_Submission
This error has already been corrected in the svn version. The correct expression is in fact
std::fill(begin_, begin_+nbc*nbl, b);
Thank you for the report.
renard

support
Public
3  Normal
5  Normal
Trouble Making GetFEM for MATLAB
1405577600
Invalid
Hello,
I am a student trying to install GetFEM++ for a project. I have had a lot of trouble getting it running for one reason or another. Here is where I am now:
 I am installing this on Linux Mint 17
 My MATLAB file is located at /home/user/Matlab.
 My MATLAB version is 2012a
 GetFEM is installed on my Desktop
I have used the ./configure command successfully. Afterwards, I attempted to make the file and got the errors below:
3169
None
1405507863
GNU/Linux
Closed
Unlocked
None
1581
0
1405507864

Added make_error.jpg, #21448
aleajacta
1405518147
Original_Submission
Hi  thanks for the help.
Apparently I accidentally installed an earlier version of GetFEM onto my computer. I deleted it and used the up to date stable version.
After resinstalling I was able to make the file succesfully. However, when I attempt make install I get the below set of errors:
make[1]: Entering directory `/home/peter/Desktop/getfem4.3/src'
make[2]: Entering directory `/home/peter/Desktop/getfem4.3/src'
/bin/mkdir p '/usr/local/lib'
/bin/bash ../libtool mode=install /usr/bin/install c libgetfem.la '/usr/local/lib'
libtool: install: /usr/bin/install c .libs/libgetfem.lai /usr/local/lib/libgetfem.la
/usr/bin/install: cannot create regular file '/usr/local/lib/libgetfem.la': Permission denied
make[2]: *** [installlibLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/peter/Desktop/getfem4.3/src'
make[1]: *** [installam] Error 2
make[1]: Leaving directory `/home/peter/Desktop/getfem4.3/src'
make: *** [installrecursive] Error 1
Regarding the compiler: I am using the compilers included in the buildessential package: gcc and g++. Let me know if there is more information I can offer regarding this as I am very new to Linux.
Thank you for your time,
aleajacta
1405577600
Status
None
Invalid
renard
Open/Closed
Open
Closed
renard
Original_Submission
Please preferably post this kind of demand on the user mailing list since this is mostly some installation difficulties than a real bug.
Did you use the command
sudo make install
in order to be superuser ?
Please answer to the mailing list.
renard

support
jeannoel.bouvier@ujfgrenoble.fr
Public
3  Normal
5  Normal
Problem building getfem++ with matlab on GNU/Linux Debian
0
None
Hello,
I encounter problems while building getfem++ with matlab support :
$ ./configure PREFIX=[MY_PREFIX] MEX=[PATHTOMEX] withpic enablematlab
$ make j2
[...]
I. I./.. DMATLAB_RELEASE= \
./gfm_mex.c ./gfm_common.c ./../gfi_array.c \
../.libs/libgetfemint.a ../../../src/.libs/libgetfem.a lblas llapack  (rm gf_matlab; false)
Building with 'gcc'.
/tmp/getfem4.3/interface/src/matlab/./gfm_mex.c: In function mexFunction:
/tmp/getfem4.3/interface/src/matlab/./gfm_mex.c:127:20: error: operator '==' has no left operand
rm: cannot remove `gf_matlab': No such file or directory
make[4]: *** [gf_matlab] Error 1
Any help would be appreciate to understand what happens.
Thanks in advance for your help.

JeanNoel BOUVIER
Laboratoire ISTerre
3237
None
1429002489
GNU/Linux
Open
Unlocked
None
1581
0
1429037749
Original_Submission
This error occurs when the configure script do not detect correctly matlab on your system. Please check the message and log files of the configure script.
Yves.
renard
1429102150
Original_Submission
Bonjour Yves,
 MERCI pour votre aide
 compilation OK :
j'ai ajouté :
#define MATLAB_RELEASE R2014b
dans interface/src/matlab/gfm_common.h
 installation OK :
j'ai renommé
interface/src/matlab/gf_matlab.mexa64 en interface/src/matlab/gf_matlab
Estce la bonne maniere de procéder ?
MERCI encore.
Bien à vous,

JNB
None
1429103560
Original_Submission
Bonjour,
Si vous arrivez à executer les programmes de tests qui sont dans
interface/tests/matlab
Alors, je dirais que oui (penser à donner le path de la l'interface compilée dans la variable MATLABPATH ou avec la commande matlab addpath).
Cordialement,
Yves.
renard
1429167433
Original_Submission
Bonjour Yves,
Je fais tester cela aux utilisateurs et vous donnerai un feedback.
MERCI.

JNB
None

support
mdoan@pmc.ucsc.edu
Public
3  Normal
5  Normal
Issue with python interface
0
None
Hello,
I'm trying to compile the python interface of Getfem4.3 on a OS X 10.10.3 computer.
The compilation process occurs without major issue, but when importing python, I get the following error
> doanm$ python
# Python 2.7.10 Anaconda 2.2.0 (x86_64) (default, May 28 2015,17:04:42)
# [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
> >>> import getfem as gf
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# File "/Users/doanm/Documents/Programs/getfem/getfem4.3/interface/src/python/getfem.py", line 44, in <module>
# from _getfem import *
# ImportError: dlopen(/Users/doanm/Documents/Programs/getfem/getfem4.3/interface/src/python/_getfem.so, 2): Symbol not found: __ZN2mu10ParserBase7SetExprERKSs
# Referenced from: /usr/local/lib/libgetfem.4.dylib
# Expected in: flat namespace
# in /usr/local/lib/libgetfem.4.dylibThanks,
gcc is the latest version available on http://hpc.sourceforge.net/
> doanm$ gcc v
# Using builtin specs.
# COLLECT_GCC=gcc
# COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64appledarwin14.0.0/4.9.2/ltowrapper
# Target: x86_64appledarwin14.0.0
# Configured with: ../gcc4.920141029/configure enablelanguages=c++,fortran
# Thread model: posix
# gcc version 4.9.2 20141029 (prerelease) (GCC)
Python is installed from the latest version of Anaconda:
> doanm$ which python
# /Applications/anaconda/bin/python
# doanm$ python version
# Python 2.7.10 :: Anaconda 2.2.0 (x86_64)
Maybe the compilation is perform with a missing option, but I quite new to compilation debugging. (I got this issue with minimal options "enablepython=yes withpic", and then later with "enablestatic" and/or "enableshared").
Do you have any clue about the cause of the problem ?
Thanks a lot for your help,
 Mai
3262
None
1434834218
Mac OS
Open
Unlocked
None
1581
0
1434834218

Added config.log, #24586
None

Added config.status, #24587
None

Added make.log, #24588
None
1434885596
Original_Submission
Dear Mai,
The error indicates that the muparser library is not found. Is it installed in the system ? (/usr/lib or /usr/local/lib).
Note that the svn version (and the future 5.0 version which will be released soon) is not still dependent on muparser.
Best regards,
Yves.
renard

support
Public
3  Normal
5  Normal
Problems with region import from gmsh to Get
1435997010
Invalid
3264
None
1435858682
None
Closed
Locked
None
1581
0
1435996948
Discussion_Lock
Unlocked
Locked
renard
Status
None
Invalid
renard
1435997010
Open/Closed
Open
Closed
renard

support
Public
4  Important
5  Normal
how importing physical surfaces from gmsh to getfem++ Help!
0
None
ello I have a problem and really hope for your help,
I use the getfem++ c++ library to model a linear elastic system. I have a mesh generated in gmsh which contains 4 physical surfaces. Now I want to import this physical surfaces as regions into a getfem mesh (e.g. mymesh) using the function:
import_mesh_gmsh(mymesh,region_map).
It seams that the regions are not there!!! They should be stored in mymesh.regions(region_id) right? Iterating in region_map shows me that the physical surfaces were found and imported. But I can't find them anywhere.
I attached the importing part of my script, there you can see what i tried. The imported gmsh mesh with the physical surfaces is also attached as facegear_mesh.msh where the import is done in the
Has any body done this before and could send me an example? I would really appreciate any help.
Best,
Natanael
3265
None
1435859596
GNU/Linux
Open
Unlocked
None
1581
0
1435859597

Added facegear_mesh.msh, #24611
natanael_lanz

Added Help.cc, #24610
natanael_lanz
1435996898
Original_Submission
Dear Natanael,
It seems that you have surface elements in your mesh. The surface elements are not imported by default if they do not correspond to element faces. If you do really want to import them, you have to use the following version of import_mesh_gmsh:
import_mesh_gmsh("facegear_mesh.msh", cmesh, true, 0, &imported_regions);
But of course, you will have to care to build a consistent prolem on this surface ...
Another remark : mdbrick and model_state are now deprecaded structures. This structures have been suppressed in the svn release. So please use instead the getfem::model object (see the demo files in the tests directory).
renard
1436360984
Original_Submission
Dear Yves,
Thank you very much. The problem was indeed that I thought, the imported faces would correspond to element faces but they did not. After changing that in the gmsh file it worked perfectly. Again thank you!
Best,
Natanael
natanael_lanz

support
Public
1  Wish
5  Normal
When Can I install Getfem++ Version5.0 in Ubuntu by apt command
0
None
Dear Getfem++ project
Hello, my name is Tetsuo Koyama.
I'm Japanese CAE engineer.
I always use Getfem++ by Python interface, and recently presented in Japanese Open Source CAE study group.
To disseminate Getfem++ in Japan I have four wishes.
1) I want to install pythongetfem++ version 5.0 by apt command in Ubuntu.
2) I want to install pythongetfem++ 64 bit version in Windows.
3) Many engineers around me uses GitHub. Is there any plan to moving repository to GitHub?
And There is one more question.
4) Is there any place I can share Getfem++ script in this project?
Sorry for my stupid English and wihes.
3309
None
1453635214
GNU/Linux
Open
Unlocked
None
1581
0
1453755883
Original_Submission
Dear Tetsuo Koyama
1. The GetFEM++ packages in Ubuntu come from Debian, where unfortunately it is only version 4.2 which is available at the moment. For not waiting until version 5 is packaged in Debian and incorporated in some future version of Ubuntu, the alternative is to create a personal package archive (ppa) and create the packages independently. Then users can use this ppa to install the packages through the apt system.
2. For Windows there aren't AFAIK any packages at the moment so one has to compile GetFEM++ manually. I have used MinGW in the past for compiling GetFEM++ on Windows.
3. Maybe it is a good idea to mirror the GetFEM++ repository to a GitHub account where people can easily fork from. However I don't think it is a good idea to move the development from the current repository to GitHub.
4. If you simply send your script to the mailing list and if it does something sufficiently interesting, I suppose it will be considered for inclusion in future versions of GetFEM++ as one of the distributed examples.
logari81
1453779817
Original_Submission
Dear Getfem++ project
Thank you for reply.
I'll try as you taught.
tkoyama010

support
Public
3  Normal
5  Normal
getfem5.0 test failed in plate.pl
1454851531
Done
Dear Getfem project
I'm Tetsuo Koyama.
I compiled getfem5.0 in Ubuntu15.10, and checked by using "make check". In results, only plate.pl was failed. I watched source code, but I couldn't understand the reason.
Do you know somthing about the reason? For reference, I append configure log and test log.
3316
renard
1454826247
GNU/Linux
Closed
Unlocked
None
1581
0
1454826247

Added config.log, #26608
tkoyama010

Added plate.pl.log, #26609
tkoyama010
1454851531
Open/Closed
Open
Closed
renard
Assigned_to
100
4654
renard
Original_Submission
Dear Tetsuo Koyama,
There were indeed an error (a missing boundary condition) which was not detected when MUMPS is used (you disabled it). A fix has been commited for the next release.
Thank you for the bug report.
renard
Status
None
Done
renard

support
Public
3  Normal
5  Normal
How can I define mass matrix which is defined density in each nodes?
0
None
Dear Getfem project
I'm Tetsuo Koyama. I wonder how can I define mass matrix which define density in each nodes. I saw source code and manual, and made following source code in python interface.
M = gf.asm('volumic','a=data(#2);M$1(#1,#1)+=sym(comp(Base(#1).Base(#1))(:,:).a(j));', mim, mfu, mfd, np.repeat(rho, mfd.nbdof()))
But, mass matrix seems twice size of corrcet answer. Can you guess which is wrong ?
3319
None
1455466666
None
Open
Unlocked
None
1581
0
1455557179
Original_Submission
Dear Tetsuo Koyama,
Your expression is indeed correct and should work. alternatively, you can also use the highlevel generic assembly for which the assembly string could be "a*u*Test_u" with "a" the coefficient and "u" the variable.
Best regards,
Yves.
renard
1455655270

Added M1.mtx, #26742
tkoyama010

Added test.py, #26741
tkoyama010
1455655271

Added M2.mtx, #26743
tkoyama010
Original_Submission
Dear Yves Renard
Thank you for reply. I checked asm function and asm_mass_matrix function in MatrixMarket format. For reference, I share MatrixMarket format files and script. M1 is asm function and M2 is asm_mass_matrix function in 1D FEM. In my calculation, asm_mass_matrix function is correct.
Best regards,
Tetsuo Koyama.
(file #26741, file #26742, file #26743)
tkoyama010
1455797737

Added test.py, #26758
renard
Original_Submission
Dear Tetsuo Koyama,
There was a small mistake in your assembly string. The correct one is :
'a=data(#2);M$1(#1,#1)+=sym(comp(Base(#1).Base(#1).Base(#2))(:,:,j).a(j));'
I post also a new version of your test.py with the expression for the highlevel assembly language.
Best regards,
Yves.
(file #26758)
renard
1455937917
Original_Submission
Dear Yves Renard
Thank you. I could understand the reason.
Best regards,
Tetsuo Koyama.
tkoyama010

support
Public
3  Normal
5  Normal
gmake check > failed
0
None
Good morning,
i have installed the getfem library, but after the compilation the make check gave me two fails: plate.pl and test_gmm_matrix_functions.pl;
i looked into these files and they don't give much information on why they don't work.
1) why these two test might not work?
2) what problems could I have if I don't solve it?
in the configuration I used the options:
./configure prefix=/opt/getfem/ CXX=$mkCxxCompiler withpic enableshared enablesuperlu withblas="L$mkOpenblasLib lopenblas"
where mkCxxCompiler and mkOpenblasLib are the path to the compiler gcc+system and to openblas
thank you very much, tell me if you need more information about my problem
3354
None
1465849095
GNU/Linux
Open
Unlocked
None
1581
0

support
Public
3  Normal
5  Normal
Python 3 not supported
0
None
Does getfem++ python interface support python 3?
I am having trouble getting it to configure with python 3 due to changes to the print statement from python 2 > 3.
3374
None
1474546850
Mac OS
Open
Unlocked
None
1581
0
1474546850

Added tacotinman
tacotinman
1474987836
Original_Submission
Unfortunately, GetFEM do not support python 3 yet. I don't know if there is important modification in the interface to do to support python 3. I agree that this is an important point.
renard

support
Public
4  Important
5  Normal
Help needed for a sliding boundary condition
0
None
I am a new use for the GetFEM++ library with the python interface.
I am trying to solve a problem with a hollow box with a sliding boundary condition at one of the xdirection face as shown in the figure.
I am attaching the simulation code file to this message.
I do not know any sliding boundary condition in GetFEM++, so I am using the contact with a rigid surface for the sliding boundary condition.
But the result attached shoes no sliding deformation along the rigid wall, but the structure crossed the rigid boundary.
1. Removal of the rigid boundary gives the same result when I use the high value of penalty constant...
2. Use of the small penalty value shows the correct displacement of the structure with no rigid sliding boundary.
3. but the solver does not converge when I place the rigid sliding boundary with small penalty constant.
Can you please help me to resolve the problem?
Any help would be highly appreciated.
With Regards,
Pankaj Kumar
3399
None
1482847543
GNU/Linux
Open
Unlocked
None
1581
0
1482847543

Added result01penalty0p1Er0p1E.png, #29599
mechamind

Added slidingboxcode.py, #29600
mechamind

Added rect7082.png, #29598
mechamind
1482931511
Original_Submission
Dear Pankaj Kumar,
Your problem may be due to the fact that your without friction, you have some nonblocked degrees of freedom tangantially to your obstacle. You have to fix at least three degrees of freedom (two translation and a rotation). You can use the add_pointwise_constraints methods for that.
Yves.
renard
1482997061

Added Selection_349.png, #29605
mechamind
Original_Submission
Dear Prof. Yves Renard,
Thanks for your reply.
I have tried to constrain 3 points in the plane in contact with the rigid boundary, but I can see the deformations on all the points except the THREE points under constraint (FIGURE IS ATTACHED)
For the sliding boundary plane at x = 2, I wrote a code:

cpoints = [2, 0, 0, 2, 1, 1, 2, 1, 1] # constrained points for 3d
cunitv = [1, 0, 0, , 1, 0, 0, 1, 0, 0] # corresponding constrained directions for 3d
md.add_initialized_data('cpoints', cpoints)
md.add_initialized_data('cunitv', cunitv)
md.add_pointwise_constraints_with_multipliers('u', OUTER_BOUNDARY, 'cunitv')

I can get the result by putting a rigid boundary (in contact) at the boundary. Earlier my not working boundary string was 'x2', but changing the string to 'x+2' gave me result (So normal of the rigid boundary is important) (FIGURE IS ATTACHED).
Posting codes using raytracing and nodal contact:

mflambdaOut = gf.MeshFem(m, N)
mflambdaOut.set_classical_fem(1)
md.add_filtered_fem_variable("mflambdaOut", mflambdaOut, OUTER_BOUNDARY)
ind_out = md.add_integral_large_sliding_contact_brick_raytracing("r", release_dist, "f_rigid", "alphaOut", 0)
md.add_slave_contact_boundary_to_large_sliding_contact_brick(ind_out, mim, OUTER_BOUNDARY, "u", "mflambdaOut", "")
md.add_rigid_obstacle_to_large_sliding_contact_brick(ind_out, "x+2", N)

# point method
obstacle = 'x+2' # normal sign value is defined using this function....
nbc = np.size(mfu.basic_dof_on_region(OUTER_BOUNDARY)) / N
#nbc = nbc*(N1)
md.add_variable('lambdaOut01', nbc)
md.add_nodal_contact_with_rigid_obstacle_brick \
(mim, 'u', 'lambdaOut01', 'r', OUTER_BOUNDARY, obstacle, 1)

But I guess, "rigid contact" for sliding boundary condition makes the code slower than the code using "pointwise constraints."
Thanks again for your time and help.
With Regards,
Pankaj Kumar
(file #29605, file #29606)
mechamind

Added Selection_350.png, #29606
mechamind
1483010300

Added add_pointwise_constraints_with_multipliers_application.png, #29610
mechamind
Original_Submission
Dear Prof. Yves Renard,
I have tried using the add_pointwise_constraints_with_multipliers for all the points on the boundary using the code:

pointsAtTheBoundary = m.pid_in_regions(OUTER_BOUNDARY)
numberOfPointsAtTheBoundary = pointsAtTheBoundary.shape[0]
numberOfDOFAtTheBoundary = numberOfPointsAtTheBoundary*N
cpoints = np.zeros(numberOfDOFAtTheBoundary)
cunitv = np.zeros(numberOfDOFAtTheBoundary)
print cpoints.shape[0]
countDofs = 0
for [i, j] in enumerate(pointsAtTheBoundary):
# adding points
cpoints[countDofs] = m.pts(j)[0][0]
cpoints[countDofs+1] = m.pts(j)[1][0]
cpoints[countDofs+2] = m.pts(j)[2][0]
# adding constraints
cunitv[countDofs] = 1
cunitv[countDofs+1] = 0
cunitv[countDofs+2] = 0
countDofs = countDofs + 3
md.add_initialized_data('cpoints', cpoints)
md.add_initialized_data('cunitv', cunitv)
md.add_pointwise_constraints_with_multipliers('u', 'cpoints', 'cunitv')

I can get the answer when I am using 1st order FEM, but it uses additional points at the boundary when I use 2nd order (generates additional points at the boundary for 2nd order FEM).
The Von Mises stress calculated using the rigid contact and using add_pointwise_constraints_with_multipliers are of the same order and range (the 1st order is less accurate).
I am attaching the screenshots (add_pointwise_constraints_with_multipliers_application.png) for the 1st and 2nd order result.
If I can select the additional points generated for the second order to apply the add_pointwise_constraints_with_multipliers constraint ... I guess we can get the correct result for rigid sliding boundary condition in simulation.
With Regards,
Pankaj Kumar
(file #29610)
mechamind
1483029402
Original_Submission
This is not the idea. md.add_pointwise_constraints_with_multipliers should be used only to fix some rigid body motions. In particular, it is not recomended to fix some displacement on the contact boundary. And it is not necessary to fix a displacement in the x direction (your contact normal).
A first point should be chosen in the symmetry axis of your body (something like (1.5, 0, 0 may be) there your prescribe horizontal motions. Then a second point have to be chosen on the xy plane and prescribing the displacmeent in the z direction to prescribe the rotation. This gives something like
cpoints = [1.5, 0, 0, 1.5, 0, 0, 1.5, 0.5, 0]
cunitv = [0, 1, 0, , 0, 0, 1, 0, 0, 1]
and in your call
md.add_pointwise_constraints_with_multipliers('u', OUTER_BOUNDARY, 'cunitv')
OUTER_BOUNDARY have to be replaced by 'cpoints' of course.
Yves.
renard
1483064559
Original_Submission
Thanks for your kind help :)
mechamind

support
Public
3  Normal
5  Normal
2D axisymmetric simulation
0
None
I am not able to find a 2D axisymmetric element in GetFEM++ to solve a hollow cylinder compression problem as shown in the figure.
I decided to simulate a 3D section of the problem to save the computation time, but the 3D section needs sliding boundary conditions at the four (4) locations as shown in Figure.
What type of boundary condition should we use for the sliding boundary conditions?
Can you please help me to resolve the problem?
Any help would be highly appreciated.
With Regards,
Pankaj Kumar
3400
None
1482848287
None
Open
Unlocked
None
1581
0
1482848287

Added axisymmetric.png, #29601
mechamind
1482932223
Original_Submission
Drear Pankaj Kumar,
There is in fact a structure for 2D axisymmetric problems in GetFEM (in getfem/getfem_torus.h) but it is not documented and not available in the python/matlab/scilab interface.
Modelizing this by a thin section is not so easy, I think. I should be better to write the correct 2D problem and use the generic assembly brick. In particular, the boundary condition should be more of a periodic kind to try to ensure the independance of the solution with respect to the angle.
Best regards,
Yves.
renard
1482997649
Original_Submission
Dear Prof. Yves Renard,
Thanks for your reply. The capability of GetFEM++ to solve 2D axisymmetric problems is very useful for the FEM community.
Is it possible to post a small example (in C++) to help us understand the 2D axisymmetric capability in GetFEM++? I am planning to shift to C++ for GetFEM because I am planning to couple the GetFEM++ with OpenFOAM (I have OpenFOAM (CFD) background).
Thanks again for your time and help.
With Regards,
Pankaj Kumar
mechamind
1483035972
Original_Submission
Dear Pankaj Kumar,
In getfem_torus_fem.h, a structure 'torus_mesh' allows to transform the 2D mesh of the section into a virtual 3D mesh and another structure 'torus_fem' is transforming a standard fem into a fem usable for the axisymmetric problem. Then it is possible to define a mesh_fem objet normally and all the standard bricks to define the problem just as it were a standard 3D problem.
Unfortunately, there is no available examples, but it should not be very difficult to use. The author of this tool is Lim Liang Jim. If you have some difficulties to use the tool, it would be possible to contact him.
Best regards,
Yves.
renard

support
Public
3  Normal
5  Normal
Problem with the Plastic deformation
0
None
I am trying to simulate an elastoplastic box hitting a rigid wall. I am facing some problem in this simulation (I have posted the code below and mesh file, and a snapshot of the result is provided).
1. very high value of Sigma_y need for successful iteration.
sigma_y = 100 didn't work, and E and 100*E worked
can we reduce the value of sigma_y for small deflection?
2. Why mesh is not uniformly deforming? and the cells close to the force application area are collapsing, and the cells after 2/3 layers are deforming very little.
3. small deformation and the release_dist value does not improve the result.
4. A Very high value of yield stress is not able to stop the material from yielding... but the simulation with elastic model gives a good result.
5. How to use a yield stress and strain plot data in this simulation.
Example:
strain  yield stress
0.1  100
0.2  200
0.3  300
... etc
Thanks in advance for the kind help :)
Regards,
Pankaj Kumar
============================================================
code
============================================================
import getfem as gf
import numpy as np
import sys
E = 21E6
nu = 0.3
clambda = E*nu/((1+nu)*(12*nu))
cmu = E/(2*(1+nu))
numberOfYieldPoints = 10
sigma_y = E
theta = 0.5; # Parameter for the generalized mid point scheme.
penalty_parameter = 10*E
r = 10*E # Augmentation parameter
alphaOut = 1
alphaIn = 1
release_dist = 1
load_steps = 1
f_coeff_rigid = 0
m = gf.Mesh("import", "gmsh", "./hollowbox.msh")
INNER_BOUNDARY = 2
OUTER_BOUNDARY = 1
N = m.dim();
print "dimensioin of the problem is: "+str(N)
mfu = gf.MeshFem(m,N)
mfu.set_classical_fem(2)
mflambdaOut = gf.MeshFem(m, N)
mflambdaOut.set_classical_fem(1)
mflambdaIn = gf.MeshFem(m, N)
mflambdaIn.set_classical_fem(1)
mfvm = gf.MeshFem(m)
mfvm.set_classical_discontinuous_fem(1)
mim = gf.MeshIm(m, 4)
mimContact = gf.MeshIm(m, 4)
# plasti parameters
mim_data = gf.MeshImData(mim, 1, [N, N])
mfxi=gf.MeshFem(m,1)
mfxi.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,2)'))
mfd=gf.MeshFem(m)
mfd.set_fem(gf.Fem('FEM_PK(3,2)'))
mfdu = gf.MeshFem(m)
mfdu.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,1)'))
mflambdaOut = gf.MeshFem(m, N)
mflambdaOut.set_classical_fem(1)
md=gf.Model('real');
md.add_fem_variable('u', mfu)
md.add_initialized_data('cmu', [cmu])
md.add_initialized_data('clambda', [clambda])
md.add_initialized_data("penalty_parameter", [penalty_parameter])
md.add_mass_brick(mim, "u", "penalty_parameter")
# plastic
md.add_initialized_data('sigma_y', sigma_y)
md.add_im_data('Previous_Epn', mim_data)
md.add_im_data('Epn', mim_data)
md.add_fem_data('xi', mfxi)
md.add_fem_data('Previous_xi', mfxi)
md.add_initialized_data('theta', [theta])
md.add_fem_data('Previous_u', mfu)
md.add_initialized_data("f_rigid", f_coeff_rigid)
md.add_initialized_data( 'r', [r] )
md.add_initialized_data('alphaOut', alphaOut)
md.add_filtered_fem_variable("mflambdaOut", mflambdaOut, OUTER_BOUNDARY)
md.add_small_strain_elastoplasticity_brick\
(mim, 'Prandtl Reuss', 'displacement only', 'u', 'xi', 'Previous_Epn', 'clambda', 'cmu', 'sigma_y', 'theta', 'timestep')
#md.add_isotropic_linearized_elasticity_brick(mim, 'u', 'clambda', 'cmu')
Ddata = np.zeros(N)
Ddata[0] = 1e6
load_steps = 50
md.add_initialized_data('Ddata', Ddata)
md.add_filtered_fem_variable('lambdaIn', mflambdaIn, INNER_BOUNDARY)
md.add_Dirichlet_condition_with_multipliers(mimContact, 'u', 'lambdaIn', INNER_BOUNDARY, 'Ddata');
# this method is slower... than the nodal method
ind_out = md.add_integral_large_sliding_contact_brick_raytracing("r", release_dist, "f_rigid", "alphaOut", 0)
md.add_slave_contact_boundary_to_large_sliding_contact_brick(ind_out, mimContact, OUTER_BOUNDARY, "u", "mflambdaOut", "")
md.add_rigid_obstacle_to_large_sliding_contact_brick(ind_out, "x+2", N)
# The contact condition
'''
obstacle = 'x+2'
cdof = mfu.dof_on_region(OUTER_BOUNDARY)
nbc = cdof.shape[0] / N
md.add_variable('lambda_n', nbc)
#md.add_initialized_data('r', [r])
md.add_nodal_contact_with_rigid_obstacle_brick(mim, 'u', 'lambda_n', 'r', OUTER_BOUNDARY, obstacle, 1);
'''
load_steps = 10
for nit in range(load_steps):
Ddata[0] = 1E1*(nit+1)
md.set_variable("Ddata", Ddata)
md.solve('max_res', 1E9, 'max_iter', 40, 'noisy', 'lsolver', 'superLu')
U = md.variable('u')
md.small_strain_elastoplasticity_next_iter\
(mim, 'Prandtl Reuss', 'displacement only', 'u', 'xi', 'Previous_Epn', 'clambda', 'cmu', 'sigma_y', 'theta', 'timestep')
Epn ='Norm(Epn)'
sigma1 = '(clambda*Trace(Sym(Grad_u))*Id(meshdim)+2*cmu*(Sym(Grad_u)Epn))'
von_mises = 'sqrt(3/2)*Norm(Deviator('+sigma1+'))'
VM = md.local_projection(mim, von_mises, mfvm);
if nit % 1 == 0:
filename = 'result_%d.vtk' % (nit)
mfvm.export_to_vtk(filename, mfvm, VM, 'VonMisesStresses', mfu, U, 'Displacements')
3402
None
1483337978
None
Open
Unlocked
None
1581
0
1152118865

support #1161 is dependent
panard
1483337978

Added result.png, #29620
mechamind

Added hollowbox.msh, #29619
mechamind
1483383092
Original_Submission
Dear Pankaj Kumar,
A few remarks on your code. First, you use a small deformation plasticity brick (a large deformation one is available
although not documented) so that the inversion of element could arrive. Of course, the deformation you draw is not a small deformation.
Second, you use an integral large deformation contact brick. A small deformation one should be more appropriate (and faster) if
you really intend to use a small deformation model.
Third, I would suggest you to use mumps instead of superlu, especially in 3D, it is really faster.
And finally for the difficulty you describe, did you check that the convergence was reached at each step ? May be smaller steps, expecially at the begining would be more appropriate.
Best regards,
Yves.
renard
1483507957
Original_Submission
Thanks for your detailed reply, and writing about the large deformation plastic brick (add_finite_strain_elastoplasticity_brick in PYTHON). My problem is intended to use large deformation characteristics.
I am still struggling to install the GetFEM++ with MUMPS in my Centos OS system, but I have a plan to use MUMPS once I successfully installed GetFEM with MUMPS.
I have also reduced the step size for the better convergence.
Right now I am facing problem in using the add_finite_strain_elastoplasticity_brick with the options required in this brick. Is it possible to provide the way to use this brick element?
I am getting errors like:
"The provided isotropic hardening function name 'sigma_y' is not defined." I don't find details to provide the strain hardening function for this brick.
With Regards,
Pankaj Kumar
mechamind

support
Public
3  Normal
5  Normal
defining user's predefined function for add_finite_strain_elastoplasticity_brick
0
None
Dear All:
I am trying to define predefined function of the hardening variable (both the yield limit and the hardening variable values are assumed to be Frobenius norms of appropriate stress and strain tensors, respectively).
I have a table for the material hardening to generate the predefined function.
strain  stress
eps1  sigma1_y
eps2  sigma2_y
eps3  sigma3_y
eps4  sigma4_y
etc..
Regards,
Pankaj Kumar
3403
None
1483681582
None
Open
Unlocked
None
1581
0
1483691479
Original_Submission
Dear Pankaj Kumar
You have two options:
A. Creat one C++ function which interpolates e.g. linearly in your tabulated data, like
double func_yield_lim(double plast_strain) {
if (plast_strain < eps1)
...
}
and a corresponding function which is the derivative (slope) of previous one, e.g.
double func_yield_lim_der(double plast_strain) {
if (plast_strain < eps1)
...
}
Don't forget to multiply your sigmas with sqrt(2/3) to convert from Von Mises or uniaxial stress to the standard Frobenius norm.
Then your predefined hardening function can be defined with
getfem::ga_define_function("yield_lim_der", func_yield_lim_der);
getfem::ga_define_function("yield_lim", func_yield_lim, "func_yield_lim_der");
B. Do some curve fitting in your favorite math software (e.g. Octave/Matlab) and then use the curve expression for defining the hardening law as a predefined function with
getfem::ga_define_function("yield_lim", "... your curve expression with t as argument");
Again don't forget the sqrt(2/3) factor.
BR
Kostas
logari81
1483886188

Added hollowbox.msh, #29640
mechamind

Added sliding_box_from_04_finite_plastic_v_code_06.py, #29639
mechamind

Added Selection_372.png, #29641
mechamind
Original_Submission
Dear Dr. Konstantinos Poulios,
Thanks for your reply.
I have chosen the method "B" to define the strain hardening function because I am using Python interface in the GetFEM++ library.
I am able to run the code with your method, but the code fails in the SOLVE function call with the error:
"Floating point exception (core dumped)".
Is it possible for you to help me resolve the problem?
I am attaching my code file and the mesh file to this message.
  W
> >  A
> >  L
  L
I am trying to solve a problem in which a box with a hole at the centre is pushed against a frictionless wall. This box undergoes the plastic deformation due to large deformation.
Any help would be highly appreciated.
With Regards,
Pankaj Kumar
(file #29639, file #29640, file #29641)
mechamind
1483887259

Added sliding_box_from_04_finite_plastic_v_code_06_NEW.py, #29642
mechamind
Original_Submission
sorry for posting the code with error in last post.
I am attaching the new code with discussed error with name:
sliding_box_from_04_finite_plastic_v_code_06_NEW.py
Regards,
Pankaj Kumar
(file #29642)
mechamind
1483889421
Original_Submission
Your example crashes due to a mesh_fem with zero dofs. I can see that at least mf_fem_data has zero dofs (you forgot to set a fem), so it is most probably the source of the problem. Otherwise look for other mesh_fems with zero degrees of freedom and fix their definition.
logari81

support
Public
3  Normal
5  Normal
Warning with add_finite_strain_elastoplasticity_brick in a simple beam case
0
None
Dear All,
I am trying to use the add_finite_strain_elastoplasticity_brick with a simple beam case fixed at the bottom, and a vertical force is applied to the top surface of the beam.
The solve function in this problem (also in other problems) gives Warning:
Warning in ../../src/gmm/gmm_dense_matrix_functions.h, line 84: Matrix is singular, may not have a square root
Can anyone please help to resolve this problem?
With Regards,
Pankaj Kumar
The code is posted below:
=========================================================
E = 21E6
nu = 0.3
clambda = E*nu/((1+nu)*(12*nu))
cmu = E/(2*(1+nu))
K = 160E12
m = gf.Mesh("import", "gmsh", "./column.msh")
TOP_BOUNDARY = 1
BOTTOM_BOUNDARY = 2
N = m.dim()
print "dimensioin of the problem is: "+str(N)
mfu = gf.MeshFem(m, N)
mfu.set_classical_fem(2)
mim = gf.MeshIm(m,4);
md = gf.Model('real')
md.add_fem_variable('u', mfu)
md.add_initialized_data('cmu', cmu)
md.add_initialized_data('clambda', clambda)
# plasti parameters
mfxi=gf.MeshFem(m,1)
mfxi.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,2)'))
mfdu = gf.MeshFem(m)
mfdu.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,1)'))
md.add_fem_data('mfdu', mfdu)
md.add_fem_variable('xi', mfxi)
md.add_initialized_data('cK', K)
mf_fem_data = gf.MeshFem(m, 6)
mf_fem_data.set_classical_fem(1)
md.add_fem_data('fem_data', mf_fem_data)
material_data = '100000*(2000 *pow(t,10) + 15000 *pow(t,9)  70000 *pow(t,8) + 20000 *pow(t,7)  300000 *pow(t,6) + 300000*pow(t,5)  200000 *pow(t,4) + 100000 *pow(t,3)  20000 *pow(t,2) + 3000 *t + 500)'
gf.asm_define_function('yield_lim', 1, material_data)
md.add_finite_strain_elastoplasticity_brick\
(mim, 'Simo Miehe', 'DISPLACEMENT AND PLASTIC MULTIPLIER', 'u', 'xi', 'mfdu', 'fem_data', 'cK', 'cmu', 'yield_lim')
Ddata = np.zeros(N)
Ddata[0] = 5
load_steps = 1
md.add_initialized_data('Ddata', Ddata)
md.add_Dirichlet_condition_with_multipliers(mim, 'u', 1, TOP_BOUNDARY, 'Ddata');
md.add_Dirichlet_condition_with_multipliers(mim, 'u', 1, BOTTOM_BOUNDARY);
for nit in range(load_steps):
md.solve('max_res', 1E9, 'max_iter', 1, 'noisy', 'lsolver', 'superLu')
U = md.variable('u')
md.finite_strain_elastoplasticity_next_iter\
(mim, 'Simo Miehe', 'DISPLACEMENT AND PLASTIC MULTIPLIER', 'u', 'xi', 'mfdu', 'fem_data', 'cK', 'cmu', 'yield_lim')
Epn ='Norm(mfdu)'
sigma1 = '(clambda*Trace(Sym(Grad_u))*Id(meshdim)+2*cmu*(Sym(Grad_u)Epn))'
von_mises = 'sqrt(3/2)*Norm(Deviator('+sigma1+'))'
VM = md.local_projection(mim, von_mises, mfvm);
if nit % 1 == 0:
filename = 'result_code03_%d.vtk' % (nit)
mfvm.export_to_vtk(filename, mfvm, VM, 'VonMisesStresses', mfu, U, 'Displacements')
3404
None
1483958676
None
Open
Unlocked
None
1581
0
1483958974
Original_Submission
sorry for missing the mesh file.
I am attaching the mesh file to this message.
With Regards,
Pankaj Kumar
(file #29644)
mechamind

Added column.msh, #29644
mechamind
1483959109
Original_Submission
Have you tested your code with a finite strain elasticity brick before trying finite strain plasticity?
I would recommend you to make your program run with finite strain elasticity first.
Moreover your bulk modulus
K = 160E12
is very high, corresponding to an almost incompressible material which will give you numerical issues.
logari81

support
Public
3  Normal
5  Normal
regarding finite strain elastoplastic brick
0
None
Hi,
I am sharing a copy of the code (at the end of the message) with the finite strain elastoplastic brick. Mesh is attahced as a file to this message. Thanks to Dr. Konstantinos Poulios for help to develop this code.
I am trying to validate the code with a perfect plastic case as shown below
 ____________
St / sigma_y
 /
./___strain______
using
1 (function legend). gf.asm_define_linear_hardening_function("yield_lim", sigma_y, H, True)
2 (equation legend). material_data = material_data = '2*10000''
gf.asm_define_function('yield_lim', 1, material_data)
by regenerating the stressstrain plot as shown in attached figure. I have also run the same case using finite strain elastic brick (elastic legend).
From the attached figure, I can not find the plastic brick generating good stressstrain plot, but the finite strain elastic brick can generate plot close to the analytical result.
With Regards,
Pankaj Kumar
============== code ===============================
E = 2E6
sigma_y = 2E4
H = 0 # perfect plastic
nu = 0.3
clambda = E*nu/((1+nu)*(12*nu))
cmu = E/(2*(1+nu))
m = gf.Mesh("import", "gmsh", "./column.msh")
TOP_BOUNDARY = 1
BOTTOM_BOUNDARY = 2
N = m.dim()
print "dimensioin of the problem is: "+str(N)
mfu = gf.MeshFem(m, N)
mfu.set_classical_fem(2)
mim = gf.MeshIm(m,4);
md = gf.Model('real')
md.add_fem_variable('u', mfu)
md.add_initialized_data('cmu', cmu)
md.add_initialized_data('clambda', clambda)
# plasti parameters
mfdu = gf.MeshFem(m)
#mfdu.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,1)'))
mfdu.set_classical_discontinuous_fem(1)
mfksi=gf.MeshFem(m,1)
mfksi.set_fem(gf.Fem('FEM_PK_DISCONTINUOUS(3,2)'))
mfvm = gf.MeshFem(m)
mfvm.set_classical_discontinuous_fem(1)
mimd1 = gf.MeshImData(mim, 1)
mim_data = gf.MeshImData(mim, 1, [3, 3])
md.add_im_data("gamma0", mimd1) # plastic multiplier value at previous time step
mimd6 = gf.MeshImData(mim, 1, [6])
md.add_im_data("invCp0", mimd6) # Components 11, 22, 33, 12, 13 and 23 of the plastic part
md.set_variable("invCp0", # of the inverse right Cauchy Green tensor at the
np.tile([1,1,1,0,0,0], # previous step.
mimd6.nbpts())) # Component 21 is equal to 12 and is omitted.
md.add_im_data('Epn', mim_data)
md.add_fem_variable('ksi', mfksi)
_K_ = "{0:.17g}".format(clambda+2*cmu/3) # Bulk modulus
_mu_ = "{0:.17g}".format(cmu) # Shear modulus
mf_fem_data = gf.MeshFem(m, 6)
mf_fem_data.set_classical_fem(1)
gf.asm_define_linear_hardening_function("yield_lim", sigma_y, H, True)
#material_data = material_data = '2*10000''
#gf.asm_define_function('yield_lim', 1, material_data)
md.add_finite_strain_elastoplasticity_brick\
(mim, 'Simo Miehe', 'DISPLACEMENT AND PLASTIC MULTIPLIER', 'u', 'ksi', 'gamma0', 'invCp0', _K_, _mu_, 'yield_lim')
Ddata = np.zeros(N)
push_displacement = 2E2
load_steps = 10
md.add_initialized_data('Ddata', Ddata)
md.add_Dirichlet_condition_with_multipliers(mim, 'u', 1, TOP_BOUNDARY, 'Ddata');
md.add_Dirichlet_condition_with_multipliers(mim, 'u', 1, BOTTOM_BOUNDARY);
for nit in range(load_steps):
Ddata[2] = push_displacement*(nit+1)
print "displacement :"
print Ddata
md.set_variable('Ddata', Ddata)
md.solve('max_res', 1E1, 'max_iter', 100, 'noisy', 'lsolver', 'superlu')
U = md.variable('u')
md.finite_strain_elastoplasticity_next_iter\
(mim, 'Simo Miehe', 'DISPLACEMENT AND PLASTIC MULTIPLIER', 'u', 'ksi', 'gamma0', 'invCp0', _K_, _mu_, 'yield_lim')
Epn ='Norm(gamma0)'
sigma1 = '(clambda*Trace(Sym(Grad_u))*Id(meshdim)+2*cmu*(Sym(Grad_u)Epn))'
von_mises = 'sqrt(3/2)*Norm(Deviator('+sigma1+'))'
VM = md.local_projection(mim, von_mises, mfvm);
if nit % 1 == 0:
filename = 'result_w_hardening_function_v03_%d.vtk' % (nit)
mfdu.export_to_vtk(filename, mfvm, VM, 'VM Stress', mfu, U, 'Displacements')
3405
None
1484108657
None
Open
Unlocked
None
1581
0
1484108658

Added figureplot.png, #29652
mechamind

Added column.msh, #29653
mechamind
1484199638
Original_Submission
I am sorry for the figure posted in the last message. I updated the last plot with the stress value at the centre of the column under compression... and attached to this message as a file: figureplotnew.png. I have also run the cases with two different meshes. The function "gf.asm_define_linear_hardening_function("yield_lim", sigma_y, H, True)" is showing the correct trend relative to the results with the asm_define_function using command:
material_data = material_data = sigma_y (value)
gf.asm_define_function('yield_lim', 1, material_data)
With Regards,
Pankaj Kumar
(file #29658)
mechamind

Added figureplotnew.png, #29658
mechamind
1484203266
Original_Submission
With the help of getfem_plasticity.cc I realized the requirement of multiplying sqrt(2./3.) in sigma_y0 and 2./3 in the t dependent parts.
With Regards,
Pankaj Kumar
mechamind