Skip to content

Commit

Permalink
Started working on the 2D pendulum CSM case (issue #6)
Browse files Browse the repository at this point in the history
Merge branch 'case-6-pendulum-csm' of github.com:feelpp/toolbox into case-pendulum2D-csm
  • Loading branch information
francoisdh committed Oct 10, 2018
2 parents 2faeeff + 44f8285 commit 12eeb3d
Show file tree
Hide file tree
Showing 13 changed files with 323 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cases
title: Feel++ Toolbox Cases Guide
version: '0.106'
version: '0.106-case-pendulum2D-csm'
nav:
- modules/ROOT/nav.adoc
- modules/csm/nav.adoc
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions examples/modules/csm/examples/pendulum2D/pendulum2D.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

directory=toolboxes/solid/pendulum/
case.dimension=2
case.discretization=P2 #P1,P2

[solid]
filename=$cfgdir/pendulum2D.json

mesh.filename=$cfgdir/pendulum2D.geo

material_law=StVenantKirchhoff# StVenantKirchhoff, NeoHookean


# # precondtioner config
pc-type=gamg #lu,gasm,ml
ksp-monitor=1
# ksp-converged-reason=1



[ts]
time-step=0.01
time-final=10
#restart=true
restart.at-last-save=true
#time-initial=0.0002
#save.freq=2
file-format=hdf5
16 changes: 16 additions & 0 deletions examples/modules/csm/examples/pendulum2D/pendulum2D.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
h=0.1;
Point(1) = { 0,0,0,h};
Point(2) = {-0.5,-3,0,h};
Point(3) = { 0.5,-3,0,h};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 1};
Line Loop(4) = {1, 2, 3};
Plane Surface(5) = {4};
Rotate {{0, 0, 1}, {0, 0, 0}, Pi/4} {
Surface{5};
}

Physical Point("AxeFixed") = {1};
Physical Line("SolidBoundary") = {1,2,3};
Physical Surface("Solid") = {5};
61 changes: 61 additions & 0 deletions examples/modules/csm/examples/pendulum2D/pendulum2D.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"Name": "Pendulum Solid Mechanics ",
"ShortName":"Solid",
"Models":
{
"equations":"Hyper-Elasticity"
},
// tag::parameters[]
"Parameters":
{
"gravity":"9.80665"
},
//end::parameters[]
// tag::materials[]
"Materials":
{
"Solid":
{
"E":"128e6", // N/mm^2
"nu":"0.33", //
"rho":"8920" // kg/mm^3
}
},
// end::materials[]
// tag::boundaryconditions[]
"BoundaryConditions":
{
"displacement":
{
"Dirichlet":
{
"AxeFixed":
{
"expr":"{0,0}"
}
},

"VolumicForces":
{
"":
{
"expr":"{0,-gravity*8920}:gravity"
}
}
}

},
// end::boundaryconditions[]
"PostProcess":
{
"Exports":
{
"fields":["displacement","pid","Von-Mises"]
},
"Measures":
{
"VolumeVariation":""
}
}

}
28 changes: 28 additions & 0 deletions examples/modules/csm/examples/pendulum3D/pendulum3D.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

directory=toolboxes/solid/pendulum/
case.dimension=3
case.discretization=P2 #P1,P2

[solid]
filename=$cfgdir/pendulum3D.json

mesh.filename=$cfgdir/pendulum3D.geo

material_law=StVenantKirchhoff# StVenantKirchhoff, NeoHookean


# # precondtioner config
pc-type=gamg #lu,gasm,ml
ksp-monitor=1
# ksp-converged-reason=1



[ts]
time-step=0.01
time-final=10
#restart=true
restart.at-last-save=true
#time-initial=0.0002
#save.freq=2
file-format=hdf5
22 changes: 22 additions & 0 deletions examples/modules/csm/examples/pendulum3D/pendulum3D.geo
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
h=0.1;
Point(1) = { 0,0,0,h};
Point(2) = {-0.5,-3,0,h};
Point(3) = { 0.5,-3,0,h};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 1};
Line Loop(4) = {1, 2, 3};
Plane Surface(5) = {4};
Rotate {{0, 0, 1}, {0, 0, 0}, Pi/4} {
Surface{5};
}
Extrude {0, 0, 1} {
Surface{5};
}
/*Surface Loop(23) = {22, 13, 5, 17, 21};
Volume(24) = {23};
*/
Physical Line("AxeFixed") = {11};
Physical Surface("SolidBoundary") = {21, 5, 13, 22, 17};
Physical Volume("Solid") = {1};

61 changes: 61 additions & 0 deletions examples/modules/csm/examples/pendulum3D/pendulum3D.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"Name": "Pendulum Solid Mechanics ",
"ShortName":"Solid",
"Models":
{
"equations":"Hyper-Elasticity"
},
// tag::parameters[]
"Parameters":
{
"gravity":"9.80665"
},
//end::parameters[]
// tag::materials[]
"Materials":
{
"Solid":
{
"E":"128e6", // N/mm^2
"nu":"0.33", //
"rho":"8920" // kg/mm^3
}
},
// end::materials[]
// tag::boundaryconditions[]
"BoundaryConditions":
{
"displacement":
{
"Dirichlet":
{
"AxeFixed":
{
"expr":"{0,0,0}"
}
},

"VolumicForces":
{
"":
{
"expr":"{0,0,-gravity*8920}:gravity"
}
}
}

},
// end::boundaryconditions[]
"PostProcess":
{
"Exports":
{
"fields":["displacement","pid","Von-Mises"]
},
"Measures":
{
"VolumeVariation":""
}
}

}
2 changes: 2 additions & 0 deletions examples/modules/csm/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
*** xref:sheet-rounding/index.adoc[Effect of sheet rounding]
*** xref:t-beam/index.adoc[T-Beam]
*** xref:vierendeel-truss/index.adoc[Vierendeel Truss]
*** xref:pendulum2D/index.adoc[Pendulum 2D]
*** xref:pendulum3D/index.adoc[Pendulum 3D]
8 changes: 8 additions & 0 deletions examples/modules/csm/pages/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,11 @@
|===
| image:vierendeel-truss/image1.png[Vierendeel Truss,100%] | A Vierendeel truss is a lightweight deep beam or girder structural concept. The goal of this exercise is to determine the deformation and stress state of the aluminium Vierendeel truss shown below, in particular the maximum stress around the lightening holes.
|===


=== xref:pendulum2D/index.adoc[Pendulum 2D]

[cols="1,3"]
|===
| image:pendulum/2Dimage1.png[Pendulum 2D,100%] | 2D Pendulum oscillating, using Hyper-Elasticity equation.
|===
96 changes: 96 additions & 0 deletions examples/modules/csm/pages/pendulum2D/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
= 2D Pendulum
:toc: left
:uri-data: https://github.com/feelpp/toolbox/blob/master/examples/modules/csm/examples
:uri-data-edit: https://github.com/feelpp/toolbox/edit/master/examples/modules/csm/examples
_describe context of the example and the example itself, use refs below if available_


== Running the case

The command line to run this case is


[[command-line2D]]
[source,sh]
----
mpirun -np 4 feelpp_toolbox_solid --case "github:{repo:toolbox,path:examples/modules/csm/examples/pendulum/pendulum2D}
----

++++
<button class="btn" data-clipboard-target="#command-line2D">
Copy 3D command line to clipboard
</button>
<button class="btn" data-clipboard-text="github:{repo:toolbox,path:examples/modules/csm/examples/pendulum/pendulum2D}">
Copy case 2D option to clipboard
</button>
++++

== Data files

The case data files are available in Github link:{uri-data}/pendulum/[here]


* link:{uri-data}/pendulum/pendulum2D/pendulum2D.cfg[CFG file] - [link:{uri-data-edit}/pendulum/pendulum2D/pendulum2D.cfg[Edit the file]]
* link:{uri-data}/pendulum/pendulum2D/pendulum2D.json[JSON file] - [link:{uri-data-edit}/pendulum/pendulum2D/pendulum2D.json[Edit the file]]

== Geometry

The pendulum is a triangle-shaped mesh.

image:pendulum/mesh2D.png[50%]
The mesh can be retrieved from girder with the following ID: 5b200dcbb0e9570499f66bfb (see xref:contribute:girder:README.adoc[girder]).

== Input parameters

[options="header"]
|===
| Name |Description | Value | Unit |
|===

=== Model & Toolbox

We use the Hyper-Elasticity model.
The model is described in the CSM toolbox documentation, see xref:toolboxes:csm:index.adoc[Computational Solid Mechanics]


=== Materials

[source,json]
----
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=params]
----

== Boundary conditions
We use .....


[source,json,,indent=0]
----
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=bc]
----

== Outputs

describe the output set of the example

[source,json]
----
include::{examplesdir}/pendulum/pendulum2D/pendulum2D.json[tags=export]
----
== Video

The video below shows the torsion of the beam at different steps.

++++
<div class="videoblock">
<div class="title">Torsion of a NeoHookean beam</div>
<div class="stretchy-wrapper-16_9">
<div class="content" style="margin: auto; width: 100%; height: 100%">
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/SUAqM6liXII" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
++++
=== Fields

add scalar vectorial and matricial fields to be visualized

0 comments on commit 12eeb3d

Please sign in to comment.