Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
tutorials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
documentation
tutorials
Commits
c9549fb0
Commit
c9549fb0
authored
6 years ago
by
Ruth Sabariego
Browse files
Options
Downloads
Patches
Plain Diff
slightly clearer and straightforward...
parent
0af0b829
No related branches found
No related tags found
No related merge requests found
Pipeline
#1958
passed
6 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Elasticity/wrench2D.pro
+55
-45
55 additions, 45 deletions
Elasticity/wrench2D.pro
with
55 additions
and
45 deletions
Elasticity/wrench2D.pro
+
55
−
45
View file @
c9549fb0
/* -------------------------------------------------------------------
Tutorial 3 : linear elastic model of a wrench
Tutorial 3 : linear elastic model of a wrench
Features:
- "grad u" GetDP specific formulation for linear elasticity
- first and second order elements
- triangular and quadrangular elements
Features:
- "grad u" GetDP specific formulation for linear elasticity
- first and second order elements
- triangular and quadrangular elements
To compute the solution interactively from the Gmsh GUI:
To compute the solution in a terminal:
getdp wrench2D.pro -solve Elast_u -pos pos
To compute the solution interactively from the Gmsh GUI:
File > Open > wrench.pro
Run (button at the bottom of the left panel)
------------------------------------------------------------------- */
/*
Linear elasticity with GetDP:
GetDP has a peculiar way to deal with linear elasticity. Instead of a vector
field "u = Vector[ ux, uy, uz ]", the displacement field
is regarded as two
(2D case) or
3
(3D case) scalar fields.
Unlike conventional formulations
then
, GetDP
's
formulation is written in terms
of the gradient "grad u" of the
displacement field, which is a non-symmetric
tensor, and the needed
symmetrization (to define the strain tensor and relate
it to the stress
tensor) is done
through
the constitutive relationship (Hooke law).
The
reason for t
his unusual formulation
is to be able to use also for elastic
problems the powerful geometrical and homological kernel of GetDP, which
relies on the operators grad, curl and div.
The "grad u" formulation entails a small increase of assembly work but makes
in
co
unterpart lots of geometrical features implemented in GetDP (change of
coordinates, function spaces, etc...) applicable to elastic problems
out-of-the-box, since the scalar fields { ux, uy, uz } have exactly the sam
e
geometrical properties as, e.g. a scalar electric potential or a temperature
field.
*/
/*
Particularities of linear elasticity in GetDP:
Instead of a vector
field "u = Vector[ ux, uy, uz ]", the displacement field
is regarded as two
(2D case) or
three
(3D case) scalar fields.
Unlike conventional formulations
, GetDP formulation is
then
written in terms
of the gradient "grad u" of the
displacement field, which is a non-symmetric
tensor, and the needed
symmetrization (to define the strain tensor and relate
it to the stress
tensor) is done
via
the constitutive relationship (Hooke law).
T
his unusual formulation
allows to take advantage of the powerful geometrical
and homological GetDP kernel, which relies on the operators grad, curl and div.
The "grad u" formulation entails a small increase of assembly work but makes
in counterpart lots of geometrical features implemented in GetDP (change of
co
ordinates, function spaces, etc...) applicable to elastic problems
out-of-the-box, since the scalar fields { ux, uy, uz } have exactly the same
geometrical properties as, e.g. an electric scalar potential or a temperatur
e
field.
*/
Include
"wrench2D_common.pro"
;
...
...
@@ -54,24 +57,30 @@ Group {
Sur_Clamp_Mec
=
Region
[
Grip
];
Sur_Force_Mec
=
Region
[
Force
];
/*
Signification of the
abstract regions:
/*
Meaning of
abstract regions:
- Vol_Mec : Elastic domain
- Vol_Force_Mec : Region with imposed volum
ic
force
- Vol_Force_Mec : Region with imposed volum
e
force
- Sur_Force_Mec : Surface with imposed surface traction
- Sur_Clamp_Mec : Surface with imposed zero displacements (all components) */
}
Function
{
/* Material coefficients.
No need to define them regionwise here ( E[{Wrench}] = ... ; )
as there is only one region in this model. */
/*
Material coefficients
No need of regionwise definition ( E[{Wrench}] = ... ; )
as this model comprises only one region.
If there is more than one region and coefficients are not particularised,
the same value holds for all of them.
*/
E
[]
=
Young
;
nu
[]
=
Poisson
;
/* Components of the volumic force applied to the region "Vol_Force_Mec"
Gravity could be defined here ( force_y[] = 7000*9.81; ) ; */
/*
Volume force components applied to the region "Vol_Force_Mec"
Gravity could be defined here as well ( force_y[] = 7000*9.81; ) ;
*/
force_x
[]
=
0
;
force_y
[]
=
0
;
/*
Components of the s
urface traction force applied to the region "Sur_Force_Mec" */
/*
S
urface traction force
components
applied to the region "Sur_Force_Mec" */
pressure_x
[]
=
0
;
pressure_y
[]
=
-
AppliedForce
/
(
SurfaceArea
[]
*
Thickness
);
// downward vertical force
}
...
...
@@ -82,7 +91,7 @@ Function {
sigma_ij = C_ijkl epsilon_ij
is represented in 2D by
4
2x2 tensors C_ij[], i,j=1,2, depending on the Lamé
is represented in 2D by
four
2x2 tensors C_ij[], i,j=1,2, depending on the Lamé
coefficients of the isotropic linear material,
lambda = E[]*nu[]/(1.+nu[])/(1.-2.*nu[])
...
...
@@ -94,7 +103,8 @@ Function {
EPD: a[] = lambda + 2 mu b[] = mu c[] = lambda
3D: a[] = lambda + 2 mu b[] = mu c[] = lambda
respectively for the 2D plane strain (EPD), 2D plane stress (EPS) and 3D cases. */
respectively for the 2D plane strain (EPD), 2D plane stress (EPS) and 3D cases.
*/
Function
{
Flag_EPC
=
1
;
...
...
@@ -128,7 +138,7 @@ Constraint {
}
}
/* As
explai
ned above, the displacement field is discretized as two scalar
/* As
mentio
ned above, the displacement field is discretized as two scalar
fields "ux" and "uy", which are the spatial components of the vector field
"u" in a fixed Cartesian coordinate system.
...
...
@@ -143,17 +153,17 @@ Constraint {
u . n = ux Cos [th] + uy Sin [th] = ... ;
are less naturally accounted for within the "grad u" formulation; but they
could be easily implemented with a Lagrange multplier.
could be easily implemented with
e.g.
a Lagrange mult
i
plier.
F
inite element shape (triangles or quadrangles
) makes no difference in the
definition of the FunctionSpaces. The appropriate shape functions
to be used
The f
inite element shape (
e.g.
triangles or quadrangles
in 2D) has no influence
in the
definition of the FunctionSpaces. The appropriate shape functions
are determined by GetDP at a much lower level on basis of the information
contained in the *.msh file.
Second order elements
, on the other hand, are implemented in the hierarchical
fashion by adding to the first
order node-based shape functions a set of
second order edge-based functions to complete a basis for 2d order
polynomials on the reference element.
*/
Second order elements
are hierarchically implemented by adding to the first
order node-based shape functions a set of
second order edge-based functions
to complete a basis for 2D order polynomials on the reference element.
*/
// Domain of definition of the "ux" and "uy" FunctionSpaces
Group
{
...
...
@@ -217,8 +227,8 @@ Jacobian {
}
}
/* Adapt the number of Gauss points to the polynomial degree of the finite elements
is
as
simple
as this
: */
/* Adapt
ing
the number of Gauss points to the polynomial degree of the finite elements
is simple: */
Integration
{
{
Name
Gauss_v
;
Case
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment