## Shell model in linear elasticity

Numerical methods and mathematical models of Elmer
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

### Shell model in linear elasticity

Hello,
I would like to use Elmer to calculate deflection of pressure vessel and I wonder if I can use shell model with 2d elements.
Should I use elastic plate solver to do that or linear elasticity is better choise?
In elastic plate solver I am able to define thickness but my model is not flat and I get error
ERROR:: ElementMetric: Degenerate 2D element:
If I use linear elasticity solver instead I din't found way to define thickness, so I was forced to use 3D model with large number of elements, so calculation takes ages.
What is the best way of performing this kind of calculation in Elmer?
Do I have to define symmetry boundary condition in this model by locking displacement in normal direction to symmetry plane or I can use model of whole pressure tank?

Jacek
raback
Posts: 3746
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: Shell model in linear elasticity

Hi Jacek

There is an undocumented shell solver that might be the best choice. It has some limitations though. Plate solver must have the mesh in (x,y) plane.

-Peter
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

### Re: Shell model in linear elasticity

Hi Peter,

Thank You for your response, it is very good news.
I would like to ask you how can I define this solver in Solver Input File and how can set boundary condition of pressure and symmetry for this solver?

Best regards,

Jacek
annier
Posts: 1141
Joined: 27 Aug 2013, 13:51
Antispam: Yes

### Re: Shell model in linear elasticity

Hi Jacek,
1. The solver can be defined in the Solver Input File as

Code: Select all

``````Solver 1
...
Procedure = "Filename" "AnyNameSolver"
...
End``````
where,
Filename.f90 is the name of the file containing solver subroutine (residing nearby to the sif, mesh files within the same directory for convenience). Also, AnyNameSolver is the subroutine's name within Filename.f90
i.e.

Code: Select all

``````SUBROUTINE AnyNameSolver( Model,Solver,dt,TransientSimulation )
...
Code
...
END SUBROUTINE AnyNameSolver``````
2. Before, executing via the ElmerSolver, the compilation of the solver has to be done by the elmerf90 command.

Code: Select all

``\$elmerf90  -o Filename.so Filename.f90``
This will produce Filename.so output (shared object) file from the Filename.f90 solver subroutine.

The following threads can be relevant for starting with:
viewtopic.php?f=3&t=3759&sid=d490ca6dec ... 4d9b439ca8
viewtopic.php?f=3&t=3754&sid=d490ca6dec ... 4d9b439ca8

Yours
Anil Kunwar
Last edited by annier on 31 Dec 2014, 16:08, edited 5 times in total.
Anil Kunwar
Department of Materials Engineering, KU Leuven, Belgium
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

### Re: Shell model in linear elasticity

Hi Anil,

Thank you for your help. I have successfully started solver using way you have written, but I found already compiled shellsolve.so file in /elmer/share/elmersolver/lib/ directory, so I just defined solver in solver input file.
But unfortunetly I had to define wrongly boundary condition and maybe compile solver as you told me because I still have same error:
ERROR:: ElementMetric: Degenerate 2D element: 0.0000000000000000
which suggested that this solver see as well only x-y plane. Could you tell me where can I find source code of shell solver in order to compile it?

Here is my sif to check what I did wrong:

Code: Select all

``````Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End

Simulation
Max Output Level = 4
Coordinate System = Cartesian 3D
Coordinate Mapping(3) = 1 2 3
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.ep
End

Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End

Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
Body Force = 1
End

Solver 2
Equation = Linear elasticity
Procedure = "ShellSolve" "ShellSolver"
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Direct
Linear System Direct Method = MUMPS
End

Solver 1
Equation = Result Output
Output Format = Vtu
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Exec Solver = After All
Output File Name = case
Binary Output = True
Single Precision = True
End

Equation 1
Name = "Equation 1"
Active Solvers(2) = 2 1
End

Material 1
Name = "Steel (stainless - generic)"
Porosity Model = van Genuchten
Thickness = 0.004
Poisson ratio = 0.285
Heat expansion Coefficient = 14.9e-6
Electric Conductivity = 1.824e6
Youngs modulus = 200.0e9
Heat Conductivity = 24.0
Sound speed = 5100.0
Heat Capacity = 460.0
Mesh Poisson ratio = 0.285
Density = 7925.0
Poisson ratio = 0.285
Youngs modulus = 200.0e9
End

Body Force 1
Name = "BodyForce 1"
Stress Pressure = 3.0e5
End

Boundary Condition 1
Target Boundaries(1) = 6
Name = "symmetry"
Normal-Tangential Displacement = True
Displacement 1 = 0
End``````
Thank you for your help again.

Best regards,

Jacek
raback
Posts: 3746
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

### Re: Shell model in linear elasticity

Hi Jacek

There seems to be two consistency tests "shell" and "shell2" among the source code under \$ELMERSRC/fem/tests.

The solver itself should be in \$ELMERSRC/fem/src/modules/ShellSolver.src

-Peter
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

### Re: Shell model in linear elasticity

Hi Peter,

I am going to try using this solver and I will report my results here.

Best regards and Happy New Year,

Jacek
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

### Re: Shell model in linear elasticity

Hi Peter,

I have succesfuly used shell solver after studing SIF from test folder.

Thank you

Jacek
pretzel21
Posts: 4
Joined: 01 Aug 2016, 23:45
Antispam: Yes

### Re: Shell model in linear elasticity

Hello, I wonder if I could piggy back off of this to ask for help. So, I downloaded the ShellSolver as proscribed in this thread and saved it as Shell Solver.f90. However, I don't think that elmerf90.bat was pointing to the right file because I did not have gfortran installed on the computer. It always errors about "cannot find the path specified"

How must I edit the elmerf90 and elmerf90.bat to accomodate my file placement? I am using Windows PowerShell in administrator mode and asked the powershell to do the following:

.\elmerf90 -o ShellSolver.dll ShellSolver.f90

elmerf90.bat:
@ECHO OFF
SET LIBDIR=%ELMER_HOME%/bin
SET INCLUDE=%ELMER_HOME%/share/elmersolver/include

SET FC=C:/Elmer-8.2-Release/bin/mingw-w64/x86_64-6.1.0-posix-seh-rt_vt-rev0/mingw64/bin/gfortran.exe

SET cmd=%FC% %* -fno-range-check -DCONTIG=,CONTIGUOUS -DMINGW32 -DWIN32 -DHAVE_EXECUTECOMMANDLINE -DUSE_ISO_C_BINDINGS -DUSE_ARPACK -O2 -g -DNDEBUG -shared -I"%INCLUDE%" -L"%LIBDIR%" -shared -lelmersolver
echo %cmd%
%cmd%

elmerf90:
#!/bin/sh -f

if test "\$ELMER_LIB" = ""; then
if test "\$ELMER_HOME" = ""; then
LIBDIR=C:/Program Files (x86)/Elmer/share/elmersolver/../../lib/elmersolver
INCLUDE=C:/Program Files (x86)/Elmer/share/elmersolver/include
else
LIBDIR=\$ELMER_HOME/lib/elmersolver
INCLUDE=\$ELMER_HOME/share/elmersolver/include
fi
else
LIBDIR=\$ELMER_LIB
INCLUDE=\$ELMER_LIB/../include
fi

if test "\$ELMER_Fortran_COMPILER" = ""; then
FC=c:/ElmerBuild/mingw/64/mingw64/bin/gfortran.exe
else
FC=\$ELMER_Fortran_COMPILER
fi

cmd="\$FC \$* -fno-range-check -DCONTIG=,CONTIGUOUS -DMINGW32 -DWIN32 -DHAVE_EXECUTECOMMANDLINE -DUSE_ISO_C_BINDINGS -DUSE_ARPACK -O2 -g -DNDEBUG -shared -I\$INCLUDE -L\$LIBDIR -shared -lelmersolver"
printf "%s " \$cmd
printf "\n"
\$FC \$* -fno-range-check -DCONTIG=,CONTIGUOUS -DMINGW32 -DWIN32 -DHAVE_EXECUTECOMMANDLINE -DUSE_ISO_C_BINDINGS -DUSE_ARPACK -O2 -g -DNDEBUG -shared -I\$INCLUDE -L\$LIBDIR -shared -lelmersolver
# \$FC -fno-range-check \$*
#\$FC \$INCLUDE \$*
#\$FC \$INCLUDE \$* -L\$LIBDIR -lelmersolver

Thank you!!
Attachments
ShellSolver.f90
mzenker
Posts: 1997
Joined: 07 Dec 2009, 11:49
Location: Germany

### Re: Shell model in linear elasticity

Hi,

you don't need to specify the output file name under Windoze.

Code: Select all

``elmerf90 ShellSolver.f90``
should be enough.

HTH,

Matthias